Sfoglia il codice sorgente

cmd/protoc-gen-go: unexport implementation-specific XXX fields

We modify protoc-gen-go to stop generating exported XXX fields.
The unsafe implementation is unaffected by this change since unsafe
can access fields regardless of visibility. However, for the purego
implementation, we need to respect Go visibility rules as enforced
by the reflect package.

We work around this by generating a exporter function that given
a reference to the message and the field to export, returns a reference
to the unexported field value. This exporter function is protected by
a constant such that it is not linked into the final binary in non-purego
build environment.

Updates golang/protobuf#276

Change-Id: Idf5c1f158973fa1c61187ff41440acb21c5dac94
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/185141
Reviewed-by: Damien Neil <dneil@google.com>
Joe Tsai 6 anni fa
parent
commit
c0e4bb2054
82 ha cambiato i file con 7567 aggiunte e 5114 eliminazioni
  1. 26 6
      cmd/protoc-gen-go-grpc/testdata/grpc/grpc.pb.go
  2. 83 26
      cmd/protoc-gen-go/internal_gengo/main.go
  3. 21 0
      cmd/protoc-gen-go/internal_gengo/reflect.go
  4. 15 4
      cmd/protoc-gen-go/testdata/annotations/annotations.pb.go
  5. 1 1
      cmd/protoc-gen-go/testdata/annotations/annotations.pb.go.meta
  6. 75 19
      cmd/protoc-gen-go/testdata/comments/comments.pb.go
  7. 15 4
      cmd/protoc-gen-go/testdata/comments/deprecated.pb.go
  8. 33 9
      cmd/protoc-gen-go/testdata/extensions/base/base.pb.go
  9. 104 28
      cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
  10. 15 4
      cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go
  11. 14 3
      cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go
  12. 27 7
      cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go
  13. 17 6
      cmd/protoc-gen-go/testdata/import_public/a.pb.go
  14. 16 5
      cmd/protoc-gen-go/testdata/import_public/b.pb.go
  15. 15 4
      cmd/protoc-gen-go/testdata/import_public/c.pb.go
  16. 30 8
      cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go
  17. 14 3
      cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go
  18. 14 3
      cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go
  19. 14 3
      cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go
  20. 27 7
      cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
  21. 14 3
      cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go
  22. 14 3
      cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go
  23. 14 3
      cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go
  24. 14 3
      cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go
  25. 14 3
      cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go
  26. 15 4
      cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
  27. 15 4
      cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
  28. 19 8
      cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go
  29. 15 4
      cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go
  30. 16 5
      cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go
  31. 28 8
      cmd/protoc-gen-go/testdata/proto2/enum.pb.go
  32. 79 23
      cmd/protoc-gen-go/testdata/proto2/fields.pb.go
  33. 41 12
      cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go
  34. 16 5
      cmd/protoc-gen-go/testdata/proto2/proto2.pb.go
  35. 63 43
      cmd/protoc-gen-go/testdata/proto3/fields.pb.go
  36. 311 132
      encoding/testprotos/pb2/test.pb.go
  37. 113 48
      encoding/testprotos/pb3/test.pb.go
  38. 3 3
      internal/impl/codec_message.go
  39. 32 14
      internal/impl/message.go
  40. 12 12
      internal/impl/message_field.go
  41. 23 8
      internal/impl/pointer_reflect.go
  42. 3 1
      internal/impl/pointer_unsafe.go
  43. 15 4
      internal/testprotos/benchmarks/benchmarks.pb.go
  44. 87 67
      internal/testprotos/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.pb.go
  45. 87 67
      internal/testprotos/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.pb.go
  46. 95 66
      internal/testprotos/benchmarks/datasets/google_message2/benchmark_message2.pb.go
  47. 693 392
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3.pb.go
  48. 355 394
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_1.pb.go
  49. 388 418
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_2.pb.go
  50. 380 411
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_3.pb.go
  51. 346 386
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_4.pb.go
  52. 349 389
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_5.pb.go
  53. 360 397
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_6.pb.go
  54. 141 49
      internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_7.pb.go
  55. 376 414
      internal/testprotos/benchmarks/datasets/google_message4/benchmark_message4.pb.go
  56. 356 393
      internal/testprotos/benchmarks/datasets/google_message4/benchmark_message4_1.pb.go
  57. 601 284
      internal/testprotos/benchmarks/datasets/google_message4/benchmark_message4_2.pb.go
  58. 54 16
      internal/testprotos/conformance/conformance.pb.go
  59. 117 48
      internal/testprotos/conformance/test_messages_proto2.pb.go
  60. 59 30
      internal/testprotos/conformance/test_messages_proto3.pb.go
  61. 15 4
      internal/testprotos/irregular/test.pb.go
  62. 26 15
      internal/testprotos/legacy/legacy.pb.go
  63. 250 75
      internal/testprotos/test/test.pb.go
  64. 14 3
      internal/testprotos/test/test_import.pb.go
  65. 14 3
      internal/testprotos/test/test_public.pb.go
  66. 15 4
      internal/testprotos/test/weak/test_weak.pb.go
  67. 43 14
      internal/testprotos/test3/test.pb.go
  68. 14 3
      internal/testprotos/test3/test_import.pb.go
  69. 54 14
      reflect/protoregistry/testprotos/test.pb.go
  70. 3 0
      runtime/protoimpl/impl.go
  71. 398 135
      types/descriptorpb/descriptor.pb.go
  72. 15 4
      types/known/anypb/any.pb.go
  73. 41 12
      types/known/apipb/api.pb.go
  74. 15 4
      types/known/durationpb/duration.pb.go
  75. 14 3
      types/known/emptypb/empty.pb.go
  76. 15 4
      types/known/fieldmaskpb/field_mask.pb.go
  77. 15 4
      types/known/sourcecontextpb/source_context.pb.go
  78. 41 12
      types/known/structpb/struct.pb.go
  79. 15 4
      types/known/timestamppb/timestamp.pb.go
  80. 67 20
      types/known/typepb/type.pb.go
  81. 119 36
      types/known/wrapperspb/wrappers.pb.go
  82. 55 17
      types/pluginpb/plugin.pb.go

+ 26 - 6
cmd/protoc-gen-go-grpc/testdata/grpc/grpc.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type Request struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Request) Reset() {
@@ -47,9 +46,8 @@ func (*Request) Descriptor() ([]byte, []int) {
 }
 
 type Response struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Response) Reset() {
@@ -147,6 +145,28 @@ func file_grpc_grpc_proto_init() {
 	if File_grpc_grpc_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_grpc_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Request); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_grpc_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Response); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_grpc_grpc_proto_rawDesc,

+ 83 - 26
cmd/protoc-gen-go/internal_gengo/main.go

@@ -39,6 +39,22 @@ const (
 	// generateOneofWrapperMethods specifies whether to generate
 	// XXX_OneofWrappers methods on messages with oneofs.
 	generateOneofWrapperMethods = false
+
+	// generateNoUnkeyedLiteralFields specifies whether to generate
+	// the XXX_NoUnkeyedLiteral field.
+	generateNoUnkeyedLiteralFields = false
+
+	// generateExportedSizeCacheFields specifies whether to generate an exported
+	// XXX_sizecache field instead of an unexported sizeCache field.
+	generateExportedSizeCacheFields = false
+
+	// generateExportedUnknownFields specifies whether to generate an exported
+	// XXX_unrecognized field instead of an unexported unknownFields field.
+	generateExportedUnknownFields = false
+
+	// generateExportedExtensionFields specifies whether to generate an exported
+	// XXX_InternalExtensions field instead of an unexported extensionFields field.
+	generateExportedExtensionFields = false
 )
 
 const (
@@ -54,11 +70,28 @@ const (
 type fileInfo struct {
 	*protogen.File
 
-	allEnums         []*protogen.Enum
-	allEnumsByPtr    map[*protogen.Enum]int // value is index into allEnums
-	allMessages      []*protogen.Message
-	allMessagesByPtr map[*protogen.Message]int // value is index into allMessages
-	allExtensions    []*protogen.Extension
+	allEnums      []*protogen.Enum
+	allMessages   []*protogen.Message
+	allExtensions []*protogen.Extension
+
+	allEnumsByPtr         map[*protogen.Enum]int    // value is index into allEnums
+	allMessagesByPtr      map[*protogen.Message]int // value is index into allMessages
+	allMessageFieldsByPtr map[*protogen.Message]*structFields
+}
+
+type structFields struct {
+	count      int
+	unexported map[int]string
+}
+
+func (sf *structFields) append(name string) {
+	if r, _ := utf8.DecodeRuneInString(name); !unicode.IsUpper(r) {
+		if sf.unexported == nil {
+			sf.unexported = make(map[int]string)
+		}
+		sf.unexported[sf.count] = name
+	}
+	sf.count++
 }
 
 // GenerateFile generates the contents of a .pb.go file.
@@ -90,8 +123,10 @@ func GenerateFile(gen *protogen.Plugin, file *protogen.File) *protogen.Generated
 	}
 	if len(f.allMessages) > 0 {
 		f.allMessagesByPtr = make(map[*protogen.Message]int)
+		f.allMessageFieldsByPtr = make(map[*protogen.Message]*structFields)
 		for i, m := range f.allMessages {
 			f.allMessagesByPtr[m] = i
+			f.allMessageFieldsByPtr[m] = new(structFields)
 		}
 	}
 
@@ -347,15 +382,28 @@ func genMessage(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, me
 	}
 	g.Annotate(message.GoIdent.GoName, message.Location)
 	g.P("type ", message.GoIdent, " struct {")
+	sf := f.allMessageFieldsByPtr[message]
 	for _, field := range message.Fields {
 		if field.Oneof != nil {
 			// It would be a bit simpler to iterate over the oneofs below,
 			// but generating the field here keeps the contents of the Go
 			// struct in the same order as the contents of the source
 			// .proto file.
-			if field == field.Oneof.Fields[0] {
-				genOneofField(gen, g, f, message, field.Oneof)
+			oneof := field.Oneof
+			if field != oneof.Fields[0] {
+				continue // already generated oneof field for first entry
+			}
+			if g.PrintLeadingComments(oneof.Location) {
+				g.P("//")
+			}
+			g.P("// Types that are valid to be assigned to ", oneofFieldName(oneof), ":")
+			for _, field := range oneof.Fields {
+				g.PrintLeadingComments(field.Location)
+				g.P("//\t*", fieldOneofType(field))
 			}
+			g.Annotate(message.GoIdent.GoName+"."+oneofFieldName(oneof), oneof.Location)
+			g.P(oneofFieldName(oneof), " ", oneofInterfaceName(oneof), " `protobuf_oneof:\"", oneof.Desc.Name(), "\"`")
+			sf.append(oneofFieldName(oneof))
 			continue
 		}
 		g.PrintLeadingComments(field.Location)
@@ -378,19 +426,42 @@ func genMessage(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, me
 		g.Annotate(message.GoIdent.GoName+"."+field.GoName, field.Location)
 		g.P(field.GoName, " ", goType, " `", strings.Join(tags, " "), "`",
 			deprecationComment(field.Desc.Options().(*descriptorpb.FieldOptions).GetDeprecated()))
+		sf.append(field.GoName)
 	}
-	g.P("XXX_NoUnkeyedLiteral struct{} `json:\"-\"`")
 
+	if generateNoUnkeyedLiteralFields {
+		g.P("XXX_NoUnkeyedLiteral", " struct{} `json:\"-\"`")
+		sf.append("XXX_NoUnkeyedLiteral")
+	}
+	if generateExportedSizeCacheFields {
+		g.P("XXX_sizecache", " ", protoimplPackage.Ident("SizeCache"), " `json:\"-\"`")
+		sf.append("XXX_sizecache")
+	} else {
+		g.P("sizeCache", " ", protoimplPackage.Ident("SizeCache"))
+		sf.append("sizeCache")
+	}
+	if generateExportedUnknownFields {
+		g.P("XXX_unrecognized", " ", protoimplPackage.Ident("UnknownFields"), " `json:\"-\"`")
+		sf.append("XXX_unrecognized")
+	} else {
+		g.P("unknownFields", " ", protoimplPackage.Ident("UnknownFields"))
+		sf.append("unknownFields")
+	}
 	if message.Desc.ExtensionRanges().Len() > 0 {
+		// TODO: Remove this tag when we drop v1 support.
 		var tags []string
 		if message.Desc.Options().(*descriptorpb.MessageOptions).GetMessageSetWireFormat() {
 			tags = append(tags, `protobuf_messageset:"1"`)
 		}
-		tags = append(tags, `json:"-"`)
-		g.P("XXX_InternalExtensions ", protoimplPackage.Ident("ExtensionFields"), " `", strings.Join(tags, " "), "`")
+		if generateExportedExtensionFields {
+			tags = append(tags, `json:"-"`)
+			g.P("XXX_InternalExtensions", " ", protoimplPackage.Ident("ExtensionFields"), " `", strings.Join(tags, " "), "`")
+			sf.append("XXX_InternalExtensions")
+		} else {
+			g.P("extensionFields", " ", protoimplPackage.Ident("ExtensionFields"), " `", strings.Join(tags, " "), "`")
+			sf.append("extensionFields")
+		}
 	}
-	g.P("XXX_unrecognized ", protoimplPackage.Ident("UnknownFields"), " `json:\"-\"`")
-	g.P("XXX_sizecache ", protoimplPackage.Ident("SizeCache"), " `json:\"-\"`")
 	g.P("}")
 	g.P()
 
@@ -744,20 +815,6 @@ var wellKnownTypes = map[protoreflect.FullName]bool{
 	"google.protobuf.Value":       true,
 }
 
-// genOneofField generates the struct field for a oneof.
-func genOneofField(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, message *protogen.Message, oneof *protogen.Oneof) {
-	if g.PrintLeadingComments(oneof.Location) {
-		g.P("//")
-	}
-	g.P("// Types that are valid to be assigned to ", oneofFieldName(oneof), ":")
-	for _, field := range oneof.Fields {
-		g.PrintLeadingComments(field.Location)
-		g.P("//\t*", fieldOneofType(field))
-	}
-	g.Annotate(message.GoIdent.GoName+"."+oneofFieldName(oneof), oneof.Location)
-	g.P(oneofFieldName(oneof), " ", oneofInterfaceName(oneof), " `protobuf_oneof:\"", oneof.Desc.Name(), "\"`")
-}
-
 // genOneofGetter generate a Get method for a oneof.
 func genOneofGetter(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, message *protogen.Message, oneof *protogen.Oneof) {
 	g.Annotate(message.GoIdent.GoName+".Get"+oneof.GoName, oneof.Location)

+ 21 - 0
cmd/protoc-gen-go/internal_gengo/reflect.go

@@ -154,6 +154,27 @@ func genReflectFileDescriptor(gen *protogen.Plugin, g *protogen.GeneratedFile, f
 	}
 
 	if len(f.allMessages) > 0 {
+		// Populate MessageInfo.Exporters.
+		g.P("if !", protoimplPackage.Ident("UnsafeEnabled"), " {")
+		for _, message := range f.allMessages {
+			if sf := f.allMessageFieldsByPtr[message]; len(sf.unexported) > 0 {
+				idx := f.allMessagesByPtr[message]
+				typesVar := messageTypesVarName(f)
+
+				g.P(typesVar, "[", idx, "].Exporter = func(v interface{}, i int) interface{} {")
+				g.P("switch v := v.(*", message.GoIdent, "); i {")
+				for i := 0; i < sf.count; i++ {
+					if name := sf.unexported[i]; name != "" {
+						g.P("case ", i, ": return &v.", name)
+					}
+				}
+				g.P("default: return nil")
+				g.P("}")
+				g.P("}")
+			}
+		}
+		g.P("}")
+
 		// Populate MessageInfo.OneofWrappers.
 		for _, message := range f.allMessages {
 			if len(message.Oneofs) > 0 {

+ 15 - 4
cmd/protoc-gen-go/testdata/annotations/annotations.pb.go

@@ -66,10 +66,9 @@ func (AnnotationsTestEnum) EnumDescriptor() ([]byte, []int) {
 }
 
 type AnnotationsTestMessage struct {
-	AnnotationsTestField *string                 `protobuf:"bytes,1,opt,name=AnnotationsTestField" json:"AnnotationsTestField,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	AnnotationsTestField *string `protobuf:"bytes,1,opt,name=AnnotationsTestField" json:"AnnotationsTestField,omitempty"`
+	sizeCache            protoimpl.SizeCache
+	unknownFields        protoimpl.UnknownFields
 }
 
 func (x *AnnotationsTestMessage) Reset() {
@@ -155,6 +154,18 @@ func file_annotations_annotations_proto_init() {
 	if File_annotations_annotations_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_annotations_annotations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AnnotationsTestMessage); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_annotations_annotations_proto_rawDesc,

+ 1 - 1
cmd/protoc-gen-go/testdata/annotations/annotations.pb.go.meta

@@ -1 +1 @@
-annotation:{path:5 path:0 source_file:"annotations/annotations.proto" begin:631 end:650} annotation:{path:5 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:667 end:714} annotation:{path:4 path:0 source_file:"annotations/annotations.proto" begin:1821 end:1843} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:1854 end:1874} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:2895 end:2918}
+annotation:{path:5 path:0 source_file:"annotations/annotations.proto" begin:631 end:650} annotation:{path:5 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:667 end:714} annotation:{path:4 path:0 source_file:"annotations/annotations.proto" begin:1821 end:1843} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:1854 end:1874} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:2796 end:2819}

+ 75 - 19
cmd/protoc-gen-go/testdata/comments/comments.pb.go

@@ -28,10 +28,9 @@ type Message1 struct {
 	// Types that are valid to be assigned to Oneof1A:
 	// COMMENT: Oneof1AField1
 	//	*Message1_Oneof1AField1
-	Oneof1A              isMessage1_Oneof1A      `protobuf_oneof:"Oneof1a"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Oneof1A       isMessage1_Oneof1A `protobuf_oneof:"Oneof1a"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message1) Reset() {
@@ -90,9 +89,8 @@ func (*Message1_Oneof1AField1) isMessage1_Oneof1A() {}
 
 // COMMENT: Message2
 type Message2 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message2) Reset() {
@@ -120,9 +118,8 @@ func (*Message2) Descriptor() ([]byte, []int) {
 
 // COMMENT: Message1A
 type Message1_Message1A struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message1_Message1A) Reset() {
@@ -150,9 +147,8 @@ func (*Message1_Message1A) Descriptor() ([]byte, []int) {
 
 // COMMENT: Message1B
 type Message1_Message1B struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message1_Message1B) Reset() {
@@ -180,9 +176,8 @@ func (*Message1_Message1B) Descriptor() ([]byte, []int) {
 
 // COMMENT: Message2A
 type Message2_Message2A struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message2_Message2A) Reset() {
@@ -210,9 +205,8 @@ func (*Message2_Message2A) Descriptor() ([]byte, []int) {
 
 // COMMENT: Message2B
 type Message2_Message2B struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message2_Message2B) Reset() {
@@ -294,6 +288,68 @@ func file_comments_comments_proto_init() {
 	if File_comments_comments_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_comments_comments_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message1); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_comments_comments_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message2); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_comments_comments_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message1_Message1A); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_comments_comments_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message1_Message1B); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_comments_comments_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message2_Message2A); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_comments_comments_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message2_Message2B); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_comments_comments_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*Message1_Oneof1AField1)(nil),
 	}

+ 15 - 4
cmd/protoc-gen-go/testdata/comments/deprecated.pb.go

@@ -56,10 +56,9 @@ func (DeprecatedEnum) EnumDescriptor() ([]byte, []int) {
 
 // Deprecated: Do not use.
 type DeprecatedMessage struct {
-	DeprecatedField      string                  `protobuf:"bytes,1,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"` // Deprecated: Do not use.
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	DeprecatedField string `protobuf:"bytes,1,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"` // Deprecated: Do not use.
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
 }
 
 func (x *DeprecatedMessage) Reset() {
@@ -145,6 +144,18 @@ func file_comments_deprecated_proto_init() {
 	if File_comments_deprecated_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_comments_deprecated_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DeprecatedMessage); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_comments_deprecated_proto_rawDesc,

+ 33 - 9
cmd/protoc-gen-go/testdata/extensions/base/base.pb.go

@@ -18,11 +18,10 @@ const (
 )
 
 type BaseMessage struct {
-	Field                  *string                   `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	Field           *string `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *BaseMessage) Reset() {
@@ -66,10 +65,9 @@ func (x *BaseMessage) GetField() string {
 }
 
 type MessageSetWireFormatMessage struct {
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `protobuf_messageset:"1" json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields `protobuf_messageset:"1"`
 }
 
 func (x *MessageSetWireFormatMessage) Reset() {
@@ -154,6 +152,32 @@ func file_extensions_base_base_proto_init() {
 	if File_extensions_base_base_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_extensions_base_base_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BaseMessage); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			case 3:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_base_base_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageSetWireFormatMessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			case 2:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_extensions_base_base_proto_rawDesc,

+ 104 - 28
cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go

@@ -68,10 +68,9 @@ func (Enum) EnumDescriptor() ([]byte, []int) {
 }
 
 type Message struct {
-	Data                 []byte                  `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Data          []byte `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message) Reset() {
@@ -105,10 +104,9 @@ func (x *Message) GetData() []byte {
 }
 
 type ExtensionGroup struct {
-	ExtensionGroup       *string                 `protobuf:"bytes,120,opt,name=extension_group,json=extensionGroup" json:"extension_group,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	ExtensionGroup *string `protobuf:"bytes,120,opt,name=extension_group,json=extensionGroup" json:"extension_group,omitempty"`
+	sizeCache      protoimpl.SizeCache
+	unknownFields  protoimpl.UnknownFields
 }
 
 func (x *ExtensionGroup) Reset() {
@@ -143,9 +141,8 @@ func (x *ExtensionGroup) GetExtensionGroup() string {
 
 // Extend in the scope of another type.
 type ExtendingMessage struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ExtendingMessage) Reset() {
@@ -172,10 +169,9 @@ func (*ExtendingMessage) Descriptor() ([]byte, []int) {
 }
 
 type RepeatedGroup struct {
-	RepeatedXGroup       []string                `protobuf:"bytes,319,rep,name=repeated_x_group,json=repeatedXGroup" json:"repeated_x_group,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	RepeatedXGroup []string `protobuf:"bytes,319,rep,name=repeated_x_group,json=repeatedXGroup" json:"repeated_x_group,omitempty"`
+	sizeCache      protoimpl.SizeCache
+	unknownFields  protoimpl.UnknownFields
 }
 
 func (x *RepeatedGroup) Reset() {
@@ -210,10 +206,9 @@ func (x *RepeatedGroup) GetRepeatedXGroup() []string {
 
 // An extension of an extension.
 type Extendable struct {
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *Extendable) Reset() {
@@ -250,9 +245,8 @@ func (*Extendable) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
 
 // Message set wire format.
 type MessageSetWireFormatExtension struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *MessageSetWireFormatExtension) Reset() {
@@ -279,9 +273,8 @@ func (*MessageSetWireFormatExtension) Descriptor() ([]byte, []int) {
 }
 
 type Message_M struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message_M) Reset() {
@@ -308,9 +301,8 @@ func (*Message_M) Descriptor() ([]byte, []int) {
 }
 
 type ExtendingMessage_ExtendingMessageSubmessage struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ExtendingMessage_ExtendingMessageSubmessage) Reset() {
@@ -1238,6 +1230,90 @@ func file_extensions_ext_ext_proto_init() {
 	if File_extensions_ext_ext_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_extensions_ext_ext_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_ext_ext_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExtensionGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_ext_ext_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExtendingMessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_ext_ext_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RepeatedGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_ext_ext_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Extendable); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			case 2:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_ext_ext_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageSetWireFormatExtension); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_ext_ext_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message_M); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_extensions_ext_ext_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExtendingMessage_ExtendingMessageSubmessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_extensions_ext_ext_proto_rawDesc,

+ 15 - 4
cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go

@@ -18,10 +18,9 @@ const (
 )
 
 type ExtraMessage struct {
-	Data                 []byte                  `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Data          []byte `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ExtraMessage) Reset() {
@@ -99,6 +98,18 @@ func file_extensions_extra_extra_proto_init() {
 	if File_extensions_extra_extra_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_extensions_extra_extra_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExtraMessage); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_extensions_extra_extra_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go

@@ -57,9 +57,8 @@ func (Enum) EnumDescriptor() ([]byte, []int) {
 }
 
 type Message struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message) Reset() {
@@ -742,6 +741,18 @@ func file_extensions_proto3_ext3_proto_init() {
 	if File_extensions_proto3_ext3_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_extensions_proto3_ext3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_extensions_proto3_ext3_proto_rawDesc,

+ 27 - 7
cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go

@@ -56,10 +56,9 @@ type Message struct {
 	//
 	// Types that are valid to be assigned to OneofConflictC:
 	//	*Message_OneofMessageConflict_
-	OneofConflictC       isMessage_OneofConflictC `protobuf_oneof:"oneof_conflict_c"`
-	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields  `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache      `json:"-"`
+	OneofConflictC isMessage_OneofConflictC `protobuf_oneof:"oneof_conflict_c"`
+	sizeCache      protoimpl.SizeCache
+	unknownFields  protoimpl.UnknownFields
 }
 
 func (x *Message) Reset() {
@@ -269,9 +268,8 @@ type Message_OneofMessageConflict_ struct {
 func (*Message_OneofMessageConflict_) isMessage_OneofConflictC() {}
 
 type Message_OneofMessageConflict struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message_OneofMessageConflict) Reset() {
@@ -384,6 +382,28 @@ func file_fieldnames_fieldnames_proto_init() {
 	if File_fieldnames_fieldnames_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_fieldnames_fieldnames_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message); i {
+			case 17:
+				return &v.sizeCache
+			case 18:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_fieldnames_fieldnames_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message_OneofMessageConflict); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_fieldnames_fieldnames_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*Message_OneofConflictA)(nil),
 		(*Message_OneofNoConflict)(nil),

+ 17 - 6
cmd/protoc-gen-go/testdata/import_public/a.pb.go

@@ -57,12 +57,11 @@ type M_Submessage_SubmessageOneofInt64 = sub.M_Submessage_SubmessageOneofInt64
 var E_ExtensionField = sub.E_ExtensionField
 
 type Public struct {
-	M                    *sub.M                  `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
-	E                    *sub.E                  `protobuf:"varint,2,opt,name=e,enum=goproto.protoc.import_public.sub.E" json:"e,omitempty"`
-	Local                *Local                  `protobuf:"bytes,3,opt,name=local" json:"local,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	M             *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
+	E             *sub.E `protobuf:"varint,2,opt,name=e,enum=goproto.protoc.import_public.sub.E" json:"e,omitempty"`
+	Local         *Local `protobuf:"bytes,3,opt,name=local" json:"local,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Public) Reset() {
@@ -172,6 +171,18 @@ func file_import_public_a_proto_init() {
 		return
 	}
 	file_import_public_b_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_import_public_a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Public); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_import_public_a_proto_rawDesc,

+ 16 - 5
cmd/protoc-gen-go/testdata/import_public/b.pb.go

@@ -19,11 +19,10 @@ const (
 )
 
 type Local struct {
-	M                    *sub.M                  `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
-	E                    *sub.E                  `protobuf:"varint,2,opt,name=e,enum=goproto.protoc.import_public.sub.E" json:"e,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	M             *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
+	E             *sub.E `protobuf:"varint,2,opt,name=e,enum=goproto.protoc.import_public.sub.E" json:"e,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Local) Reset() {
@@ -118,6 +117,18 @@ func file_import_public_b_proto_init() {
 	if File_import_public_b_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_import_public_b_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Local); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_import_public_b_proto_rawDesc,

+ 15 - 4
cmd/protoc-gen-go/testdata/import_public/c.pb.go

@@ -23,10 +23,9 @@ type UsingPublicImport struct {
 	Local *Local `protobuf:"bytes,1,opt,name=local" json:"local,omitempty"`
 	// Sub2Message is declared in sub2/a.proto, which is a public import of
 	// sub/a.proto, which is a public import of a.proto.
-	Sub2                 *sub2.Sub2Message       `protobuf:"bytes,2,opt,name=sub2" json:"sub2,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Sub2          *sub2.Sub2Message `protobuf:"bytes,2,opt,name=sub2" json:"sub2,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *UsingPublicImport) Reset() {
@@ -124,6 +123,18 @@ func file_import_public_c_proto_init() {
 		return
 	}
 	file_import_public_a_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_import_public_c_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UsingPublicImport); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_import_public_c_proto_rawDesc,

+ 30 - 8
cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go

@@ -174,11 +174,10 @@ type M struct {
 	// Types that are valid to be assigned to OneofField:
 	//	*M_OneofInt32
 	//	*M_OneofInt64
-	OneofField             isM_OneofField            `protobuf_oneof:"oneof_field"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	OneofField      isM_OneofField `protobuf_oneof:"oneof_field"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *M) Reset() {
@@ -288,9 +287,8 @@ type M_Submessage struct {
 	//	*M_Submessage_SubmessageOneofInt32
 	//	*M_Submessage_SubmessageOneofInt64
 	SubmessageOneofField isM_Submessage_SubmessageOneofField `protobuf_oneof:"submessage_oneof_field"`
-	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields             `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache                 `json:"-"`
+	sizeCache            protoimpl.SizeCache
+	unknownFields        protoimpl.UnknownFields
 }
 
 func (x *M_Submessage) Reset() {
@@ -456,6 +454,30 @@ func file_import_public_sub_a_proto_init() {
 		return
 	}
 	file_import_public_sub_b_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_import_public_sub_a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			case 7:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_import_public_sub_a_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M_Submessage); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_import_public_sub_a_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*M_OneofInt32)(nil),
 		(*M_OneofInt64)(nil),

+ 14 - 3
cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type M2 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M2) Reset() {
@@ -89,6 +88,18 @@ func file_import_public_sub_b_proto_init() {
 	if File_import_public_sub_b_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_import_public_sub_b_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M2); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_import_public_sub_b_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type Sub2Message struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Sub2Message) Reset() {
@@ -90,6 +89,18 @@ func file_import_public_sub2_a_proto_init() {
 	if File_import_public_sub2_a_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_import_public_sub2_a_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Sub2Message); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_import_public_sub2_a_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type M struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M) Reset() {
@@ -87,6 +86,18 @@ func file_imports_fmt_m_proto_init() {
 	if File_imports_fmt_m_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_fmt_m_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_fmt_m_proto_rawDesc,

+ 27 - 7
cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go

@@ -56,9 +56,8 @@ func (E1) EnumDescriptor() ([]byte, []int) {
 }
 
 type M1 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M1) Reset() {
@@ -85,10 +84,9 @@ func (*M1) Descriptor() ([]byte, []int) {
 }
 
 type M1_1 struct {
-	M1                   *M1                     `protobuf:"bytes,1,opt,name=m1,proto3" json:"m1,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	M1            *M1 `protobuf:"bytes,1,opt,name=m1,proto3" json:"m1,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M1_1) Reset() {
@@ -171,6 +169,28 @@ func file_imports_test_a_1_m1_proto_init() {
 	if File_imports_test_a_1_m1_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_a_1_m1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M1); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_imports_test_a_1_m1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M1_1); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_a_1_m1_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type M2 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M2) Reset() {
@@ -88,6 +87,18 @@ func file_imports_test_a_1_m2_proto_init() {
 	if File_imports_test_a_1_m2_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_a_1_m2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M2); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_a_1_m2_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type M3 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M3) Reset() {
@@ -88,6 +87,18 @@ func file_imports_test_a_2_m3_proto_init() {
 	if File_imports_test_a_2_m3_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_a_2_m3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M3); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_a_2_m3_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type M4 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M4) Reset() {
@@ -88,6 +87,18 @@ func file_imports_test_a_2_m4_proto_init() {
 	if File_imports_test_a_2_m4_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_a_2_m4_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M4); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_a_2_m4_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type M1 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M1) Reset() {
@@ -89,6 +88,18 @@ func file_imports_test_b_1_m1_proto_init() {
 	if File_imports_test_b_1_m1_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_b_1_m1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M1); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_b_1_m1_proto_rawDesc,

+ 14 - 3
cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type M2 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *M2) Reset() {
@@ -89,6 +88,18 @@ func file_imports_test_b_1_m2_proto_init() {
 	if File_imports_test_b_1_m2_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_b_1_m2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*M2); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_b_1_m2_proto_rawDesc,

+ 15 - 4
cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go

@@ -19,10 +19,9 @@ const (
 )
 
 type A1M1 struct {
-	F                    *test_a_1.M1            `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	F             *test_a_1.M1 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *A1M1) Reset() {
@@ -102,6 +101,18 @@ func file_imports_test_import_a1m1_proto_init() {
 	if File_imports_test_import_a1m1_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_import_a1m1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*A1M1); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_import_a1m1_proto_rawDesc,

+ 15 - 4
cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go

@@ -19,10 +19,9 @@ const (
 )
 
 type A1M2 struct {
-	F                    *test_a_1.M2            `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	F             *test_a_1.M2 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *A1M2) Reset() {
@@ -102,6 +101,18 @@ func file_imports_test_import_a1m2_proto_init() {
 	if File_imports_test_import_a1m2_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_import_a1m2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*A1M2); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_import_a1m2_proto_rawDesc,

+ 19 - 8
cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go

@@ -22,14 +22,13 @@ const (
 )
 
 type All struct {
-	Am1                  *test_a_1.M1            `protobuf:"bytes,1,opt,name=am1,proto3" json:"am1,omitempty"`
-	Am2                  *test_a_1.M2            `protobuf:"bytes,2,opt,name=am2,proto3" json:"am2,omitempty"`
-	Bm1                  *test_b_1.M1            `protobuf:"bytes,5,opt,name=bm1,proto3" json:"bm1,omitempty"`
-	Bm2                  *test_b_1.M2            `protobuf:"bytes,6,opt,name=bm2,proto3" json:"bm2,omitempty"`
-	Fmt                  *fmt.M                  `protobuf:"bytes,7,opt,name=fmt,proto3" json:"fmt,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Am1           *test_a_1.M1 `protobuf:"bytes,1,opt,name=am1,proto3" json:"am1,omitempty"`
+	Am2           *test_a_1.M2 `protobuf:"bytes,2,opt,name=am2,proto3" json:"am2,omitempty"`
+	Bm1           *test_b_1.M1 `protobuf:"bytes,5,opt,name=bm1,proto3" json:"bm1,omitempty"`
+	Bm2           *test_b_1.M2 `protobuf:"bytes,6,opt,name=bm2,proto3" json:"bm2,omitempty"`
+	Fmt           *fmt.M       `protobuf:"bytes,7,opt,name=fmt,proto3" json:"fmt,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *All) Reset() {
@@ -163,6 +162,18 @@ func file_imports_test_import_all_proto_init() {
 	if File_imports_test_import_all_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_imports_test_import_all_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*All); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_imports_test_import_all_proto_rawDesc,

+ 15 - 4
cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go

@@ -20,10 +20,9 @@ const (
 type Foo struct {
 	// Types that are valid to be assigned to Bar:
 	//	*Foo_GetBar
-	Bar                  isFoo_Bar               `protobuf_oneof:"bar"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Bar           isFoo_Bar `protobuf_oneof:"bar"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Foo) Reset() {
@@ -113,6 +112,18 @@ func file_issue780_oneof_conflict_test_proto_init() {
 	if File_issue780_oneof_conflict_test_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_issue780_oneof_conflict_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Foo); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_issue780_oneof_conflict_test_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*Foo_GetBar)(nil),
 	}

+ 16 - 5
cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go

@@ -66,11 +66,10 @@ func (Enum) EnumDescriptor() ([]byte, []int) {
 }
 
 type Message struct {
-	StringField          *string                 `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"`
-	EnumField            *Enum                   `protobuf:"varint,2,opt,name=enum_field,json=enumField,enum=Enum,def=0" json:"enum_field,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	StringField   *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"`
+	EnumField     *Enum   `protobuf:"varint,2,opt,name=enum_field,json=enumField,enum=Enum,def=0" json:"enum_field,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message) Reset() {
@@ -158,6 +157,18 @@ func file_nopackage_nopackage_proto_init() {
 	if File_nopackage_nopackage_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_nopackage_nopackage_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_nopackage_nopackage_proto_rawDesc,

+ 28 - 8
cmd/protoc-gen-go/testdata/proto2/enum.pb.go

@@ -314,11 +314,10 @@ func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) EnumDescript
 }
 
 type EnumContainerMessage1 struct {
-	DefaultDuplicate1    *EnumType2              `protobuf:"varint,1,opt,name=default_duplicate1,json=defaultDuplicate1,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate1,omitempty"`
-	DefaultDuplicate2    *EnumType2              `protobuf:"varint,2,opt,name=default_duplicate2,json=defaultDuplicate2,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate2,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	DefaultDuplicate1 *EnumType2 `protobuf:"varint,1,opt,name=default_duplicate1,json=defaultDuplicate1,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate1,omitempty"`
+	DefaultDuplicate2 *EnumType2 `protobuf:"varint,2,opt,name=default_duplicate2,json=defaultDuplicate2,enum=goproto.protoc.proto2.EnumType2,def=1" json:"default_duplicate2,omitempty"`
+	sizeCache         protoimpl.SizeCache
+	unknownFields     protoimpl.UnknownFields
 }
 
 func (x *EnumContainerMessage1) Reset() {
@@ -362,9 +361,8 @@ func (x *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 {
 }
 
 type EnumContainerMessage1_EnumContainerMessage2 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *EnumContainerMessage1_EnumContainerMessage2) Reset() {
@@ -473,6 +471,28 @@ func file_proto2_enum_proto_init() {
 	if File_proto2_enum_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_proto2_enum_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumContainerMessage1); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_enum_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumContainerMessage1_EnumContainerMessage2); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_proto2_enum_proto_rawDesc,

+ 79 - 23
cmd/protoc-gen-go/testdata/proto2/fields.pb.go

@@ -175,10 +175,9 @@ type FieldTestMessage struct {
 	// Types that are valid to be assigned to OneofTwo:
 	//	*FieldTestMessage_OneofTwo_1
 	//	*FieldTestMessage_OneofTwo_2
-	OneofTwo             isFieldTestMessage_OneofTwo `protobuf_oneof:"oneof_two"`
-	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields     `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache         `json:"-"`
+	OneofTwo      isFieldTestMessage_OneofTwo `protobuf_oneof:"oneof_two"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage) Reset() {
@@ -1095,10 +1094,9 @@ func (*FieldTestMessage_OneofTwo_1) isFieldTestMessage_OneofTwo() {}
 func (*FieldTestMessage_OneofTwo_2) isFieldTestMessage_OneofTwo() {}
 
 type FieldTestMessage_OptionalGroup struct {
-	OptionalGroup        *string                 `protobuf:"bytes,19,opt,name=optional_group,json=optionalGroup" json:"optional_group,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptionalGroup *string `protobuf:"bytes,19,opt,name=optional_group,json=optionalGroup" json:"optional_group,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage_OptionalGroup) Reset() {
@@ -1132,10 +1130,9 @@ func (x *FieldTestMessage_OptionalGroup) GetOptionalGroup() string {
 }
 
 type FieldTestMessage_RequiredGroup struct {
-	RequiredGroup        *string                 `protobuf:"bytes,119,req,name=required_group,json=requiredGroup" json:"required_group,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	RequiredGroup *string `protobuf:"bytes,119,req,name=required_group,json=requiredGroup" json:"required_group,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage_RequiredGroup) Reset() {
@@ -1169,10 +1166,9 @@ func (x *FieldTestMessage_RequiredGroup) GetRequiredGroup() string {
 }
 
 type FieldTestMessage_RepeatedGroup struct {
-	RepeatedGroup        []string                `protobuf:"bytes,219,rep,name=repeated_group,json=repeatedGroup" json:"repeated_group,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	RepeatedGroup []string `protobuf:"bytes,219,rep,name=repeated_group,json=repeatedGroup" json:"repeated_group,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage_RepeatedGroup) Reset() {
@@ -1206,10 +1202,9 @@ func (x *FieldTestMessage_RepeatedGroup) GetRepeatedGroup() []string {
 }
 
 type FieldTestMessage_OneofGroup struct {
-	OneofGroupField      *string                 `protobuf:"bytes,619,opt,name=oneof_group_field,json=oneofGroupField" json:"oneof_group_field,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OneofGroupField *string `protobuf:"bytes,619,opt,name=oneof_group_field,json=oneofGroupField" json:"oneof_group_field,omitempty"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage_OneofGroup) Reset() {
@@ -1243,9 +1238,8 @@ func (x *FieldTestMessage_OneofGroup) GetOneofGroupField() string {
 }
 
 type FieldTestMessage_Message struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage_Message) Reset() {
@@ -1703,6 +1697,68 @@ func file_proto2_fields_proto_init() {
 	if File_proto2_fields_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_proto2_fields_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage); i {
+			case 83:
+				return &v.sizeCache
+			case 84:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_fields_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage_OptionalGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_fields_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage_RequiredGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_fields_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage_RepeatedGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_fields_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage_OneofGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_fields_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage_Message); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_proto2_fields_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*FieldTestMessage_OneofBool)(nil),
 		(*FieldTestMessage_OneofEnum)(nil),

+ 41 - 12
cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go

@@ -18,11 +18,10 @@ const (
 )
 
 type Layer1 struct {
-	L2                   *Layer1_Layer2          `protobuf:"bytes,1,opt,name=l2" json:"l2,omitempty"`
-	L3                   *Layer1_Layer2_Layer3   `protobuf:"bytes,2,opt,name=l3" json:"l3,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	L2            *Layer1_Layer2        `protobuf:"bytes,1,opt,name=l2" json:"l2,omitempty"`
+	L3            *Layer1_Layer2_Layer3 `protobuf:"bytes,2,opt,name=l3" json:"l3,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Layer1) Reset() {
@@ -63,10 +62,9 @@ func (x *Layer1) GetL3() *Layer1_Layer2_Layer3 {
 }
 
 type Layer1_Layer2 struct {
-	L3                   *Layer1_Layer2_Layer3   `protobuf:"bytes,1,opt,name=l3" json:"l3,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	L3            *Layer1_Layer2_Layer3 `protobuf:"bytes,1,opt,name=l3" json:"l3,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Layer1_Layer2) Reset() {
@@ -100,9 +98,8 @@ func (x *Layer1_Layer2) GetL3() *Layer1_Layer2_Layer3 {
 }
 
 type Layer1_Layer2_Layer3 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Layer1_Layer2_Layer3) Reset() {
@@ -188,6 +185,38 @@ func file_proto2_nested_messages_proto_init() {
 	if File_proto2_nested_messages_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_proto2_nested_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Layer1); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_nested_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Layer1_Layer2); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto2_nested_messages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Layer1_Layer2_Layer3); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_proto2_nested_messages_proto_rawDesc,

+ 16 - 5
cmd/protoc-gen-go/testdata/proto2/proto2.pb.go

@@ -18,11 +18,10 @@ const (
 )
 
 type Message struct {
-	I32                  *int32                  `protobuf:"varint,1,opt,name=i32" json:"i32,omitempty"`
-	M                    *Message                `protobuf:"bytes,2,opt,name=m" json:"m,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	I32           *int32   `protobuf:"varint,1,opt,name=i32" json:"i32,omitempty"`
+	M             *Message `protobuf:"bytes,2,opt,name=m" json:"m,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message) Reset() {
@@ -109,6 +108,18 @@ func file_proto2_proto2_proto_init() {
 	if File_proto2_proto2_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_proto2_proto2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_proto2_proto2_proto_rawDesc,

+ 63 - 43
cmd/protoc-gen-go/testdata/proto3/fields.pb.go

@@ -56,46 +56,45 @@ func (FieldTestMessage_Enum) EnumDescriptor() ([]byte, []int) {
 }
 
 type FieldTestMessage struct {
-	OptionalBool         string                               `protobuf:"bytes,1,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"`
-	OptionalEnum         FieldTestMessage_Enum                `protobuf:"varint,2,opt,name=optional_enum,json=optionalEnum,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum" json:"optional_enum,omitempty"`
-	OptionalInt32        int32                                `protobuf:"varint,3,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"`
-	OptionalSint32       int32                                `protobuf:"zigzag32,4,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"`
-	OptionalUint32       uint32                               `protobuf:"varint,5,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"`
-	OptionalInt64        int64                                `protobuf:"varint,6,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"`
-	OptionalSint64       int64                                `protobuf:"zigzag64,7,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"`
-	OptionalUint64       uint64                               `protobuf:"varint,8,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"`
-	OptionalSfixed32     int32                                `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"`
-	OptionalFixed32      uint32                               `protobuf:"fixed32,10,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"`
-	OptionalFloat        float32                              `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"`
-	OptionalSfixed64     int64                                `protobuf:"fixed64,12,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"`
-	OptionalFixed64      uint64                               `protobuf:"fixed64,13,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"`
-	OptionalDouble       float64                              `protobuf:"fixed64,14,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"`
-	OptionalString       string                               `protobuf:"bytes,15,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"`
-	OptionalBytes        []byte                               `protobuf:"bytes,16,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"`
-	Optional_Message     *FieldTestMessage_Message            `protobuf:"bytes,17,opt,name=optional_Message,json=optionalMessage,proto3" json:"optional_Message,omitempty"`
-	RepeatedBool         []bool                               `protobuf:"varint,201,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"`
-	RepeatedEnum         []FieldTestMessage_Enum              `protobuf:"varint,202,rep,packed,name=repeated_enum,json=repeatedEnum,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum" json:"repeated_enum,omitempty"`
-	RepeatedInt32        []int32                              `protobuf:"varint,203,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"`
-	RepeatedSint32       []int32                              `protobuf:"zigzag32,204,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"`
-	RepeatedUint32       []uint32                             `protobuf:"varint,205,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"`
-	RepeatedInt64        []int64                              `protobuf:"varint,206,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"`
-	RepeatedSint64       []int64                              `protobuf:"zigzag64,207,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"`
-	RepeatedUint64       []uint64                             `protobuf:"varint,208,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"`
-	RepeatedSfixed32     []int32                              `protobuf:"fixed32,209,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"`
-	RepeatedFixed32      []uint32                             `protobuf:"fixed32,210,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"`
-	RepeatedFloat        []float32                            `protobuf:"fixed32,211,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"`
-	RepeatedSfixed64     []int64                              `protobuf:"fixed64,212,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"`
-	RepeatedFixed64      []uint64                             `protobuf:"fixed64,213,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"`
-	RepeatedDouble       []float64                            `protobuf:"fixed64,214,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"`
-	RepeatedString       []string                             `protobuf:"bytes,215,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"`
-	RepeatedBytes        [][]byte                             `protobuf:"bytes,216,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"`
-	Repeated_Message     []*FieldTestMessage_Message          `protobuf:"bytes,217,rep,name=repeated_Message,json=repeatedMessage,proto3" json:"repeated_Message,omitempty"`
-	MapInt32Int64        map[int32]int64                      `protobuf:"bytes,500,rep,name=map_int32_int64,json=mapInt32Int64,proto3" json:"map_int32_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
-	MapStringMessage     map[string]*FieldTestMessage_Message `protobuf:"bytes,501,rep,name=map_string_message,json=mapStringMessage,proto3" json:"map_string_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
-	MapFixed64Enum       map[uint64]FieldTestMessage_Enum     `protobuf:"bytes,502,rep,name=map_fixed64_enum,json=mapFixed64Enum,proto3" json:"map_fixed64_enum,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum"`
-	XXX_NoUnkeyedLiteral struct{}                             `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields              `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache                  `json:"-"`
+	OptionalBool     string                               `protobuf:"bytes,1,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"`
+	OptionalEnum     FieldTestMessage_Enum                `protobuf:"varint,2,opt,name=optional_enum,json=optionalEnum,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum" json:"optional_enum,omitempty"`
+	OptionalInt32    int32                                `protobuf:"varint,3,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"`
+	OptionalSint32   int32                                `protobuf:"zigzag32,4,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"`
+	OptionalUint32   uint32                               `protobuf:"varint,5,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"`
+	OptionalInt64    int64                                `protobuf:"varint,6,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"`
+	OptionalSint64   int64                                `protobuf:"zigzag64,7,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"`
+	OptionalUint64   uint64                               `protobuf:"varint,8,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"`
+	OptionalSfixed32 int32                                `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"`
+	OptionalFixed32  uint32                               `protobuf:"fixed32,10,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"`
+	OptionalFloat    float32                              `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"`
+	OptionalSfixed64 int64                                `protobuf:"fixed64,12,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"`
+	OptionalFixed64  uint64                               `protobuf:"fixed64,13,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"`
+	OptionalDouble   float64                              `protobuf:"fixed64,14,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"`
+	OptionalString   string                               `protobuf:"bytes,15,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"`
+	OptionalBytes    []byte                               `protobuf:"bytes,16,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"`
+	Optional_Message *FieldTestMessage_Message            `protobuf:"bytes,17,opt,name=optional_Message,json=optionalMessage,proto3" json:"optional_Message,omitempty"`
+	RepeatedBool     []bool                               `protobuf:"varint,201,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"`
+	RepeatedEnum     []FieldTestMessage_Enum              `protobuf:"varint,202,rep,packed,name=repeated_enum,json=repeatedEnum,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum" json:"repeated_enum,omitempty"`
+	RepeatedInt32    []int32                              `protobuf:"varint,203,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"`
+	RepeatedSint32   []int32                              `protobuf:"zigzag32,204,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"`
+	RepeatedUint32   []uint32                             `protobuf:"varint,205,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"`
+	RepeatedInt64    []int64                              `protobuf:"varint,206,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"`
+	RepeatedSint64   []int64                              `protobuf:"zigzag64,207,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"`
+	RepeatedUint64   []uint64                             `protobuf:"varint,208,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"`
+	RepeatedSfixed32 []int32                              `protobuf:"fixed32,209,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"`
+	RepeatedFixed32  []uint32                             `protobuf:"fixed32,210,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"`
+	RepeatedFloat    []float32                            `protobuf:"fixed32,211,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"`
+	RepeatedSfixed64 []int64                              `protobuf:"fixed64,212,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"`
+	RepeatedFixed64  []uint64                             `protobuf:"fixed64,213,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"`
+	RepeatedDouble   []float64                            `protobuf:"fixed64,214,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"`
+	RepeatedString   []string                             `protobuf:"bytes,215,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"`
+	RepeatedBytes    [][]byte                             `protobuf:"bytes,216,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"`
+	Repeated_Message []*FieldTestMessage_Message          `protobuf:"bytes,217,rep,name=repeated_Message,json=repeatedMessage,proto3" json:"repeated_Message,omitempty"`
+	MapInt32Int64    map[int32]int64                      `protobuf:"bytes,500,rep,name=map_int32_int64,json=mapInt32Int64,proto3" json:"map_int32_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+	MapStringMessage map[string]*FieldTestMessage_Message `protobuf:"bytes,501,rep,name=map_string_message,json=mapStringMessage,proto3" json:"map_string_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	MapFixed64Enum   map[uint64]FieldTestMessage_Enum     `protobuf:"bytes,502,rep,name=map_fixed64_enum,json=mapFixed64Enum,proto3" json:"map_fixed64_enum,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=goproto.protoc.proto3.FieldTestMessage_Enum"`
+	sizeCache        protoimpl.SizeCache
+	unknownFields    protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage) Reset() {
@@ -381,9 +380,8 @@ func (x *FieldTestMessage) GetMapFixed64Enum() map[uint64]FieldTestMessage_Enum
 }
 
 type FieldTestMessage_Message struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldTestMessage_Message) Reset() {
@@ -607,6 +605,28 @@ func file_proto3_fields_proto_init() {
 	if File_proto3_fields_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_proto3_fields_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage); i {
+			case 37:
+				return &v.sizeCache
+			case 38:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_proto3_fields_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldTestMessage_Message); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_proto3_fields_proto_rawDesc,

+ 311 - 132
encoding/testprotos/pb2/test.pb.go

@@ -133,24 +133,23 @@ func (Enums_NestedEnum) EnumDescriptor() ([]byte, []int) {
 
 // Scalars contains optional scalar fields.
 type Scalars struct {
-	OptBool              *bool                   `protobuf:"varint,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
-	OptInt32             *int32                  `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
-	OptInt64             *int64                  `protobuf:"varint,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
-	OptUint32            *uint32                 `protobuf:"varint,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
-	OptUint64            *uint64                 `protobuf:"varint,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
-	OptSint32            *int32                  `protobuf:"zigzag32,6,opt,name=opt_sint32,json=optSint32" json:"opt_sint32,omitempty"`
-	OptSint64            *int64                  `protobuf:"zigzag64,7,opt,name=opt_sint64,json=optSint64" json:"opt_sint64,omitempty"`
-	OptFixed32           *uint32                 `protobuf:"fixed32,8,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
-	OptFixed64           *uint64                 `protobuf:"fixed64,9,opt,name=opt_fixed64,json=optFixed64" json:"opt_fixed64,omitempty"`
-	OptSfixed32          *int32                  `protobuf:"fixed32,10,opt,name=opt_sfixed32,json=optSfixed32" json:"opt_sfixed32,omitempty"`
-	OptSfixed64          *int64                  `protobuf:"fixed64,11,opt,name=opt_sfixed64,json=optSfixed64" json:"opt_sfixed64,omitempty"`
-	OptFloat             *float32                `protobuf:"fixed32,20,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
-	OptDouble            *float64                `protobuf:"fixed64,21,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
-	OptBytes             []byte                  `protobuf:"bytes,14,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
-	OptString            *string                 `protobuf:"bytes,13,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptBool       *bool    `protobuf:"varint,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
+	OptInt32      *int32   `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
+	OptInt64      *int64   `protobuf:"varint,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
+	OptUint32     *uint32  `protobuf:"varint,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
+	OptUint64     *uint64  `protobuf:"varint,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
+	OptSint32     *int32   `protobuf:"zigzag32,6,opt,name=opt_sint32,json=optSint32" json:"opt_sint32,omitempty"`
+	OptSint64     *int64   `protobuf:"zigzag64,7,opt,name=opt_sint64,json=optSint64" json:"opt_sint64,omitempty"`
+	OptFixed32    *uint32  `protobuf:"fixed32,8,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
+	OptFixed64    *uint64  `protobuf:"fixed64,9,opt,name=opt_fixed64,json=optFixed64" json:"opt_fixed64,omitempty"`
+	OptSfixed32   *int32   `protobuf:"fixed32,10,opt,name=opt_sfixed32,json=optSfixed32" json:"opt_sfixed32,omitempty"`
+	OptSfixed64   *int64   `protobuf:"fixed64,11,opt,name=opt_sfixed64,json=optSfixed64" json:"opt_sfixed64,omitempty"`
+	OptFloat      *float32 `protobuf:"fixed32,20,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
+	OptDouble     *float64 `protobuf:"fixed64,21,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
+	OptBytes      []byte   `protobuf:"bytes,14,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
+	OptString     *string  `protobuf:"bytes,13,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Scalars) Reset() {
@@ -283,13 +282,12 @@ func (x *Scalars) GetOptString() string {
 
 // Message contains enum fields.
 type Enums struct {
-	OptEnum              *Enum                   `protobuf:"varint,1,opt,name=opt_enum,json=optEnum,enum=pb2.Enum" json:"opt_enum,omitempty"`
-	RptEnum              []Enum                  `protobuf:"varint,2,rep,name=rpt_enum,json=rptEnum,enum=pb2.Enum" json:"rpt_enum,omitempty"`
-	OptNestedEnum        *Enums_NestedEnum       `protobuf:"varint,3,opt,name=opt_nested_enum,json=optNestedEnum,enum=pb2.Enums_NestedEnum" json:"opt_nested_enum,omitempty"`
-	RptNestedEnum        []Enums_NestedEnum      `protobuf:"varint,4,rep,name=rpt_nested_enum,json=rptNestedEnum,enum=pb2.Enums_NestedEnum" json:"rpt_nested_enum,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptEnum       *Enum              `protobuf:"varint,1,opt,name=opt_enum,json=optEnum,enum=pb2.Enum" json:"opt_enum,omitempty"`
+	RptEnum       []Enum             `protobuf:"varint,2,rep,name=rpt_enum,json=rptEnum,enum=pb2.Enum" json:"rpt_enum,omitempty"`
+	OptNestedEnum *Enums_NestedEnum  `protobuf:"varint,3,opt,name=opt_nested_enum,json=optNestedEnum,enum=pb2.Enums_NestedEnum" json:"opt_nested_enum,omitempty"`
+	RptNestedEnum []Enums_NestedEnum `protobuf:"varint,4,rep,name=rpt_nested_enum,json=rptNestedEnum,enum=pb2.Enums_NestedEnum" json:"rpt_nested_enum,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Enums) Reset() {
@@ -345,18 +343,17 @@ func (x *Enums) GetRptNestedEnum() []Enums_NestedEnum {
 
 // Message contains repeated fields.
 type Repeats struct {
-	RptBool              []bool                  `protobuf:"varint,1,rep,name=rpt_bool,json=rptBool" json:"rpt_bool,omitempty"`
-	RptInt32             []int32                 `protobuf:"varint,2,rep,name=rpt_int32,json=rptInt32" json:"rpt_int32,omitempty"`
-	RptInt64             []int64                 `protobuf:"varint,3,rep,name=rpt_int64,json=rptInt64" json:"rpt_int64,omitempty"`
-	RptUint32            []uint32                `protobuf:"varint,4,rep,name=rpt_uint32,json=rptUint32" json:"rpt_uint32,omitempty"`
-	RptUint64            []uint64                `protobuf:"varint,5,rep,name=rpt_uint64,json=rptUint64" json:"rpt_uint64,omitempty"`
-	RptFloat             []float32               `protobuf:"fixed32,6,rep,name=rpt_float,json=rptFloat" json:"rpt_float,omitempty"`
-	RptDouble            []float64               `protobuf:"fixed64,7,rep,name=rpt_double,json=rptDouble" json:"rpt_double,omitempty"`
-	RptString            []string                `protobuf:"bytes,8,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
-	RptBytes             [][]byte                `protobuf:"bytes,9,rep,name=rpt_bytes,json=rptBytes" json:"rpt_bytes,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	RptBool       []bool    `protobuf:"varint,1,rep,name=rpt_bool,json=rptBool" json:"rpt_bool,omitempty"`
+	RptInt32      []int32   `protobuf:"varint,2,rep,name=rpt_int32,json=rptInt32" json:"rpt_int32,omitempty"`
+	RptInt64      []int64   `protobuf:"varint,3,rep,name=rpt_int64,json=rptInt64" json:"rpt_int64,omitempty"`
+	RptUint32     []uint32  `protobuf:"varint,4,rep,name=rpt_uint32,json=rptUint32" json:"rpt_uint32,omitempty"`
+	RptUint64     []uint64  `protobuf:"varint,5,rep,name=rpt_uint64,json=rptUint64" json:"rpt_uint64,omitempty"`
+	RptFloat      []float32 `protobuf:"fixed32,6,rep,name=rpt_float,json=rptFloat" json:"rpt_float,omitempty"`
+	RptDouble     []float64 `protobuf:"fixed64,7,rep,name=rpt_double,json=rptDouble" json:"rpt_double,omitempty"`
+	RptString     []string  `protobuf:"bytes,8,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
+	RptBytes      [][]byte  `protobuf:"bytes,9,rep,name=rpt_bytes,json=rptBytes" json:"rpt_bytes,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Repeats) Reset() {
@@ -447,11 +444,10 @@ func (x *Repeats) GetRptBytes() [][]byte {
 
 // Message type used as submessage.
 type Nested struct {
-	OptString            *string                 `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	OptNested            *Nested                 `protobuf:"bytes,2,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptString     *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	OptNested     *Nested `protobuf:"bytes,2,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Nested) Reset() {
@@ -493,13 +489,12 @@ func (x *Nested) GetOptNested() *Nested {
 
 // Message contains message and group fields.
 type Nests struct {
-	OptNested            *Nested                 `protobuf:"bytes,1,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
-	Optgroup             *Nests_OptGroup         `protobuf:"group,2,opt,name=OptGroup,json=optgroup" json:"optgroup,omitempty"`
-	RptNested            []*Nested               `protobuf:"bytes,4,rep,name=rpt_nested,json=rptNested" json:"rpt_nested,omitempty"`
-	Rptgroup             []*Nests_RptGroup       `protobuf:"group,5,rep,name=RptGroup,json=rptgroup" json:"rptgroup,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptNested     *Nested           `protobuf:"bytes,1,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
+	Optgroup      *Nests_OptGroup   `protobuf:"group,2,opt,name=OptGroup,json=optgroup" json:"optgroup,omitempty"`
+	RptNested     []*Nested         `protobuf:"bytes,4,rep,name=rpt_nested,json=rptNested" json:"rpt_nested,omitempty"`
+	Rptgroup      []*Nests_RptGroup `protobuf:"group,5,rep,name=RptGroup,json=rptgroup" json:"rptgroup,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Nests) Reset() {
@@ -555,15 +550,14 @@ func (x *Nests) GetRptgroup() []*Nests_RptGroup {
 
 // Message contains required fields.
 type Requireds struct {
-	ReqBool              *bool                   `protobuf:"varint,1,req,name=req_bool,json=reqBool" json:"req_bool,omitempty"`
-	ReqSfixed64          *int64                  `protobuf:"fixed64,2,req,name=req_sfixed64,json=reqSfixed64" json:"req_sfixed64,omitempty"`
-	ReqDouble            *float64                `protobuf:"fixed64,3,req,name=req_double,json=reqDouble" json:"req_double,omitempty"`
-	ReqString            *string                 `protobuf:"bytes,4,req,name=req_string,json=reqString" json:"req_string,omitempty"`
-	ReqEnum              *Enum                   `protobuf:"varint,5,req,name=req_enum,json=reqEnum,enum=pb2.Enum" json:"req_enum,omitempty"`
-	ReqNested            *Nested                 `protobuf:"bytes,6,req,name=req_nested,json=reqNested" json:"req_nested,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	ReqBool       *bool    `protobuf:"varint,1,req,name=req_bool,json=reqBool" json:"req_bool,omitempty"`
+	ReqSfixed64   *int64   `protobuf:"fixed64,2,req,name=req_sfixed64,json=reqSfixed64" json:"req_sfixed64,omitempty"`
+	ReqDouble     *float64 `protobuf:"fixed64,3,req,name=req_double,json=reqDouble" json:"req_double,omitempty"`
+	ReqString     *string  `protobuf:"bytes,4,req,name=req_string,json=reqString" json:"req_string,omitempty"`
+	ReqEnum       *Enum    `protobuf:"varint,5,req,name=req_enum,json=reqEnum,enum=pb2.Enum" json:"req_enum,omitempty"`
+	ReqNested     *Nested  `protobuf:"bytes,6,req,name=req_nested,json=reqNested" json:"req_nested,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Requireds) Reset() {
@@ -633,11 +627,10 @@ func (x *Requireds) GetReqNested() *Nested {
 
 // Message contains both required and optional fields.
 type PartialRequired struct {
-	ReqString            *string                 `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
-	OptString            *string                 `protobuf:"bytes,2,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	ReqString     *string `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
+	OptString     *string `protobuf:"bytes,2,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *PartialRequired) Reset() {
@@ -678,10 +671,9 @@ func (x *PartialRequired) GetOptString() string {
 }
 
 type NestedWithRequired struct {
-	ReqString            *string                 `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	ReqString     *string `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *NestedWithRequired) Reset() {
@@ -720,10 +712,9 @@ type IndirectRequired struct {
 	StrToNested map[string]*NestedWithRequired `protobuf:"bytes,3,rep,name=str_to_nested,json=strToNested" json:"str_to_nested,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
 	// Types that are valid to be assigned to Union:
 	//	*IndirectRequired_OneofNested
-	Union                isIndirectRequired_Union `protobuf_oneof:"union"`
-	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields  `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache      `json:"-"`
+	Union         isIndirectRequired_Union `protobuf_oneof:"union"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *IndirectRequired) Reset() {
@@ -795,13 +786,12 @@ type IndirectRequired_OneofNested struct {
 func (*IndirectRequired_OneofNested) isIndirectRequired_Union() {}
 
 type Extensions struct {
-	OptString              *string                   `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	OptBool                *bool                     `protobuf:"varint,101,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
-	OptInt32               *int32                    `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	OptString       *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	OptBool         *bool   `protobuf:"varint,101,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
+	OptInt32        *int32  `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *Extensions) Reset() {
@@ -858,9 +848,8 @@ func (x *Extensions) GetOptInt32() int32 {
 }
 
 type ExtensionsContainer struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ExtensionsContainer) Reset() {
@@ -887,10 +876,9 @@ func (*ExtensionsContainer) Descriptor() ([]byte, []int) {
 }
 
 type MessageSet struct {
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `protobuf_messageset:"1" json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields `protobuf_messageset:"1"`
 }
 
 func (x *MessageSet) Reset() {
@@ -926,10 +914,9 @@ func (*MessageSet) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
 }
 
 type MessageSetExtension struct {
-	OptString            *string                 `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptString     *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *MessageSetExtension) Reset() {
@@ -963,10 +950,9 @@ func (x *MessageSetExtension) GetOptString() string {
 }
 
 type FakeMessageSet struct {
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *FakeMessageSet) Reset() {
@@ -1002,10 +988,9 @@ func (*FakeMessageSet) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
 }
 
 type FakeMessageSetExtension struct {
-	OptString            *string                 `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptString     *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FakeMessageSetExtension) Reset() {
@@ -1040,27 +1025,26 @@ func (x *FakeMessageSetExtension) GetOptString() string {
 
 // Message contains well-known type fields.
 type KnownTypes struct {
-	OptBool              *wrapperspb.BoolValue   `protobuf:"bytes,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
-	OptInt32             *wrapperspb.Int32Value  `protobuf:"bytes,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
-	OptInt64             *wrapperspb.Int64Value  `protobuf:"bytes,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
-	OptUint32            *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
-	OptUint64            *wrapperspb.UInt64Value `protobuf:"bytes,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
-	OptFloat             *wrapperspb.FloatValue  `protobuf:"bytes,6,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
-	OptDouble            *wrapperspb.DoubleValue `protobuf:"bytes,7,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
-	OptString            *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	OptBytes             *wrapperspb.BytesValue  `protobuf:"bytes,9,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
-	OptDuration          *durationpb.Duration    `protobuf:"bytes,20,opt,name=opt_duration,json=optDuration" json:"opt_duration,omitempty"`
-	OptTimestamp         *timestamppb.Timestamp  `protobuf:"bytes,21,opt,name=opt_timestamp,json=optTimestamp" json:"opt_timestamp,omitempty"`
-	OptStruct            *structpb.Struct        `protobuf:"bytes,25,opt,name=opt_struct,json=optStruct" json:"opt_struct,omitempty"`
-	OptList              *structpb.ListValue     `protobuf:"bytes,26,opt,name=opt_list,json=optList" json:"opt_list,omitempty"`
-	OptValue             *structpb.Value         `protobuf:"bytes,27,opt,name=opt_value,json=optValue" json:"opt_value,omitempty"`
-	OptNull              *structpb.NullValue     `protobuf:"varint,28,opt,name=opt_null,json=optNull,enum=google.protobuf.NullValue" json:"opt_null,omitempty"`
-	OptEmpty             *emptypb.Empty          `protobuf:"bytes,30,opt,name=opt_empty,json=optEmpty" json:"opt_empty,omitempty"`
-	OptAny               *anypb.Any              `protobuf:"bytes,32,opt,name=opt_any,json=optAny" json:"opt_any,omitempty"`
-	OptFieldmask         *fieldmaskpb.FieldMask  `protobuf:"bytes,40,opt,name=opt_fieldmask,json=optFieldmask" json:"opt_fieldmask,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptBool       *wrapperspb.BoolValue   `protobuf:"bytes,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
+	OptInt32      *wrapperspb.Int32Value  `protobuf:"bytes,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
+	OptInt64      *wrapperspb.Int64Value  `protobuf:"bytes,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
+	OptUint32     *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
+	OptUint64     *wrapperspb.UInt64Value `protobuf:"bytes,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
+	OptFloat      *wrapperspb.FloatValue  `protobuf:"bytes,6,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
+	OptDouble     *wrapperspb.DoubleValue `protobuf:"bytes,7,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
+	OptString     *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	OptBytes      *wrapperspb.BytesValue  `protobuf:"bytes,9,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
+	OptDuration   *durationpb.Duration    `protobuf:"bytes,20,opt,name=opt_duration,json=optDuration" json:"opt_duration,omitempty"`
+	OptTimestamp  *timestamppb.Timestamp  `protobuf:"bytes,21,opt,name=opt_timestamp,json=optTimestamp" json:"opt_timestamp,omitempty"`
+	OptStruct     *structpb.Struct        `protobuf:"bytes,25,opt,name=opt_struct,json=optStruct" json:"opt_struct,omitempty"`
+	OptList       *structpb.ListValue     `protobuf:"bytes,26,opt,name=opt_list,json=optList" json:"opt_list,omitempty"`
+	OptValue      *structpb.Value         `protobuf:"bytes,27,opt,name=opt_value,json=optValue" json:"opt_value,omitempty"`
+	OptNull       *structpb.NullValue     `protobuf:"varint,28,opt,name=opt_null,json=optNull,enum=google.protobuf.NullValue" json:"opt_null,omitempty"`
+	OptEmpty      *emptypb.Empty          `protobuf:"bytes,30,opt,name=opt_empty,json=optEmpty" json:"opt_empty,omitempty"`
+	OptAny        *anypb.Any              `protobuf:"bytes,32,opt,name=opt_any,json=optAny" json:"opt_any,omitempty"`
+	OptFieldmask  *fieldmaskpb.FieldMask  `protobuf:"bytes,40,opt,name=opt_fieldmask,json=optFieldmask" json:"opt_fieldmask,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *KnownTypes) Reset() {
@@ -1213,12 +1197,11 @@ func (x *KnownTypes) GetOptFieldmask() *fieldmaskpb.FieldMask {
 }
 
 type Nests_OptGroup struct {
-	OptString            *string                        `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
-	OptNested            *Nested                        `protobuf:"bytes,2,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
-	Optnestedgroup       *Nests_OptGroup_OptNestedGroup `protobuf:"group,3,opt,name=OptNestedGroup,json=optnestedgroup" json:"optnestedgroup,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields        `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache            `json:"-"`
+	OptString      *string                        `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+	OptNested      *Nested                        `protobuf:"bytes,2,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
+	Optnestedgroup *Nests_OptGroup_OptNestedGroup `protobuf:"group,3,opt,name=OptNestedGroup,json=optnestedgroup" json:"optnestedgroup,omitempty"`
+	sizeCache      protoimpl.SizeCache
+	unknownFields  protoimpl.UnknownFields
 }
 
 func (x *Nests_OptGroup) Reset() {
@@ -1266,10 +1249,9 @@ func (x *Nests_OptGroup) GetOptnestedgroup() *Nests_OptGroup_OptNestedGroup {
 }
 
 type Nests_RptGroup struct {
-	RptString            []string                `protobuf:"bytes,1,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	RptString     []string `protobuf:"bytes,1,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Nests_RptGroup) Reset() {
@@ -1303,10 +1285,9 @@ func (x *Nests_RptGroup) GetRptString() []string {
 }
 
 type Nests_OptGroup_OptNestedGroup struct {
-	OptFixed32           *uint32                 `protobuf:"fixed32,1,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	OptFixed32    *uint32 `protobuf:"fixed32,1,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Nests_OptGroup_OptNestedGroup) Reset() {
@@ -2059,6 +2040,204 @@ func file_pb2_test_proto_init() {
 	if File_pb2_test_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_pb2_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Scalars); i {
+			case 15:
+				return &v.sizeCache
+			case 16:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Enums); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Repeats); i {
+			case 9:
+				return &v.sizeCache
+			case 10:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Nested); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Nests); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Requireds); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PartialRequired); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*NestedWithRequired); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*IndirectRequired); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Extensions); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			case 5:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExtensionsContainer); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageSet); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			case 2:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageSetExtension); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FakeMessageSet); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			case 2:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FakeMessageSetExtension); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*KnownTypes); i {
+			case 18:
+				return &v.sizeCache
+			case 19:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Nests_OptGroup); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Nests_RptGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb2_test_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Nests_OptGroup_OptNestedGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_pb2_test_proto_msgTypes[8].OneofWrappers = []interface{}{
 		(*IndirectRequired_OneofNested)(nil),
 	}

+ 113 - 48
encoding/testprotos/pb3/test.pb.go

@@ -112,24 +112,23 @@ func (Enums_NestedEnum) EnumDescriptor() ([]byte, []int) {
 
 // Scalars contains scalar field types.
 type Scalars struct {
-	SBool                bool                    `protobuf:"varint,1,opt,name=s_bool,json=sBool,proto3" json:"s_bool,omitempty"`
-	SInt32               int32                   `protobuf:"varint,2,opt,name=s_int32,json=sInt32,proto3" json:"s_int32,omitempty"`
-	SInt64               int64                   `protobuf:"varint,3,opt,name=s_int64,json=sInt64,proto3" json:"s_int64,omitempty"`
-	SUint32              uint32                  `protobuf:"varint,4,opt,name=s_uint32,json=sUint32,proto3" json:"s_uint32,omitempty"`
-	SUint64              uint64                  `protobuf:"varint,5,opt,name=s_uint64,json=sUint64,proto3" json:"s_uint64,omitempty"`
-	SSint32              int32                   `protobuf:"zigzag32,6,opt,name=s_sint32,json=sSint32,proto3" json:"s_sint32,omitempty"`
-	SSint64              int64                   `protobuf:"zigzag64,7,opt,name=s_sint64,json=sSint64,proto3" json:"s_sint64,omitempty"`
-	SFixed32             uint32                  `protobuf:"fixed32,8,opt,name=s_fixed32,json=sFixed32,proto3" json:"s_fixed32,omitempty"`
-	SFixed64             uint64                  `protobuf:"fixed64,9,opt,name=s_fixed64,json=sFixed64,proto3" json:"s_fixed64,omitempty"`
-	SSfixed32            int32                   `protobuf:"fixed32,10,opt,name=s_sfixed32,json=sSfixed32,proto3" json:"s_sfixed32,omitempty"`
-	SSfixed64            int64                   `protobuf:"fixed64,11,opt,name=s_sfixed64,json=sSfixed64,proto3" json:"s_sfixed64,omitempty"`
-	SFloat               float32                 `protobuf:"fixed32,20,opt,name=s_float,json=sFloat,proto3" json:"s_float,omitempty"`
-	SDouble              float64                 `protobuf:"fixed64,21,opt,name=s_double,json=sDouble,proto3" json:"s_double,omitempty"`
-	SBytes               []byte                  `protobuf:"bytes,14,opt,name=s_bytes,json=sBytes,proto3" json:"s_bytes,omitempty"`
-	SString              string                  `protobuf:"bytes,13,opt,name=s_string,json=sString,proto3" json:"s_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	SBool         bool    `protobuf:"varint,1,opt,name=s_bool,json=sBool,proto3" json:"s_bool,omitempty"`
+	SInt32        int32   `protobuf:"varint,2,opt,name=s_int32,json=sInt32,proto3" json:"s_int32,omitempty"`
+	SInt64        int64   `protobuf:"varint,3,opt,name=s_int64,json=sInt64,proto3" json:"s_int64,omitempty"`
+	SUint32       uint32  `protobuf:"varint,4,opt,name=s_uint32,json=sUint32,proto3" json:"s_uint32,omitempty"`
+	SUint64       uint64  `protobuf:"varint,5,opt,name=s_uint64,json=sUint64,proto3" json:"s_uint64,omitempty"`
+	SSint32       int32   `protobuf:"zigzag32,6,opt,name=s_sint32,json=sSint32,proto3" json:"s_sint32,omitempty"`
+	SSint64       int64   `protobuf:"zigzag64,7,opt,name=s_sint64,json=sSint64,proto3" json:"s_sint64,omitempty"`
+	SFixed32      uint32  `protobuf:"fixed32,8,opt,name=s_fixed32,json=sFixed32,proto3" json:"s_fixed32,omitempty"`
+	SFixed64      uint64  `protobuf:"fixed64,9,opt,name=s_fixed64,json=sFixed64,proto3" json:"s_fixed64,omitempty"`
+	SSfixed32     int32   `protobuf:"fixed32,10,opt,name=s_sfixed32,json=sSfixed32,proto3" json:"s_sfixed32,omitempty"`
+	SSfixed64     int64   `protobuf:"fixed64,11,opt,name=s_sfixed64,json=sSfixed64,proto3" json:"s_sfixed64,omitempty"`
+	SFloat        float32 `protobuf:"fixed32,20,opt,name=s_float,json=sFloat,proto3" json:"s_float,omitempty"`
+	SDouble       float64 `protobuf:"fixed64,21,opt,name=s_double,json=sDouble,proto3" json:"s_double,omitempty"`
+	SBytes        []byte  `protobuf:"bytes,14,opt,name=s_bytes,json=sBytes,proto3" json:"s_bytes,omitempty"`
+	SString       string  `protobuf:"bytes,13,opt,name=s_string,json=sString,proto3" json:"s_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Scalars) Reset() {
@@ -262,11 +261,10 @@ func (x *Scalars) GetSString() string {
 
 // Message contains enum fields.
 type Enums struct {
-	SEnum                Enum                    `protobuf:"varint,1,opt,name=s_enum,json=sEnum,proto3,enum=pb3.Enum" json:"s_enum,omitempty"`
-	SNestedEnum          Enums_NestedEnum        `protobuf:"varint,3,opt,name=s_nested_enum,json=sNestedEnum,proto3,enum=pb3.Enums_NestedEnum" json:"s_nested_enum,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	SEnum         Enum             `protobuf:"varint,1,opt,name=s_enum,json=sEnum,proto3,enum=pb3.Enum" json:"s_enum,omitempty"`
+	SNestedEnum   Enums_NestedEnum `protobuf:"varint,3,opt,name=s_nested_enum,json=sNestedEnum,proto3,enum=pb3.Enums_NestedEnum" json:"s_nested_enum,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Enums) Reset() {
@@ -308,10 +306,9 @@ func (x *Enums) GetSNestedEnum() Enums_NestedEnum {
 
 // Message contains nested message field.
 type Nests struct {
-	SNested              *Nested                 `protobuf:"bytes,2,opt,name=s_nested,json=sNested,proto3" json:"s_nested,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	SNested       *Nested `protobuf:"bytes,2,opt,name=s_nested,json=sNested,proto3" json:"s_nested,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Nests) Reset() {
@@ -346,11 +343,10 @@ func (x *Nests) GetSNested() *Nested {
 
 // Message type used as submessage.
 type Nested struct {
-	SString              string                  `protobuf:"bytes,1,opt,name=s_string,json=sString,proto3" json:"s_string,omitempty"`
-	SNested              *Nested                 `protobuf:"bytes,2,opt,name=s_nested,json=sNested,proto3" json:"s_nested,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	SString       string  `protobuf:"bytes,1,opt,name=s_string,json=sString,proto3" json:"s_string,omitempty"`
+	SNested       *Nested `protobuf:"bytes,2,opt,name=s_nested,json=sNested,proto3" json:"s_nested,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Nested) Reset() {
@@ -396,10 +392,9 @@ type Oneofs struct {
 	//	*Oneofs_OneofEnum
 	//	*Oneofs_OneofString
 	//	*Oneofs_OneofNested
-	Union                isOneofs_Union          `protobuf_oneof:"union"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Union         isOneofs_Union `protobuf_oneof:"union"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Oneofs) Reset() {
@@ -477,14 +472,13 @@ func (*Oneofs_OneofNested) isOneofs_Union() {}
 
 // Message contains map fields.
 type Maps struct {
-	Int32ToStr           map[int32]string        `protobuf:"bytes,1,rep,name=int32_to_str,json=int32ToStr,proto3" json:"int32_to_str,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
-	BoolToUint32         map[bool]uint32         `protobuf:"bytes,2,rep,name=bool_to_uint32,json=boolToUint32,proto3" json:"bool_to_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
-	Uint64ToEnum         map[uint64]Enum         `protobuf:"bytes,3,rep,name=uint64_to_enum,json=uint64ToEnum,proto3" json:"uint64_to_enum,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=pb3.Enum"`
-	StrToNested          map[string]*Nested      `protobuf:"bytes,4,rep,name=str_to_nested,json=strToNested,proto3" json:"str_to_nested,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
-	StrToOneofs          map[string]*Oneofs      `protobuf:"bytes,5,rep,name=str_to_oneofs,json=strToOneofs,proto3" json:"str_to_oneofs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Int32ToStr    map[int32]string   `protobuf:"bytes,1,rep,name=int32_to_str,json=int32ToStr,proto3" json:"int32_to_str,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	BoolToUint32  map[bool]uint32    `protobuf:"bytes,2,rep,name=bool_to_uint32,json=boolToUint32,proto3" json:"bool_to_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
+	Uint64ToEnum  map[uint64]Enum    `protobuf:"bytes,3,rep,name=uint64_to_enum,json=uint64ToEnum,proto3" json:"uint64_to_enum,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=pb3.Enum"`
+	StrToNested   map[string]*Nested `protobuf:"bytes,4,rep,name=str_to_nested,json=strToNested,proto3" json:"str_to_nested,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	StrToOneofs   map[string]*Oneofs `protobuf:"bytes,5,rep,name=str_to_oneofs,json=strToOneofs,proto3" json:"str_to_oneofs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Maps) Reset() {
@@ -547,10 +541,9 @@ func (x *Maps) GetStrToOneofs() map[string]*Oneofs {
 
 // Message for testing json_name option.
 type JSONNames struct {
-	SString              string                  `protobuf:"bytes,1,opt,name=s_string,json=foo_bar,proto3" json:"s_string,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	SString       string `protobuf:"bytes,1,opt,name=s_string,json=foo_bar,proto3" json:"s_string,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *JSONNames) Reset() {
@@ -752,6 +745,78 @@ func file_pb3_test_proto_init() {
 	if File_pb3_test_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_pb3_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Scalars); i {
+			case 15:
+				return &v.sizeCache
+			case 16:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb3_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Enums); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb3_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Nests); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb3_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Nested); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb3_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Oneofs); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb3_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Maps); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_pb3_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*JSONNames); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_pb3_test_proto_msgTypes[4].OneofWrappers = []interface{}{
 		(*Oneofs_OneofEnum)(nil),
 		(*Oneofs_OneofString)(nil),

+ 3 - 3
internal/impl/codec_message.go

@@ -19,8 +19,8 @@ import (
 type coderMessageInfo struct {
 	orderedCoderFields []*coderFieldInfo
 	sizecacheOffset    offset
-	extensionOffset    offset
 	unknownOffset      offset
+	extensionOffset    offset
 	needsInitCheck     bool
 }
 
@@ -55,7 +55,7 @@ func (mi *MessageInfo) makeMethods(t reflect.Type, si structInfo) {
 		}
 		mi.orderedCoderFields = append(mi.orderedCoderFields, &coderFieldInfo{
 			num:     fd.Number(),
-			offset:  offsetOf(fs),
+			offset:  offsetOf(fs, mi.Exporter),
 			wiretag: wiretag,
 			tagsize: wire.SizeVarint(wiretag),
 			funcs:   fieldCoder(fd, ft),
@@ -71,7 +71,7 @@ func (mi *MessageInfo) makeMethods(t reflect.Type, si structInfo) {
 		fs := si.oneofsByName[od.Name()]
 		mi.orderedCoderFields = append(mi.orderedCoderFields, &coderFieldInfo{
 			num:       od.Fields().Get(0).Number(),
-			offset:    offsetOf(fs),
+			offset:    offsetOf(fs, mi.Exporter),
 			funcs:     makeOneofFieldCoder(fs, od, si.fieldsByNumber, si.oneofWrappersByNumber),
 			isPointer: true,
 		})

+ 32 - 14
internal/impl/message.go

@@ -29,6 +29,10 @@ type MessageInfo struct {
 	// Once set, this field must never be mutated.
 	PBType pref.MessageType
 
+	// Exporter must be provided in a purego environment in order to provide
+	// access to unexported fields.
+	Exporter exporter
+
 	// OneofWrappers is list of pointers to oneof wrapper struct types.
 	OneofWrappers []interface{}
 
@@ -51,6 +55,11 @@ type MessageInfo struct {
 	extensionFieldInfos   map[pref.ExtensionType]*extensionFieldInfo
 }
 
+// exporter is a function that returns a reference to the ith field of v,
+// where v is a pointer to a struct. It returns nil if it does not support
+// exporting the requested field (e.g., already exported).
+type exporter func(v interface{}, i int) interface{}
+
 var prefMessageType = reflect.TypeOf((*pref.Message)(nil)).Elem()
 
 // getMessageInfo returns the MessageInfo (if any) for a type.
@@ -120,8 +129,8 @@ var (
 
 type structInfo struct {
 	sizecacheOffset offset
-	extensionOffset offset
 	unknownOffset   offset
+	extensionOffset offset
 
 	fieldsByNumber        map[pref.FieldNumber]reflect.StructField
 	oneofsByName          map[pref.Name]reflect.StructField
@@ -132,8 +141,8 @@ type structInfo struct {
 func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo {
 	si := structInfo{
 		sizecacheOffset: invalidOffset,
-		extensionOffset: invalidOffset,
 		unknownOffset:   invalidOffset,
+		extensionOffset: invalidOffset,
 
 		fieldsByNumber:        map[pref.FieldNumber]reflect.StructField{},
 		oneofsByName:          map[pref.Name]reflect.StructField{},
@@ -141,17 +150,26 @@ func (mi *MessageInfo) makeStructInfo(t reflect.Type) structInfo {
 		oneofWrappersByNumber: map[pref.FieldNumber]reflect.Type{},
 	}
 
+	if f, _ := t.FieldByName("sizeCache"); f.Type == sizecacheType {
+		si.sizecacheOffset = offsetOf(f, mi.Exporter)
+	}
 	if f, _ := t.FieldByName("XXX_sizecache"); f.Type == sizecacheType {
-		si.sizecacheOffset = offsetOf(f)
+		si.sizecacheOffset = offsetOf(f, mi.Exporter)
+	}
+	if f, _ := t.FieldByName("unknownFields"); f.Type == unknownFieldsType {
+		si.unknownOffset = offsetOf(f, mi.Exporter)
+	}
+	if f, _ := t.FieldByName("XXX_unrecognized"); f.Type == unknownFieldsType {
+		si.unknownOffset = offsetOf(f, mi.Exporter)
+	}
+	if f, _ := t.FieldByName("extensionFields"); f.Type == extensionFieldsType {
+		si.extensionOffset = offsetOf(f, mi.Exporter)
 	}
 	if f, _ := t.FieldByName("XXX_InternalExtensions"); f.Type == extensionFieldsType {
-		si.extensionOffset = offsetOf(f)
+		si.extensionOffset = offsetOf(f, mi.Exporter)
 	}
 	if f, _ := t.FieldByName("XXX_extensions"); f.Type == extensionFieldsType {
-		si.extensionOffset = offsetOf(f)
-	}
-	if f, _ := t.FieldByName("XXX_unrecognized"); f.Type == unknownFieldsType {
-		si.unknownOffset = offsetOf(f)
+		si.extensionOffset = offsetOf(f, mi.Exporter)
 	}
 
 	// Generate a mapping of field numbers and names to Go struct field or type.
@@ -209,15 +227,15 @@ func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) {
 		var fi fieldInfo
 		switch {
 		case fd.ContainingOneof() != nil:
-			fi = fieldInfoForOneof(fd, si.oneofsByName[fd.ContainingOneof().Name()], si.oneofWrappersByNumber[fd.Number()])
+			fi = fieldInfoForOneof(fd, si.oneofsByName[fd.ContainingOneof().Name()], mi.Exporter, si.oneofWrappersByNumber[fd.Number()])
 		case fd.IsMap():
-			fi = fieldInfoForMap(fd, fs)
+			fi = fieldInfoForMap(fd, fs, mi.Exporter)
 		case fd.IsList():
-			fi = fieldInfoForList(fd, fs)
+			fi = fieldInfoForList(fd, fs, mi.Exporter)
 		case fd.Kind() == pref.MessageKind || fd.Kind() == pref.GroupKind:
-			fi = fieldInfoForMessage(fd, fs)
+			fi = fieldInfoForMessage(fd, fs, mi.Exporter)
 		default:
-			fi = fieldInfoForScalar(fd, fs)
+			fi = fieldInfoForScalar(fd, fs, mi.Exporter)
 		}
 		mi.fields[fd.Number()] = &fi
 	}
@@ -225,7 +243,7 @@ func (mi *MessageInfo) makeKnownFieldsFunc(si structInfo) {
 	mi.oneofs = map[pref.Name]*oneofInfo{}
 	for i := 0; i < mi.PBType.Descriptor().Oneofs().Len(); i++ {
 		od := mi.PBType.Descriptor().Oneofs().Get(i)
-		mi.oneofs[od.Name()] = makeOneofInfo(od, si.oneofsByName[od.Name()], si.oneofWrappersByType)
+		mi.oneofs[od.Name()] = makeOneofInfo(od, si.oneofsByName[od.Name()], mi.Exporter, si.oneofWrappersByType)
 	}
 }
 

+ 12 - 12
internal/impl/message_field.go

@@ -26,7 +26,7 @@ type fieldInfo struct {
 	newMessage func() pref.Message
 }
 
-func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, ot reflect.Type) fieldInfo {
+func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, x exporter, ot reflect.Type) fieldInfo {
 	ft := fs.Type
 	if ft.Kind() != reflect.Interface {
 		panic(fmt.Sprintf("invalid type: got %v, want interface kind", ft))
@@ -44,7 +44,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, ot refle
 	}
 
 	// TODO: Implement unsafe fast path?
-	fieldOffset := offsetOf(fs)
+	fieldOffset := offsetOf(fs, x)
 	return fieldInfo{
 		// NOTE: The logic below intentionally assumes that oneof fields are
 		// well-formatted. That is, the oneof interface never contains a
@@ -111,7 +111,7 @@ func fieldInfoForOneof(fd pref.FieldDescriptor, fs reflect.StructField, ot refle
 	}
 }
 
-func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo {
+func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
 	ft := fs.Type
 	if ft.Kind() != reflect.Map {
 		panic(fmt.Sprintf("invalid type: got %v, want map kind", ft))
@@ -123,7 +123,7 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo
 	})
 
 	// TODO: Implement unsafe fast path?
-	fieldOffset := offsetOf(fs)
+	fieldOffset := offsetOf(fs, x)
 	return fieldInfo{
 		fieldDesc: fd,
 		has: func(p pointer) bool {
@@ -158,7 +158,7 @@ func fieldInfoForMap(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo
 	}
 }
 
-func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo {
+func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
 	ft := fs.Type
 	if ft.Kind() != reflect.Slice {
 		panic(fmt.Sprintf("invalid type: got %v, want slice kind", ft))
@@ -169,7 +169,7 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo
 	})
 
 	// TODO: Implement unsafe fast path?
-	fieldOffset := offsetOf(fs)
+	fieldOffset := offsetOf(fs, x)
 	return fieldInfo{
 		fieldDesc: fd,
 		has: func(p pointer) bool {
@@ -206,7 +206,7 @@ func fieldInfoForList(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo
 
 var emptyBytes = reflect.ValueOf([]byte{})
 
-func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo {
+func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
 	ft := fs.Type
 	nullable := fd.Syntax() == pref.Proto2
 	if nullable {
@@ -220,7 +220,7 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField) fieldIn
 	conv, _ := newConverter(ft, fd.Kind())
 
 	// TODO: Implement unsafe fast path?
-	fieldOffset := offsetOf(fs)
+	fieldOffset := offsetOf(fs, x)
 	return fieldInfo{
 		fieldDesc: fd,
 		has: func(p pointer) bool {
@@ -281,13 +281,13 @@ func fieldInfoForScalar(fd pref.FieldDescriptor, fs reflect.StructField) fieldIn
 	}
 }
 
-func fieldInfoForMessage(fd pref.FieldDescriptor, fs reflect.StructField) fieldInfo {
+func fieldInfoForMessage(fd pref.FieldDescriptor, fs reflect.StructField, x exporter) fieldInfo {
 	ft := fs.Type
 	conv, _ := newConverter(ft, fd.Kind())
 	frozenEmpty := pref.ValueOf(frozenMessage{conv.NewMessage()})
 
 	// TODO: Implement unsafe fast path?
-	fieldOffset := offsetOf(fs)
+	fieldOffset := offsetOf(fs, x)
 	return fieldInfo{
 		fieldDesc: fd,
 		has: func(p pointer) bool {
@@ -334,8 +334,8 @@ type oneofInfo struct {
 	which     func(pointer) pref.FieldNumber
 }
 
-func makeOneofInfo(od pref.OneofDescriptor, fs reflect.StructField, wrappersByType map[reflect.Type]pref.FieldNumber) *oneofInfo {
-	fieldOffset := offsetOf(fs)
+func makeOneofInfo(od pref.OneofDescriptor, fs reflect.StructField, x exporter, wrappersByType map[reflect.Type]pref.FieldNumber) *oneofInfo {
+	fieldOffset := offsetOf(fs, x)
 	return &oneofInfo{
 		oneofDesc: od,
 		which: func(p pointer) pref.FieldNumber {

+ 23 - 8
internal/impl/pointer_reflect.go

@@ -11,26 +11,37 @@ import (
 	"reflect"
 )
 
+const UnsafeEnabled = false
+
 // offset represents the offset to a struct field, accessible from a pointer.
 // The offset is the field index into a struct.
-type offset []int
+type offset struct {
+	index  int
+	export exporter
+}
 
 // offsetOf returns a field offset for the struct field.
-func offsetOf(f reflect.StructField) offset {
+func offsetOf(f reflect.StructField, x exporter) offset {
 	if len(f.Index) != 1 {
 		panic("embedded structs are not supported")
 	}
-	return f.Index
+	if f.PkgPath == "" {
+		return offset{index: f.Index[0]} // field is already exported
+	}
+	if x == nil {
+		panic("exporter must be provided for unexported field")
+	}
+	return offset{index: f.Index[0], export: x}
 }
 
 // IsValid reports whether the offset is valid.
-func (f offset) IsValid() bool { return f != nil }
+func (f offset) IsValid() bool { return f.index >= 0 }
 
 // invalidOffset is an invalid field offset.
-var invalidOffset = offset(nil)
+var invalidOffset = offset{index: -1}
 
 // zeroOffset is a noop when calling pointer.Apply.
-var zeroOffset = offset([]int{0})
+var zeroOffset = offset{index: 0}
 
 // pointer is an abstract representation of a pointer to a struct or field.
 type pointer struct{ v reflect.Value }
@@ -53,8 +64,12 @@ func (p pointer) IsNil() bool {
 // Apply adds an offset to the pointer to derive a new pointer
 // to a specified field. The current pointer must be pointing at a struct.
 func (p pointer) Apply(f offset) pointer {
-	// TODO: Handle unexported fields in an API that hides XXX fields?
-	return pointer{v: p.v.Elem().FieldByIndex(f).Addr()}
+	if f.export != nil {
+		if v := reflect.ValueOf(f.export(p.v.Interface(), f.index)); v.IsValid() {
+			return pointer{v: v}
+		}
+	}
+	return pointer{v: p.v.Elem().Field(f.index).Addr()}
 }
 
 // AsValueOf treats p as a pointer to an object of type t and returns the value.

+ 3 - 1
internal/impl/pointer_unsafe.go

@@ -11,12 +11,14 @@ import (
 	"unsafe"
 )
 
+const UnsafeEnabled = true
+
 // offset represents the offset to a struct field, accessible from a pointer.
 // The offset is the byte offset to the field from the start of the struct.
 type offset uintptr
 
 // offsetOf returns a field offset for the struct field.
-func offsetOf(f reflect.StructField) offset {
+func offsetOf(f reflect.StructField, x exporter) offset {
 	return offset(f.Offset)
 }
 

+ 15 - 4
internal/testprotos/benchmarks/benchmarks.pb.go

@@ -42,10 +42,9 @@ type BenchmarkDataset struct {
 	// potentially more realistic results than just parsing the same message
 	// over and over.  A single message parsed repeatedly could yield unusually
 	// good branch prediction performance.
-	Payload              [][]byte                `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Payload       [][]byte `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *BenchmarkDataset) Reset() {
@@ -141,6 +140,18 @@ func file_benchmarks_proto_init() {
 	if File_benchmarks_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_benchmarks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BenchmarkDataset); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_benchmarks_proto_rawDesc,

+ 87 - 67
internal/testprotos/benchmarks/datasets/google_message1/proto2/benchmark_message1_proto2.pb.go

@@ -18,50 +18,49 @@ const (
 )
 
 type GoogleMessage1 struct {
-	Field1               *string                   `protobuf:"bytes,1,req,name=field1" json:"field1,omitempty"`
-	Field9               *string                   `protobuf:"bytes,9,opt,name=field9" json:"field9,omitempty"`
-	Field18              *string                   `protobuf:"bytes,18,opt,name=field18" json:"field18,omitempty"`
-	Field80              *bool                     `protobuf:"varint,80,opt,name=field80,def=0" json:"field80,omitempty"`
-	Field81              *bool                     `protobuf:"varint,81,opt,name=field81,def=1" json:"field81,omitempty"`
-	Field2               *int32                    `protobuf:"varint,2,req,name=field2" json:"field2,omitempty"`
-	Field3               *int32                    `protobuf:"varint,3,req,name=field3" json:"field3,omitempty"`
-	Field280             *int32                    `protobuf:"varint,280,opt,name=field280" json:"field280,omitempty"`
-	Field6               *int32                    `protobuf:"varint,6,opt,name=field6,def=0" json:"field6,omitempty"`
-	Field22              *int64                    `protobuf:"varint,22,opt,name=field22" json:"field22,omitempty"`
-	Field4               *string                   `protobuf:"bytes,4,opt,name=field4" json:"field4,omitempty"`
-	Field5               []uint64                  `protobuf:"fixed64,5,rep,name=field5" json:"field5,omitempty"`
-	Field59              *bool                     `protobuf:"varint,59,opt,name=field59,def=0" json:"field59,omitempty"`
-	Field7               *string                   `protobuf:"bytes,7,opt,name=field7" json:"field7,omitempty"`
-	Field16              *int32                    `protobuf:"varint,16,opt,name=field16" json:"field16,omitempty"`
-	Field130             *int32                    `protobuf:"varint,130,opt,name=field130,def=0" json:"field130,omitempty"`
-	Field12              *bool                     `protobuf:"varint,12,opt,name=field12,def=1" json:"field12,omitempty"`
-	Field17              *bool                     `protobuf:"varint,17,opt,name=field17,def=1" json:"field17,omitempty"`
-	Field13              *bool                     `protobuf:"varint,13,opt,name=field13,def=1" json:"field13,omitempty"`
-	Field14              *bool                     `protobuf:"varint,14,opt,name=field14,def=1" json:"field14,omitempty"`
-	Field104             *int32                    `protobuf:"varint,104,opt,name=field104,def=0" json:"field104,omitempty"`
-	Field100             *int32                    `protobuf:"varint,100,opt,name=field100,def=0" json:"field100,omitempty"`
-	Field101             *int32                    `protobuf:"varint,101,opt,name=field101,def=0" json:"field101,omitempty"`
-	Field102             *string                   `protobuf:"bytes,102,opt,name=field102" json:"field102,omitempty"`
-	Field103             *string                   `protobuf:"bytes,103,opt,name=field103" json:"field103,omitempty"`
-	Field29              *int32                    `protobuf:"varint,29,opt,name=field29,def=0" json:"field29,omitempty"`
-	Field30              *bool                     `protobuf:"varint,30,opt,name=field30,def=0" json:"field30,omitempty"`
-	Field60              *int32                    `protobuf:"varint,60,opt,name=field60,def=-1" json:"field60,omitempty"`
-	Field271             *int32                    `protobuf:"varint,271,opt,name=field271,def=-1" json:"field271,omitempty"`
-	Field272             *int32                    `protobuf:"varint,272,opt,name=field272,def=-1" json:"field272,omitempty"`
-	Field150             *int32                    `protobuf:"varint,150,opt,name=field150" json:"field150,omitempty"`
-	Field23              *int32                    `protobuf:"varint,23,opt,name=field23,def=0" json:"field23,omitempty"`
-	Field24              *bool                     `protobuf:"varint,24,opt,name=field24,def=0" json:"field24,omitempty"`
-	Field25              *int32                    `protobuf:"varint,25,opt,name=field25,def=0" json:"field25,omitempty"`
-	Field15              *GoogleMessage1SubMessage `protobuf:"bytes,15,opt,name=field15" json:"field15,omitempty"`
-	Field78              *bool                     `protobuf:"varint,78,opt,name=field78" json:"field78,omitempty"`
-	Field67              *int32                    `protobuf:"varint,67,opt,name=field67,def=0" json:"field67,omitempty"`
-	Field68              *int32                    `protobuf:"varint,68,opt,name=field68" json:"field68,omitempty"`
-	Field128             *int32                    `protobuf:"varint,128,opt,name=field128,def=0" json:"field128,omitempty"`
-	Field129             *string                   `protobuf:"bytes,129,opt,name=field129,def=xxxxxxxxxxxxxxxxxxxxx" json:"field129,omitempty"`
-	Field131             *int32                    `protobuf:"varint,131,opt,name=field131,def=0" json:"field131,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache       `json:"-"`
+	Field1        *string                   `protobuf:"bytes,1,req,name=field1" json:"field1,omitempty"`
+	Field9        *string                   `protobuf:"bytes,9,opt,name=field9" json:"field9,omitempty"`
+	Field18       *string                   `protobuf:"bytes,18,opt,name=field18" json:"field18,omitempty"`
+	Field80       *bool                     `protobuf:"varint,80,opt,name=field80,def=0" json:"field80,omitempty"`
+	Field81       *bool                     `protobuf:"varint,81,opt,name=field81,def=1" json:"field81,omitempty"`
+	Field2        *int32                    `protobuf:"varint,2,req,name=field2" json:"field2,omitempty"`
+	Field3        *int32                    `protobuf:"varint,3,req,name=field3" json:"field3,omitempty"`
+	Field280      *int32                    `protobuf:"varint,280,opt,name=field280" json:"field280,omitempty"`
+	Field6        *int32                    `protobuf:"varint,6,opt,name=field6,def=0" json:"field6,omitempty"`
+	Field22       *int64                    `protobuf:"varint,22,opt,name=field22" json:"field22,omitempty"`
+	Field4        *string                   `protobuf:"bytes,4,opt,name=field4" json:"field4,omitempty"`
+	Field5        []uint64                  `protobuf:"fixed64,5,rep,name=field5" json:"field5,omitempty"`
+	Field59       *bool                     `protobuf:"varint,59,opt,name=field59,def=0" json:"field59,omitempty"`
+	Field7        *string                   `protobuf:"bytes,7,opt,name=field7" json:"field7,omitempty"`
+	Field16       *int32                    `protobuf:"varint,16,opt,name=field16" json:"field16,omitempty"`
+	Field130      *int32                    `protobuf:"varint,130,opt,name=field130,def=0" json:"field130,omitempty"`
+	Field12       *bool                     `protobuf:"varint,12,opt,name=field12,def=1" json:"field12,omitempty"`
+	Field17       *bool                     `protobuf:"varint,17,opt,name=field17,def=1" json:"field17,omitempty"`
+	Field13       *bool                     `protobuf:"varint,13,opt,name=field13,def=1" json:"field13,omitempty"`
+	Field14       *bool                     `protobuf:"varint,14,opt,name=field14,def=1" json:"field14,omitempty"`
+	Field104      *int32                    `protobuf:"varint,104,opt,name=field104,def=0" json:"field104,omitempty"`
+	Field100      *int32                    `protobuf:"varint,100,opt,name=field100,def=0" json:"field100,omitempty"`
+	Field101      *int32                    `protobuf:"varint,101,opt,name=field101,def=0" json:"field101,omitempty"`
+	Field102      *string                   `protobuf:"bytes,102,opt,name=field102" json:"field102,omitempty"`
+	Field103      *string                   `protobuf:"bytes,103,opt,name=field103" json:"field103,omitempty"`
+	Field29       *int32                    `protobuf:"varint,29,opt,name=field29,def=0" json:"field29,omitempty"`
+	Field30       *bool                     `protobuf:"varint,30,opt,name=field30,def=0" json:"field30,omitempty"`
+	Field60       *int32                    `protobuf:"varint,60,opt,name=field60,def=-1" json:"field60,omitempty"`
+	Field271      *int32                    `protobuf:"varint,271,opt,name=field271,def=-1" json:"field271,omitempty"`
+	Field272      *int32                    `protobuf:"varint,272,opt,name=field272,def=-1" json:"field272,omitempty"`
+	Field150      *int32                    `protobuf:"varint,150,opt,name=field150" json:"field150,omitempty"`
+	Field23       *int32                    `protobuf:"varint,23,opt,name=field23,def=0" json:"field23,omitempty"`
+	Field24       *bool                     `protobuf:"varint,24,opt,name=field24,def=0" json:"field24,omitempty"`
+	Field25       *int32                    `protobuf:"varint,25,opt,name=field25,def=0" json:"field25,omitempty"`
+	Field15       *GoogleMessage1SubMessage `protobuf:"bytes,15,opt,name=field15" json:"field15,omitempty"`
+	Field78       *bool                     `protobuf:"varint,78,opt,name=field78" json:"field78,omitempty"`
+	Field67       *int32                    `protobuf:"varint,67,opt,name=field67,def=0" json:"field67,omitempty"`
+	Field68       *int32                    `protobuf:"varint,68,opt,name=field68" json:"field68,omitempty"`
+	Field128      *int32                    `protobuf:"varint,128,opt,name=field128,def=0" json:"field128,omitempty"`
+	Field129      *string                   `protobuf:"bytes,129,opt,name=field129,def=xxxxxxxxxxxxxxxxxxxxx" json:"field129,omitempty"`
+	Field131      *int32                    `protobuf:"varint,131,opt,name=field131,def=0" json:"field131,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage1) Reset() {
@@ -400,29 +399,28 @@ func (x *GoogleMessage1) GetField131() int32 {
 }
 
 type GoogleMessage1SubMessage struct {
-	Field1               *int32                  `protobuf:"varint,1,opt,name=field1,def=0" json:"field1,omitempty"`
-	Field2               *int32                  `protobuf:"varint,2,opt,name=field2,def=0" json:"field2,omitempty"`
-	Field3               *int32                  `protobuf:"varint,3,opt,name=field3,def=0" json:"field3,omitempty"`
-	Field15              *string                 `protobuf:"bytes,15,opt,name=field15" json:"field15,omitempty"`
-	Field12              *bool                   `protobuf:"varint,12,opt,name=field12,def=1" json:"field12,omitempty"`
-	Field13              *int64                  `protobuf:"varint,13,opt,name=field13" json:"field13,omitempty"`
-	Field14              *int64                  `protobuf:"varint,14,opt,name=field14" json:"field14,omitempty"`
-	Field16              *int32                  `protobuf:"varint,16,opt,name=field16" json:"field16,omitempty"`
-	Field19              *int32                  `protobuf:"varint,19,opt,name=field19,def=2" json:"field19,omitempty"`
-	Field20              *bool                   `protobuf:"varint,20,opt,name=field20,def=1" json:"field20,omitempty"`
-	Field28              *bool                   `protobuf:"varint,28,opt,name=field28,def=1" json:"field28,omitempty"`
-	Field21              *uint64                 `protobuf:"fixed64,21,opt,name=field21" json:"field21,omitempty"`
-	Field22              *int32                  `protobuf:"varint,22,opt,name=field22" json:"field22,omitempty"`
-	Field23              *bool                   `protobuf:"varint,23,opt,name=field23,def=0" json:"field23,omitempty"`
-	Field206             *bool                   `protobuf:"varint,206,opt,name=field206,def=0" json:"field206,omitempty"`
-	Field203             *uint32                 `protobuf:"fixed32,203,opt,name=field203" json:"field203,omitempty"`
-	Field204             *int32                  `protobuf:"varint,204,opt,name=field204" json:"field204,omitempty"`
-	Field205             *string                 `protobuf:"bytes,205,opt,name=field205" json:"field205,omitempty"`
-	Field207             *uint64                 `protobuf:"varint,207,opt,name=field207" json:"field207,omitempty"`
-	Field300             *uint64                 `protobuf:"varint,300,opt,name=field300" json:"field300,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field1        *int32  `protobuf:"varint,1,opt,name=field1,def=0" json:"field1,omitempty"`
+	Field2        *int32  `protobuf:"varint,2,opt,name=field2,def=0" json:"field2,omitempty"`
+	Field3        *int32  `protobuf:"varint,3,opt,name=field3,def=0" json:"field3,omitempty"`
+	Field15       *string `protobuf:"bytes,15,opt,name=field15" json:"field15,omitempty"`
+	Field12       *bool   `protobuf:"varint,12,opt,name=field12,def=1" json:"field12,omitempty"`
+	Field13       *int64  `protobuf:"varint,13,opt,name=field13" json:"field13,omitempty"`
+	Field14       *int64  `protobuf:"varint,14,opt,name=field14" json:"field14,omitempty"`
+	Field16       *int32  `protobuf:"varint,16,opt,name=field16" json:"field16,omitempty"`
+	Field19       *int32  `protobuf:"varint,19,opt,name=field19,def=2" json:"field19,omitempty"`
+	Field20       *bool   `protobuf:"varint,20,opt,name=field20,def=1" json:"field20,omitempty"`
+	Field28       *bool   `protobuf:"varint,28,opt,name=field28,def=1" json:"field28,omitempty"`
+	Field21       *uint64 `protobuf:"fixed64,21,opt,name=field21" json:"field21,omitempty"`
+	Field22       *int32  `protobuf:"varint,22,opt,name=field22" json:"field22,omitempty"`
+	Field23       *bool   `protobuf:"varint,23,opt,name=field23,def=0" json:"field23,omitempty"`
+	Field206      *bool   `protobuf:"varint,206,opt,name=field206,def=0" json:"field206,omitempty"`
+	Field203      *uint32 `protobuf:"fixed32,203,opt,name=field203" json:"field203,omitempty"`
+	Field204      *int32  `protobuf:"varint,204,opt,name=field204" json:"field204,omitempty"`
+	Field205      *string `protobuf:"bytes,205,opt,name=field205" json:"field205,omitempty"`
+	Field207      *uint64 `protobuf:"varint,207,opt,name=field207" json:"field207,omitempty"`
+	Field300      *uint64 `protobuf:"varint,300,opt,name=field300" json:"field300,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage1SubMessage) Reset() {
@@ -765,6 +763,28 @@ func file_datasets_google_message1_proto2_benchmark_message1_proto2_proto_init()
 	if File_datasets_google_message1_proto2_benchmark_message1_proto2_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_datasets_google_message1_proto2_benchmark_message1_proto2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage1); i {
+			case 41:
+				return &v.sizeCache
+			case 42:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message1_proto2_benchmark_message1_proto2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage1SubMessage); i {
+			case 20:
+				return &v.sizeCache
+			case 21:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_datasets_google_message1_proto2_benchmark_message1_proto2_proto_rawDesc,

+ 87 - 67
internal/testprotos/benchmarks/datasets/google_message1/proto3/benchmark_message1_proto3.pb.go

@@ -18,50 +18,49 @@ const (
 )
 
 type GoogleMessage1 struct {
-	Field1               string                    `protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty"`
-	Field9               string                    `protobuf:"bytes,9,opt,name=field9,proto3" json:"field9,omitempty"`
-	Field18              string                    `protobuf:"bytes,18,opt,name=field18,proto3" json:"field18,omitempty"`
-	Field80              bool                      `protobuf:"varint,80,opt,name=field80,proto3" json:"field80,omitempty"`
-	Field81              bool                      `protobuf:"varint,81,opt,name=field81,proto3" json:"field81,omitempty"`
-	Field2               int32                     `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"`
-	Field3               int32                     `protobuf:"varint,3,opt,name=field3,proto3" json:"field3,omitempty"`
-	Field280             int32                     `protobuf:"varint,280,opt,name=field280,proto3" json:"field280,omitempty"`
-	Field6               int32                     `protobuf:"varint,6,opt,name=field6,proto3" json:"field6,omitempty"`
-	Field22              int64                     `protobuf:"varint,22,opt,name=field22,proto3" json:"field22,omitempty"`
-	Field4               string                    `protobuf:"bytes,4,opt,name=field4,proto3" json:"field4,omitempty"`
-	Field5               []uint64                  `protobuf:"fixed64,5,rep,packed,name=field5,proto3" json:"field5,omitempty"`
-	Field59              bool                      `protobuf:"varint,59,opt,name=field59,proto3" json:"field59,omitempty"`
-	Field7               string                    `protobuf:"bytes,7,opt,name=field7,proto3" json:"field7,omitempty"`
-	Field16              int32                     `protobuf:"varint,16,opt,name=field16,proto3" json:"field16,omitempty"`
-	Field130             int32                     `protobuf:"varint,130,opt,name=field130,proto3" json:"field130,omitempty"`
-	Field12              bool                      `protobuf:"varint,12,opt,name=field12,proto3" json:"field12,omitempty"`
-	Field17              bool                      `protobuf:"varint,17,opt,name=field17,proto3" json:"field17,omitempty"`
-	Field13              bool                      `protobuf:"varint,13,opt,name=field13,proto3" json:"field13,omitempty"`
-	Field14              bool                      `protobuf:"varint,14,opt,name=field14,proto3" json:"field14,omitempty"`
-	Field104             int32                     `protobuf:"varint,104,opt,name=field104,proto3" json:"field104,omitempty"`
-	Field100             int32                     `protobuf:"varint,100,opt,name=field100,proto3" json:"field100,omitempty"`
-	Field101             int32                     `protobuf:"varint,101,opt,name=field101,proto3" json:"field101,omitempty"`
-	Field102             string                    `protobuf:"bytes,102,opt,name=field102,proto3" json:"field102,omitempty"`
-	Field103             string                    `protobuf:"bytes,103,opt,name=field103,proto3" json:"field103,omitempty"`
-	Field29              int32                     `protobuf:"varint,29,opt,name=field29,proto3" json:"field29,omitempty"`
-	Field30              bool                      `protobuf:"varint,30,opt,name=field30,proto3" json:"field30,omitempty"`
-	Field60              int32                     `protobuf:"varint,60,opt,name=field60,proto3" json:"field60,omitempty"`
-	Field271             int32                     `protobuf:"varint,271,opt,name=field271,proto3" json:"field271,omitempty"`
-	Field272             int32                     `protobuf:"varint,272,opt,name=field272,proto3" json:"field272,omitempty"`
-	Field150             int32                     `protobuf:"varint,150,opt,name=field150,proto3" json:"field150,omitempty"`
-	Field23              int32                     `protobuf:"varint,23,opt,name=field23,proto3" json:"field23,omitempty"`
-	Field24              bool                      `protobuf:"varint,24,opt,name=field24,proto3" json:"field24,omitempty"`
-	Field25              int32                     `protobuf:"varint,25,opt,name=field25,proto3" json:"field25,omitempty"`
-	Field15              *GoogleMessage1SubMessage `protobuf:"bytes,15,opt,name=field15,proto3" json:"field15,omitempty"`
-	Field78              bool                      `protobuf:"varint,78,opt,name=field78,proto3" json:"field78,omitempty"`
-	Field67              int32                     `protobuf:"varint,67,opt,name=field67,proto3" json:"field67,omitempty"`
-	Field68              int32                     `protobuf:"varint,68,opt,name=field68,proto3" json:"field68,omitempty"`
-	Field128             int32                     `protobuf:"varint,128,opt,name=field128,proto3" json:"field128,omitempty"`
-	Field129             string                    `protobuf:"bytes,129,opt,name=field129,proto3" json:"field129,omitempty"`
-	Field131             int32                     `protobuf:"varint,131,opt,name=field131,proto3" json:"field131,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache       `json:"-"`
+	Field1        string                    `protobuf:"bytes,1,opt,name=field1,proto3" json:"field1,omitempty"`
+	Field9        string                    `protobuf:"bytes,9,opt,name=field9,proto3" json:"field9,omitempty"`
+	Field18       string                    `protobuf:"bytes,18,opt,name=field18,proto3" json:"field18,omitempty"`
+	Field80       bool                      `protobuf:"varint,80,opt,name=field80,proto3" json:"field80,omitempty"`
+	Field81       bool                      `protobuf:"varint,81,opt,name=field81,proto3" json:"field81,omitempty"`
+	Field2        int32                     `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"`
+	Field3        int32                     `protobuf:"varint,3,opt,name=field3,proto3" json:"field3,omitempty"`
+	Field280      int32                     `protobuf:"varint,280,opt,name=field280,proto3" json:"field280,omitempty"`
+	Field6        int32                     `protobuf:"varint,6,opt,name=field6,proto3" json:"field6,omitempty"`
+	Field22       int64                     `protobuf:"varint,22,opt,name=field22,proto3" json:"field22,omitempty"`
+	Field4        string                    `protobuf:"bytes,4,opt,name=field4,proto3" json:"field4,omitempty"`
+	Field5        []uint64                  `protobuf:"fixed64,5,rep,packed,name=field5,proto3" json:"field5,omitempty"`
+	Field59       bool                      `protobuf:"varint,59,opt,name=field59,proto3" json:"field59,omitempty"`
+	Field7        string                    `protobuf:"bytes,7,opt,name=field7,proto3" json:"field7,omitempty"`
+	Field16       int32                     `protobuf:"varint,16,opt,name=field16,proto3" json:"field16,omitempty"`
+	Field130      int32                     `protobuf:"varint,130,opt,name=field130,proto3" json:"field130,omitempty"`
+	Field12       bool                      `protobuf:"varint,12,opt,name=field12,proto3" json:"field12,omitempty"`
+	Field17       bool                      `protobuf:"varint,17,opt,name=field17,proto3" json:"field17,omitempty"`
+	Field13       bool                      `protobuf:"varint,13,opt,name=field13,proto3" json:"field13,omitempty"`
+	Field14       bool                      `protobuf:"varint,14,opt,name=field14,proto3" json:"field14,omitempty"`
+	Field104      int32                     `protobuf:"varint,104,opt,name=field104,proto3" json:"field104,omitempty"`
+	Field100      int32                     `protobuf:"varint,100,opt,name=field100,proto3" json:"field100,omitempty"`
+	Field101      int32                     `protobuf:"varint,101,opt,name=field101,proto3" json:"field101,omitempty"`
+	Field102      string                    `protobuf:"bytes,102,opt,name=field102,proto3" json:"field102,omitempty"`
+	Field103      string                    `protobuf:"bytes,103,opt,name=field103,proto3" json:"field103,omitempty"`
+	Field29       int32                     `protobuf:"varint,29,opt,name=field29,proto3" json:"field29,omitempty"`
+	Field30       bool                      `protobuf:"varint,30,opt,name=field30,proto3" json:"field30,omitempty"`
+	Field60       int32                     `protobuf:"varint,60,opt,name=field60,proto3" json:"field60,omitempty"`
+	Field271      int32                     `protobuf:"varint,271,opt,name=field271,proto3" json:"field271,omitempty"`
+	Field272      int32                     `protobuf:"varint,272,opt,name=field272,proto3" json:"field272,omitempty"`
+	Field150      int32                     `protobuf:"varint,150,opt,name=field150,proto3" json:"field150,omitempty"`
+	Field23       int32                     `protobuf:"varint,23,opt,name=field23,proto3" json:"field23,omitempty"`
+	Field24       bool                      `protobuf:"varint,24,opt,name=field24,proto3" json:"field24,omitempty"`
+	Field25       int32                     `protobuf:"varint,25,opt,name=field25,proto3" json:"field25,omitempty"`
+	Field15       *GoogleMessage1SubMessage `protobuf:"bytes,15,opt,name=field15,proto3" json:"field15,omitempty"`
+	Field78       bool                      `protobuf:"varint,78,opt,name=field78,proto3" json:"field78,omitempty"`
+	Field67       int32                     `protobuf:"varint,67,opt,name=field67,proto3" json:"field67,omitempty"`
+	Field68       int32                     `protobuf:"varint,68,opt,name=field68,proto3" json:"field68,omitempty"`
+	Field128      int32                     `protobuf:"varint,128,opt,name=field128,proto3" json:"field128,omitempty"`
+	Field129      string                    `protobuf:"bytes,129,opt,name=field129,proto3" json:"field129,omitempty"`
+	Field131      int32                     `protobuf:"varint,131,opt,name=field131,proto3" json:"field131,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage1) Reset() {
@@ -375,29 +374,28 @@ func (x *GoogleMessage1) GetField131() int32 {
 }
 
 type GoogleMessage1SubMessage struct {
-	Field1               int32                   `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"`
-	Field2               int32                   `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"`
-	Field3               int32                   `protobuf:"varint,3,opt,name=field3,proto3" json:"field3,omitempty"`
-	Field15              string                  `protobuf:"bytes,15,opt,name=field15,proto3" json:"field15,omitempty"`
-	Field12              bool                    `protobuf:"varint,12,opt,name=field12,proto3" json:"field12,omitempty"`
-	Field13              int64                   `protobuf:"varint,13,opt,name=field13,proto3" json:"field13,omitempty"`
-	Field14              int64                   `protobuf:"varint,14,opt,name=field14,proto3" json:"field14,omitempty"`
-	Field16              int32                   `protobuf:"varint,16,opt,name=field16,proto3" json:"field16,omitempty"`
-	Field19              int32                   `protobuf:"varint,19,opt,name=field19,proto3" json:"field19,omitempty"`
-	Field20              bool                    `protobuf:"varint,20,opt,name=field20,proto3" json:"field20,omitempty"`
-	Field28              bool                    `protobuf:"varint,28,opt,name=field28,proto3" json:"field28,omitempty"`
-	Field21              uint64                  `protobuf:"fixed64,21,opt,name=field21,proto3" json:"field21,omitempty"`
-	Field22              int32                   `protobuf:"varint,22,opt,name=field22,proto3" json:"field22,omitempty"`
-	Field23              bool                    `protobuf:"varint,23,opt,name=field23,proto3" json:"field23,omitempty"`
-	Field206             bool                    `protobuf:"varint,206,opt,name=field206,proto3" json:"field206,omitempty"`
-	Field203             uint32                  `protobuf:"fixed32,203,opt,name=field203,proto3" json:"field203,omitempty"`
-	Field204             int32                   `protobuf:"varint,204,opt,name=field204,proto3" json:"field204,omitempty"`
-	Field205             string                  `protobuf:"bytes,205,opt,name=field205,proto3" json:"field205,omitempty"`
-	Field207             uint64                  `protobuf:"varint,207,opt,name=field207,proto3" json:"field207,omitempty"`
-	Field300             uint64                  `protobuf:"varint,300,opt,name=field300,proto3" json:"field300,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field1        int32  `protobuf:"varint,1,opt,name=field1,proto3" json:"field1,omitempty"`
+	Field2        int32  `protobuf:"varint,2,opt,name=field2,proto3" json:"field2,omitempty"`
+	Field3        int32  `protobuf:"varint,3,opt,name=field3,proto3" json:"field3,omitempty"`
+	Field15       string `protobuf:"bytes,15,opt,name=field15,proto3" json:"field15,omitempty"`
+	Field12       bool   `protobuf:"varint,12,opt,name=field12,proto3" json:"field12,omitempty"`
+	Field13       int64  `protobuf:"varint,13,opt,name=field13,proto3" json:"field13,omitempty"`
+	Field14       int64  `protobuf:"varint,14,opt,name=field14,proto3" json:"field14,omitempty"`
+	Field16       int32  `protobuf:"varint,16,opt,name=field16,proto3" json:"field16,omitempty"`
+	Field19       int32  `protobuf:"varint,19,opt,name=field19,proto3" json:"field19,omitempty"`
+	Field20       bool   `protobuf:"varint,20,opt,name=field20,proto3" json:"field20,omitempty"`
+	Field28       bool   `protobuf:"varint,28,opt,name=field28,proto3" json:"field28,omitempty"`
+	Field21       uint64 `protobuf:"fixed64,21,opt,name=field21,proto3" json:"field21,omitempty"`
+	Field22       int32  `protobuf:"varint,22,opt,name=field22,proto3" json:"field22,omitempty"`
+	Field23       bool   `protobuf:"varint,23,opt,name=field23,proto3" json:"field23,omitempty"`
+	Field206      bool   `protobuf:"varint,206,opt,name=field206,proto3" json:"field206,omitempty"`
+	Field203      uint32 `protobuf:"fixed32,203,opt,name=field203,proto3" json:"field203,omitempty"`
+	Field204      int32  `protobuf:"varint,204,opt,name=field204,proto3" json:"field204,omitempty"`
+	Field205      string `protobuf:"bytes,205,opt,name=field205,proto3" json:"field205,omitempty"`
+	Field207      uint64 `protobuf:"varint,207,opt,name=field207,proto3" json:"field207,omitempty"`
+	Field300      uint64 `protobuf:"varint,300,opt,name=field300,proto3" json:"field300,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage1SubMessage) Reset() {
@@ -720,6 +718,28 @@ func file_datasets_google_message1_proto3_benchmark_message1_proto3_proto_init()
 	if File_datasets_google_message1_proto3_benchmark_message1_proto3_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_datasets_google_message1_proto3_benchmark_message1_proto3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage1); i {
+			case 41:
+				return &v.sizeCache
+			case 42:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message1_proto3_benchmark_message1_proto3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage1SubMessage); i {
+			case 20:
+				return &v.sizeCache
+			case 21:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_datasets_google_message1_proto3_benchmark_message1_proto3_proto_rawDesc,

+ 95 - 66
internal/testprotos/benchmarks/datasets/google_message2/benchmark_message2.pb.go

@@ -18,39 +18,38 @@ const (
 )
 
 type GoogleMessage2 struct {
-	Field1               *string                  `protobuf:"bytes,1,opt,name=field1" json:"field1,omitempty"`
-	Field3               *int64                   `protobuf:"varint,3,opt,name=field3" json:"field3,omitempty"`
-	Field4               *int64                   `protobuf:"varint,4,opt,name=field4" json:"field4,omitempty"`
-	Field30              *int64                   `protobuf:"varint,30,opt,name=field30" json:"field30,omitempty"`
-	Field75              *bool                    `protobuf:"varint,75,opt,name=field75,def=0" json:"field75,omitempty"`
-	Field6               *string                  `protobuf:"bytes,6,opt,name=field6" json:"field6,omitempty"`
-	Field2               []byte                   `protobuf:"bytes,2,opt,name=field2" json:"field2,omitempty"`
-	Field21              *int32                   `protobuf:"varint,21,opt,name=field21,def=0" json:"field21,omitempty"`
-	Field71              *int32                   `protobuf:"varint,71,opt,name=field71" json:"field71,omitempty"`
-	Field25              *float32                 `protobuf:"fixed32,25,opt,name=field25" json:"field25,omitempty"`
-	Field109             *int32                   `protobuf:"varint,109,opt,name=field109,def=0" json:"field109,omitempty"`
-	Field210             *int32                   `protobuf:"varint,210,opt,name=field210,def=0" json:"field210,omitempty"`
-	Field211             *int32                   `protobuf:"varint,211,opt,name=field211,def=0" json:"field211,omitempty"`
-	Field212             *int32                   `protobuf:"varint,212,opt,name=field212,def=0" json:"field212,omitempty"`
-	Field213             *int32                   `protobuf:"varint,213,opt,name=field213,def=0" json:"field213,omitempty"`
-	Field216             *int32                   `protobuf:"varint,216,opt,name=field216,def=0" json:"field216,omitempty"`
-	Field217             *int32                   `protobuf:"varint,217,opt,name=field217,def=0" json:"field217,omitempty"`
-	Field218             *int32                   `protobuf:"varint,218,opt,name=field218,def=0" json:"field218,omitempty"`
-	Field220             *int32                   `protobuf:"varint,220,opt,name=field220,def=0" json:"field220,omitempty"`
-	Field221             *int32                   `protobuf:"varint,221,opt,name=field221,def=0" json:"field221,omitempty"`
-	Field222             *float32                 `protobuf:"fixed32,222,opt,name=field222,def=0" json:"field222,omitempty"`
-	Field63              *int32                   `protobuf:"varint,63,opt,name=field63" json:"field63,omitempty"`
-	Group1               []*GoogleMessage2_Group1 `protobuf:"group,10,rep,name=Group1,json=group1" json:"group1,omitempty"`
-	Field128             []string                 `protobuf:"bytes,128,rep,name=field128" json:"field128,omitempty"`
-	Field131             *int64                   `protobuf:"varint,131,opt,name=field131" json:"field131,omitempty"`
-	Field127             []string                 `protobuf:"bytes,127,rep,name=field127" json:"field127,omitempty"`
-	Field129             *int32                   `protobuf:"varint,129,opt,name=field129" json:"field129,omitempty"`
-	Field130             []int64                  `protobuf:"varint,130,rep,name=field130" json:"field130,omitempty"`
-	Field205             *bool                    `protobuf:"varint,205,opt,name=field205,def=0" json:"field205,omitempty"`
-	Field206             *bool                    `protobuf:"varint,206,opt,name=field206,def=0" json:"field206,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields  `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache      `json:"-"`
+	Field1        *string                  `protobuf:"bytes,1,opt,name=field1" json:"field1,omitempty"`
+	Field3        *int64                   `protobuf:"varint,3,opt,name=field3" json:"field3,omitempty"`
+	Field4        *int64                   `protobuf:"varint,4,opt,name=field4" json:"field4,omitempty"`
+	Field30       *int64                   `protobuf:"varint,30,opt,name=field30" json:"field30,omitempty"`
+	Field75       *bool                    `protobuf:"varint,75,opt,name=field75,def=0" json:"field75,omitempty"`
+	Field6        *string                  `protobuf:"bytes,6,opt,name=field6" json:"field6,omitempty"`
+	Field2        []byte                   `protobuf:"bytes,2,opt,name=field2" json:"field2,omitempty"`
+	Field21       *int32                   `protobuf:"varint,21,opt,name=field21,def=0" json:"field21,omitempty"`
+	Field71       *int32                   `protobuf:"varint,71,opt,name=field71" json:"field71,omitempty"`
+	Field25       *float32                 `protobuf:"fixed32,25,opt,name=field25" json:"field25,omitempty"`
+	Field109      *int32                   `protobuf:"varint,109,opt,name=field109,def=0" json:"field109,omitempty"`
+	Field210      *int32                   `protobuf:"varint,210,opt,name=field210,def=0" json:"field210,omitempty"`
+	Field211      *int32                   `protobuf:"varint,211,opt,name=field211,def=0" json:"field211,omitempty"`
+	Field212      *int32                   `protobuf:"varint,212,opt,name=field212,def=0" json:"field212,omitempty"`
+	Field213      *int32                   `protobuf:"varint,213,opt,name=field213,def=0" json:"field213,omitempty"`
+	Field216      *int32                   `protobuf:"varint,216,opt,name=field216,def=0" json:"field216,omitempty"`
+	Field217      *int32                   `protobuf:"varint,217,opt,name=field217,def=0" json:"field217,omitempty"`
+	Field218      *int32                   `protobuf:"varint,218,opt,name=field218,def=0" json:"field218,omitempty"`
+	Field220      *int32                   `protobuf:"varint,220,opt,name=field220,def=0" json:"field220,omitempty"`
+	Field221      *int32                   `protobuf:"varint,221,opt,name=field221,def=0" json:"field221,omitempty"`
+	Field222      *float32                 `protobuf:"fixed32,222,opt,name=field222,def=0" json:"field222,omitempty"`
+	Field63       *int32                   `protobuf:"varint,63,opt,name=field63" json:"field63,omitempty"`
+	Group1        []*GoogleMessage2_Group1 `protobuf:"group,10,rep,name=Group1,json=group1" json:"group1,omitempty"`
+	Field128      []string                 `protobuf:"bytes,128,rep,name=field128" json:"field128,omitempty"`
+	Field131      *int64                   `protobuf:"varint,131,opt,name=field131" json:"field131,omitempty"`
+	Field127      []string                 `protobuf:"bytes,127,rep,name=field127" json:"field127,omitempty"`
+	Field129      *int32                   `protobuf:"varint,129,opt,name=field129" json:"field129,omitempty"`
+	Field130      []int64                  `protobuf:"varint,130,rep,name=field130" json:"field130,omitempty"`
+	Field205      *bool                    `protobuf:"varint,205,opt,name=field205,def=0" json:"field205,omitempty"`
+	Field206      *bool                    `protobuf:"varint,206,opt,name=field206,def=0" json:"field206,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage2) Reset() {
@@ -303,20 +302,19 @@ func (x *GoogleMessage2) GetField206() bool {
 }
 
 type GoogleMessage2GroupedMessage struct {
-	Field1               *float32                `protobuf:"fixed32,1,opt,name=field1" json:"field1,omitempty"`
-	Field2               *float32                `protobuf:"fixed32,2,opt,name=field2" json:"field2,omitempty"`
-	Field3               *float32                `protobuf:"fixed32,3,opt,name=field3,def=0" json:"field3,omitempty"`
-	Field4               *bool                   `protobuf:"varint,4,opt,name=field4" json:"field4,omitempty"`
-	Field5               *bool                   `protobuf:"varint,5,opt,name=field5" json:"field5,omitempty"`
-	Field6               *bool                   `protobuf:"varint,6,opt,name=field6,def=1" json:"field6,omitempty"`
-	Field7               *bool                   `protobuf:"varint,7,opt,name=field7,def=0" json:"field7,omitempty"`
-	Field8               *float32                `protobuf:"fixed32,8,opt,name=field8" json:"field8,omitempty"`
-	Field9               *bool                   `protobuf:"varint,9,opt,name=field9" json:"field9,omitempty"`
-	Field10              *float32                `protobuf:"fixed32,10,opt,name=field10" json:"field10,omitempty"`
-	Field11              *int64                  `protobuf:"varint,11,opt,name=field11" json:"field11,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field1        *float32 `protobuf:"fixed32,1,opt,name=field1" json:"field1,omitempty"`
+	Field2        *float32 `protobuf:"fixed32,2,opt,name=field2" json:"field2,omitempty"`
+	Field3        *float32 `protobuf:"fixed32,3,opt,name=field3,def=0" json:"field3,omitempty"`
+	Field4        *bool    `protobuf:"varint,4,opt,name=field4" json:"field4,omitempty"`
+	Field5        *bool    `protobuf:"varint,5,opt,name=field5" json:"field5,omitempty"`
+	Field6        *bool    `protobuf:"varint,6,opt,name=field6,def=1" json:"field6,omitempty"`
+	Field7        *bool    `protobuf:"varint,7,opt,name=field7,def=0" json:"field7,omitempty"`
+	Field8        *float32 `protobuf:"fixed32,8,opt,name=field8" json:"field8,omitempty"`
+	Field9        *bool    `protobuf:"varint,9,opt,name=field9" json:"field9,omitempty"`
+	Field10       *float32 `protobuf:"fixed32,10,opt,name=field10" json:"field10,omitempty"`
+	Field11       *int64   `protobuf:"varint,11,opt,name=field11" json:"field11,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage2GroupedMessage) Reset() {
@@ -424,25 +422,24 @@ func (x *GoogleMessage2GroupedMessage) GetField11() int64 {
 }
 
 type GoogleMessage2_Group1 struct {
-	Field11              *float32                      `protobuf:"fixed32,11,req,name=field11" json:"field11,omitempty"`
-	Field26              *float32                      `protobuf:"fixed32,26,opt,name=field26" json:"field26,omitempty"`
-	Field12              *string                       `protobuf:"bytes,12,opt,name=field12" json:"field12,omitempty"`
-	Field13              *string                       `protobuf:"bytes,13,opt,name=field13" json:"field13,omitempty"`
-	Field14              []string                      `protobuf:"bytes,14,rep,name=field14" json:"field14,omitempty"`
-	Field15              *uint64                       `protobuf:"varint,15,req,name=field15" json:"field15,omitempty"`
-	Field5               *int32                        `protobuf:"varint,5,opt,name=field5" json:"field5,omitempty"`
-	Field27              *string                       `protobuf:"bytes,27,opt,name=field27" json:"field27,omitempty"`
-	Field28              *int32                        `protobuf:"varint,28,opt,name=field28" json:"field28,omitempty"`
-	Field29              *string                       `protobuf:"bytes,29,opt,name=field29" json:"field29,omitempty"`
-	Field16              *string                       `protobuf:"bytes,16,opt,name=field16" json:"field16,omitempty"`
-	Field22              []string                      `protobuf:"bytes,22,rep,name=field22" json:"field22,omitempty"`
-	Field73              []int32                       `protobuf:"varint,73,rep,name=field73" json:"field73,omitempty"`
-	Field20              *int32                        `protobuf:"varint,20,opt,name=field20,def=0" json:"field20,omitempty"`
-	Field24              *string                       `protobuf:"bytes,24,opt,name=field24" json:"field24,omitempty"`
-	Field31              *GoogleMessage2GroupedMessage `protobuf:"bytes,31,opt,name=field31" json:"field31,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                      `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields       `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache           `json:"-"`
+	Field11       *float32                      `protobuf:"fixed32,11,req,name=field11" json:"field11,omitempty"`
+	Field26       *float32                      `protobuf:"fixed32,26,opt,name=field26" json:"field26,omitempty"`
+	Field12       *string                       `protobuf:"bytes,12,opt,name=field12" json:"field12,omitempty"`
+	Field13       *string                       `protobuf:"bytes,13,opt,name=field13" json:"field13,omitempty"`
+	Field14       []string                      `protobuf:"bytes,14,rep,name=field14" json:"field14,omitempty"`
+	Field15       *uint64                       `protobuf:"varint,15,req,name=field15" json:"field15,omitempty"`
+	Field5        *int32                        `protobuf:"varint,5,opt,name=field5" json:"field5,omitempty"`
+	Field27       *string                       `protobuf:"bytes,27,opt,name=field27" json:"field27,omitempty"`
+	Field28       *int32                        `protobuf:"varint,28,opt,name=field28" json:"field28,omitempty"`
+	Field29       *string                       `protobuf:"bytes,29,opt,name=field29" json:"field29,omitempty"`
+	Field16       *string                       `protobuf:"bytes,16,opt,name=field16" json:"field16,omitempty"`
+	Field22       []string                      `protobuf:"bytes,22,rep,name=field22" json:"field22,omitempty"`
+	Field73       []int32                       `protobuf:"varint,73,rep,name=field73" json:"field73,omitempty"`
+	Field20       *int32                        `protobuf:"varint,20,opt,name=field20,def=0" json:"field20,omitempty"`
+	Field24       *string                       `protobuf:"bytes,24,opt,name=field24" json:"field24,omitempty"`
+	Field31       *GoogleMessage2GroupedMessage `protobuf:"bytes,31,opt,name=field31" json:"field31,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage2_Group1) Reset() {
@@ -741,6 +738,38 @@ func file_datasets_google_message2_benchmark_message2_proto_init() {
 	if File_datasets_google_message2_benchmark_message2_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_datasets_google_message2_benchmark_message2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage2); i {
+			case 30:
+				return &v.sizeCache
+			case 31:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message2_benchmark_message2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage2GroupedMessage); i {
+			case 11:
+				return &v.sizeCache
+			case 12:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message2_benchmark_message2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage2_Group1); i {
+			case 16:
+				return &v.sizeCache
+			case 17:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_datasets_google_message2_benchmark_message2_proto_rawDesc,

+ 693 - 392
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3.pb.go

@@ -18,24 +18,23 @@ const (
 )
 
 type GoogleMessage3 struct {
-	Field37519           *Message37487           `protobuf:"bytes,2,opt,name=field37519" json:"field37519,omitempty"`
-	Field37520           *Message36876           `protobuf:"bytes,3,opt,name=field37520" json:"field37520,omitempty"`
-	Field37521           *Message13062           `protobuf:"bytes,4,opt,name=field37521" json:"field37521,omitempty"`
-	Field37522           *Message952             `protobuf:"bytes,5,opt,name=field37522" json:"field37522,omitempty"`
-	Field37523           *UnusedEmptyMessage     `protobuf:"bytes,6,opt,name=field37523" json:"field37523,omitempty"`
-	Field37524           *UnusedEmptyMessage     `protobuf:"bytes,7,opt,name=field37524" json:"field37524,omitempty"`
-	Field37525           *UnusedEmptyMessage     `protobuf:"bytes,8,opt,name=field37525" json:"field37525,omitempty"`
-	Field37526           *UnusedEmptyMessage     `protobuf:"bytes,9,opt,name=field37526" json:"field37526,omitempty"`
-	Field37527           *UnusedEmptyMessage     `protobuf:"bytes,10,opt,name=field37527" json:"field37527,omitempty"`
-	Field37528           *UnusedEmptyMessage     `protobuf:"bytes,11,opt,name=field37528" json:"field37528,omitempty"`
-	Field37529           *UnusedEmptyMessage     `protobuf:"bytes,12,opt,name=field37529" json:"field37529,omitempty"`
-	Field37530           *UnusedEmptyMessage     `protobuf:"bytes,13,opt,name=field37530" json:"field37530,omitempty"`
-	Field37531           *UnusedEmptyMessage     `protobuf:"bytes,14,opt,name=field37531" json:"field37531,omitempty"`
-	Field37532           *UnusedEmptyMessage     `protobuf:"bytes,15,opt,name=field37532" json:"field37532,omitempty"`
-	Field37533           *UnusedEmptyMessage     `protobuf:"bytes,16,opt,name=field37533" json:"field37533,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field37519    *Message37487       `protobuf:"bytes,2,opt,name=field37519" json:"field37519,omitempty"`
+	Field37520    *Message36876       `protobuf:"bytes,3,opt,name=field37520" json:"field37520,omitempty"`
+	Field37521    *Message13062       `protobuf:"bytes,4,opt,name=field37521" json:"field37521,omitempty"`
+	Field37522    *Message952         `protobuf:"bytes,5,opt,name=field37522" json:"field37522,omitempty"`
+	Field37523    *UnusedEmptyMessage `protobuf:"bytes,6,opt,name=field37523" json:"field37523,omitempty"`
+	Field37524    *UnusedEmptyMessage `protobuf:"bytes,7,opt,name=field37524" json:"field37524,omitempty"`
+	Field37525    *UnusedEmptyMessage `protobuf:"bytes,8,opt,name=field37525" json:"field37525,omitempty"`
+	Field37526    *UnusedEmptyMessage `protobuf:"bytes,9,opt,name=field37526" json:"field37526,omitempty"`
+	Field37527    *UnusedEmptyMessage `protobuf:"bytes,10,opt,name=field37527" json:"field37527,omitempty"`
+	Field37528    *UnusedEmptyMessage `protobuf:"bytes,11,opt,name=field37528" json:"field37528,omitempty"`
+	Field37529    *UnusedEmptyMessage `protobuf:"bytes,12,opt,name=field37529" json:"field37529,omitempty"`
+	Field37530    *UnusedEmptyMessage `protobuf:"bytes,13,opt,name=field37530" json:"field37530,omitempty"`
+	Field37531    *UnusedEmptyMessage `protobuf:"bytes,14,opt,name=field37531" json:"field37531,omitempty"`
+	Field37532    *UnusedEmptyMessage `protobuf:"bytes,15,opt,name=field37532" json:"field37532,omitempty"`
+	Field37533    *UnusedEmptyMessage `protobuf:"bytes,16,opt,name=field37533" json:"field37533,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GoogleMessage3) Reset() {
@@ -167,13 +166,12 @@ func (x *GoogleMessage3) GetField37533() *UnusedEmptyMessage {
 }
 
 type Message1327 struct {
-	Field1369            []*UnusedEmptyMessage   `protobuf:"bytes,1,rep,name=field1369" json:"field1369,omitempty"`
-	Field1370            []*Message1328          `protobuf:"bytes,3,rep,name=field1370" json:"field1370,omitempty"`
-	Field1371            []*UnusedEmptyMessage   `protobuf:"bytes,5,rep,name=field1371" json:"field1371,omitempty"`
-	Field1372            []*UnusedEmptyMessage   `protobuf:"bytes,6,rep,name=field1372" json:"field1372,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field1369     []*UnusedEmptyMessage `protobuf:"bytes,1,rep,name=field1369" json:"field1369,omitempty"`
+	Field1370     []*Message1328        `protobuf:"bytes,3,rep,name=field1370" json:"field1370,omitempty"`
+	Field1371     []*UnusedEmptyMessage `protobuf:"bytes,5,rep,name=field1371" json:"field1371,omitempty"`
+	Field1372     []*UnusedEmptyMessage `protobuf:"bytes,6,rep,name=field1372" json:"field1372,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message1327) Reset() {
@@ -228,19 +226,18 @@ func (x *Message1327) GetField1372() []*UnusedEmptyMessage {
 }
 
 type Message3672 struct {
-	Field3727            *Enum3476                  `protobuf:"varint,1,opt,name=field3727,enum=benchmarks.google_message3.Enum3476" json:"field3727,omitempty"`
-	Field3728            *int32                     `protobuf:"varint,11,opt,name=field3728" json:"field3728,omitempty"`
-	Field3729            *int32                     `protobuf:"varint,2,opt,name=field3729" json:"field3729,omitempty"`
-	Message3673          []*Message3672_Message3673 `protobuf:"group,3,rep,name=Message3673,json=message3673" json:"message3673,omitempty"`
-	Message3674          []*Message3672_Message3674 `protobuf:"group,6,rep,name=Message3674,json=message3674" json:"message3674,omitempty"`
-	Field3732            *bool                      `protobuf:"varint,9,opt,name=field3732" json:"field3732,omitempty"`
-	Field3733            *int32                     `protobuf:"varint,10,opt,name=field3733" json:"field3733,omitempty"`
-	Field3734            *Enum3476                  `protobuf:"varint,20,opt,name=field3734,enum=benchmarks.google_message3.Enum3476" json:"field3734,omitempty"`
-	Field3735            *int32                     `protobuf:"varint,21,opt,name=field3735" json:"field3735,omitempty"`
-	Field3736            *UnusedEmptyMessage        `protobuf:"bytes,50,opt,name=field3736" json:"field3736,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields    `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache        `json:"-"`
+	Field3727     *Enum3476                  `protobuf:"varint,1,opt,name=field3727,enum=benchmarks.google_message3.Enum3476" json:"field3727,omitempty"`
+	Field3728     *int32                     `protobuf:"varint,11,opt,name=field3728" json:"field3728,omitempty"`
+	Field3729     *int32                     `protobuf:"varint,2,opt,name=field3729" json:"field3729,omitempty"`
+	Message3673   []*Message3672_Message3673 `protobuf:"group,3,rep,name=Message3673,json=message3673" json:"message3673,omitempty"`
+	Message3674   []*Message3672_Message3674 `protobuf:"group,6,rep,name=Message3674,json=message3674" json:"message3674,omitempty"`
+	Field3732     *bool                      `protobuf:"varint,9,opt,name=field3732" json:"field3732,omitempty"`
+	Field3733     *int32                     `protobuf:"varint,10,opt,name=field3733" json:"field3733,omitempty"`
+	Field3734     *Enum3476                  `protobuf:"varint,20,opt,name=field3734,enum=benchmarks.google_message3.Enum3476" json:"field3734,omitempty"`
+	Field3735     *int32                     `protobuf:"varint,21,opt,name=field3735" json:"field3735,omitempty"`
+	Field3736     *UnusedEmptyMessage        `protobuf:"bytes,50,opt,name=field3736" json:"field3736,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message3672) Reset() {
@@ -337,16 +334,15 @@ func (x *Message3672) GetField3736() *UnusedEmptyMessage {
 }
 
 type Message3804 struct {
-	Field3818            *int64                  `protobuf:"varint,1,req,name=field3818" json:"field3818,omitempty"`
-	Field3819            *bool                   `protobuf:"varint,2,req,name=field3819" json:"field3819,omitempty"`
-	Field3820            []Enum3805              `protobuf:"varint,4,rep,name=field3820,enum=benchmarks.google_message3.Enum3805" json:"field3820,omitempty"`
-	Field3821            *int32                  `protobuf:"varint,5,opt,name=field3821" json:"field3821,omitempty"`
-	Field3822            *bool                   `protobuf:"varint,6,opt,name=field3822" json:"field3822,omitempty"`
-	Field3823            *int64                  `protobuf:"varint,7,opt,name=field3823" json:"field3823,omitempty"`
-	Field3824            *Enum3783               `protobuf:"varint,8,opt,name=field3824,enum=benchmarks.google_message3.Enum3783" json:"field3824,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field3818     *int64     `protobuf:"varint,1,req,name=field3818" json:"field3818,omitempty"`
+	Field3819     *bool      `protobuf:"varint,2,req,name=field3819" json:"field3819,omitempty"`
+	Field3820     []Enum3805 `protobuf:"varint,4,rep,name=field3820,enum=benchmarks.google_message3.Enum3805" json:"field3820,omitempty"`
+	Field3821     *int32     `protobuf:"varint,5,opt,name=field3821" json:"field3821,omitempty"`
+	Field3822     *bool      `protobuf:"varint,6,opt,name=field3822" json:"field3822,omitempty"`
+	Field3823     *int64     `protobuf:"varint,7,opt,name=field3823" json:"field3823,omitempty"`
+	Field3824     *Enum3783  `protobuf:"varint,8,opt,name=field3824,enum=benchmarks.google_message3.Enum3783" json:"field3824,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message3804) Reset() {
@@ -422,10 +418,9 @@ func (x *Message3804) GetField3824() Enum3783 {
 }
 
 type Message6849 struct {
-	Field6910            []*Message6850          `protobuf:"bytes,1,rep,name=field6910" json:"field6910,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6910     []*Message6850 `protobuf:"bytes,1,rep,name=field6910" json:"field6910,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6849) Reset() {
@@ -459,10 +454,9 @@ func (x *Message6849) GetField6910() []*Message6850 {
 }
 
 type Message6866 struct {
-	Field6973            []*Message6863          `protobuf:"bytes,1,rep,name=field6973" json:"field6973,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6973     []*Message6863 `protobuf:"bytes,1,rep,name=field6973" json:"field6973,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6866) Reset() {
@@ -496,10 +490,9 @@ func (x *Message6866) GetField6973() []*Message6863 {
 }
 
 type Message6870 struct {
-	Field6991            []*Message6871          `protobuf:"bytes,1,rep,name=field6991" json:"field6991,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6991     []*Message6871 `protobuf:"bytes,1,rep,name=field6991" json:"field6991,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6870) Reset() {
@@ -533,54 +526,53 @@ func (x *Message6870) GetField6991() []*Message6871 {
 }
 
 type Message7651 struct {
-	Field7685            *string                 `protobuf:"bytes,1,opt,name=field7685" json:"field7685,omitempty"`
-	Field7686            *int64                  `protobuf:"varint,2,opt,name=field7686" json:"field7686,omitempty"`
-	Field7687            *int64                  `protobuf:"varint,3,opt,name=field7687" json:"field7687,omitempty"`
-	Field7688            *int64                  `protobuf:"varint,4,opt,name=field7688" json:"field7688,omitempty"`
-	Field7689            *int32                  `protobuf:"varint,5,opt,name=field7689" json:"field7689,omitempty"`
-	Field7690            *int32                  `protobuf:"varint,6,opt,name=field7690" json:"field7690,omitempty"`
-	Field7691            *int32                  `protobuf:"varint,7,opt,name=field7691" json:"field7691,omitempty"`
-	Field7692            *int32                  `protobuf:"varint,8,opt,name=field7692" json:"field7692,omitempty"`
-	Field7693            *int32                  `protobuf:"varint,9,opt,name=field7693" json:"field7693,omitempty"`
-	Field7694            *int32                  `protobuf:"varint,10,opt,name=field7694" json:"field7694,omitempty"`
-	Field7695            *int32                  `protobuf:"varint,11,opt,name=field7695" json:"field7695,omitempty"`
-	Field7696            *int32                  `protobuf:"varint,12,opt,name=field7696" json:"field7696,omitempty"`
-	Field7697            *int32                  `protobuf:"varint,13,opt,name=field7697" json:"field7697,omitempty"`
-	Field7698            *int32                  `protobuf:"varint,14,opt,name=field7698" json:"field7698,omitempty"`
-	Field7699            *int32                  `protobuf:"varint,15,opt,name=field7699" json:"field7699,omitempty"`
-	Field7700            *int32                  `protobuf:"varint,16,opt,name=field7700" json:"field7700,omitempty"`
-	Field7701            *int32                  `protobuf:"varint,17,opt,name=field7701" json:"field7701,omitempty"`
-	Field7702            *int32                  `protobuf:"varint,18,opt,name=field7702" json:"field7702,omitempty"`
-	Field7703            *bool                   `protobuf:"varint,19,opt,name=field7703" json:"field7703,omitempty"`
-	Field7704            []int32                 `protobuf:"varint,20,rep,name=field7704" json:"field7704,omitempty"`
-	Field7705            []int32                 `protobuf:"varint,21,rep,name=field7705" json:"field7705,omitempty"`
-	Field7706            []string                `protobuf:"bytes,22,rep,name=field7706" json:"field7706,omitempty"`
-	Field7707            []string                `protobuf:"bytes,23,rep,name=field7707" json:"field7707,omitempty"`
-	Field7708            *UnusedEmptyMessage     `protobuf:"bytes,24,opt,name=field7708" json:"field7708,omitempty"`
-	Field7709            *int32                  `protobuf:"varint,25,opt,name=field7709" json:"field7709,omitempty"`
-	Field7710            *int32                  `protobuf:"varint,26,opt,name=field7710" json:"field7710,omitempty"`
-	Field7711            *int32                  `protobuf:"varint,27,opt,name=field7711" json:"field7711,omitempty"`
-	Field7712            *int32                  `protobuf:"varint,43,opt,name=field7712" json:"field7712,omitempty"`
-	Field7713            *int32                  `protobuf:"varint,28,opt,name=field7713" json:"field7713,omitempty"`
-	Field7714            *int32                  `protobuf:"varint,29,opt,name=field7714" json:"field7714,omitempty"`
-	Field7715            []*Message7547          `protobuf:"bytes,30,rep,name=field7715" json:"field7715,omitempty"`
-	Field7716            []*Message7547          `protobuf:"bytes,31,rep,name=field7716" json:"field7716,omitempty"`
-	Field7717            []*UnusedEmptyMessage   `protobuf:"bytes,32,rep,name=field7717" json:"field7717,omitempty"`
-	Field7718            []string                `protobuf:"bytes,33,rep,name=field7718" json:"field7718,omitempty"`
-	Field7719            []string                `protobuf:"bytes,34,rep,name=field7719" json:"field7719,omitempty"`
-	Field7720            []*Message7648          `protobuf:"bytes,35,rep,name=field7720" json:"field7720,omitempty"`
-	Field7721            *bool                   `protobuf:"varint,36,opt,name=field7721" json:"field7721,omitempty"`
-	Field7722            *bool                   `protobuf:"varint,37,opt,name=field7722" json:"field7722,omitempty"`
-	Field7723            *bool                   `protobuf:"varint,38,opt,name=field7723" json:"field7723,omitempty"`
-	Field7724            *bool                   `protobuf:"varint,39,opt,name=field7724" json:"field7724,omitempty"`
-	Field7725            *UnusedEmptyMessage     `protobuf:"bytes,40,opt,name=field7725" json:"field7725,omitempty"`
-	Field7726            *UnusedEnum             `protobuf:"varint,41,opt,name=field7726,enum=benchmarks.google_message3.UnusedEnum" json:"field7726,omitempty"`
-	Field7727            *Enum7654               `protobuf:"varint,42,opt,name=field7727,enum=benchmarks.google_message3.Enum7654" json:"field7727,omitempty"`
-	Field7728            *string                 `protobuf:"bytes,44,opt,name=field7728" json:"field7728,omitempty"`
-	Field7729            *UnusedEmptyMessage     `protobuf:"bytes,45,opt,name=field7729" json:"field7729,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7685     *string               `protobuf:"bytes,1,opt,name=field7685" json:"field7685,omitempty"`
+	Field7686     *int64                `protobuf:"varint,2,opt,name=field7686" json:"field7686,omitempty"`
+	Field7687     *int64                `protobuf:"varint,3,opt,name=field7687" json:"field7687,omitempty"`
+	Field7688     *int64                `protobuf:"varint,4,opt,name=field7688" json:"field7688,omitempty"`
+	Field7689     *int32                `protobuf:"varint,5,opt,name=field7689" json:"field7689,omitempty"`
+	Field7690     *int32                `protobuf:"varint,6,opt,name=field7690" json:"field7690,omitempty"`
+	Field7691     *int32                `protobuf:"varint,7,opt,name=field7691" json:"field7691,omitempty"`
+	Field7692     *int32                `protobuf:"varint,8,opt,name=field7692" json:"field7692,omitempty"`
+	Field7693     *int32                `protobuf:"varint,9,opt,name=field7693" json:"field7693,omitempty"`
+	Field7694     *int32                `protobuf:"varint,10,opt,name=field7694" json:"field7694,omitempty"`
+	Field7695     *int32                `protobuf:"varint,11,opt,name=field7695" json:"field7695,omitempty"`
+	Field7696     *int32                `protobuf:"varint,12,opt,name=field7696" json:"field7696,omitempty"`
+	Field7697     *int32                `protobuf:"varint,13,opt,name=field7697" json:"field7697,omitempty"`
+	Field7698     *int32                `protobuf:"varint,14,opt,name=field7698" json:"field7698,omitempty"`
+	Field7699     *int32                `protobuf:"varint,15,opt,name=field7699" json:"field7699,omitempty"`
+	Field7700     *int32                `protobuf:"varint,16,opt,name=field7700" json:"field7700,omitempty"`
+	Field7701     *int32                `protobuf:"varint,17,opt,name=field7701" json:"field7701,omitempty"`
+	Field7702     *int32                `protobuf:"varint,18,opt,name=field7702" json:"field7702,omitempty"`
+	Field7703     *bool                 `protobuf:"varint,19,opt,name=field7703" json:"field7703,omitempty"`
+	Field7704     []int32               `protobuf:"varint,20,rep,name=field7704" json:"field7704,omitempty"`
+	Field7705     []int32               `protobuf:"varint,21,rep,name=field7705" json:"field7705,omitempty"`
+	Field7706     []string              `protobuf:"bytes,22,rep,name=field7706" json:"field7706,omitempty"`
+	Field7707     []string              `protobuf:"bytes,23,rep,name=field7707" json:"field7707,omitempty"`
+	Field7708     *UnusedEmptyMessage   `protobuf:"bytes,24,opt,name=field7708" json:"field7708,omitempty"`
+	Field7709     *int32                `protobuf:"varint,25,opt,name=field7709" json:"field7709,omitempty"`
+	Field7710     *int32                `protobuf:"varint,26,opt,name=field7710" json:"field7710,omitempty"`
+	Field7711     *int32                `protobuf:"varint,27,opt,name=field7711" json:"field7711,omitempty"`
+	Field7712     *int32                `protobuf:"varint,43,opt,name=field7712" json:"field7712,omitempty"`
+	Field7713     *int32                `protobuf:"varint,28,opt,name=field7713" json:"field7713,omitempty"`
+	Field7714     *int32                `protobuf:"varint,29,opt,name=field7714" json:"field7714,omitempty"`
+	Field7715     []*Message7547        `protobuf:"bytes,30,rep,name=field7715" json:"field7715,omitempty"`
+	Field7716     []*Message7547        `protobuf:"bytes,31,rep,name=field7716" json:"field7716,omitempty"`
+	Field7717     []*UnusedEmptyMessage `protobuf:"bytes,32,rep,name=field7717" json:"field7717,omitempty"`
+	Field7718     []string              `protobuf:"bytes,33,rep,name=field7718" json:"field7718,omitempty"`
+	Field7719     []string              `protobuf:"bytes,34,rep,name=field7719" json:"field7719,omitempty"`
+	Field7720     []*Message7648        `protobuf:"bytes,35,rep,name=field7720" json:"field7720,omitempty"`
+	Field7721     *bool                 `protobuf:"varint,36,opt,name=field7721" json:"field7721,omitempty"`
+	Field7722     *bool                 `protobuf:"varint,37,opt,name=field7722" json:"field7722,omitempty"`
+	Field7723     *bool                 `protobuf:"varint,38,opt,name=field7723" json:"field7723,omitempty"`
+	Field7724     *bool                 `protobuf:"varint,39,opt,name=field7724" json:"field7724,omitempty"`
+	Field7725     *UnusedEmptyMessage   `protobuf:"bytes,40,opt,name=field7725" json:"field7725,omitempty"`
+	Field7726     *UnusedEnum           `protobuf:"varint,41,opt,name=field7726,enum=benchmarks.google_message3.UnusedEnum" json:"field7726,omitempty"`
+	Field7727     *Enum7654             `protobuf:"varint,42,opt,name=field7727,enum=benchmarks.google_message3.Enum7654" json:"field7727,omitempty"`
+	Field7728     *string               `protobuf:"bytes,44,opt,name=field7728" json:"field7728,omitempty"`
+	Field7729     *UnusedEmptyMessage   `protobuf:"bytes,45,opt,name=field7729" json:"field7729,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7651) Reset() {
@@ -922,15 +914,14 @@ func (x *Message7651) GetField7729() *UnusedEmptyMessage {
 }
 
 type Message7864 struct {
-	Field7866            *string                 `protobuf:"bytes,1,opt,name=field7866" json:"field7866,omitempty"`
-	Field7867            *string                 `protobuf:"bytes,2,opt,name=field7867" json:"field7867,omitempty"`
-	Field7868            []*Message7865          `protobuf:"bytes,5,rep,name=field7868" json:"field7868,omitempty"`
-	Field7869            []*Message7865          `protobuf:"bytes,6,rep,name=field7869" json:"field7869,omitempty"`
-	Field7870            []*Message7865          `protobuf:"bytes,7,rep,name=field7870" json:"field7870,omitempty"`
-	Field7871            []*UnusedEmptyMessage   `protobuf:"bytes,8,rep,name=field7871" json:"field7871,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7866     *string               `protobuf:"bytes,1,opt,name=field7866" json:"field7866,omitempty"`
+	Field7867     *string               `protobuf:"bytes,2,opt,name=field7867" json:"field7867,omitempty"`
+	Field7868     []*Message7865        `protobuf:"bytes,5,rep,name=field7868" json:"field7868,omitempty"`
+	Field7869     []*Message7865        `protobuf:"bytes,6,rep,name=field7869" json:"field7869,omitempty"`
+	Field7870     []*Message7865        `protobuf:"bytes,7,rep,name=field7870" json:"field7870,omitempty"`
+	Field7871     []*UnusedEmptyMessage `protobuf:"bytes,8,rep,name=field7871" json:"field7871,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7864) Reset() {
@@ -999,29 +990,28 @@ func (x *Message7864) GetField7871() []*UnusedEmptyMessage {
 }
 
 type Message7929 struct {
-	Field7942            *int64                  `protobuf:"varint,1,opt,name=field7942" json:"field7942,omitempty"`
-	Field7943            *int64                  `protobuf:"varint,4,opt,name=field7943" json:"field7943,omitempty"`
-	Field7944            *int64                  `protobuf:"varint,5,opt,name=field7944" json:"field7944,omitempty"`
-	Field7945            *int64                  `protobuf:"varint,12,opt,name=field7945" json:"field7945,omitempty"`
-	Field7946            *int64                  `protobuf:"varint,13,opt,name=field7946" json:"field7946,omitempty"`
-	Field7947            *int64                  `protobuf:"varint,18,opt,name=field7947" json:"field7947,omitempty"`
-	Field7948            *int64                  `protobuf:"varint,6,opt,name=field7948" json:"field7948,omitempty"`
-	Field7949            *int64                  `protobuf:"varint,7,opt,name=field7949" json:"field7949,omitempty"`
-	Field7950            []*Message7919          `protobuf:"bytes,8,rep,name=field7950" json:"field7950,omitempty"`
-	Field7951            []*UnusedEmptyMessage   `protobuf:"bytes,20,rep,name=field7951" json:"field7951,omitempty"`
-	Field7952            []*Message7920          `protobuf:"bytes,14,rep,name=field7952" json:"field7952,omitempty"`
-	Field7953            []*Message7921          `protobuf:"bytes,15,rep,name=field7953" json:"field7953,omitempty"`
-	Field7954            []*Message7928          `protobuf:"bytes,17,rep,name=field7954" json:"field7954,omitempty"`
-	Field7955            *int64                  `protobuf:"varint,19,opt,name=field7955" json:"field7955,omitempty"`
-	Field7956            *bool                   `protobuf:"varint,2,opt,name=field7956" json:"field7956,omitempty"`
-	Field7957            *int64                  `protobuf:"varint,3,opt,name=field7957" json:"field7957,omitempty"`
-	Field7958            *int64                  `protobuf:"varint,9,opt,name=field7958" json:"field7958,omitempty"`
-	Field7959            []*UnusedEmptyMessage   `protobuf:"bytes,10,rep,name=field7959" json:"field7959,omitempty"`
-	Field7960            [][]byte                `protobuf:"bytes,11,rep,name=field7960" json:"field7960,omitempty"`
-	Field7961            *int64                  `protobuf:"varint,16,opt,name=field7961" json:"field7961,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7942     *int64                `protobuf:"varint,1,opt,name=field7942" json:"field7942,omitempty"`
+	Field7943     *int64                `protobuf:"varint,4,opt,name=field7943" json:"field7943,omitempty"`
+	Field7944     *int64                `protobuf:"varint,5,opt,name=field7944" json:"field7944,omitempty"`
+	Field7945     *int64                `protobuf:"varint,12,opt,name=field7945" json:"field7945,omitempty"`
+	Field7946     *int64                `protobuf:"varint,13,opt,name=field7946" json:"field7946,omitempty"`
+	Field7947     *int64                `protobuf:"varint,18,opt,name=field7947" json:"field7947,omitempty"`
+	Field7948     *int64                `protobuf:"varint,6,opt,name=field7948" json:"field7948,omitempty"`
+	Field7949     *int64                `protobuf:"varint,7,opt,name=field7949" json:"field7949,omitempty"`
+	Field7950     []*Message7919        `protobuf:"bytes,8,rep,name=field7950" json:"field7950,omitempty"`
+	Field7951     []*UnusedEmptyMessage `protobuf:"bytes,20,rep,name=field7951" json:"field7951,omitempty"`
+	Field7952     []*Message7920        `protobuf:"bytes,14,rep,name=field7952" json:"field7952,omitempty"`
+	Field7953     []*Message7921        `protobuf:"bytes,15,rep,name=field7953" json:"field7953,omitempty"`
+	Field7954     []*Message7928        `protobuf:"bytes,17,rep,name=field7954" json:"field7954,omitempty"`
+	Field7955     *int64                `protobuf:"varint,19,opt,name=field7955" json:"field7955,omitempty"`
+	Field7956     *bool                 `protobuf:"varint,2,opt,name=field7956" json:"field7956,omitempty"`
+	Field7957     *int64                `protobuf:"varint,3,opt,name=field7957" json:"field7957,omitempty"`
+	Field7958     *int64                `protobuf:"varint,9,opt,name=field7958" json:"field7958,omitempty"`
+	Field7959     []*UnusedEmptyMessage `protobuf:"bytes,10,rep,name=field7959" json:"field7959,omitempty"`
+	Field7960     [][]byte              `protobuf:"bytes,11,rep,name=field7960" json:"field7960,omitempty"`
+	Field7961     *int64                `protobuf:"varint,16,opt,name=field7961" json:"field7961,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7929) Reset() {
@@ -1188,26 +1178,25 @@ func (x *Message7929) GetField7961() int64 {
 }
 
 type Message8508 struct {
-	Field8517            []*Message8511          `protobuf:"bytes,8,rep,name=field8517" json:"field8517,omitempty"`
-	Field8518            []*Message8512          `protobuf:"bytes,9,rep,name=field8518" json:"field8518,omitempty"`
-	Field8519            []*Message8513          `protobuf:"bytes,11,rep,name=field8519" json:"field8519,omitempty"`
-	Field8520            *bool                   `protobuf:"varint,13,opt,name=field8520" json:"field8520,omitempty"`
-	Field8521            *Message8514            `protobuf:"bytes,14,opt,name=field8521" json:"field8521,omitempty"`
-	Field8522            []*UnusedEmptyMessage   `protobuf:"bytes,15,rep,name=field8522" json:"field8522,omitempty"`
-	Field8523            []*Message8515          `protobuf:"bytes,16,rep,name=field8523" json:"field8523,omitempty"`
-	Field8524            []*UnusedEmptyMessage   `protobuf:"bytes,17,rep,name=field8524" json:"field8524,omitempty"`
-	Field8525            *int64                  `protobuf:"varint,1,opt,name=field8525" json:"field8525,omitempty"`
-	Field8526            *float32                `protobuf:"fixed32,2,opt,name=field8526" json:"field8526,omitempty"`
-	Field8527            *int64                  `protobuf:"varint,3,opt,name=field8527" json:"field8527,omitempty"`
-	Field8528            *int64                  `protobuf:"varint,4,opt,name=field8528" json:"field8528,omitempty"`
-	Field8529            *int32                  `protobuf:"varint,5,opt,name=field8529" json:"field8529,omitempty"`
-	Field8530            []byte                  `protobuf:"bytes,6,opt,name=field8530" json:"field8530,omitempty"`
-	Field8531            [][]byte                `protobuf:"bytes,7,rep,name=field8531" json:"field8531,omitempty"`
-	Field8532            *bool                   `protobuf:"varint,10,opt,name=field8532" json:"field8532,omitempty"`
-	Field8533            []byte                  `protobuf:"bytes,12,opt,name=field8533" json:"field8533,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field8517     []*Message8511        `protobuf:"bytes,8,rep,name=field8517" json:"field8517,omitempty"`
+	Field8518     []*Message8512        `protobuf:"bytes,9,rep,name=field8518" json:"field8518,omitempty"`
+	Field8519     []*Message8513        `protobuf:"bytes,11,rep,name=field8519" json:"field8519,omitempty"`
+	Field8520     *bool                 `protobuf:"varint,13,opt,name=field8520" json:"field8520,omitempty"`
+	Field8521     *Message8514          `protobuf:"bytes,14,opt,name=field8521" json:"field8521,omitempty"`
+	Field8522     []*UnusedEmptyMessage `protobuf:"bytes,15,rep,name=field8522" json:"field8522,omitempty"`
+	Field8523     []*Message8515        `protobuf:"bytes,16,rep,name=field8523" json:"field8523,omitempty"`
+	Field8524     []*UnusedEmptyMessage `protobuf:"bytes,17,rep,name=field8524" json:"field8524,omitempty"`
+	Field8525     *int64                `protobuf:"varint,1,opt,name=field8525" json:"field8525,omitempty"`
+	Field8526     *float32              `protobuf:"fixed32,2,opt,name=field8526" json:"field8526,omitempty"`
+	Field8527     *int64                `protobuf:"varint,3,opt,name=field8527" json:"field8527,omitempty"`
+	Field8528     *int64                `protobuf:"varint,4,opt,name=field8528" json:"field8528,omitempty"`
+	Field8529     *int32                `protobuf:"varint,5,opt,name=field8529" json:"field8529,omitempty"`
+	Field8530     []byte                `protobuf:"bytes,6,opt,name=field8530" json:"field8530,omitempty"`
+	Field8531     [][]byte              `protobuf:"bytes,7,rep,name=field8531" json:"field8531,omitempty"`
+	Field8532     *bool                 `protobuf:"varint,10,opt,name=field8532" json:"field8532,omitempty"`
+	Field8533     []byte                `protobuf:"bytes,12,opt,name=field8533" json:"field8533,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message8508) Reset() {
@@ -1353,11 +1342,10 @@ func (x *Message8508) GetField8533() []byte {
 }
 
 type Message9122 struct {
-	Field9132            *float32                `protobuf:"fixed32,1,opt,name=field9132" json:"field9132,omitempty"`
-	Field9133            *float32                `protobuf:"fixed32,2,opt,name=field9133" json:"field9133,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field9132     *float32 `protobuf:"fixed32,1,opt,name=field9132" json:"field9132,omitempty"`
+	Field9133     *float32 `protobuf:"fixed32,2,opt,name=field9133" json:"field9133,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message9122) Reset() {
@@ -1398,10 +1386,9 @@ func (x *Message9122) GetField9133() float32 {
 }
 
 type Message10177 struct {
-	Field10270           []*Message10155         `protobuf:"bytes,1,rep,name=field10270" json:"field10270,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field10270    []*Message10155 `protobuf:"bytes,1,rep,name=field10270" json:"field10270,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10177) Reset() {
@@ -1435,12 +1422,11 @@ func (x *Message10177) GetField10270() []*Message10155 {
 }
 
 type Message10278 struct {
-	Field10286           []int32                 `protobuf:"varint,1,rep,packed,name=field10286" json:"field10286,omitempty"`
-	Field10287           []int32                 `protobuf:"varint,2,rep,packed,name=field10287" json:"field10287,omitempty"`
-	Field10288           *int32                  `protobuf:"varint,3,opt,name=field10288" json:"field10288,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field10286    []int32 `protobuf:"varint,1,rep,packed,name=field10286" json:"field10286,omitempty"`
+	Field10287    []int32 `protobuf:"varint,2,rep,packed,name=field10287" json:"field10287,omitempty"`
+	Field10288    *int32  `protobuf:"varint,3,opt,name=field10288" json:"field10288,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10278) Reset() {
@@ -1488,10 +1474,9 @@ func (x *Message10278) GetField10288() int32 {
 }
 
 type Message10323 struct {
-	Field10360           []*Message10320         `protobuf:"bytes,1,rep,name=field10360" json:"field10360,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field10360    []*Message10320 `protobuf:"bytes,1,rep,name=field10360" json:"field10360,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10323) Reset() {
@@ -1525,11 +1510,10 @@ func (x *Message10323) GetField10360() []*Message10320 {
 }
 
 type Message10324 struct {
-	Field10362           []*Message10322         `protobuf:"bytes,1,rep,name=field10362" json:"field10362,omitempty"`
-	Field10363           *Message10321           `protobuf:"bytes,2,opt,name=field10363" json:"field10363,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field10362    []*Message10322 `protobuf:"bytes,1,rep,name=field10362" json:"field10362,omitempty"`
+	Field10363    *Message10321   `protobuf:"bytes,2,opt,name=field10363" json:"field10363,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10324) Reset() {
@@ -1570,10 +1554,9 @@ func (x *Message10324) GetField10363() *Message10321 {
 }
 
 type Message11990 struct {
-	Field12030           []*Message11988         `protobuf:"bytes,1,rep,name=field12030" json:"field12030,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12030    []*Message11988 `protobuf:"bytes,1,rep,name=field12030" json:"field12030,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message11990) Reset() {
@@ -1607,12 +1590,11 @@ func (x *Message11990) GetField12030() []*Message11988 {
 }
 
 type Message12691 struct {
-	Field12713           *string                 `protobuf:"bytes,1,opt,name=field12713" json:"field12713,omitempty"`
-	Field12714           *int32                  `protobuf:"varint,2,opt,name=field12714" json:"field12714,omitempty"`
-	Field12715           *Message12668           `protobuf:"bytes,3,opt,name=field12715" json:"field12715,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12713    *string       `protobuf:"bytes,1,opt,name=field12713" json:"field12713,omitempty"`
+	Field12714    *int32        `protobuf:"varint,2,opt,name=field12714" json:"field12714,omitempty"`
+	Field12715    *Message12668 `protobuf:"bytes,3,opt,name=field12715" json:"field12715,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12691) Reset() {
@@ -1660,29 +1642,28 @@ func (x *Message12691) GetField12715() *Message12668 {
 }
 
 type Message12870 struct {
-	Field12879           *int32                  `protobuf:"varint,1,req,name=field12879" json:"field12879,omitempty"`
-	Field12880           *int32                  `protobuf:"varint,7,opt,name=field12880" json:"field12880,omitempty"`
-	Field12881           *int32                  `protobuf:"varint,2,req,name=field12881" json:"field12881,omitempty"`
-	Field12882           *uint64                 `protobuf:"varint,3,opt,name=field12882" json:"field12882,omitempty"`
-	Field12883           *string                 `protobuf:"bytes,2001,opt,name=field12883" json:"field12883,omitempty"`
-	Field12884           *uint64                 `protobuf:"fixed64,4,opt,name=field12884" json:"field12884,omitempty"`
-	Field12885           []uint64                `protobuf:"fixed64,14,rep,name=field12885" json:"field12885,omitempty"`
-	Field12886           *int32                  `protobuf:"varint,9,opt,name=field12886" json:"field12886,omitempty"`
-	Field12887           *int64                  `protobuf:"varint,18,opt,name=field12887" json:"field12887,omitempty"`
-	Field12888           []*Message12870         `protobuf:"bytes,8,rep,name=field12888" json:"field12888,omitempty"`
-	Field12889           *int32                  `protobuf:"varint,5,opt,name=field12889" json:"field12889,omitempty"`
-	Field12890           *uint64                 `protobuf:"varint,6,opt,name=field12890" json:"field12890,omitempty"`
-	Field12891           *int32                  `protobuf:"varint,10,opt,name=field12891" json:"field12891,omitempty"`
-	Field12892           *int32                  `protobuf:"varint,11,opt,name=field12892" json:"field12892,omitempty"`
-	Field12893           *float64                `protobuf:"fixed64,12,opt,name=field12893" json:"field12893,omitempty"`
-	Field12894           *Message12825           `protobuf:"bytes,13,opt,name=field12894" json:"field12894,omitempty"`
-	Field12895           *float64                `protobuf:"fixed64,15,opt,name=field12895" json:"field12895,omitempty"`
-	Field12896           *string                 `protobuf:"bytes,16,opt,name=field12896" json:"field12896,omitempty"`
-	Field12897           *Enum12871              `protobuf:"varint,17,opt,name=field12897,enum=benchmarks.google_message3.Enum12871" json:"field12897,omitempty"`
-	Field12898           *int32                  `protobuf:"varint,19,opt,name=field12898" json:"field12898,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12879    *int32          `protobuf:"varint,1,req,name=field12879" json:"field12879,omitempty"`
+	Field12880    *int32          `protobuf:"varint,7,opt,name=field12880" json:"field12880,omitempty"`
+	Field12881    *int32          `protobuf:"varint,2,req,name=field12881" json:"field12881,omitempty"`
+	Field12882    *uint64         `protobuf:"varint,3,opt,name=field12882" json:"field12882,omitempty"`
+	Field12883    *string         `protobuf:"bytes,2001,opt,name=field12883" json:"field12883,omitempty"`
+	Field12884    *uint64         `protobuf:"fixed64,4,opt,name=field12884" json:"field12884,omitempty"`
+	Field12885    []uint64        `protobuf:"fixed64,14,rep,name=field12885" json:"field12885,omitempty"`
+	Field12886    *int32          `protobuf:"varint,9,opt,name=field12886" json:"field12886,omitempty"`
+	Field12887    *int64          `protobuf:"varint,18,opt,name=field12887" json:"field12887,omitempty"`
+	Field12888    []*Message12870 `protobuf:"bytes,8,rep,name=field12888" json:"field12888,omitempty"`
+	Field12889    *int32          `protobuf:"varint,5,opt,name=field12889" json:"field12889,omitempty"`
+	Field12890    *uint64         `protobuf:"varint,6,opt,name=field12890" json:"field12890,omitempty"`
+	Field12891    *int32          `protobuf:"varint,10,opt,name=field12891" json:"field12891,omitempty"`
+	Field12892    *int32          `protobuf:"varint,11,opt,name=field12892" json:"field12892,omitempty"`
+	Field12893    *float64        `protobuf:"fixed64,12,opt,name=field12893" json:"field12893,omitempty"`
+	Field12894    *Message12825   `protobuf:"bytes,13,opt,name=field12894" json:"field12894,omitempty"`
+	Field12895    *float64        `protobuf:"fixed64,15,opt,name=field12895" json:"field12895,omitempty"`
+	Field12896    *string         `protobuf:"bytes,16,opt,name=field12896" json:"field12896,omitempty"`
+	Field12897    *Enum12871      `protobuf:"varint,17,opt,name=field12897,enum=benchmarks.google_message3.Enum12871" json:"field12897,omitempty"`
+	Field12898    *int32          `protobuf:"varint,19,opt,name=field12898" json:"field12898,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12870) Reset() {
@@ -1849,11 +1830,10 @@ func (x *Message12870) GetField12898() int32 {
 }
 
 type Message13154 struct {
-	Field13164           *float32                `protobuf:"fixed32,1,req,name=field13164" json:"field13164,omitempty"`
-	Field13165           *float32                `protobuf:"fixed32,2,req,name=field13165" json:"field13165,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field13164    *float32 `protobuf:"fixed32,1,req,name=field13164" json:"field13164,omitempty"`
+	Field13165    *float32 `protobuf:"fixed32,2,req,name=field13165" json:"field13165,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message13154) Reset() {
@@ -1894,42 +1874,41 @@ func (x *Message13154) GetField13165() float32 {
 }
 
 type Message16507 struct {
-	Field16510             *bool                     `protobuf:"varint,3,opt,name=field16510" json:"field16510,omitempty"`
-	Field16511             *bool                     `protobuf:"varint,4,opt,name=field16511" json:"field16511,omitempty"`
-	Field16512             *bool                     `protobuf:"varint,14,opt,name=field16512" json:"field16512,omitempty"`
-	Field16513             []string                  `protobuf:"bytes,5,rep,name=field16513" json:"field16513,omitempty"`
-	Field16514             []string                  `protobuf:"bytes,6,rep,name=field16514" json:"field16514,omitempty"`
-	Field16515             *string                   `protobuf:"bytes,8,opt,name=field16515" json:"field16515,omitempty"`
-	Field16516             []int32                   `protobuf:"varint,9,rep,name=field16516" json:"field16516,omitempty"`
-	Field16517             []int32                   `protobuf:"varint,10,rep,name=field16517" json:"field16517,omitempty"`
-	Field16518             *int32                    `protobuf:"varint,7,opt,name=field16518" json:"field16518,omitempty"`
-	Field16519             *string                   `protobuf:"bytes,15,opt,name=field16519" json:"field16519,omitempty"`
-	Field16520             []string                  `protobuf:"bytes,11,rep,name=field16520" json:"field16520,omitempty"`
-	Field16521             []*UnusedEmptyMessage     `protobuf:"bytes,27,rep,name=field16521" json:"field16521,omitempty"`
-	Field16522             []*UnusedEmptyMessage     `protobuf:"bytes,22,rep,name=field16522" json:"field16522,omitempty"`
-	Field16523             []*UnusedEmptyMessage     `protobuf:"bytes,28,rep,name=field16523" json:"field16523,omitempty"`
-	Field16524             *string                   `protobuf:"bytes,18,opt,name=field16524" json:"field16524,omitempty"`
-	Field16525             *int32                    `protobuf:"varint,19,opt,name=field16525" json:"field16525,omitempty"`
-	Field16526             *int32                    `protobuf:"varint,20,opt,name=field16526" json:"field16526,omitempty"`
-	Field16527             *UnusedEmptyMessage       `protobuf:"bytes,23,opt,name=field16527" json:"field16527,omitempty"`
-	Field16528             *bool                     `protobuf:"varint,24,opt,name=field16528" json:"field16528,omitempty"`
-	Field16529             []string                  `protobuf:"bytes,25,rep,name=field16529" json:"field16529,omitempty"`
-	Field16530             *float64                  `protobuf:"fixed64,26,opt,name=field16530" json:"field16530,omitempty"`
-	Field16531             *Message16478             `protobuf:"bytes,30,opt,name=field16531" json:"field16531,omitempty"`
-	Field16532             *bool                     `protobuf:"varint,31,opt,name=field16532" json:"field16532,omitempty"`
-	Field16533             *string                   `protobuf:"bytes,32,opt,name=field16533" json:"field16533,omitempty"`
-	Field16534             *bool                     `protobuf:"varint,33,opt,name=field16534" json:"field16534,omitempty"`
-	Field16535             *bool                     `protobuf:"varint,35,opt,name=field16535" json:"field16535,omitempty"`
-	Field16536             *bool                     `protobuf:"varint,36,opt,name=field16536" json:"field16536,omitempty"`
-	Field16537             *bool                     `protobuf:"varint,37,opt,name=field16537" json:"field16537,omitempty"`
-	Field16538             *bool                     `protobuf:"varint,38,opt,name=field16538" json:"field16538,omitempty"`
-	Field16539             *bool                     `protobuf:"varint,39,opt,name=field16539" json:"field16539,omitempty"`
-	Field16540             *bool                     `protobuf:"varint,40,opt,name=field16540" json:"field16540,omitempty"`
-	Field16541             []string                  `protobuf:"bytes,41,rep,name=field16541" json:"field16541,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	Field16510      *bool                 `protobuf:"varint,3,opt,name=field16510" json:"field16510,omitempty"`
+	Field16511      *bool                 `protobuf:"varint,4,opt,name=field16511" json:"field16511,omitempty"`
+	Field16512      *bool                 `protobuf:"varint,14,opt,name=field16512" json:"field16512,omitempty"`
+	Field16513      []string              `protobuf:"bytes,5,rep,name=field16513" json:"field16513,omitempty"`
+	Field16514      []string              `protobuf:"bytes,6,rep,name=field16514" json:"field16514,omitempty"`
+	Field16515      *string               `protobuf:"bytes,8,opt,name=field16515" json:"field16515,omitempty"`
+	Field16516      []int32               `protobuf:"varint,9,rep,name=field16516" json:"field16516,omitempty"`
+	Field16517      []int32               `protobuf:"varint,10,rep,name=field16517" json:"field16517,omitempty"`
+	Field16518      *int32                `protobuf:"varint,7,opt,name=field16518" json:"field16518,omitempty"`
+	Field16519      *string               `protobuf:"bytes,15,opt,name=field16519" json:"field16519,omitempty"`
+	Field16520      []string              `protobuf:"bytes,11,rep,name=field16520" json:"field16520,omitempty"`
+	Field16521      []*UnusedEmptyMessage `protobuf:"bytes,27,rep,name=field16521" json:"field16521,omitempty"`
+	Field16522      []*UnusedEmptyMessage `protobuf:"bytes,22,rep,name=field16522" json:"field16522,omitempty"`
+	Field16523      []*UnusedEmptyMessage `protobuf:"bytes,28,rep,name=field16523" json:"field16523,omitempty"`
+	Field16524      *string               `protobuf:"bytes,18,opt,name=field16524" json:"field16524,omitempty"`
+	Field16525      *int32                `protobuf:"varint,19,opt,name=field16525" json:"field16525,omitempty"`
+	Field16526      *int32                `protobuf:"varint,20,opt,name=field16526" json:"field16526,omitempty"`
+	Field16527      *UnusedEmptyMessage   `protobuf:"bytes,23,opt,name=field16527" json:"field16527,omitempty"`
+	Field16528      *bool                 `protobuf:"varint,24,opt,name=field16528" json:"field16528,omitempty"`
+	Field16529      []string              `protobuf:"bytes,25,rep,name=field16529" json:"field16529,omitempty"`
+	Field16530      *float64              `protobuf:"fixed64,26,opt,name=field16530" json:"field16530,omitempty"`
+	Field16531      *Message16478         `protobuf:"bytes,30,opt,name=field16531" json:"field16531,omitempty"`
+	Field16532      *bool                 `protobuf:"varint,31,opt,name=field16532" json:"field16532,omitempty"`
+	Field16533      *string               `protobuf:"bytes,32,opt,name=field16533" json:"field16533,omitempty"`
+	Field16534      *bool                 `protobuf:"varint,33,opt,name=field16534" json:"field16534,omitempty"`
+	Field16535      *bool                 `protobuf:"varint,35,opt,name=field16535" json:"field16535,omitempty"`
+	Field16536      *bool                 `protobuf:"varint,36,opt,name=field16536" json:"field16536,omitempty"`
+	Field16537      *bool                 `protobuf:"varint,37,opt,name=field16537" json:"field16537,omitempty"`
+	Field16538      *bool                 `protobuf:"varint,38,opt,name=field16538" json:"field16538,omitempty"`
+	Field16539      *bool                 `protobuf:"varint,39,opt,name=field16539" json:"field16539,omitempty"`
+	Field16540      *bool                 `protobuf:"varint,40,opt,name=field16540" json:"field16540,omitempty"`
+	Field16541      []string              `protobuf:"bytes,41,rep,name=field16541" json:"field16541,omitempty"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *Message16507) Reset() {
@@ -2189,10 +2168,9 @@ func (x *Message16507) GetField16541() []string {
 }
 
 type Message16564 struct {
-	Field16568           []*Message16552         `protobuf:"bytes,1,rep,name=field16568" json:"field16568,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field16568    []*Message16552 `protobuf:"bytes,1,rep,name=field16568" json:"field16568,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message16564) Reset() {
@@ -2226,11 +2204,10 @@ func (x *Message16564) GetField16568() []*Message16552 {
 }
 
 type Message16661 struct {
-	Field16671           []*Message16660         `protobuf:"bytes,1,rep,name=field16671" json:"field16671,omitempty"`
-	Field16672           []uint64                `protobuf:"varint,2,rep,name=field16672" json:"field16672,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field16671    []*Message16660 `protobuf:"bytes,1,rep,name=field16671" json:"field16671,omitempty"`
+	Field16672    []uint64        `protobuf:"varint,2,rep,name=field16672" json:"field16672,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message16661) Reset() {
@@ -2271,13 +2248,12 @@ func (x *Message16661) GetField16672() []uint64 {
 }
 
 type Message16746 struct {
-	Field16806           []*Message16727         `protobuf:"bytes,1,rep,name=field16806" json:"field16806,omitempty"`
-	Field16807           *bool                   `protobuf:"varint,2,opt,name=field16807" json:"field16807,omitempty"`
-	Field16808           *bool                   `protobuf:"varint,3,opt,name=field16808" json:"field16808,omitempty"`
-	Field16809           []*Message16725         `protobuf:"bytes,4,rep,name=field16809" json:"field16809,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field16806    []*Message16727 `protobuf:"bytes,1,rep,name=field16806" json:"field16806,omitempty"`
+	Field16807    *bool           `protobuf:"varint,2,opt,name=field16807" json:"field16807,omitempty"`
+	Field16808    *bool           `protobuf:"varint,3,opt,name=field16808" json:"field16808,omitempty"`
+	Field16809    []*Message16725 `protobuf:"bytes,4,rep,name=field16809" json:"field16809,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message16746) Reset() {
@@ -2332,11 +2308,10 @@ func (x *Message16746) GetField16809() []*Message16725 {
 }
 
 type Message17786 struct {
-	Message17787         []*Message17786_Message17787 `protobuf:"group,1,rep,name=Message17787,json=message17787" json:"message17787,omitempty"`
-	Field18175           []*Message17782              `protobuf:"bytes,20,rep,name=field18175" json:"field18175,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields      `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache          `json:"-"`
+	Message17787  []*Message17786_Message17787 `protobuf:"group,1,rep,name=Message17787,json=message17787" json:"message17787,omitempty"`
+	Field18175    []*Message17782              `protobuf:"bytes,20,rep,name=field18175" json:"field18175,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message17786) Reset() {
@@ -2377,10 +2352,9 @@ func (x *Message17786) GetField18175() []*Message17782 {
 }
 
 type Message22857 struct {
-	Field22874           []*Message22853         `protobuf:"bytes,1,rep,name=field22874" json:"field22874,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field22874    []*Message22853 `protobuf:"bytes,1,rep,name=field22874" json:"field22874,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message22857) Reset() {
@@ -2414,11 +2388,10 @@ func (x *Message22857) GetField22874() []*Message22853 {
 }
 
 type Message24404 struct {
-	Message24405         []*Message24404_Message24405 `protobuf:"group,1,rep,name=Message24405,json=message24405" json:"message24405,omitempty"`
-	Field24684           *Message24403                `protobuf:"bytes,30,opt,name=field24684" json:"field24684,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields      `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache          `json:"-"`
+	Message24405  []*Message24404_Message24405 `protobuf:"group,1,rep,name=Message24405,json=message24405" json:"message24405,omitempty"`
+	Field24684    *Message24403                `protobuf:"bytes,30,opt,name=field24684" json:"field24684,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message24404) Reset() {
@@ -2459,11 +2432,10 @@ func (x *Message24404) GetField24684() *Message24403 {
 }
 
 type Message27300 struct {
-	Field27302           []*UnusedEmptyMessage   `protobuf:"bytes,1,rep,name=field27302" json:"field27302,omitempty"`
-	Field27303           *string                 `protobuf:"bytes,2,opt,name=field27303" json:"field27303,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field27302    []*UnusedEmptyMessage `protobuf:"bytes,1,rep,name=field27302" json:"field27302,omitempty"`
+	Field27303    *string               `protobuf:"bytes,2,opt,name=field27303" json:"field27303,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message27300) Reset() {
@@ -2504,32 +2476,31 @@ func (x *Message27300) GetField27303() string {
 }
 
 type Message27453 struct {
-	Field27459           *string                 `protobuf:"bytes,15,opt,name=field27459" json:"field27459,omitempty"`
-	Field27460           []string                `protobuf:"bytes,1,rep,name=field27460" json:"field27460,omitempty"`
-	Field27461           []float32               `protobuf:"fixed32,6,rep,name=field27461" json:"field27461,omitempty"`
-	Field27462           []int32                 `protobuf:"varint,27,rep,name=field27462" json:"field27462,omitempty"`
-	Field27463           []int32                 `protobuf:"varint,28,rep,name=field27463" json:"field27463,omitempty"`
-	Field27464           []*Message27454         `protobuf:"bytes,24,rep,name=field27464" json:"field27464,omitempty"`
-	Field27465           []string                `protobuf:"bytes,2,rep,name=field27465" json:"field27465,omitempty"`
-	Field27466           []float32               `protobuf:"fixed32,7,rep,name=field27466" json:"field27466,omitempty"`
-	Field27467           []string                `protobuf:"bytes,22,rep,name=field27467" json:"field27467,omitempty"`
-	Field27468           []string                `protobuf:"bytes,23,rep,name=field27468" json:"field27468,omitempty"`
-	Field27469           *string                 `protobuf:"bytes,26,opt,name=field27469" json:"field27469,omitempty"`
-	Field27470           []*Message27357         `protobuf:"bytes,8,rep,name=field27470" json:"field27470,omitempty"`
-	Field27471           *Message27360           `protobuf:"bytes,16,opt,name=field27471" json:"field27471,omitempty"`
-	Field27472           *string                 `protobuf:"bytes,25,opt,name=field27472" json:"field27472,omitempty"`
-	Field27473           *string                 `protobuf:"bytes,11,opt,name=field27473" json:"field27473,omitempty"`
-	Field27474           *bool                   `protobuf:"varint,13,opt,name=field27474" json:"field27474,omitempty"`
-	Field27475           *bool                   `protobuf:"varint,14,opt,name=field27475" json:"field27475,omitempty"`
-	Field27476           *bool                   `protobuf:"varint,17,opt,name=field27476" json:"field27476,omitempty"`
-	Field27477           *UnusedEmptyMessage     `protobuf:"bytes,12,opt,name=field27477" json:"field27477,omitempty"`
-	Field27478           *bool                   `protobuf:"varint,34268945,opt,name=field27478" json:"field27478,omitempty"`
-	Field27479           *bool                   `protobuf:"varint,20,opt,name=field27479" json:"field27479,omitempty"`
-	Field27480           *string                 `protobuf:"bytes,21,opt,name=field27480" json:"field27480,omitempty"`
-	Field27481           *UnusedEmptyMessage     `protobuf:"bytes,10,opt,name=field27481" json:"field27481,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field27459    *string             `protobuf:"bytes,15,opt,name=field27459" json:"field27459,omitempty"`
+	Field27460    []string            `protobuf:"bytes,1,rep,name=field27460" json:"field27460,omitempty"`
+	Field27461    []float32           `protobuf:"fixed32,6,rep,name=field27461" json:"field27461,omitempty"`
+	Field27462    []int32             `protobuf:"varint,27,rep,name=field27462" json:"field27462,omitempty"`
+	Field27463    []int32             `protobuf:"varint,28,rep,name=field27463" json:"field27463,omitempty"`
+	Field27464    []*Message27454     `protobuf:"bytes,24,rep,name=field27464" json:"field27464,omitempty"`
+	Field27465    []string            `protobuf:"bytes,2,rep,name=field27465" json:"field27465,omitempty"`
+	Field27466    []float32           `protobuf:"fixed32,7,rep,name=field27466" json:"field27466,omitempty"`
+	Field27467    []string            `protobuf:"bytes,22,rep,name=field27467" json:"field27467,omitempty"`
+	Field27468    []string            `protobuf:"bytes,23,rep,name=field27468" json:"field27468,omitempty"`
+	Field27469    *string             `protobuf:"bytes,26,opt,name=field27469" json:"field27469,omitempty"`
+	Field27470    []*Message27357     `protobuf:"bytes,8,rep,name=field27470" json:"field27470,omitempty"`
+	Field27471    *Message27360       `protobuf:"bytes,16,opt,name=field27471" json:"field27471,omitempty"`
+	Field27472    *string             `protobuf:"bytes,25,opt,name=field27472" json:"field27472,omitempty"`
+	Field27473    *string             `protobuf:"bytes,11,opt,name=field27473" json:"field27473,omitempty"`
+	Field27474    *bool               `protobuf:"varint,13,opt,name=field27474" json:"field27474,omitempty"`
+	Field27475    *bool               `protobuf:"varint,14,opt,name=field27475" json:"field27475,omitempty"`
+	Field27476    *bool               `protobuf:"varint,17,opt,name=field27476" json:"field27476,omitempty"`
+	Field27477    *UnusedEmptyMessage `protobuf:"bytes,12,opt,name=field27477" json:"field27477,omitempty"`
+	Field27478    *bool               `protobuf:"varint,34268945,opt,name=field27478" json:"field27478,omitempty"`
+	Field27479    *bool               `protobuf:"varint,20,opt,name=field27479" json:"field27479,omitempty"`
+	Field27480    *string             `protobuf:"bytes,21,opt,name=field27480" json:"field27480,omitempty"`
+	Field27481    *UnusedEmptyMessage `protobuf:"bytes,10,opt,name=field27481" json:"field27481,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message27453) Reset() {
@@ -2717,11 +2688,10 @@ func (x *Message27453) GetField27481() *UnusedEmptyMessage {
 }
 
 type Message3672_Message3673 struct {
-	Field3738            *Enum3476               `protobuf:"varint,4,req,name=field3738,enum=benchmarks.google_message3.Enum3476" json:"field3738,omitempty"`
-	Field3739            *int32                  `protobuf:"varint,5,req,name=field3739" json:"field3739,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field3738     *Enum3476 `protobuf:"varint,4,req,name=field3738,enum=benchmarks.google_message3.Enum3476" json:"field3738,omitempty"`
+	Field3739     *int32    `protobuf:"varint,5,req,name=field3739" json:"field3739,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message3672_Message3673) Reset() {
@@ -2762,11 +2732,10 @@ func (x *Message3672_Message3673) GetField3739() int32 {
 }
 
 type Message3672_Message3674 struct {
-	Field3740            *Enum3476               `protobuf:"varint,7,req,name=field3740,enum=benchmarks.google_message3.Enum3476" json:"field3740,omitempty"`
-	Field3741            *int32                  `protobuf:"varint,8,req,name=field3741" json:"field3741,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field3740     *Enum3476 `protobuf:"varint,7,req,name=field3740,enum=benchmarks.google_message3.Enum3476" json:"field3740,omitempty"`
+	Field3741     *int32    `protobuf:"varint,8,req,name=field3741" json:"field3741,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message3672_Message3674) Reset() {
@@ -2807,35 +2776,34 @@ func (x *Message3672_Message3674) GetField3741() int32 {
 }
 
 type Message17786_Message17787 struct {
-	Field18177           *int32                  `protobuf:"varint,2,req,name=field18177" json:"field18177,omitempty"`
-	Field18178           *int32                  `protobuf:"varint,3,req,name=field18178" json:"field18178,omitempty"`
-	Field18179           *Message17783           `protobuf:"bytes,4,opt,name=field18179" json:"field18179,omitempty"`
-	Field18180           *UnusedEmptyMessage     `protobuf:"bytes,5,opt,name=field18180" json:"field18180,omitempty"`
-	Field18181           *UnusedEmptyMessage     `protobuf:"bytes,6,opt,name=field18181" json:"field18181,omitempty"`
-	Field18182           []*UnusedEmptyMessage   `protobuf:"bytes,8,rep,name=field18182" json:"field18182,omitempty"`
-	Field18183           *UnusedEmptyMessage     `protobuf:"bytes,9,opt,name=field18183" json:"field18183,omitempty"`
-	Field18184           *Message17726           `protobuf:"bytes,10,opt,name=field18184" json:"field18184,omitempty"`
-	Field18185           *UnusedEmptyMessage     `protobuf:"bytes,11,opt,name=field18185" json:"field18185,omitempty"`
-	Field18186           *Message16945           `protobuf:"bytes,102,opt,name=field18186" json:"field18186,omitempty"`
-	Field18187           *UnusedEmptyMessage     `protobuf:"bytes,12,opt,name=field18187" json:"field18187,omitempty"`
-	Field18188           *UnusedEmptyMessage     `protobuf:"bytes,13,opt,name=field18188" json:"field18188,omitempty"`
-	Field18189           *UnusedEmptyMessage     `protobuf:"bytes,7,opt,name=field18189" json:"field18189,omitempty"`
-	Field18190           *UnusedEmptyMessage     `protobuf:"bytes,100,opt,name=field18190" json:"field18190,omitempty"`
-	Field18191           *UnusedEmptyMessage     `protobuf:"bytes,101,opt,name=field18191" json:"field18191,omitempty"`
-	Field18192           *UnusedEmptyMessage     `protobuf:"bytes,14,opt,name=field18192" json:"field18192,omitempty"`
-	Field18193           *UnusedEmptyMessage     `protobuf:"bytes,19,opt,name=field18193" json:"field18193,omitempty"`
-	Field18194           *UnusedEmptyMessage     `protobuf:"bytes,22,opt,name=field18194" json:"field18194,omitempty"`
-	Field18195           *UnusedEmptyMessage     `protobuf:"bytes,24,opt,name=field18195" json:"field18195,omitempty"`
-	Field18196           *Enum16925              `protobuf:"varint,21,opt,name=field18196,enum=benchmarks.google_message3.Enum16925" json:"field18196,omitempty"`
-	Field18197           *bool                   `protobuf:"varint,18,opt,name=field18197" json:"field18197,omitempty"`
-	Field18198           []UnusedEnum            `protobuf:"varint,23,rep,name=field18198,enum=benchmarks.google_message3.UnusedEnum" json:"field18198,omitempty"`
-	Field18199           *UnusedEmptyMessage     `protobuf:"bytes,15,opt,name=field18199" json:"field18199,omitempty"`
-	Field18200           *string                 `protobuf:"bytes,16,opt,name=field18200" json:"field18200,omitempty"`
-	Field18201           *string                 `protobuf:"bytes,17,opt,name=field18201" json:"field18201,omitempty"`
-	Field18202           *bool                   `protobuf:"varint,99,opt,name=field18202" json:"field18202,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field18177    *int32                `protobuf:"varint,2,req,name=field18177" json:"field18177,omitempty"`
+	Field18178    *int32                `protobuf:"varint,3,req,name=field18178" json:"field18178,omitempty"`
+	Field18179    *Message17783         `protobuf:"bytes,4,opt,name=field18179" json:"field18179,omitempty"`
+	Field18180    *UnusedEmptyMessage   `protobuf:"bytes,5,opt,name=field18180" json:"field18180,omitempty"`
+	Field18181    *UnusedEmptyMessage   `protobuf:"bytes,6,opt,name=field18181" json:"field18181,omitempty"`
+	Field18182    []*UnusedEmptyMessage `protobuf:"bytes,8,rep,name=field18182" json:"field18182,omitempty"`
+	Field18183    *UnusedEmptyMessage   `protobuf:"bytes,9,opt,name=field18183" json:"field18183,omitempty"`
+	Field18184    *Message17726         `protobuf:"bytes,10,opt,name=field18184" json:"field18184,omitempty"`
+	Field18185    *UnusedEmptyMessage   `protobuf:"bytes,11,opt,name=field18185" json:"field18185,omitempty"`
+	Field18186    *Message16945         `protobuf:"bytes,102,opt,name=field18186" json:"field18186,omitempty"`
+	Field18187    *UnusedEmptyMessage   `protobuf:"bytes,12,opt,name=field18187" json:"field18187,omitempty"`
+	Field18188    *UnusedEmptyMessage   `protobuf:"bytes,13,opt,name=field18188" json:"field18188,omitempty"`
+	Field18189    *UnusedEmptyMessage   `protobuf:"bytes,7,opt,name=field18189" json:"field18189,omitempty"`
+	Field18190    *UnusedEmptyMessage   `protobuf:"bytes,100,opt,name=field18190" json:"field18190,omitempty"`
+	Field18191    *UnusedEmptyMessage   `protobuf:"bytes,101,opt,name=field18191" json:"field18191,omitempty"`
+	Field18192    *UnusedEmptyMessage   `protobuf:"bytes,14,opt,name=field18192" json:"field18192,omitempty"`
+	Field18193    *UnusedEmptyMessage   `protobuf:"bytes,19,opt,name=field18193" json:"field18193,omitempty"`
+	Field18194    *UnusedEmptyMessage   `protobuf:"bytes,22,opt,name=field18194" json:"field18194,omitempty"`
+	Field18195    *UnusedEmptyMessage   `protobuf:"bytes,24,opt,name=field18195" json:"field18195,omitempty"`
+	Field18196    *Enum16925            `protobuf:"varint,21,opt,name=field18196,enum=benchmarks.google_message3.Enum16925" json:"field18196,omitempty"`
+	Field18197    *bool                 `protobuf:"varint,18,opt,name=field18197" json:"field18197,omitempty"`
+	Field18198    []UnusedEnum          `protobuf:"varint,23,rep,name=field18198,enum=benchmarks.google_message3.UnusedEnum" json:"field18198,omitempty"`
+	Field18199    *UnusedEmptyMessage   `protobuf:"bytes,15,opt,name=field18199" json:"field18199,omitempty"`
+	Field18200    *string               `protobuf:"bytes,16,opt,name=field18200" json:"field18200,omitempty"`
+	Field18201    *string               `protobuf:"bytes,17,opt,name=field18201" json:"field18201,omitempty"`
+	Field18202    *bool                 `protobuf:"varint,99,opt,name=field18202" json:"field18202,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message17786_Message17787) Reset() {
@@ -3044,40 +3012,39 @@ func (x *Message17786_Message17787) GetField18202() bool {
 }
 
 type Message24404_Message24405 struct {
-	Field24686           *int32                  `protobuf:"varint,2,req,name=field24686" json:"field24686,omitempty"`
-	Field24687           *int32                  `protobuf:"varint,3,req,name=field24687" json:"field24687,omitempty"`
-	Field24688           *Message24317           `protobuf:"bytes,4,opt,name=field24688" json:"field24688,omitempty"`
-	Field24689           *UnusedEmptyMessage     `protobuf:"bytes,5,opt,name=field24689" json:"field24689,omitempty"`
-	Field24690           *Message24376           `protobuf:"bytes,6,opt,name=field24690" json:"field24690,omitempty"`
-	Field24691           *Message24345           `protobuf:"bytes,7,opt,name=field24691" json:"field24691,omitempty"`
-	Field24692           *UnusedEmptyMessage     `protobuf:"bytes,8,opt,name=field24692" json:"field24692,omitempty"`
-	Field24693           *Message24379           `protobuf:"bytes,9,opt,name=field24693" json:"field24693,omitempty"`
-	Field24694           *UnusedEmptyMessage     `protobuf:"bytes,10,opt,name=field24694" json:"field24694,omitempty"`
-	Field24695           *UnusedEmptyMessage     `protobuf:"bytes,11,opt,name=field24695" json:"field24695,omitempty"`
-	Field24696           *Message24391           `protobuf:"bytes,12,opt,name=field24696" json:"field24696,omitempty"`
-	Field24697           *UnusedEmptyMessage     `protobuf:"bytes,13,opt,name=field24697" json:"field24697,omitempty"`
-	Field24698           *UnusedEmptyMessage     `protobuf:"bytes,14,opt,name=field24698" json:"field24698,omitempty"`
-	Field24699           *UnusedEmptyMessage     `protobuf:"bytes,22,opt,name=field24699" json:"field24699,omitempty"`
-	Field24700           *UnusedEmptyMessage     `protobuf:"bytes,23,opt,name=field24700" json:"field24700,omitempty"`
-	Field24701           *UnusedEmptyMessage     `protobuf:"bytes,25,opt,name=field24701" json:"field24701,omitempty"`
-	Field24702           *Enum16925              `protobuf:"varint,18,opt,name=field24702,enum=benchmarks.google_message3.Enum16925" json:"field24702,omitempty"`
-	Field24703           *float32                `protobuf:"fixed32,20,opt,name=field24703" json:"field24703,omitempty"`
-	Field24704           *bool                   `protobuf:"varint,19,opt,name=field24704" json:"field24704,omitempty"`
-	Field24705           []Enum16891             `protobuf:"varint,24,rep,name=field24705,enum=benchmarks.google_message3.Enum16891" json:"field24705,omitempty"`
-	Field24706           *UnusedEmptyMessage     `protobuf:"bytes,15,opt,name=field24706" json:"field24706,omitempty"`
-	Field24707           *string                 `protobuf:"bytes,16,opt,name=field24707" json:"field24707,omitempty"`
-	Field24708           *string                 `protobuf:"bytes,17,opt,name=field24708" json:"field24708,omitempty"`
-	Field24709           *float32                `protobuf:"fixed32,21,opt,name=field24709" json:"field24709,omitempty"`
-	Field24710           *bool                   `protobuf:"varint,26,opt,name=field24710" json:"field24710,omitempty"`
-	Field24711           *UnusedEnum             `protobuf:"varint,27,opt,name=field24711,enum=benchmarks.google_message3.UnusedEnum" json:"field24711,omitempty"`
-	Field24712           *bool                   `protobuf:"varint,28,opt,name=field24712" json:"field24712,omitempty"`
-	Field24713           *UnusedEnum             `protobuf:"varint,29,opt,name=field24713,enum=benchmarks.google_message3.UnusedEnum" json:"field24713,omitempty"`
-	Field24714           *bool                   `protobuf:"varint,31,opt,name=field24714" json:"field24714,omitempty"`
-	Field24715           *bool                   `protobuf:"varint,99,opt,name=field24715" json:"field24715,omitempty"`
-	Field24716           *int64                  `protobuf:"varint,32,opt,name=field24716" json:"field24716,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field24686    *int32              `protobuf:"varint,2,req,name=field24686" json:"field24686,omitempty"`
+	Field24687    *int32              `protobuf:"varint,3,req,name=field24687" json:"field24687,omitempty"`
+	Field24688    *Message24317       `protobuf:"bytes,4,opt,name=field24688" json:"field24688,omitempty"`
+	Field24689    *UnusedEmptyMessage `protobuf:"bytes,5,opt,name=field24689" json:"field24689,omitempty"`
+	Field24690    *Message24376       `protobuf:"bytes,6,opt,name=field24690" json:"field24690,omitempty"`
+	Field24691    *Message24345       `protobuf:"bytes,7,opt,name=field24691" json:"field24691,omitempty"`
+	Field24692    *UnusedEmptyMessage `protobuf:"bytes,8,opt,name=field24692" json:"field24692,omitempty"`
+	Field24693    *Message24379       `protobuf:"bytes,9,opt,name=field24693" json:"field24693,omitempty"`
+	Field24694    *UnusedEmptyMessage `protobuf:"bytes,10,opt,name=field24694" json:"field24694,omitempty"`
+	Field24695    *UnusedEmptyMessage `protobuf:"bytes,11,opt,name=field24695" json:"field24695,omitempty"`
+	Field24696    *Message24391       `protobuf:"bytes,12,opt,name=field24696" json:"field24696,omitempty"`
+	Field24697    *UnusedEmptyMessage `protobuf:"bytes,13,opt,name=field24697" json:"field24697,omitempty"`
+	Field24698    *UnusedEmptyMessage `protobuf:"bytes,14,opt,name=field24698" json:"field24698,omitempty"`
+	Field24699    *UnusedEmptyMessage `protobuf:"bytes,22,opt,name=field24699" json:"field24699,omitempty"`
+	Field24700    *UnusedEmptyMessage `protobuf:"bytes,23,opt,name=field24700" json:"field24700,omitempty"`
+	Field24701    *UnusedEmptyMessage `protobuf:"bytes,25,opt,name=field24701" json:"field24701,omitempty"`
+	Field24702    *Enum16925          `protobuf:"varint,18,opt,name=field24702,enum=benchmarks.google_message3.Enum16925" json:"field24702,omitempty"`
+	Field24703    *float32            `protobuf:"fixed32,20,opt,name=field24703" json:"field24703,omitempty"`
+	Field24704    *bool               `protobuf:"varint,19,opt,name=field24704" json:"field24704,omitempty"`
+	Field24705    []Enum16891         `protobuf:"varint,24,rep,name=field24705,enum=benchmarks.google_message3.Enum16891" json:"field24705,omitempty"`
+	Field24706    *UnusedEmptyMessage `protobuf:"bytes,15,opt,name=field24706" json:"field24706,omitempty"`
+	Field24707    *string             `protobuf:"bytes,16,opt,name=field24707" json:"field24707,omitempty"`
+	Field24708    *string             `protobuf:"bytes,17,opt,name=field24708" json:"field24708,omitempty"`
+	Field24709    *float32            `protobuf:"fixed32,21,opt,name=field24709" json:"field24709,omitempty"`
+	Field24710    *bool               `protobuf:"varint,26,opt,name=field24710" json:"field24710,omitempty"`
+	Field24711    *UnusedEnum         `protobuf:"varint,27,opt,name=field24711,enum=benchmarks.google_message3.UnusedEnum" json:"field24711,omitempty"`
+	Field24712    *bool               `protobuf:"varint,28,opt,name=field24712" json:"field24712,omitempty"`
+	Field24713    *UnusedEnum         `protobuf:"varint,29,opt,name=field24713,enum=benchmarks.google_message3.UnusedEnum" json:"field24713,omitempty"`
+	Field24714    *bool               `protobuf:"varint,31,opt,name=field24714" json:"field24714,omitempty"`
+	Field24715    *bool               `protobuf:"varint,99,opt,name=field24715" json:"field24715,omitempty"`
+	Field24716    *int64              `protobuf:"varint,32,opt,name=field24716" json:"field24716,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message24404_Message24405) Reset() {
@@ -6037,6 +6004,340 @@ func file_datasets_google_message3_benchmark_message3_proto_init() {
 	file_datasets_google_message3_benchmark_message3_5_proto_init()
 	file_datasets_google_message3_benchmark_message3_7_proto_init()
 	file_datasets_google_message3_benchmark_message3_8_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GoogleMessage3); i {
+			case 15:
+				return &v.sizeCache
+			case 16:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message1327); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message3672); i {
+			case 10:
+				return &v.sizeCache
+			case 11:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message3804); i {
+			case 7:
+				return &v.sizeCache
+			case 8:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6849); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6866); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6870); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7651); i {
+			case 45:
+				return &v.sizeCache
+			case 46:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7864); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7929); i {
+			case 20:
+				return &v.sizeCache
+			case 21:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message8508); i {
+			case 17:
+				return &v.sizeCache
+			case 18:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message9122); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10177); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10278); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10323); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10324); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message11990); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12691); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12870); i {
+			case 20:
+				return &v.sizeCache
+			case 21:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message13154); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message16507); i {
+			case 32:
+				return &v.sizeCache
+			case 33:
+				return &v.unknownFields
+			case 34:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message16564); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message16661); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message16746); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message17786); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message22857); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message24404); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message27300); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message27453); i {
+			case 23:
+				return &v.sizeCache
+			case 24:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message3672_Message3673); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message3672_Message3674); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message17786_Message17787); i {
+			case 26:
+				return &v.sizeCache
+			case 27:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message24404_Message24405); i {
+			case 31:
+				return &v.sizeCache
+			case 32:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_datasets_google_message3_benchmark_message3_proto_rawDesc,

File diff suppressed because it is too large
+ 355 - 394
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_1.pb.go


File diff suppressed because it is too large
+ 388 - 418
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_2.pb.go


File diff suppressed because it is too large
+ 380 - 411
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_3.pb.go


File diff suppressed because it is too large
+ 346 - 386
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_4.pb.go


File diff suppressed because it is too large
+ 349 - 389
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_5.pb.go


File diff suppressed because it is too large
+ 360 - 397
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_6.pb.go


+ 141 - 49
internal/testprotos/benchmarks/datasets/google_message3/benchmark_message3_7.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type Message11018 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message11018) Reset() {
@@ -47,13 +46,12 @@ func (*Message11018) Descriptor() ([]byte, []int) {
 }
 
 type Message10800 struct {
-	Field10808           *string                 `protobuf:"bytes,1,opt,name=field10808" json:"field10808,omitempty"`
-	Field10809           *int64                  `protobuf:"varint,2,opt,name=field10809" json:"field10809,omitempty"`
-	Field10810           *bool                   `protobuf:"varint,3,opt,name=field10810" json:"field10810,omitempty"`
-	Field10811           *float32                `protobuf:"fixed32,4,opt,name=field10811" json:"field10811,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field10808    *string  `protobuf:"bytes,1,opt,name=field10808" json:"field10808,omitempty"`
+	Field10809    *int64   `protobuf:"varint,2,opt,name=field10809" json:"field10809,omitempty"`
+	Field10810    *bool    `protobuf:"varint,3,opt,name=field10810" json:"field10810,omitempty"`
+	Field10811    *float32 `protobuf:"fixed32,4,opt,name=field10811" json:"field10811,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10800) Reset() {
@@ -108,9 +106,8 @@ func (x *Message10800) GetField10811() float32 {
 }
 
 type Message10802 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10802) Reset() {
@@ -137,13 +134,12 @@ func (*Message10802) Descriptor() ([]byte, []int) {
 }
 
 type Message10748 struct {
-	Field10750           *string                 `protobuf:"bytes,1,opt,name=field10750" json:"field10750,omitempty"`
-	Field10751           *int32                  `protobuf:"varint,2,opt,name=field10751" json:"field10751,omitempty"`
-	Field10752           *int32                  `protobuf:"varint,3,opt,name=field10752" json:"field10752,omitempty"`
-	Field10753           *int32                  `protobuf:"varint,4,opt,name=field10753" json:"field10753,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field10750    *string `protobuf:"bytes,1,opt,name=field10750" json:"field10750,omitempty"`
+	Field10751    *int32  `protobuf:"varint,2,opt,name=field10751" json:"field10751,omitempty"`
+	Field10752    *int32  `protobuf:"varint,3,opt,name=field10752" json:"field10752,omitempty"`
+	Field10753    *int32  `protobuf:"varint,4,opt,name=field10753" json:"field10753,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10748) Reset() {
@@ -198,11 +194,10 @@ func (x *Message10748) GetField10753() int32 {
 }
 
 type Message7966 struct {
-	Field7969            *string                 `protobuf:"bytes,1,opt,name=field7969" json:"field7969,omitempty"`
-	Field7970            *bool                   `protobuf:"varint,2,opt,name=field7970" json:"field7970,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7969     *string `protobuf:"bytes,1,opt,name=field7969" json:"field7969,omitempty"`
+	Field7970     *bool   `protobuf:"varint,2,opt,name=field7970" json:"field7970,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7966) Reset() {
@@ -243,15 +238,14 @@ func (x *Message7966) GetField7970() bool {
 }
 
 type Message708 struct {
-	Field823             *Message741             `protobuf:"bytes,1,opt,name=field823" json:"field823,omitempty"`
-	Field824             []string                `protobuf:"bytes,6,rep,name=field824" json:"field824,omitempty"`
-	Field825             *string                 `protobuf:"bytes,2,opt,name=field825" json:"field825,omitempty"`
-	Field826             *string                 `protobuf:"bytes,3,opt,name=field826" json:"field826,omitempty"`
-	Field827             []string                `protobuf:"bytes,4,rep,name=field827" json:"field827,omitempty"`
-	Field828             []string                `protobuf:"bytes,5,rep,name=field828" json:"field828,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field823      *Message741 `protobuf:"bytes,1,opt,name=field823" json:"field823,omitempty"`
+	Field824      []string    `protobuf:"bytes,6,rep,name=field824" json:"field824,omitempty"`
+	Field825      *string     `protobuf:"bytes,2,opt,name=field825" json:"field825,omitempty"`
+	Field826      *string     `protobuf:"bytes,3,opt,name=field826" json:"field826,omitempty"`
+	Field827      []string    `protobuf:"bytes,4,rep,name=field827" json:"field827,omitempty"`
+	Field828      []string    `protobuf:"bytes,5,rep,name=field828" json:"field828,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message708) Reset() {
@@ -320,9 +314,8 @@ func (x *Message708) GetField828() []string {
 }
 
 type Message8942 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message8942) Reset() {
@@ -349,11 +342,10 @@ func (*Message8942) Descriptor() ([]byte, []int) {
 }
 
 type Message11011 struct {
-	Field11752           []byte                  `protobuf:"bytes,1,req,name=field11752" json:"field11752,omitempty"`
-	Field11753           []byte                  `protobuf:"bytes,2,req,name=field11753" json:"field11753,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field11752    []byte `protobuf:"bytes,1,req,name=field11752" json:"field11752,omitempty"`
+	Field11753    []byte `protobuf:"bytes,2,req,name=field11753" json:"field11753,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message11011) Reset() {
@@ -394,9 +386,8 @@ func (x *Message11011) GetField11753() []byte {
 }
 
 type UnusedEmptyMessage struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *UnusedEmptyMessage) Reset() {
@@ -423,10 +414,9 @@ func (*UnusedEmptyMessage) Descriptor() ([]byte, []int) {
 }
 
 type Message741 struct {
-	Field936             []string                `protobuf:"bytes,1,rep,name=field936" json:"field936,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field936      []string `protobuf:"bytes,1,rep,name=field936" json:"field936,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message741) Reset() {
@@ -565,6 +555,108 @@ func file_datasets_google_message3_benchmark_message3_7_proto_init() {
 	if File_datasets_google_message3_benchmark_message3_7_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message11018); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10800); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10802); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10748); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7966); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message708); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message8942); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message11011); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UnusedEmptyMessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message3_benchmark_message3_7_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message741); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_datasets_google_message3_benchmark_message3_7_proto_rawDesc,

File diff suppressed because it is too large
+ 376 - 414
internal/testprotos/benchmarks/datasets/google_message4/benchmark_message4.pb.go


File diff suppressed because it is too large
+ 356 - 393
internal/testprotos/benchmarks/datasets/google_message4/benchmark_message4_1.pb.go


+ 601 - 284
internal/testprotos/benchmarks/datasets/google_message4/benchmark_message4_2.pb.go

@@ -18,15 +18,14 @@ const (
 )
 
 type Message12774 struct {
-	Field12777           *uint32                 `protobuf:"varint,1,opt,name=field12777" json:"field12777,omitempty"`
-	Field12778           *uint32                 `protobuf:"varint,2,opt,name=field12778" json:"field12778,omitempty"`
-	Field12779           *uint32                 `protobuf:"varint,3,opt,name=field12779" json:"field12779,omitempty"`
-	Field12780           *uint32                 `protobuf:"varint,4,opt,name=field12780" json:"field12780,omitempty"`
-	Field12781           *uint32                 `protobuf:"varint,5,opt,name=field12781" json:"field12781,omitempty"`
-	Field12782           *bool                   `protobuf:"varint,6,opt,name=field12782" json:"field12782,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12777    *uint32 `protobuf:"varint,1,opt,name=field12777" json:"field12777,omitempty"`
+	Field12778    *uint32 `protobuf:"varint,2,opt,name=field12778" json:"field12778,omitempty"`
+	Field12779    *uint32 `protobuf:"varint,3,opt,name=field12779" json:"field12779,omitempty"`
+	Field12780    *uint32 `protobuf:"varint,4,opt,name=field12780" json:"field12780,omitempty"`
+	Field12781    *uint32 `protobuf:"varint,5,opt,name=field12781" json:"field12781,omitempty"`
+	Field12782    *bool   `protobuf:"varint,6,opt,name=field12782" json:"field12782,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12774) Reset() {
@@ -95,11 +94,10 @@ func (x *Message12774) GetField12782() bool {
 }
 
 type Message12796 struct {
-	Field12800           []uint64                `protobuf:"fixed64,1,rep,name=field12800" json:"field12800,omitempty"`
-	Field12801           *uint64                 `protobuf:"varint,2,opt,name=field12801" json:"field12801,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12800    []uint64 `protobuf:"fixed64,1,rep,name=field12800" json:"field12800,omitempty"`
+	Field12801    *uint64  `protobuf:"varint,2,opt,name=field12801" json:"field12801,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12796) Reset() {
@@ -140,14 +138,13 @@ func (x *Message12796) GetField12801() uint64 {
 }
 
 type Message12821 struct {
-	Field12848           *int32                  `protobuf:"varint,1,opt,name=field12848" json:"field12848,omitempty"`
-	Field12849           *int32                  `protobuf:"varint,2,opt,name=field12849" json:"field12849,omitempty"`
-	Field12850           *int32                  `protobuf:"varint,3,opt,name=field12850" json:"field12850,omitempty"`
-	Field12851           *int32                  `protobuf:"varint,4,opt,name=field12851" json:"field12851,omitempty"`
-	Field12852           *int32                  `protobuf:"varint,5,opt,name=field12852" json:"field12852,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12848    *int32 `protobuf:"varint,1,opt,name=field12848" json:"field12848,omitempty"`
+	Field12849    *int32 `protobuf:"varint,2,opt,name=field12849" json:"field12849,omitempty"`
+	Field12850    *int32 `protobuf:"varint,3,opt,name=field12850" json:"field12850,omitempty"`
+	Field12851    *int32 `protobuf:"varint,4,opt,name=field12851" json:"field12851,omitempty"`
+	Field12852    *int32 `protobuf:"varint,5,opt,name=field12852" json:"field12852,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12821) Reset() {
@@ -209,17 +206,16 @@ func (x *Message12821) GetField12852() int32 {
 }
 
 type Message12820 struct {
-	Field12840           *int32                  `protobuf:"varint,1,opt,name=field12840" json:"field12840,omitempty"`
-	Field12841           *int32                  `protobuf:"varint,2,opt,name=field12841" json:"field12841,omitempty"`
-	Field12842           *int32                  `protobuf:"varint,3,opt,name=field12842" json:"field12842,omitempty"`
-	Field12843           *int32                  `protobuf:"varint,8,opt,name=field12843" json:"field12843,omitempty"`
-	Field12844           *int32                  `protobuf:"varint,4,opt,name=field12844" json:"field12844,omitempty"`
-	Field12845           *int32                  `protobuf:"varint,5,opt,name=field12845" json:"field12845,omitempty"`
-	Field12846           *int32                  `protobuf:"varint,6,opt,name=field12846" json:"field12846,omitempty"`
-	Field12847           *int32                  `protobuf:"varint,7,opt,name=field12847" json:"field12847,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12840    *int32 `protobuf:"varint,1,opt,name=field12840" json:"field12840,omitempty"`
+	Field12841    *int32 `protobuf:"varint,2,opt,name=field12841" json:"field12841,omitempty"`
+	Field12842    *int32 `protobuf:"varint,3,opt,name=field12842" json:"field12842,omitempty"`
+	Field12843    *int32 `protobuf:"varint,8,opt,name=field12843" json:"field12843,omitempty"`
+	Field12844    *int32 `protobuf:"varint,4,opt,name=field12844" json:"field12844,omitempty"`
+	Field12845    *int32 `protobuf:"varint,5,opt,name=field12845" json:"field12845,omitempty"`
+	Field12846    *int32 `protobuf:"varint,6,opt,name=field12846" json:"field12846,omitempty"`
+	Field12847    *int32 `protobuf:"varint,7,opt,name=field12847" json:"field12847,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12820) Reset() {
@@ -302,15 +298,14 @@ func (x *Message12820) GetField12847() int32 {
 }
 
 type Message12819 struct {
-	Field12834           *float64                `protobuf:"fixed64,1,opt,name=field12834" json:"field12834,omitempty"`
-	Field12835           *float64                `protobuf:"fixed64,2,opt,name=field12835" json:"field12835,omitempty"`
-	Field12836           *float64                `protobuf:"fixed64,3,opt,name=field12836" json:"field12836,omitempty"`
-	Field12837           *float64                `protobuf:"fixed64,4,opt,name=field12837" json:"field12837,omitempty"`
-	Field12838           *float64                `protobuf:"fixed64,5,opt,name=field12838" json:"field12838,omitempty"`
-	Field12839           *float64                `protobuf:"fixed64,6,opt,name=field12839" json:"field12839,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12834    *float64 `protobuf:"fixed64,1,opt,name=field12834" json:"field12834,omitempty"`
+	Field12835    *float64 `protobuf:"fixed64,2,opt,name=field12835" json:"field12835,omitempty"`
+	Field12836    *float64 `protobuf:"fixed64,3,opt,name=field12836" json:"field12836,omitempty"`
+	Field12837    *float64 `protobuf:"fixed64,4,opt,name=field12837" json:"field12837,omitempty"`
+	Field12838    *float64 `protobuf:"fixed64,5,opt,name=field12838" json:"field12838,omitempty"`
+	Field12839    *float64 `protobuf:"fixed64,6,opt,name=field12839" json:"field12839,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12819) Reset() {
@@ -379,14 +374,13 @@ func (x *Message12819) GetField12839() float64 {
 }
 
 type Message12818 struct {
-	Field12829           *uint64                 `protobuf:"varint,1,opt,name=field12829" json:"field12829,omitempty"`
-	Field12830           *int32                  `protobuf:"varint,2,opt,name=field12830" json:"field12830,omitempty"`
-	Field12831           *int32                  `protobuf:"varint,3,opt,name=field12831" json:"field12831,omitempty"`
-	Field12832           *int32                  `protobuf:"varint,5,opt,name=field12832" json:"field12832,omitempty"`
-	Field12833           []*Message12817         `protobuf:"bytes,4,rep,name=field12833" json:"field12833,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12829    *uint64         `protobuf:"varint,1,opt,name=field12829" json:"field12829,omitempty"`
+	Field12830    *int32          `protobuf:"varint,2,opt,name=field12830" json:"field12830,omitempty"`
+	Field12831    *int32          `protobuf:"varint,3,opt,name=field12831" json:"field12831,omitempty"`
+	Field12832    *int32          `protobuf:"varint,5,opt,name=field12832" json:"field12832,omitempty"`
+	Field12833    []*Message12817 `protobuf:"bytes,4,rep,name=field12833" json:"field12833,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12818) Reset() {
@@ -448,16 +442,15 @@ func (x *Message12818) GetField12833() []*Message12817 {
 }
 
 type Message10319 struct {
-	Field10340           *Enum10325              `protobuf:"varint,1,opt,name=field10340,enum=benchmarks.google_message4.Enum10325" json:"field10340,omitempty"`
-	Field10341           *int32                  `protobuf:"varint,4,opt,name=field10341" json:"field10341,omitempty"`
-	Field10342           *int32                  `protobuf:"varint,5,opt,name=field10342" json:"field10342,omitempty"`
-	Field10343           []byte                  `protobuf:"bytes,3,opt,name=field10343" json:"field10343,omitempty"`
-	Field10344           *string                 `protobuf:"bytes,2,opt,name=field10344" json:"field10344,omitempty"`
-	Field10345           *string                 `protobuf:"bytes,6,opt,name=field10345" json:"field10345,omitempty"`
-	Field10346           *string                 `protobuf:"bytes,7,opt,name=field10346" json:"field10346,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field10340    *Enum10325 `protobuf:"varint,1,opt,name=field10340,enum=benchmarks.google_message4.Enum10325" json:"field10340,omitempty"`
+	Field10341    *int32     `protobuf:"varint,4,opt,name=field10341" json:"field10341,omitempty"`
+	Field10342    *int32     `protobuf:"varint,5,opt,name=field10342" json:"field10342,omitempty"`
+	Field10343    []byte     `protobuf:"bytes,3,opt,name=field10343" json:"field10343,omitempty"`
+	Field10344    *string    `protobuf:"bytes,2,opt,name=field10344" json:"field10344,omitempty"`
+	Field10345    *string    `protobuf:"bytes,6,opt,name=field10345" json:"field10345,omitempty"`
+	Field10346    *string    `protobuf:"bytes,7,opt,name=field10346" json:"field10346,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message10319) Reset() {
@@ -533,11 +526,10 @@ func (x *Message10319) GetField10346() string {
 }
 
 type Message6578 struct {
-	Field6632            *Enum6579               `protobuf:"varint,1,opt,name=field6632,enum=benchmarks.google_message4.Enum6579" json:"field6632,omitempty"`
-	Field6633            *Enum6588               `protobuf:"varint,2,opt,name=field6633,enum=benchmarks.google_message4.Enum6588" json:"field6633,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6632     *Enum6579 `protobuf:"varint,1,opt,name=field6632,enum=benchmarks.google_message4.Enum6579" json:"field6632,omitempty"`
+	Field6633     *Enum6588 `protobuf:"varint,2,opt,name=field6633,enum=benchmarks.google_message4.Enum6588" json:"field6633,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6578) Reset() {
@@ -578,28 +570,27 @@ func (x *Message6578) GetField6633() Enum6588 {
 }
 
 type Message6126 struct {
-	Field6152            *string                 `protobuf:"bytes,1,req,name=field6152" json:"field6152,omitempty"`
-	Field6153            []*Message6127          `protobuf:"bytes,9,rep,name=field6153" json:"field6153,omitempty"`
-	Field6154            *int32                  `protobuf:"varint,14,opt,name=field6154" json:"field6154,omitempty"`
-	Field6155            []byte                  `protobuf:"bytes,10,opt,name=field6155" json:"field6155,omitempty"`
-	Field6156            *Message6024            `protobuf:"bytes,12,opt,name=field6156" json:"field6156,omitempty"`
-	Field6157            *int32                  `protobuf:"varint,4,opt,name=field6157" json:"field6157,omitempty"`
-	Field6158            *string                 `protobuf:"bytes,5,opt,name=field6158" json:"field6158,omitempty"`
-	Field6159            *int32                  `protobuf:"varint,6,opt,name=field6159" json:"field6159,omitempty"`
-	Field6160            []int32                 `protobuf:"varint,2,rep,name=field6160" json:"field6160,omitempty"`
-	Field6161            []int32                 `protobuf:"varint,3,rep,name=field6161" json:"field6161,omitempty"`
-	Field6162            []*Message6052          `protobuf:"bytes,7,rep,name=field6162" json:"field6162,omitempty"`
-	Field6163            []*UnusedEmptyMessage   `protobuf:"bytes,11,rep,name=field6163" json:"field6163,omitempty"`
-	Field6164            *Enum6065               `protobuf:"varint,15,opt,name=field6164,enum=benchmarks.google_message4.Enum6065" json:"field6164,omitempty"`
-	Field6165            []*Message6127          `protobuf:"bytes,8,rep,name=field6165" json:"field6165,omitempty"`
-	Field6166            *bool                   `protobuf:"varint,13,opt,name=field6166" json:"field6166,omitempty"`
-	Field6167            *bool                   `protobuf:"varint,16,opt,name=field6167" json:"field6167,omitempty"`
-	Field6168            *bool                   `protobuf:"varint,18,opt,name=field6168" json:"field6168,omitempty"`
-	Field6169            []*Message6054          `protobuf:"bytes,17,rep,name=field6169" json:"field6169,omitempty"`
-	Field6170            *int32                  `protobuf:"varint,19,opt,name=field6170" json:"field6170,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6152     *string               `protobuf:"bytes,1,req,name=field6152" json:"field6152,omitempty"`
+	Field6153     []*Message6127        `protobuf:"bytes,9,rep,name=field6153" json:"field6153,omitempty"`
+	Field6154     *int32                `protobuf:"varint,14,opt,name=field6154" json:"field6154,omitempty"`
+	Field6155     []byte                `protobuf:"bytes,10,opt,name=field6155" json:"field6155,omitempty"`
+	Field6156     *Message6024          `protobuf:"bytes,12,opt,name=field6156" json:"field6156,omitempty"`
+	Field6157     *int32                `protobuf:"varint,4,opt,name=field6157" json:"field6157,omitempty"`
+	Field6158     *string               `protobuf:"bytes,5,opt,name=field6158" json:"field6158,omitempty"`
+	Field6159     *int32                `protobuf:"varint,6,opt,name=field6159" json:"field6159,omitempty"`
+	Field6160     []int32               `protobuf:"varint,2,rep,name=field6160" json:"field6160,omitempty"`
+	Field6161     []int32               `protobuf:"varint,3,rep,name=field6161" json:"field6161,omitempty"`
+	Field6162     []*Message6052        `protobuf:"bytes,7,rep,name=field6162" json:"field6162,omitempty"`
+	Field6163     []*UnusedEmptyMessage `protobuf:"bytes,11,rep,name=field6163" json:"field6163,omitempty"`
+	Field6164     *Enum6065             `protobuf:"varint,15,opt,name=field6164,enum=benchmarks.google_message4.Enum6065" json:"field6164,omitempty"`
+	Field6165     []*Message6127        `protobuf:"bytes,8,rep,name=field6165" json:"field6165,omitempty"`
+	Field6166     *bool                 `protobuf:"varint,13,opt,name=field6166" json:"field6166,omitempty"`
+	Field6167     *bool                 `protobuf:"varint,16,opt,name=field6167" json:"field6167,omitempty"`
+	Field6168     *bool                 `protobuf:"varint,18,opt,name=field6168" json:"field6168,omitempty"`
+	Field6169     []*Message6054        `protobuf:"bytes,17,rep,name=field6169" json:"field6169,omitempty"`
+	Field6170     *int32                `protobuf:"varint,19,opt,name=field6170" json:"field6170,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6126) Reset() {
@@ -759,15 +750,14 @@ func (x *Message6126) GetField6170() int32 {
 }
 
 type Message5881 struct {
-	Field5897            *float64                `protobuf:"fixed64,1,req,name=field5897" json:"field5897,omitempty"`
-	Field5898            *string                 `protobuf:"bytes,5,opt,name=field5898" json:"field5898,omitempty"`
-	Field5899            *Message5861            `protobuf:"bytes,2,opt,name=field5899" json:"field5899,omitempty"`
-	Field5900            *UnusedEmptyMessage     `protobuf:"bytes,3,opt,name=field5900" json:"field5900,omitempty"`
-	Field5901            *Message5867            `protobuf:"bytes,4,opt,name=field5901" json:"field5901,omitempty"`
-	Field5902            *Message5880            `protobuf:"bytes,6,opt,name=field5902" json:"field5902,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field5897     *float64            `protobuf:"fixed64,1,req,name=field5897" json:"field5897,omitempty"`
+	Field5898     *string             `protobuf:"bytes,5,opt,name=field5898" json:"field5898,omitempty"`
+	Field5899     *Message5861        `protobuf:"bytes,2,opt,name=field5899" json:"field5899,omitempty"`
+	Field5900     *UnusedEmptyMessage `protobuf:"bytes,3,opt,name=field5900" json:"field5900,omitempty"`
+	Field5901     *Message5867        `protobuf:"bytes,4,opt,name=field5901" json:"field5901,omitempty"`
+	Field5902     *Message5880        `protobuf:"bytes,6,opt,name=field5902" json:"field5902,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message5881) Reset() {
@@ -836,9 +826,8 @@ func (x *Message5881) GetField5902() *Message5880 {
 }
 
 type Message6110 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6110) Reset() {
@@ -865,15 +854,14 @@ func (*Message6110) Descriptor() ([]byte, []int) {
 }
 
 type Message6107 struct {
-	Field6134            *Message4016            `protobuf:"bytes,1,opt,name=field6134" json:"field6134,omitempty"`
-	Field6135            *int32                  `protobuf:"varint,2,opt,name=field6135" json:"field6135,omitempty"`
-	Field6136            *string                 `protobuf:"bytes,3,opt,name=field6136" json:"field6136,omitempty"`
-	Field6137            []int32                 `protobuf:"varint,4,rep,name=field6137" json:"field6137,omitempty"`
-	Field6138            *int32                  `protobuf:"varint,5,opt,name=field6138" json:"field6138,omitempty"`
-	Field6139            []*Message6108          `protobuf:"bytes,6,rep,name=field6139" json:"field6139,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6134     *Message4016   `protobuf:"bytes,1,opt,name=field6134" json:"field6134,omitempty"`
+	Field6135     *int32         `protobuf:"varint,2,opt,name=field6135" json:"field6135,omitempty"`
+	Field6136     *string        `protobuf:"bytes,3,opt,name=field6136" json:"field6136,omitempty"`
+	Field6137     []int32        `protobuf:"varint,4,rep,name=field6137" json:"field6137,omitempty"`
+	Field6138     *int32         `protobuf:"varint,5,opt,name=field6138" json:"field6138,omitempty"`
+	Field6139     []*Message6108 `protobuf:"bytes,6,rep,name=field6139" json:"field6139,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6107) Reset() {
@@ -942,11 +930,10 @@ func (x *Message6107) GetField6139() []*Message6108 {
 }
 
 type Message6129 struct {
-	Field6171            *Enum6130               `protobuf:"varint,1,req,name=field6171,enum=benchmarks.google_message4.Enum6130" json:"field6171,omitempty"`
-	Field6172            *string                 `protobuf:"bytes,2,req,name=field6172" json:"field6172,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6171     *Enum6130 `protobuf:"varint,1,req,name=field6171,enum=benchmarks.google_message4.Enum6130" json:"field6171,omitempty"`
+	Field6172     *string   `protobuf:"bytes,2,req,name=field6172" json:"field6172,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6129) Reset() {
@@ -987,59 +974,58 @@ func (x *Message6129) GetField6172() string {
 }
 
 type Message5908 struct {
-	Field5971            *string                 `protobuf:"bytes,1,opt,name=field5971" json:"field5971,omitempty"`
-	Field5972            *int32                  `protobuf:"varint,2,opt,name=field5972" json:"field5972,omitempty"`
-	Field5973            *int32                  `protobuf:"varint,3,opt,name=field5973" json:"field5973,omitempty"`
-	Field5974            *Enum5909               `protobuf:"varint,45,opt,name=field5974,enum=benchmarks.google_message4.Enum5909" json:"field5974,omitempty"`
-	Field5975            *Enum5912               `protobuf:"varint,4,opt,name=field5975,enum=benchmarks.google_message4.Enum5912" json:"field5975,omitempty"`
-	Field5976            *uint32                 `protobuf:"fixed32,50,opt,name=field5976" json:"field5976,omitempty"`
-	Field5977            *uint32                 `protobuf:"fixed32,5,opt,name=field5977" json:"field5977,omitempty"`
-	Field5978            *uint32                 `protobuf:"fixed32,6,opt,name=field5978" json:"field5978,omitempty"`
-	Field5979            *string                 `protobuf:"bytes,7,opt,name=field5979" json:"field5979,omitempty"`
-	Field5980            *Enum5915               `protobuf:"varint,8,opt,name=field5980,enum=benchmarks.google_message4.Enum5915" json:"field5980,omitempty"`
-	Field5981            *Message5903            `protobuf:"bytes,9,opt,name=field5981" json:"field5981,omitempty"`
-	Field5982            *Message5903            `protobuf:"bytes,10,opt,name=field5982" json:"field5982,omitempty"`
-	Field5983            *Enum5920               `protobuf:"varint,11,opt,name=field5983,enum=benchmarks.google_message4.Enum5920" json:"field5983,omitempty"`
-	Field5984            *Enum5923               `protobuf:"varint,40,opt,name=field5984,enum=benchmarks.google_message4.Enum5923" json:"field5984,omitempty"`
-	Field5985            *Message5903            `protobuf:"bytes,41,opt,name=field5985" json:"field5985,omitempty"`
-	Field5986            *Message5903            `protobuf:"bytes,42,opt,name=field5986" json:"field5986,omitempty"`
-	Field5987            *Enum5928               `protobuf:"varint,47,opt,name=field5987,enum=benchmarks.google_message4.Enum5928" json:"field5987,omitempty"`
-	Field5988            *bool                   `protobuf:"varint,48,opt,name=field5988" json:"field5988,omitempty"`
-	Field5989            []uint32                `protobuf:"fixed32,49,rep,name=field5989" json:"field5989,omitempty"`
-	Field5990            *string                 `protobuf:"bytes,12,opt,name=field5990" json:"field5990,omitempty"`
-	Field5991            *Message5903            `protobuf:"bytes,13,opt,name=field5991" json:"field5991,omitempty"`
-	Field5992            *Message5903            `protobuf:"bytes,14,opt,name=field5992" json:"field5992,omitempty"`
-	Field5993            *Message5903            `protobuf:"bytes,15,opt,name=field5993" json:"field5993,omitempty"`
-	Field5994            *Message5903            `protobuf:"bytes,16,opt,name=field5994" json:"field5994,omitempty"`
-	Field5995            *Message5903            `protobuf:"bytes,32,opt,name=field5995" json:"field5995,omitempty"`
-	Field5996            *Message5903            `protobuf:"bytes,33,opt,name=field5996" json:"field5996,omitempty"`
-	Field5997            *Message5903            `protobuf:"bytes,34,opt,name=field5997" json:"field5997,omitempty"`
-	Field5998            *Message5903            `protobuf:"bytes,35,opt,name=field5998" json:"field5998,omitempty"`
-	Field5999            *Enum5931               `protobuf:"varint,17,opt,name=field5999,enum=benchmarks.google_message4.Enum5931" json:"field5999,omitempty"`
-	Field6000            *Enum5935               `protobuf:"varint,18,opt,name=field6000,enum=benchmarks.google_message4.Enum5935" json:"field6000,omitempty"`
-	Field6001            *Enum5939               `protobuf:"varint,36,opt,name=field6001,enum=benchmarks.google_message4.Enum5939" json:"field6001,omitempty"`
-	Field6002            *Enum5939               `protobuf:"varint,37,opt,name=field6002,enum=benchmarks.google_message4.Enum5939" json:"field6002,omitempty"`
-	Field6003            []int32                 `protobuf:"varint,19,rep,name=field6003" json:"field6003,omitempty"`
-	Field6004            *uint32                 `protobuf:"varint,20,opt,name=field6004" json:"field6004,omitempty"`
-	Field6005            *uint32                 `protobuf:"varint,21,opt,name=field6005" json:"field6005,omitempty"`
-	Field6006            *uint32                 `protobuf:"varint,22,opt,name=field6006" json:"field6006,omitempty"`
-	Field6007            *uint32                 `protobuf:"varint,23,opt,name=field6007" json:"field6007,omitempty"`
-	Field6008            *Enum5946               `protobuf:"varint,24,opt,name=field6008,enum=benchmarks.google_message4.Enum5946" json:"field6008,omitempty"`
-	Field6009            *Enum5946               `protobuf:"varint,25,opt,name=field6009,enum=benchmarks.google_message4.Enum5946" json:"field6009,omitempty"`
-	Field6010            *Enum5946               `protobuf:"varint,26,opt,name=field6010,enum=benchmarks.google_message4.Enum5946" json:"field6010,omitempty"`
-	Field6011            *Enum5946               `protobuf:"varint,27,opt,name=field6011,enum=benchmarks.google_message4.Enum5946" json:"field6011,omitempty"`
-	Field6012            *uint32                 `protobuf:"fixed32,28,opt,name=field6012" json:"field6012,omitempty"`
-	Field6013            *uint32                 `protobuf:"fixed32,29,opt,name=field6013" json:"field6013,omitempty"`
-	Field6014            *uint32                 `protobuf:"fixed32,30,opt,name=field6014" json:"field6014,omitempty"`
-	Field6015            *uint32                 `protobuf:"fixed32,31,opt,name=field6015" json:"field6015,omitempty"`
-	Field6016            *int32                  `protobuf:"varint,38,opt,name=field6016" json:"field6016,omitempty"`
-	Field6017            *float32                `protobuf:"fixed32,39,opt,name=field6017" json:"field6017,omitempty"`
-	Field6018            *Enum5957               `protobuf:"varint,43,opt,name=field6018,enum=benchmarks.google_message4.Enum5957" json:"field6018,omitempty"`
-	Field6019            *Message5907            `protobuf:"bytes,44,opt,name=field6019" json:"field6019,omitempty"`
-	Field6020            *Enum5962               `protobuf:"varint,46,opt,name=field6020,enum=benchmarks.google_message4.Enum5962" json:"field6020,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field5971     *string      `protobuf:"bytes,1,opt,name=field5971" json:"field5971,omitempty"`
+	Field5972     *int32       `protobuf:"varint,2,opt,name=field5972" json:"field5972,omitempty"`
+	Field5973     *int32       `protobuf:"varint,3,opt,name=field5973" json:"field5973,omitempty"`
+	Field5974     *Enum5909    `protobuf:"varint,45,opt,name=field5974,enum=benchmarks.google_message4.Enum5909" json:"field5974,omitempty"`
+	Field5975     *Enum5912    `protobuf:"varint,4,opt,name=field5975,enum=benchmarks.google_message4.Enum5912" json:"field5975,omitempty"`
+	Field5976     *uint32      `protobuf:"fixed32,50,opt,name=field5976" json:"field5976,omitempty"`
+	Field5977     *uint32      `protobuf:"fixed32,5,opt,name=field5977" json:"field5977,omitempty"`
+	Field5978     *uint32      `protobuf:"fixed32,6,opt,name=field5978" json:"field5978,omitempty"`
+	Field5979     *string      `protobuf:"bytes,7,opt,name=field5979" json:"field5979,omitempty"`
+	Field5980     *Enum5915    `protobuf:"varint,8,opt,name=field5980,enum=benchmarks.google_message4.Enum5915" json:"field5980,omitempty"`
+	Field5981     *Message5903 `protobuf:"bytes,9,opt,name=field5981" json:"field5981,omitempty"`
+	Field5982     *Message5903 `protobuf:"bytes,10,opt,name=field5982" json:"field5982,omitempty"`
+	Field5983     *Enum5920    `protobuf:"varint,11,opt,name=field5983,enum=benchmarks.google_message4.Enum5920" json:"field5983,omitempty"`
+	Field5984     *Enum5923    `protobuf:"varint,40,opt,name=field5984,enum=benchmarks.google_message4.Enum5923" json:"field5984,omitempty"`
+	Field5985     *Message5903 `protobuf:"bytes,41,opt,name=field5985" json:"field5985,omitempty"`
+	Field5986     *Message5903 `protobuf:"bytes,42,opt,name=field5986" json:"field5986,omitempty"`
+	Field5987     *Enum5928    `protobuf:"varint,47,opt,name=field5987,enum=benchmarks.google_message4.Enum5928" json:"field5987,omitempty"`
+	Field5988     *bool        `protobuf:"varint,48,opt,name=field5988" json:"field5988,omitempty"`
+	Field5989     []uint32     `protobuf:"fixed32,49,rep,name=field5989" json:"field5989,omitempty"`
+	Field5990     *string      `protobuf:"bytes,12,opt,name=field5990" json:"field5990,omitempty"`
+	Field5991     *Message5903 `protobuf:"bytes,13,opt,name=field5991" json:"field5991,omitempty"`
+	Field5992     *Message5903 `protobuf:"bytes,14,opt,name=field5992" json:"field5992,omitempty"`
+	Field5993     *Message5903 `protobuf:"bytes,15,opt,name=field5993" json:"field5993,omitempty"`
+	Field5994     *Message5903 `protobuf:"bytes,16,opt,name=field5994" json:"field5994,omitempty"`
+	Field5995     *Message5903 `protobuf:"bytes,32,opt,name=field5995" json:"field5995,omitempty"`
+	Field5996     *Message5903 `protobuf:"bytes,33,opt,name=field5996" json:"field5996,omitempty"`
+	Field5997     *Message5903 `protobuf:"bytes,34,opt,name=field5997" json:"field5997,omitempty"`
+	Field5998     *Message5903 `protobuf:"bytes,35,opt,name=field5998" json:"field5998,omitempty"`
+	Field5999     *Enum5931    `protobuf:"varint,17,opt,name=field5999,enum=benchmarks.google_message4.Enum5931" json:"field5999,omitempty"`
+	Field6000     *Enum5935    `protobuf:"varint,18,opt,name=field6000,enum=benchmarks.google_message4.Enum5935" json:"field6000,omitempty"`
+	Field6001     *Enum5939    `protobuf:"varint,36,opt,name=field6001,enum=benchmarks.google_message4.Enum5939" json:"field6001,omitempty"`
+	Field6002     *Enum5939    `protobuf:"varint,37,opt,name=field6002,enum=benchmarks.google_message4.Enum5939" json:"field6002,omitempty"`
+	Field6003     []int32      `protobuf:"varint,19,rep,name=field6003" json:"field6003,omitempty"`
+	Field6004     *uint32      `protobuf:"varint,20,opt,name=field6004" json:"field6004,omitempty"`
+	Field6005     *uint32      `protobuf:"varint,21,opt,name=field6005" json:"field6005,omitempty"`
+	Field6006     *uint32      `protobuf:"varint,22,opt,name=field6006" json:"field6006,omitempty"`
+	Field6007     *uint32      `protobuf:"varint,23,opt,name=field6007" json:"field6007,omitempty"`
+	Field6008     *Enum5946    `protobuf:"varint,24,opt,name=field6008,enum=benchmarks.google_message4.Enum5946" json:"field6008,omitempty"`
+	Field6009     *Enum5946    `protobuf:"varint,25,opt,name=field6009,enum=benchmarks.google_message4.Enum5946" json:"field6009,omitempty"`
+	Field6010     *Enum5946    `protobuf:"varint,26,opt,name=field6010,enum=benchmarks.google_message4.Enum5946" json:"field6010,omitempty"`
+	Field6011     *Enum5946    `protobuf:"varint,27,opt,name=field6011,enum=benchmarks.google_message4.Enum5946" json:"field6011,omitempty"`
+	Field6012     *uint32      `protobuf:"fixed32,28,opt,name=field6012" json:"field6012,omitempty"`
+	Field6013     *uint32      `protobuf:"fixed32,29,opt,name=field6013" json:"field6013,omitempty"`
+	Field6014     *uint32      `protobuf:"fixed32,30,opt,name=field6014" json:"field6014,omitempty"`
+	Field6015     *uint32      `protobuf:"fixed32,31,opt,name=field6015" json:"field6015,omitempty"`
+	Field6016     *int32       `protobuf:"varint,38,opt,name=field6016" json:"field6016,omitempty"`
+	Field6017     *float32     `protobuf:"fixed32,39,opt,name=field6017" json:"field6017,omitempty"`
+	Field6018     *Enum5957    `protobuf:"varint,43,opt,name=field6018,enum=benchmarks.google_message4.Enum5957" json:"field6018,omitempty"`
+	Field6019     *Message5907 `protobuf:"bytes,44,opt,name=field6019" json:"field6019,omitempty"`
+	Field6020     *Enum5962    `protobuf:"varint,46,opt,name=field6020,enum=benchmarks.google_message4.Enum5962" json:"field6020,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message5908) Reset() {
@@ -1416,15 +1402,14 @@ func (x *Message5908) GetField6020() Enum5962 {
 }
 
 type Message3850 struct {
-	Field3924            *Enum3851               `protobuf:"varint,2,opt,name=field3924,enum=benchmarks.google_message4.Enum3851" json:"field3924,omitempty"`
-	Field3925            *bool                   `protobuf:"varint,12,opt,name=field3925" json:"field3925,omitempty"`
-	Field3926            *int32                  `protobuf:"varint,4,opt,name=field3926" json:"field3926,omitempty"`
-	Field3927            *bool                   `protobuf:"varint,10,opt,name=field3927" json:"field3927,omitempty"`
-	Field3928            *bool                   `protobuf:"varint,13,opt,name=field3928" json:"field3928,omitempty"`
-	Field3929            *bool                   `protobuf:"varint,14,opt,name=field3929" json:"field3929,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field3924     *Enum3851 `protobuf:"varint,2,opt,name=field3924,enum=benchmarks.google_message4.Enum3851" json:"field3924,omitempty"`
+	Field3925     *bool     `protobuf:"varint,12,opt,name=field3925" json:"field3925,omitempty"`
+	Field3926     *int32    `protobuf:"varint,4,opt,name=field3926" json:"field3926,omitempty"`
+	Field3927     *bool     `protobuf:"varint,10,opt,name=field3927" json:"field3927,omitempty"`
+	Field3928     *bool     `protobuf:"varint,13,opt,name=field3928" json:"field3928,omitempty"`
+	Field3929     *bool     `protobuf:"varint,14,opt,name=field3929" json:"field3929,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message3850) Reset() {
@@ -1493,9 +1478,8 @@ func (x *Message3850) GetField3929() bool {
 }
 
 type Message7865 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7865) Reset() {
@@ -1522,16 +1506,15 @@ func (*Message7865) Descriptor() ([]byte, []int) {
 }
 
 type Message7511 struct {
-	Field7523            *bool                   `protobuf:"varint,1,opt,name=field7523" json:"field7523,omitempty"`
-	Field7524            *Enum7512               `protobuf:"varint,2,opt,name=field7524,enum=benchmarks.google_message4.Enum7512" json:"field7524,omitempty"`
-	Field7525            *int32                  `protobuf:"varint,3,opt,name=field7525" json:"field7525,omitempty"`
-	Field7526            *int32                  `protobuf:"varint,4,opt,name=field7526" json:"field7526,omitempty"`
-	Field7527            *bool                   `protobuf:"varint,5,opt,name=field7527" json:"field7527,omitempty"`
-	Field7528            *int32                  `protobuf:"varint,6,opt,name=field7528" json:"field7528,omitempty"`
-	Field7529            *int32                  `protobuf:"varint,7,opt,name=field7529" json:"field7529,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7523     *bool     `protobuf:"varint,1,opt,name=field7523" json:"field7523,omitempty"`
+	Field7524     *Enum7512 `protobuf:"varint,2,opt,name=field7524,enum=benchmarks.google_message4.Enum7512" json:"field7524,omitempty"`
+	Field7525     *int32    `protobuf:"varint,3,opt,name=field7525" json:"field7525,omitempty"`
+	Field7526     *int32    `protobuf:"varint,4,opt,name=field7526" json:"field7526,omitempty"`
+	Field7527     *bool     `protobuf:"varint,5,opt,name=field7527" json:"field7527,omitempty"`
+	Field7528     *int32    `protobuf:"varint,6,opt,name=field7528" json:"field7528,omitempty"`
+	Field7529     *int32    `protobuf:"varint,7,opt,name=field7529" json:"field7529,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7511) Reset() {
@@ -1607,9 +1590,8 @@ func (x *Message7511) GetField7529() int32 {
 }
 
 type Message3920 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message3920) Reset() {
@@ -1636,11 +1618,10 @@ func (*Message3920) Descriptor() ([]byte, []int) {
 }
 
 type Message7928 struct {
-	Field7940            *string                 `protobuf:"bytes,1,opt,name=field7940" json:"field7940,omitempty"`
-	Field7941            *int64                  `protobuf:"varint,2,opt,name=field7941" json:"field7941,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7940     *string `protobuf:"bytes,1,opt,name=field7940" json:"field7940,omitempty"`
+	Field7941     *int64  `protobuf:"varint,2,opt,name=field7941" json:"field7941,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7928) Reset() {
@@ -1681,13 +1662,12 @@ func (x *Message7928) GetField7941() int64 {
 }
 
 type Message7921 struct {
-	Field7936            *int32                  `protobuf:"varint,1,opt,name=field7936" json:"field7936,omitempty"`
-	Field7937            *int64                  `protobuf:"varint,2,opt,name=field7937" json:"field7937,omitempty"`
-	Field7938            *float32                `protobuf:"fixed32,3,opt,name=field7938" json:"field7938,omitempty"`
-	Field7939            *Enum7922               `protobuf:"varint,4,opt,name=field7939,enum=benchmarks.google_message4.Enum7922" json:"field7939,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7936     *int32    `protobuf:"varint,1,opt,name=field7936" json:"field7936,omitempty"`
+	Field7937     *int64    `protobuf:"varint,2,opt,name=field7937" json:"field7937,omitempty"`
+	Field7938     *float32  `protobuf:"fixed32,3,opt,name=field7938" json:"field7938,omitempty"`
+	Field7939     *Enum7922 `protobuf:"varint,4,opt,name=field7939,enum=benchmarks.google_message4.Enum7922" json:"field7939,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7921) Reset() {
@@ -1742,11 +1722,10 @@ func (x *Message7921) GetField7939() Enum7922 {
 }
 
 type Message7920 struct {
-	Field7934            *int64                  `protobuf:"varint,1,opt,name=field7934" json:"field7934,omitempty"`
-	Field7935            *int64                  `protobuf:"varint,2,opt,name=field7935" json:"field7935,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7934     *int64 `protobuf:"varint,1,opt,name=field7934" json:"field7934,omitempty"`
+	Field7935     *int64 `protobuf:"varint,2,opt,name=field7935" json:"field7935,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7920) Reset() {
@@ -1787,12 +1766,11 @@ func (x *Message7920) GetField7935() int64 {
 }
 
 type Message7919 struct {
-	Field7931            *uint64                 `protobuf:"fixed64,1,opt,name=field7931" json:"field7931,omitempty"`
-	Field7932            *int64                  `protobuf:"varint,2,opt,name=field7932" json:"field7932,omitempty"`
-	Field7933            []byte                  `protobuf:"bytes,3,opt,name=field7933" json:"field7933,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field7931     *uint64 `protobuf:"fixed64,1,opt,name=field7931" json:"field7931,omitempty"`
+	Field7932     *int64  `protobuf:"varint,2,opt,name=field7932" json:"field7932,omitempty"`
+	Field7933     []byte  `protobuf:"bytes,3,opt,name=field7933" json:"field7933,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message7919) Reset() {
@@ -1840,12 +1818,11 @@ func (x *Message7919) GetField7933() []byte {
 }
 
 type Message12817 struct {
-	Field12826           *int32                  `protobuf:"varint,1,opt,name=field12826" json:"field12826,omitempty"`
-	Field12827           *int32                  `protobuf:"varint,2,opt,name=field12827" json:"field12827,omitempty"`
-	Field12828           *int32                  `protobuf:"varint,3,opt,name=field12828" json:"field12828,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field12826    *int32 `protobuf:"varint,1,opt,name=field12826" json:"field12826,omitempty"`
+	Field12827    *int32 `protobuf:"varint,2,opt,name=field12827" json:"field12827,omitempty"`
+	Field12828    *int32 `protobuf:"varint,3,opt,name=field12828" json:"field12828,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message12817) Reset() {
@@ -1893,11 +1870,10 @@ func (x *Message12817) GetField12828() int32 {
 }
 
 type Message6054 struct {
-	Field6089            *string                 `protobuf:"bytes,1,req,name=field6089" json:"field6089,omitempty"`
-	Field6090            *string                 `protobuf:"bytes,2,opt,name=field6090" json:"field6090,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6089     *string `protobuf:"bytes,1,req,name=field6089" json:"field6089,omitempty"`
+	Field6090     *string `protobuf:"bytes,2,opt,name=field6090" json:"field6090,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6054) Reset() {
@@ -1938,9 +1914,8 @@ func (x *Message6054) GetField6090() string {
 }
 
 type Message6127 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6127) Reset() {
@@ -1967,11 +1942,10 @@ func (*Message6127) Descriptor() ([]byte, []int) {
 }
 
 type Message6052 struct {
-	Field6084            *string                 `protobuf:"bytes,1,req,name=field6084" json:"field6084,omitempty"`
-	Field6085            []byte                  `protobuf:"bytes,2,req,name=field6085" json:"field6085,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6084     *string `protobuf:"bytes,1,req,name=field6084" json:"field6084,omitempty"`
+	Field6085     []byte  `protobuf:"bytes,2,req,name=field6085" json:"field6085,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6052) Reset() {
@@ -2012,12 +1986,11 @@ func (x *Message6052) GetField6085() []byte {
 }
 
 type Message6024 struct {
-	Field6048            *Enum6025               `protobuf:"varint,1,opt,name=field6048,enum=benchmarks.google_message4.Enum6025" json:"field6048,omitempty"`
-	Field6049            *string                 `protobuf:"bytes,2,opt,name=field6049" json:"field6049,omitempty"`
-	Field6050            *UnusedEmptyMessage     `protobuf:"bytes,3,opt,name=field6050" json:"field6050,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field6048     *Enum6025           `protobuf:"varint,1,opt,name=field6048,enum=benchmarks.google_message4.Enum6025" json:"field6048,omitempty"`
+	Field6049     *string             `protobuf:"bytes,2,opt,name=field6049" json:"field6049,omitempty"`
+	Field6050     *UnusedEmptyMessage `protobuf:"bytes,3,opt,name=field6050" json:"field6050,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6024) Reset() {
@@ -2065,13 +2038,12 @@ func (x *Message6024) GetField6050() *UnusedEmptyMessage {
 }
 
 type Message5861 struct {
-	Field5882            *Enum5862               `protobuf:"varint,1,req,name=field5882,enum=benchmarks.google_message4.Enum5862" json:"field5882,omitempty"`
-	Field5883            *string                 `protobuf:"bytes,2,req,name=field5883" json:"field5883,omitempty"`
-	Field5884            *bool                   `protobuf:"varint,3,opt,name=field5884" json:"field5884,omitempty"`
-	Field5885            *string                 `protobuf:"bytes,4,opt,name=field5885" json:"field5885,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field5882     *Enum5862 `protobuf:"varint,1,req,name=field5882,enum=benchmarks.google_message4.Enum5862" json:"field5882,omitempty"`
+	Field5883     *string   `protobuf:"bytes,2,req,name=field5883" json:"field5883,omitempty"`
+	Field5884     *bool     `protobuf:"varint,3,opt,name=field5884" json:"field5884,omitempty"`
+	Field5885     *string   `protobuf:"bytes,4,opt,name=field5885" json:"field5885,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message5861) Reset() {
@@ -2126,10 +2098,9 @@ func (x *Message5861) GetField5885() string {
 }
 
 type Message5880 struct {
-	Field5896            *string                 `protobuf:"bytes,1,opt,name=field5896" json:"field5896,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field5896     *string `protobuf:"bytes,1,opt,name=field5896" json:"field5896,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message5880) Reset() {
@@ -2163,15 +2134,14 @@ func (x *Message5880) GetField5896() string {
 }
 
 type Message5867 struct {
-	Field5890            *Enum5868               `protobuf:"varint,1,opt,name=field5890,enum=benchmarks.google_message4.Enum5868" json:"field5890,omitempty"`
-	Field5891            *string                 `protobuf:"bytes,2,opt,name=field5891" json:"field5891,omitempty"`
-	Field5892            *Enum5873               `protobuf:"varint,3,opt,name=field5892,enum=benchmarks.google_message4.Enum5873" json:"field5892,omitempty"`
-	Field5893            *int32                  `protobuf:"varint,4,opt,name=field5893" json:"field5893,omitempty"`
-	Field5894            *UnusedEnum             `protobuf:"varint,5,opt,name=field5894,enum=benchmarks.google_message4.UnusedEnum" json:"field5894,omitempty"`
-	Field5895            *bool                   `protobuf:"varint,6,opt,name=field5895" json:"field5895,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field5890     *Enum5868   `protobuf:"varint,1,opt,name=field5890,enum=benchmarks.google_message4.Enum5868" json:"field5890,omitempty"`
+	Field5891     *string     `protobuf:"bytes,2,opt,name=field5891" json:"field5891,omitempty"`
+	Field5892     *Enum5873   `protobuf:"varint,3,opt,name=field5892,enum=benchmarks.google_message4.Enum5873" json:"field5892,omitempty"`
+	Field5893     *int32      `protobuf:"varint,4,opt,name=field5893" json:"field5893,omitempty"`
+	Field5894     *UnusedEnum `protobuf:"varint,5,opt,name=field5894,enum=benchmarks.google_message4.UnusedEnum" json:"field5894,omitempty"`
+	Field5895     *bool       `protobuf:"varint,6,opt,name=field5895" json:"field5895,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message5867) Reset() {
@@ -2240,13 +2210,12 @@ func (x *Message5867) GetField5895() bool {
 }
 
 type Message4016 struct {
-	Field4017            *int32                  `protobuf:"varint,1,req,name=field4017" json:"field4017,omitempty"`
-	Field4018            *int32                  `protobuf:"varint,2,req,name=field4018" json:"field4018,omitempty"`
-	Field4019            *int32                  `protobuf:"varint,3,req,name=field4019" json:"field4019,omitempty"`
-	Field4020            *int32                  `protobuf:"varint,4,req,name=field4020" json:"field4020,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field4017     *int32 `protobuf:"varint,1,req,name=field4017" json:"field4017,omitempty"`
+	Field4018     *int32 `protobuf:"varint,2,req,name=field4018" json:"field4018,omitempty"`
+	Field4019     *int32 `protobuf:"varint,3,req,name=field4019" json:"field4019,omitempty"`
+	Field4020     *int32 `protobuf:"varint,4,req,name=field4020" json:"field4020,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message4016) Reset() {
@@ -2301,9 +2270,8 @@ func (x *Message4016) GetField4020() int32 {
 }
 
 type Message6108 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message6108) Reset() {
@@ -2330,13 +2298,12 @@ func (*Message6108) Descriptor() ([]byte, []int) {
 }
 
 type Message5907 struct {
-	Field5967            *Message5903            `protobuf:"bytes,1,opt,name=field5967" json:"field5967,omitempty"`
-	Field5968            *Message5903            `protobuf:"bytes,2,opt,name=field5968" json:"field5968,omitempty"`
-	Field5969            *Message5903            `protobuf:"bytes,3,opt,name=field5969" json:"field5969,omitempty"`
-	Field5970            *Message5903            `protobuf:"bytes,4,opt,name=field5970" json:"field5970,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field5967     *Message5903 `protobuf:"bytes,1,opt,name=field5967" json:"field5967,omitempty"`
+	Field5968     *Message5903 `protobuf:"bytes,2,opt,name=field5968" json:"field5968,omitempty"`
+	Field5969     *Message5903 `protobuf:"bytes,3,opt,name=field5969" json:"field5969,omitempty"`
+	Field5970     *Message5903 `protobuf:"bytes,4,opt,name=field5970" json:"field5970,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message5907) Reset() {
@@ -2391,9 +2358,8 @@ func (x *Message5907) GetField5970() *Message5903 {
 }
 
 type UnusedEmptyMessage struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *UnusedEmptyMessage) Reset() {
@@ -2420,11 +2386,10 @@ func (*UnusedEmptyMessage) Descriptor() ([]byte, []int) {
 }
 
 type Message5903 struct {
-	Field5965            *int32                  `protobuf:"varint,1,req,name=field5965" json:"field5965,omitempty"`
-	Field5966            *Enum5904               `protobuf:"varint,2,opt,name=field5966,enum=benchmarks.google_message4.Enum5904" json:"field5966,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Field5965     *int32    `protobuf:"varint,1,req,name=field5965" json:"field5965,omitempty"`
+	Field5966     *Enum5904 `protobuf:"varint,2,opt,name=field5966,enum=benchmarks.google_message4.Enum5904" json:"field5966,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message5903) Reset() {
@@ -3164,6 +3129,358 @@ func file_datasets_google_message4_benchmark_message4_2_proto_init() {
 		return
 	}
 	file_datasets_google_message4_benchmark_message4_3_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12774); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12796); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12821); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12820); i {
+			case 8:
+				return &v.sizeCache
+			case 9:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12819); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12818); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message10319); i {
+			case 7:
+				return &v.sizeCache
+			case 8:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6578); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6126); i {
+			case 19:
+				return &v.sizeCache
+			case 20:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message5881); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6110); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6107); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6129); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message5908); i {
+			case 50:
+				return &v.sizeCache
+			case 51:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message3850); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7865); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7511); i {
+			case 7:
+				return &v.sizeCache
+			case 8:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message3920); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7928); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7921); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7920); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message7919); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message12817); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6054); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6127); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6052); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6024); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message5861); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message5880); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message5867); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message4016); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message6108); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message5907); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UnusedEmptyMessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_datasets_google_message4_benchmark_message4_2_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message5903); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_datasets_google_message4_benchmark_message4_2_proto_rawDesc,

+ 54 - 16
internal/testprotos/conformance/conformance.pb.go

@@ -131,10 +131,9 @@ func (TestCategory) EnumDescriptor() ([]byte, []int) {
 // This will be known by message_type == "conformance.FailureSet", a conformance
 // test should return a serialized FailureSet in protobuf_payload.
 type FailureSet struct {
-	Failure              []string                `protobuf:"bytes,1,rep,name=failure,proto3" json:"failure,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Failure       []string `protobuf:"bytes,1,rep,name=failure,proto3" json:"failure,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FailureSet) Reset() {
@@ -199,10 +198,9 @@ type ConformanceRequest struct {
 	// for more information.
 	TestCategory TestCategory `protobuf:"varint,5,opt,name=test_category,json=testCategory,proto3,enum=conformance.TestCategory" json:"test_category,omitempty"`
 	// Specify details for how to encode jspb.
-	JspbEncodingOptions  *JspbEncodingConfig     `protobuf:"bytes,6,opt,name=jspb_encoding_options,json=jspbEncodingOptions,proto3" json:"jspb_encoding_options,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	JspbEncodingOptions *JspbEncodingConfig `protobuf:"bytes,6,opt,name=jspb_encoding_options,json=jspbEncodingOptions,proto3" json:"jspb_encoding_options,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
 }
 
 func (x *ConformanceRequest) Reset() {
@@ -352,10 +350,9 @@ type ConformanceResponse struct {
 	// If the input was successfully parsed and the requested output was
 	// TEXT_FORMAT, serialize to TEXT_FORMAT and set it in this field.
 	//	*ConformanceResponse_TextPayload
-	Result               isConformanceResponse_Result `protobuf_oneof:"result"`
-	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields      `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache          `json:"-"`
+	Result        isConformanceResponse_Result `protobuf_oneof:"result"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ConformanceResponse) Reset() {
@@ -499,10 +496,9 @@ func (*ConformanceResponse_TextPayload) isConformanceResponse_Result() {}
 // Encoding options for jspb format.
 type JspbEncodingConfig struct {
 	// Encode the value field of Any as jspb array if ture, otherwise binary.
-	UseJspbArrayAnyFormat bool                    `protobuf:"varint,1,opt,name=use_jspb_array_any_format,json=useJspbArrayAnyFormat,proto3" json:"use_jspb_array_any_format,omitempty"`
-	XXX_NoUnkeyedLiteral  struct{}                `json:"-"`
-	XXX_unrecognized      protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache         protoimpl.SizeCache     `json:"-"`
+	UseJspbArrayAnyFormat bool `protobuf:"varint,1,opt,name=use_jspb_array_any_format,json=useJspbArrayAnyFormat,proto3" json:"use_jspb_array_any_format,omitempty"`
+	sizeCache             protoimpl.SizeCache
+	unknownFields         protoimpl.UnknownFields
 }
 
 func (x *JspbEncodingConfig) Reset() {
@@ -659,6 +655,48 @@ func file_conformance_conformance_proto_init() {
 	if File_conformance_conformance_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_conformance_conformance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FailureSet); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_conformance_conformance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ConformanceRequest); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_conformance_conformance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ConformanceResponse); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_conformance_conformance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*JspbEncodingConfig); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_conformance_conformance_proto_msgTypes[1].OneofWrappers = []interface{}{
 		(*ConformanceRequest_ProtobufPayload)(nil),
 		(*ConformanceRequest_JsonPayload)(nil),

+ 117 - 48
internal/testprotos/conformance/test_messages_proto2.pb.go

@@ -214,28 +214,27 @@ type TestAllTypesProto2 struct {
 	Data       *TestAllTypesProto2_Data        `protobuf:"group,201,opt,name=Data,json=data" json:"data,omitempty"`
 	// Test field-name-to-JSON-name convention.
 	// (protobuf says names can be any valid C/C++ identifier.)
-	Fieldname1             *int32                    `protobuf:"varint,401,opt,name=fieldname1" json:"fieldname1,omitempty"`
-	FieldName2             *int32                    `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"`
-	XFieldName3            *int32                    `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3" json:"_field_name3,omitempty"`
-	Field_Name4_           *int32                    `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"`
-	Field0Name5            *int32                    `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"`
-	Field_0Name6           *int32                    `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"`
-	FieldName7             *int32                    `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"`
-	FieldName8             *int32                    `protobuf:"varint,408,opt,name=FieldName8" json:"FieldName8,omitempty"`
-	Field_Name9            *int32                    `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"`
-	Field_Name10           *int32                    `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10" json:"Field_Name10,omitempty"`
-	FIELD_NAME11           *int32                    `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11" json:"FIELD_NAME11,omitempty"`
-	FIELDName12            *int32                    `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12" json:"FIELD_name12,omitempty"`
-	XFieldName13           *int32                    `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13" json:"__field_name13,omitempty"`
-	X_FieldName14          *int32                    `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14" json:"__Field_name14,omitempty"`
-	Field_Name15           *int32                    `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"`
-	Field__Name16          *int32                    `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"`
-	FieldName17__          *int32                    `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"`
-	FieldName18__          *int32                    `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18" json:"Field_name18__,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	Fieldname1      *int32 `protobuf:"varint,401,opt,name=fieldname1" json:"fieldname1,omitempty"`
+	FieldName2      *int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"`
+	XFieldName3     *int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3" json:"_field_name3,omitempty"`
+	Field_Name4_    *int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"`
+	Field0Name5     *int32 `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"`
+	Field_0Name6    *int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"`
+	FieldName7      *int32 `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"`
+	FieldName8      *int32 `protobuf:"varint,408,opt,name=FieldName8" json:"FieldName8,omitempty"`
+	Field_Name9     *int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"`
+	Field_Name10    *int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10" json:"Field_Name10,omitempty"`
+	FIELD_NAME11    *int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11" json:"FIELD_NAME11,omitempty"`
+	FIELDName12     *int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12" json:"FIELD_name12,omitempty"`
+	XFieldName13    *int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13" json:"__field_name13,omitempty"`
+	X_FieldName14   *int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14" json:"__Field_name14,omitempty"`
+	Field_Name15    *int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"`
+	Field__Name16   *int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"`
+	FieldName17__   *int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"`
+	FieldName18__   *int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18" json:"Field_name18__,omitempty"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *TestAllTypesProto2) Reset() {
@@ -966,10 +965,9 @@ func (*TestAllTypesProto2_OneofDouble) isTestAllTypesProto2_OneofField() {}
 func (*TestAllTypesProto2_OneofEnum) isTestAllTypesProto2_OneofField() {}
 
 type ForeignMessageProto2 struct {
-	C                    *int32                  `protobuf:"varint,1,opt,name=c" json:"c,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	C             *int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ForeignMessageProto2) Reset() {
@@ -1003,11 +1001,10 @@ func (x *ForeignMessageProto2) GetC() int32 {
 }
 
 type TestAllTypesProto2_NestedMessage struct {
-	A                    *int32                  `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
-	Corecursive          *TestAllTypesProto2     `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32              `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
+	Corecursive   *TestAllTypesProto2 `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypesProto2_NestedMessage) Reset() {
@@ -1049,11 +1046,10 @@ func (x *TestAllTypesProto2_NestedMessage) GetCorecursive() *TestAllTypesProto2
 
 // groups
 type TestAllTypesProto2_Data struct {
-	GroupInt32           *int32                  `protobuf:"varint,202,opt,name=group_int32,json=groupInt32" json:"group_int32,omitempty"`
-	GroupUint32          *uint32                 `protobuf:"varint,203,opt,name=group_uint32,json=groupUint32" json:"group_uint32,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	GroupInt32    *int32  `protobuf:"varint,202,opt,name=group_int32,json=groupInt32" json:"group_int32,omitempty"`
+	GroupUint32   *uint32 `protobuf:"varint,203,opt,name=group_uint32,json=groupUint32" json:"group_uint32,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypesProto2_Data) Reset() {
@@ -1095,10 +1091,9 @@ func (x *TestAllTypesProto2_Data) GetGroupUint32() uint32 {
 
 // message_set test case.
 type TestAllTypesProto2_MessageSetCorrect struct {
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `protobuf_messageset:"1" json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields `protobuf_messageset:"1"`
 }
 
 func (x *TestAllTypesProto2_MessageSetCorrect) Reset() {
@@ -1134,10 +1129,9 @@ func (*TestAllTypesProto2_MessageSetCorrect) ExtensionRangeArray() []protoiface.
 }
 
 type TestAllTypesProto2_MessageSetCorrectExtension1 struct {
-	Str                  *string                 `protobuf:"bytes,25,opt,name=str" json:"str,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Str           *string `protobuf:"bytes,25,opt,name=str" json:"str,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypesProto2_MessageSetCorrectExtension1) Reset() {
@@ -1171,10 +1165,9 @@ func (x *TestAllTypesProto2_MessageSetCorrectExtension1) GetStr() string {
 }
 
 type TestAllTypesProto2_MessageSetCorrectExtension2 struct {
-	I                    *int32                  `protobuf:"varint,9,opt,name=i" json:"i,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	I             *int32 `protobuf:"varint,9,opt,name=i" json:"i,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypesProto2_MessageSetCorrectExtension2) Reset() {
@@ -1887,6 +1880,82 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
 	if File_google_protobuf_test_messages_proto2_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_test_messages_proto2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto2); i {
+			case 82:
+				return &v.sizeCache
+			case 83:
+				return &v.unknownFields
+			case 84:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ForeignMessageProto2); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto2_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto2_NestedMessage); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto2_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto2_Data); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto2_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto2_MessageSetCorrect); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			case 2:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto2_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension1); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto2_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension2); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_google_protobuf_test_messages_proto2_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*TestAllTypesProto2_OneofUint32)(nil),
 		(*TestAllTypesProto2_OneofNestedMessage)(nil),

+ 59 - 30
internal/testprotos/conformance/test_messages_proto3.pb.go

@@ -284,27 +284,26 @@ type TestAllTypesProto3 struct {
 	RepeatedListValue     []*structpb.ListValue     `protobuf:"bytes,317,rep,name=repeated_list_value,json=repeatedListValue,proto3" json:"repeated_list_value,omitempty"`
 	// Test field-name-to-JSON-name convention.
 	// (protobuf says names can be any valid C/C++ identifier.)
-	Fieldname1           int32                   `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"`
-	FieldName2           int32                   `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"`
-	XFieldName3          int32                   `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"`
-	Field_Name4_         int32                   `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"`
-	Field0Name5          int32                   `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"`
-	Field_0Name6         int32                   `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"`
-	FieldName7           int32                   `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"`
-	FieldName8           int32                   `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"`
-	Field_Name9          int32                   `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"`
-	Field_Name10         int32                   `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"`
-	FIELD_NAME11         int32                   `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"`
-	FIELDName12          int32                   `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"`
-	XFieldName13         int32                   `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13,proto3" json:"__field_name13,omitempty"`
-	X_FieldName14        int32                   `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14,proto3" json:"__Field_name14,omitempty"`
-	Field_Name15         int32                   `protobuf:"varint,415,opt,name=field__name15,json=fieldName15,proto3" json:"field__name15,omitempty"`
-	Field__Name16        int32                   `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16,proto3" json:"field__Name16,omitempty"`
-	FieldName17__        int32                   `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17,proto3" json:"field_name17__,omitempty"`
-	FieldName18__        int32                   `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18,proto3" json:"Field_name18__,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Fieldname1    int32 `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"`
+	FieldName2    int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"`
+	XFieldName3   int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"`
+	Field_Name4_  int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"`
+	Field0Name5   int32 `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"`
+	Field_0Name6  int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"`
+	FieldName7    int32 `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"`
+	FieldName8    int32 `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"`
+	Field_Name9   int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"`
+	Field_Name10  int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"`
+	FIELD_NAME11  int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"`
+	FIELDName12   int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"`
+	XFieldName13  int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13,proto3" json:"__field_name13,omitempty"`
+	X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14,proto3" json:"__Field_name14,omitempty"`
+	Field_Name15  int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15,proto3" json:"field__name15,omitempty"`
+	Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16,proto3" json:"field__Name16,omitempty"`
+	FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17,proto3" json:"field_name17__,omitempty"`
+	FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18,proto3" json:"Field_name18__,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypesProto3) Reset() {
@@ -1243,10 +1242,9 @@ func (*TestAllTypesProto3_OneofDouble) isTestAllTypesProto3_OneofField() {}
 func (*TestAllTypesProto3_OneofEnum) isTestAllTypesProto3_OneofField() {}
 
 type ForeignMessage struct {
-	C                    int32                   `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	C             int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ForeignMessage) Reset() {
@@ -1280,11 +1278,10 @@ func (x *ForeignMessage) GetC() int32 {
 }
 
 type TestAllTypesProto3_NestedMessage struct {
-	A                    int32                   `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
-	Corecursive          *TestAllTypesProto3     `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             int32               `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
+	Corecursive   *TestAllTypesProto3 `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypesProto3_NestedMessage) Reset() {
@@ -2133,6 +2130,38 @@ func file_google_protobuf_test_messages_proto3_proto_init() {
 	if File_google_protobuf_test_messages_proto3_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_test_messages_proto3_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto3); i {
+			case 113:
+				return &v.sizeCache
+			case 114:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto3_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ForeignMessage); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_test_messages_proto3_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypesProto3_NestedMessage); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_google_protobuf_test_messages_proto3_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*TestAllTypesProto3_OneofUint32)(nil),
 		(*TestAllTypesProto3_OneofNestedMessage)(nil),

+ 15 - 4
internal/testprotos/irregular/test.pb.go

@@ -24,10 +24,9 @@ type Message struct {
 	MapMessage      map[string]*IrregularMessage `protobuf:"bytes,4,rep,name=map_message,json=mapMessage" json:"map_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
 	// Types that are valid to be assigned to Union:
 	//	*Message_OneofMessage
-	Union                isMessage_Union         `protobuf_oneof:"union"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Union         isMessage_Union `protobuf_oneof:"union"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message) Reset() {
@@ -191,6 +190,18 @@ func file_irregular_test_proto_init() {
 		return
 	}
 	file_irregular_irregular_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_irregular_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_irregular_test_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*Message_OneofMessage)(nil),
 	}

+ 26 - 15
internal/testprotos/legacy/legacy.pb.go

@@ -30,21 +30,20 @@ const (
 )
 
 type Legacy struct {
-	F1                   *proto2_v0_0.Message    `protobuf:"bytes,1,opt,name=f1,proto3" json:"f1,omitempty"`
-	F2                   *proto3_v0_0.Message    `protobuf:"bytes,2,opt,name=f2,proto3" json:"f2,omitempty"`
-	F3                   *proto2_v0_01.Message   `protobuf:"bytes,3,opt,name=f3,proto3" json:"f3,omitempty"`
-	F4                   *proto3_v0_01.Message   `protobuf:"bytes,4,opt,name=f4,proto3" json:"f4,omitempty"`
-	F5                   *proto2_v1_0.Message    `protobuf:"bytes,5,opt,name=f5,proto3" json:"f5,omitempty"`
-	F6                   *proto3_v1_0.Message    `protobuf:"bytes,6,opt,name=f6,proto3" json:"f6,omitempty"`
-	F7                   *proto2_v1_1.Message    `protobuf:"bytes,7,opt,name=f7,proto3" json:"f7,omitempty"`
-	F8                   *proto3_v1_1.Message    `protobuf:"bytes,8,opt,name=f8,proto3" json:"f8,omitempty"`
-	F9                   *proto2_v1_2.Message    `protobuf:"bytes,9,opt,name=f9,proto3" json:"f9,omitempty"`
-	F10                  *proto3_v1_2.Message    `protobuf:"bytes,10,opt,name=f10,proto3" json:"f10,omitempty"`
-	F11                  *proto2_v1_21.Message   `protobuf:"bytes,11,opt,name=f11,proto3" json:"f11,omitempty"`
-	F12                  *proto3_v1_21.Message   `protobuf:"bytes,12,opt,name=f12,proto3" json:"f12,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	F1            *proto2_v0_0.Message  `protobuf:"bytes,1,opt,name=f1,proto3" json:"f1,omitempty"`
+	F2            *proto3_v0_0.Message  `protobuf:"bytes,2,opt,name=f2,proto3" json:"f2,omitempty"`
+	F3            *proto2_v0_01.Message `protobuf:"bytes,3,opt,name=f3,proto3" json:"f3,omitempty"`
+	F4            *proto3_v0_01.Message `protobuf:"bytes,4,opt,name=f4,proto3" json:"f4,omitempty"`
+	F5            *proto2_v1_0.Message  `protobuf:"bytes,5,opt,name=f5,proto3" json:"f5,omitempty"`
+	F6            *proto3_v1_0.Message  `protobuf:"bytes,6,opt,name=f6,proto3" json:"f6,omitempty"`
+	F7            *proto2_v1_1.Message  `protobuf:"bytes,7,opt,name=f7,proto3" json:"f7,omitempty"`
+	F8            *proto3_v1_1.Message  `protobuf:"bytes,8,opt,name=f8,proto3" json:"f8,omitempty"`
+	F9            *proto2_v1_2.Message  `protobuf:"bytes,9,opt,name=f9,proto3" json:"f9,omitempty"`
+	F10           *proto3_v1_2.Message  `protobuf:"bytes,10,opt,name=f10,proto3" json:"f10,omitempty"`
+	F11           *proto2_v1_21.Message `protobuf:"bytes,11,opt,name=f11,proto3" json:"f11,omitempty"`
+	F12           *proto3_v1_21.Message `protobuf:"bytes,12,opt,name=f12,proto3" json:"f12,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Legacy) Reset() {
@@ -303,6 +302,18 @@ func file_legacy_legacy_proto_init() {
 	if File_legacy_legacy_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_legacy_legacy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Legacy); i {
+			case 12:
+				return &v.sizeCache
+			case 13:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_legacy_legacy_proto_rawDesc,

+ 250 - 75
internal/testprotos/test/test.pb.go

@@ -311,10 +311,9 @@ type TestAllTypes struct {
 	//	*TestAllTypes_OneofFloat
 	//	*TestAllTypes_OneofDouble
 	//	*TestAllTypes_OneofEnum
-	OneofField           isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"`
-	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache       `json:"-"`
+	OneofField    isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypes) Reset() {
@@ -1039,10 +1038,9 @@ type TestDeprecatedMessage struct {
 	DeprecatedInt32 *int32 `protobuf:"varint,1,opt,name=deprecated_int32,json=deprecatedInt32" json:"deprecated_int32,omitempty"` // Deprecated: Do not use.
 	// Types that are valid to be assigned to DeprecatedOneof:
 	//	*TestDeprecatedMessage_DeprecatedOneofField
-	DeprecatedOneof      isTestDeprecatedMessage_DeprecatedOneof `protobuf_oneof:"deprecated_oneof"`
-	XXX_NoUnkeyedLiteral struct{}                                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields                 `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache                     `json:"-"`
+	DeprecatedOneof isTestDeprecatedMessage_DeprecatedOneof `protobuf_oneof:"deprecated_oneof"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
 }
 
 func (x *TestDeprecatedMessage) Reset() {
@@ -1102,11 +1100,10 @@ type TestDeprecatedMessage_DeprecatedOneofField struct {
 func (*TestDeprecatedMessage_DeprecatedOneofField) isTestDeprecatedMessage_DeprecatedOneof() {}
 
 type ForeignMessage struct {
-	C                    *int32                  `protobuf:"varint,1,opt,name=c" json:"c,omitempty"`
-	D                    *int32                  `protobuf:"varint,2,opt,name=d" json:"d,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	C             *int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"`
+	D             *int32 `protobuf:"varint,2,opt,name=d" json:"d,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ForeignMessage) Reset() {
@@ -1147,9 +1144,8 @@ func (x *ForeignMessage) GetD() int32 {
 }
 
 type TestReservedFields struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestReservedFields) Reset() {
@@ -1176,10 +1172,9 @@ func (*TestReservedFields) Descriptor() ([]byte, []int) {
 }
 
 type TestAllExtensions struct {
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *TestAllExtensions) Reset() {
@@ -1215,10 +1210,9 @@ func (*TestAllExtensions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
 }
 
 type OptionalGroupExtension struct {
-	A                    *int32                  `protobuf:"varint,17,opt,name=a" json:"a,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32 `protobuf:"varint,17,opt,name=a" json:"a,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *OptionalGroupExtension) Reset() {
@@ -1252,10 +1246,9 @@ func (x *OptionalGroupExtension) GetA() int32 {
 }
 
 type RepeatedGroupExtension struct {
-	A                    *int32                  `protobuf:"varint,47,opt,name=a" json:"a,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32 `protobuf:"varint,47,opt,name=a" json:"a,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *RepeatedGroupExtension) Reset() {
@@ -1289,9 +1282,8 @@ func (x *RepeatedGroupExtension) GetA() int32 {
 }
 
 type TestNestedExtension struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestNestedExtension) Reset() {
@@ -1318,10 +1310,9 @@ func (*TestNestedExtension) Descriptor() ([]byte, []int) {
 }
 
 type TestRequired struct {
-	RequiredField        *int32                  `protobuf:"varint,1,req,name=required_field,json=requiredField" json:"required_field,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	RequiredField *int32 `protobuf:"varint,1,req,name=required_field,json=requiredField" json:"required_field,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestRequired) Reset() {
@@ -1360,10 +1351,9 @@ type TestRequiredForeign struct {
 	MapMessage      map[int32]*TestRequired `protobuf:"bytes,3,rep,name=map_message,json=mapMessage" json:"map_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
 	// Types that are valid to be assigned to OneofField:
 	//	*TestRequiredForeign_OneofMessage
-	OneofField           isTestRequiredForeign_OneofField `protobuf_oneof:"oneof_field"`
-	XXX_NoUnkeyedLiteral struct{}                         `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields          `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache              `json:"-"`
+	OneofField    isTestRequiredForeign_OneofField `protobuf_oneof:"oneof_field"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestRequiredForeign) Reset() {
@@ -1435,11 +1425,10 @@ type TestRequiredForeign_OneofMessage struct {
 func (*TestRequiredForeign_OneofMessage) isTestRequiredForeign_OneofField() {}
 
 type TestRequiredGroupFields struct {
-	Optionalgroup        *TestRequiredGroupFields_OptionalGroup   `protobuf:"group,1,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"`
-	Repeatedgroup        []*TestRequiredGroupFields_RepeatedGroup `protobuf:"group,3,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                                 `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields                  `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache                      `json:"-"`
+	Optionalgroup *TestRequiredGroupFields_OptionalGroup   `protobuf:"group,1,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"`
+	Repeatedgroup []*TestRequiredGroupFields_RepeatedGroup `protobuf:"group,3,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestRequiredGroupFields) Reset() {
@@ -1480,10 +1469,9 @@ func (x *TestRequiredGroupFields) GetRepeatedgroup() []*TestRequiredGroupFields_
 }
 
 type TestWeak struct {
-	WeakMessage          *weak.WeakImportMessage `protobuf:"bytes,1,opt,name=weak_message,json=weakMessage" json:"weak_message,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	WeakMessage   *weak.WeakImportMessage `protobuf:"bytes,1,opt,name=weak_message,json=weakMessage" json:"weak_message,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestWeak) Reset() {
@@ -1518,9 +1506,8 @@ func (x *TestWeak) GetWeakMessage() *weak.WeakImportMessage {
 
 // Test that RPC services work.
 type FooRequest struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FooRequest) Reset() {
@@ -1547,9 +1534,8 @@ func (*FooRequest) Descriptor() ([]byte, []int) {
 }
 
 type FooResponse struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FooResponse) Reset() {
@@ -1576,11 +1562,10 @@ func (*FooResponse) Descriptor() ([]byte, []int) {
 }
 
 type TestAllTypes_NestedMessage struct {
-	A                    *int32                  `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
-	Corecursive          *TestAllTypes           `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32        `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
+	Corecursive   *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypes_NestedMessage) Reset() {
@@ -1621,10 +1606,9 @@ func (x *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
 }
 
 type TestAllTypes_OptionalGroup struct {
-	A                    *int32                  `protobuf:"varint,17,opt,name=a" json:"a,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32 `protobuf:"varint,17,opt,name=a" json:"a,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypes_OptionalGroup) Reset() {
@@ -1658,10 +1642,9 @@ func (x *TestAllTypes_OptionalGroup) GetA() int32 {
 }
 
 type TestAllTypes_RepeatedGroup struct {
-	A                    *int32                  `protobuf:"varint,47,opt,name=a" json:"a,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32 `protobuf:"varint,47,opt,name=a" json:"a,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypes_RepeatedGroup) Reset() {
@@ -1695,10 +1678,9 @@ func (x *TestAllTypes_RepeatedGroup) GetA() int32 {
 }
 
 type TestRequiredGroupFields_OptionalGroup struct {
-	A                    *int32                  `protobuf:"varint,2,req,name=a" json:"a,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32 `protobuf:"varint,2,req,name=a" json:"a,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestRequiredGroupFields_OptionalGroup) Reset() {
@@ -1732,10 +1714,9 @@ func (x *TestRequiredGroupFields_OptionalGroup) GetA() int32 {
 }
 
 type TestRequiredGroupFields_RepeatedGroup struct {
-	A                    *int32                  `protobuf:"varint,4,req,name=a" json:"a,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32 `protobuf:"varint,4,req,name=a" json:"a,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestRequiredGroupFields_RepeatedGroup) Reset() {
@@ -3475,6 +3456,200 @@ func file_test_test_proto_init() {
 	}
 	file_test_test_import_proto_init()
 	file_test_test_public_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_test_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypes); i {
+			case 79:
+				return &v.sizeCache
+			case 80:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestDeprecatedMessage); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ForeignMessage); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestReservedFields); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllExtensions); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			case 2:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OptionalGroupExtension); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RepeatedGroupExtension); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestNestedExtension); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestRequired); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestRequiredForeign); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestRequiredGroupFields); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestWeak); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FooRequest); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FooResponse); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypes_NestedMessage); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypes_OptionalGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypes_RepeatedGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestRequiredGroupFields_OptionalGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_test_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestRequiredGroupFields_RepeatedGroup); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_test_test_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*TestAllTypes_OneofUint32)(nil),
 		(*TestAllTypes_OneofNestedMessage)(nil),

+ 14 - 3
internal/testprotos/test/test_import.pb.go

@@ -66,9 +66,8 @@ func (ImportEnum) EnumDescriptor() ([]byte, []int) {
 }
 
 type ImportMessage struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ImportMessage) Reset() {
@@ -140,6 +139,18 @@ func file_test_test_import_proto_init() {
 	if File_test_test_import_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_test_test_import_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ImportMessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_test_test_import_proto_rawDesc,

+ 14 - 3
internal/testprotos/test/test_public.pb.go

@@ -18,9 +18,8 @@ const (
 )
 
 type PublicImportMessage struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *PublicImportMessage) Reset() {
@@ -88,6 +87,18 @@ func file_test_test_public_proto_init() {
 	if File_test_test_public_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_test_test_public_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PublicImportMessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_test_test_public_proto_rawDesc,

+ 15 - 4
internal/testprotos/test/weak/test_weak.pb.go

@@ -18,10 +18,9 @@ const (
 )
 
 type WeakImportMessage struct {
-	A                    *int32                  `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             *int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *WeakImportMessage) Reset() {
@@ -98,6 +97,18 @@ func file_test_weak_test_weak_proto_init() {
 	if File_test_weak_test_weak_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_test_weak_test_weak_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*WeakImportMessage); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_test_weak_test_weak_proto_rawDesc,

+ 43 - 14
internal/testprotos/test3/test.pb.go

@@ -180,10 +180,9 @@ type TestAllTypes struct {
 	//	*TestAllTypes_OneofFloat
 	//	*TestAllTypes_OneofDouble
 	//	*TestAllTypes_OneofEnum
-	OneofField           isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"`
-	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache       `json:"-"`
+	OneofField    isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypes) Reset() {
@@ -751,11 +750,10 @@ func (*TestAllTypes_OneofDouble) isTestAllTypes_OneofField() {}
 func (*TestAllTypes_OneofEnum) isTestAllTypes_OneofField() {}
 
 type ForeignMessage struct {
-	C                    int32                   `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"`
-	D                    int32                   `protobuf:"varint,2,opt,name=d,proto3" json:"d,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	C             int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"`
+	D             int32 `protobuf:"varint,2,opt,name=d,proto3" json:"d,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ForeignMessage) Reset() {
@@ -796,11 +794,10 @@ func (x *ForeignMessage) GetD() int32 {
 }
 
 type TestAllTypes_NestedMessage struct {
-	A                    int32                   `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
-	Corecursive          *TestAllTypes           `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	A             int32         `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
+	Corecursive   *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *TestAllTypes_NestedMessage) Reset() {
@@ -1322,6 +1319,38 @@ func file_test3_test_proto_init() {
 		return
 	}
 	file_test3_test_import_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_test3_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypes); i {
+			case 60:
+				return &v.sizeCache
+			case 61:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test3_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ForeignMessage); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test3_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TestAllTypes_NestedMessage); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_test3_test_proto_msgTypes[0].OneofWrappers = []interface{}{
 		(*TestAllTypes_OneofUint32)(nil),
 		(*TestAllTypes_OneofNestedMessage)(nil),

+ 14 - 3
internal/testprotos/test3/test_import.pb.go

@@ -56,9 +56,8 @@ func (ImportEnum) EnumDescriptor() ([]byte, []int) {
 }
 
 type ImportMessage struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ImportMessage) Reset() {
@@ -130,6 +129,18 @@ func file_test3_test_import_proto_init() {
 	if File_test3_test_import_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_test3_test_import_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ImportMessage); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_test3_test_import_proto_rawDesc,

+ 54 - 14
reflect/protoregistry/testprotos/test.pb.go

@@ -160,10 +160,9 @@ func (Enum3) EnumDescriptor() ([]byte, []int) {
 }
 
 type Message1 struct {
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
+	extensionFields protoimpl.ExtensionFields ``
 }
 
 func (x *Message1) Reset() {
@@ -199,9 +198,8 @@ func (*Message1) ExtensionRangeArray() []protoiface.ExtensionRangeV1 {
 }
 
 type Message2 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message2) Reset() {
@@ -228,9 +226,8 @@ func (*Message2) Descriptor() ([]byte, []int) {
 }
 
 type Message3 struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message3) Reset() {
@@ -257,10 +254,9 @@ func (*Message3) Descriptor() ([]byte, []int) {
 }
 
 type Message4 struct {
-	BoolField            *bool                   `protobuf:"varint,30,opt,name=bool_field,json=boolField" json:"bool_field,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	BoolField     *bool `protobuf:"varint,30,opt,name=bool_field,json=boolField" json:"bool_field,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Message4) Reset() {
@@ -454,6 +450,50 @@ func file_test_proto_init() {
 	if File_test_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message1); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			case 2:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message2); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message3); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message4); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_test_proto_rawDesc,

+ 3 - 0
runtime/protoimpl/impl.go

@@ -33,6 +33,9 @@ const (
 	// TODO: Encode a date instead of the minor version?
 )
 
+// UnsafeEnabled specifies whether package unsafe can be used.
+const UnsafeEnabled = impl.UnsafeEnabled
+
 type (
 	// EnforceVersion is used by code generated by protoc-gen-go
 	// to statically enforce minimum and maximum versions of this package.

+ 398 - 135
types/descriptorpb/descriptor.pb.go

@@ -405,10 +405,9 @@ func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {
 // The protocol compiler can output a FileDescriptorSet containing the .proto
 // files it parses.
 type FileDescriptorSet struct {
-	File                 []*FileDescriptorProto  `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	File          []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FileDescriptorSet) Reset() {
@@ -465,10 +464,9 @@ type FileDescriptorProto struct {
 	SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"`
 	// The syntax of the proto file.
 	// The supported values are "proto2" and "proto3".
-	Syntax               *string                 `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Syntax        *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FileDescriptorProto) Reset() {
@@ -591,10 +589,9 @@ type DescriptorProto struct {
 	ReservedRange  []*DescriptorProto_ReservedRange  `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
 	// Reserved field names, which may not be used by fields in the same message.
 	// A given name may only be reserved once.
-	ReservedName         []string                `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	ReservedName  []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *DescriptorProto) Reset() {
@@ -692,11 +689,10 @@ func (x *DescriptorProto) GetReservedName() []string {
 
 type ExtensionRangeOptions struct {
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *ExtensionRangeOptions) Reset() {
@@ -768,11 +764,10 @@ type FieldDescriptorProto struct {
 	// user has set a "json_name" option on this field, that option's value
 	// will be used. Otherwise, it's deduced from the field's name by converting
 	// it to camelCase.
-	JsonName             *string                 `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"`
-	Options              *FieldOptions           `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	JsonName      *string       `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"`
+	Options       *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldDescriptorProto) Reset() {
@@ -870,11 +865,10 @@ func (x *FieldDescriptorProto) GetOptions() *FieldOptions {
 
 // Describes a oneof.
 type OneofDescriptorProto struct {
-	Name                 *string                 `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
-	Options              *OneofOptions           `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Name          *string       `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+	Options       *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *OneofDescriptorProto) Reset() {
@@ -925,10 +919,9 @@ type EnumDescriptorProto struct {
 	ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
 	// Reserved enum value names, which may not be reused. A given name may only
 	// be reserved once.
-	ReservedName         []string                `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	ReservedName  []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *EnumDescriptorProto) Reset() {
@@ -991,12 +984,11 @@ func (x *EnumDescriptorProto) GetReservedName() []string {
 
 // Describes a value within an enum.
 type EnumValueDescriptorProto struct {
-	Name                 *string                 `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
-	Number               *int32                  `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
-	Options              *EnumValueOptions       `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Name          *string           `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+	Number        *int32            `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
+	Options       *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *EnumValueDescriptorProto) Reset() {
@@ -1045,12 +1037,11 @@ func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions {
 
 // Describes a service.
 type ServiceDescriptorProto struct {
-	Name                 *string                  `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
-	Method               []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"`
-	Options              *ServiceOptions          `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields  `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache      `json:"-"`
+	Name          *string                  `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+	Method        []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"`
+	Options       *ServiceOptions          `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ServiceDescriptorProto) Reset() {
@@ -1108,10 +1099,9 @@ type MethodDescriptorProto struct {
 	// Identifies if client streams multiple client messages
 	ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"`
 	// Identifies if server streams multiple server messages
-	ServerStreaming      *bool                   `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
 }
 
 func (x *MethodDescriptorProto) Reset() {
@@ -1266,11 +1256,10 @@ type FileOptions struct {
 	RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"`
 	// The parser stores options it doesn't recognize here.
 	// See the documentation for the "Options" section above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *FileOptions) Reset() {
@@ -1515,11 +1504,10 @@ type MessageOptions struct {
 	// parser.
 	MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"`
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *MessageOptions) Reset() {
@@ -1654,11 +1642,10 @@ type FieldOptions struct {
 	// For Google-internal migration only. Do not use.
 	Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"`
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *FieldOptions) Reset() {
@@ -1750,11 +1737,10 @@ func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {
 
 type OneofOptions struct {
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *OneofOptions) Reset() {
@@ -1806,11 +1792,10 @@ type EnumOptions struct {
 	// is a formalization for deprecating enums.
 	Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *EnumOptions) Reset() {
@@ -1875,11 +1860,10 @@ type EnumValueOptions struct {
 	// this is a formalization for deprecating enum values.
 	Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *EnumValueOptions) Reset() {
@@ -1937,11 +1921,10 @@ type ServiceOptions struct {
 	// this is a formalization for deprecating services.
 	Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *ServiceOptions) Reset() {
@@ -2000,11 +1983,10 @@ type MethodOptions struct {
 	Deprecated       *bool                           `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
 	IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"`
 	// The parser stores options it doesn't recognize here. See above.
-	UninterpretedOption    []*UninterpretedOption    `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
-	XXX_unrecognized       protoimpl.UnknownFields   `json:"-"`
-	XXX_sizecache          protoimpl.SizeCache       `json:"-"`
+	UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+	sizeCache           protoimpl.SizeCache
+	unknownFields       protoimpl.UnknownFields
+	extensionFields     protoimpl.ExtensionFields ``
 }
 
 func (x *MethodOptions) Reset() {
@@ -2073,15 +2055,14 @@ type UninterpretedOption struct {
 	Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"`
 	// The value of the uninterpreted option, in whatever type the tokenizer
 	// identified it as during parsing. Exactly one of these should be set.
-	IdentifierValue      *string                 `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"`
-	PositiveIntValue     *uint64                 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"`
-	NegativeIntValue     *int64                  `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"`
-	DoubleValue          *float64                `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"`
-	StringValue          []byte                  `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
-	AggregateValue       *string                 `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	IdentifierValue  *string  `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"`
+	PositiveIntValue *uint64  `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"`
+	NegativeIntValue *int64   `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"`
+	DoubleValue      *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"`
+	StringValue      []byte   `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
+	AggregateValue   *string  `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"`
+	sizeCache        protoimpl.SizeCache
+	unknownFields    protoimpl.UnknownFields
 }
 
 func (x *UninterpretedOption) Reset() {
@@ -2202,10 +2183,9 @@ type SourceCodeInfo struct {
 	// - Code which tries to interpret locations should probably be designed to
 	//   ignore those that it doesn't understand, as more types of locations could
 	//   be recorded in the future.
-	Location             []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields    `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache        `json:"-"`
+	Location      []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *SourceCodeInfo) Reset() {
@@ -2244,10 +2224,9 @@ func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {
 type GeneratedCodeInfo struct {
 	// An Annotation connects some span of text in generated code to an element
 	// of its generating .proto file.
-	Annotation           []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields         `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache             `json:"-"`
+	Annotation    []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GeneratedCodeInfo) Reset() {
@@ -2281,12 +2260,11 @@ func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {
 }
 
 type DescriptorProto_ExtensionRange struct {
-	Start                *int32                  `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
-	End                  *int32                  `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
-	Options              *ExtensionRangeOptions  `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Start         *int32                 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
+	End           *int32                 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
+	Options       *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *DescriptorProto_ExtensionRange) Reset() {
@@ -2337,11 +2315,10 @@ func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
 // fields or extension ranges in the same message. Reserved ranges may
 // not overlap.
 type DescriptorProto_ReservedRange struct {
-	Start                *int32                  `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
-	End                  *int32                  `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Start         *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
+	End           *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *DescriptorProto_ReservedRange) Reset() {
@@ -2388,11 +2365,10 @@ func (x *DescriptorProto_ReservedRange) GetEnd() int32 {
 // is inclusive such that it can appropriately represent the entire int32
 // domain.
 type EnumDescriptorProto_EnumReservedRange struct {
-	Start                *int32                  `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
-	End                  *int32                  `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Start         *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
+	End           *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *EnumDescriptorProto_EnumReservedRange) Reset() {
@@ -2438,11 +2414,10 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {
 // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
 // "foo.(bar.baz).qux".
 type UninterpretedOption_NamePart struct {
-	NamePart             *string                 `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"`
-	IsExtension          *bool                   `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	NamePart      *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"`
+	IsExtension   *bool   `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *UninterpretedOption_NamePart) Reset() {
@@ -2560,12 +2535,11 @@ type SourceCodeInfo_Location struct {
 	//   optional int32 grault = 6;
 	//
 	//   // ignored detached comments.
-	LeadingComments         *string                 `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"`
-	TrailingComments        *string                 `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"`
-	LeadingDetachedComments []string                `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"`
-	XXX_NoUnkeyedLiteral    struct{}                `json:"-"`
-	XXX_unrecognized        protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache           protoimpl.SizeCache     `json:"-"`
+	LeadingComments         *string  `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"`
+	TrailingComments        *string  `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"`
+	LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"`
+	sizeCache               protoimpl.SizeCache
+	unknownFields           protoimpl.UnknownFields
 }
 
 func (x *SourceCodeInfo_Location) Reset() {
@@ -2638,10 +2612,9 @@ type GeneratedCodeInfo_Annotation struct {
 	// Identifies the ending offset in bytes in the generated code that
 	// relates to the identified offset. The end offset should be one past
 	// the last relevant byte (so the length of the text = end - begin).
-	End                  *int32                  `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	End           *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *GeneratedCodeInfo_Annotation) Reset() {
@@ -3278,6 +3251,296 @@ func file_google_protobuf_descriptor_proto_init() {
 	if File_google_protobuf_descriptor_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FileDescriptorSet); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FileDescriptorProto); i {
+			case 12:
+				return &v.sizeCache
+			case 13:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DescriptorProto); i {
+			case 10:
+				return &v.sizeCache
+			case 11:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExtensionRangeOptions); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			case 3:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldDescriptorProto); i {
+			case 10:
+				return &v.sizeCache
+			case 11:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OneofDescriptorProto); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumDescriptorProto); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumValueDescriptorProto); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ServiceDescriptorProto); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MethodDescriptorProto); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FileOptions); i {
+			case 21:
+				return &v.sizeCache
+			case 22:
+				return &v.unknownFields
+			case 23:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageOptions); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			case 7:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldOptions); i {
+			case 7:
+				return &v.sizeCache
+			case 8:
+				return &v.unknownFields
+			case 9:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OneofOptions); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			case 3:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumOptions); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			case 5:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumValueOptions); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			case 4:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ServiceOptions); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			case 4:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MethodOptions); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			case 5:
+				return &v.extensionFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UninterpretedOption); i {
+			case 7:
+				return &v.sizeCache
+			case 8:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SourceCodeInfo); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GeneratedCodeInfo); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DescriptorProto_ExtensionRange); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DescriptorProto_ReservedRange); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumDescriptorProto_EnumReservedRange); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UninterpretedOption_NamePart); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SourceCodeInfo_Location); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GeneratedCodeInfo_Annotation); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_descriptor_proto_rawDesc,

+ 15 - 4
types/known/anypb/any.pb.go

@@ -128,10 +128,9 @@ type Any struct {
 	//
 	TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
 	// Must be a valid serialized protocol buffer of the above specified type.
-	Value                []byte                  `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Any) Reset() {
@@ -222,6 +221,18 @@ func file_google_protobuf_any_proto_init() {
 	if File_google_protobuf_any_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Any); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_any_proto_rawDesc,

+ 41 - 12
types/known/apipb/api.pb.go

@@ -64,10 +64,9 @@ type Api struct {
 	// Included interfaces. See [Mixin][].
 	Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins,proto3" json:"mixins,omitempty"`
 	// The source syntax of the service.
-	Syntax               typepb.Syntax           `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Syntax        typepb.Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Api) Reset() {
@@ -157,10 +156,9 @@ type Method struct {
 	// Any metadata attached to the method.
 	Options []*typepb.Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"`
 	// The source syntax of this method.
-	Syntax               typepb.Syntax           `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Syntax        typepb.Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Method) Reset() {
@@ -318,10 +316,9 @@ type Mixin struct {
 	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
 	// If non-empty specifies a path under which inherited HTTP paths
 	// are rooted.
-	Root                 string                  `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Root          string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Mixin) Reset() {
@@ -465,6 +462,38 @@ func file_google_protobuf_api_proto_init() {
 	if File_google_protobuf_api_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Api); i {
+			case 7:
+				return &v.sizeCache
+			case 8:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Method); i {
+			case 7:
+				return &v.sizeCache
+			case 8:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Mixin); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_api_proto_rawDesc,

+ 15 - 4
types/known/durationpb/duration.pb.go

@@ -88,10 +88,9 @@ type Duration struct {
 	// of one second or more, a non-zero value for the `nanos` field must be
 	// of the same sign as the `seconds` field. Must be from -999,999,999
 	// to +999,999,999 inclusive.
-	Nanos                int32                   `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Nanos         int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Duration) Reset() {
@@ -183,6 +182,18 @@ func file_google_protobuf_duration_proto_init() {
 	if File_google_protobuf_duration_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Duration); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_duration_proto_rawDesc,

+ 14 - 3
types/known/emptypb/empty.pb.go

@@ -27,9 +27,8 @@ const (
 //
 // The JSON representation for `Empty` is empty JSON object `{}`.
 type Empty struct {
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Empty) Reset() {
@@ -103,6 +102,18 @@ func file_google_protobuf_empty_proto_init() {
 	if File_google_protobuf_empty_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_empty_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Empty); i {
+			case 0:
+				return &v.sizeCache
+			case 1:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_empty_proto_rawDesc,

+ 15 - 4
types/known/fieldmaskpb/field_mask.pb.go

@@ -218,10 +218,9 @@ const (
 // `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
 type FieldMask struct {
 	// The set of field mask paths.
-	Paths                []string                `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Paths         []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FieldMask) Reset() {
@@ -303,6 +302,18 @@ func file_google_protobuf_field_mask_proto_init() {
 	if File_google_protobuf_field_mask_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FieldMask); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_field_mask_proto_rawDesc,

+ 15 - 4
types/known/sourcecontextpb/source_context.pb.go

@@ -22,10 +22,9 @@ const (
 type SourceContext struct {
 	// The path-qualified name of the .proto file that contained the associated
 	// protobuf element.  For example: `"google/protobuf/source_context.proto"`.
-	FileName             string                  `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	FileName      string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *SourceContext) Reset() {
@@ -108,6 +107,18 @@ func file_google_protobuf_source_context_proto_init() {
 	if File_google_protobuf_source_context_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_source_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SourceContext); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_source_context_proto_rawDesc,

+ 41 - 12
types/known/structpb/struct.pb.go

@@ -72,10 +72,9 @@ func (NullValue) XXX_WellKnownType() string { return "NullValue" }
 // The JSON representation for `Struct` is JSON object.
 type Struct struct {
 	// Unordered map of dynamically typed values.
-	Fields               map[string]*Value       `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Fields        map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Struct) Reset() {
@@ -132,10 +131,9 @@ type Value struct {
 	//	*Value_StructValue
 	// Represents a repeated `Value`.
 	//	*Value_ListValue
-	Kind                 isValue_Kind            `protobuf_oneof:"kind"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Kind          isValue_Kind `protobuf_oneof:"kind"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Value) Reset() {
@@ -257,10 +255,9 @@ func (*Value_ListValue) isValue_Kind() {}
 // The JSON representation for `ListValue` is JSON array.
 type ListValue struct {
 	// Repeated field of dynamically typed values.
-	Values               []*Value                `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Values        []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *ListValue) Reset() {
@@ -387,6 +384,38 @@ func file_google_protobuf_struct_proto_init() {
 	if File_google_protobuf_struct_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Struct); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Value); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ListValue); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []interface{}{
 		(*Value_NullValue)(nil),
 		(*Value_NumberValue)(nil),

+ 15 - 4
types/known/timestamppb/timestamp.pb.go

@@ -108,10 +108,9 @@ type Timestamp struct {
 	// second values with fractions must still have non-negative nanos values
 	// that count forward in time. Must be from 0 to 999,999,999
 	// inclusive.
-	Nanos                int32                   `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Nanos         int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Timestamp) Reset() {
@@ -203,6 +202,18 @@ func file_google_protobuf_timestamp_proto_init() {
 	if File_google_protobuf_timestamp_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Timestamp); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_timestamp_proto_rawDesc,

+ 67 - 20
types/known/typepb/type.pb.go

@@ -238,10 +238,9 @@ type Type struct {
 	// The source context.
 	SourceContext *sourcecontextpb.SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"`
 	// The source syntax.
-	Syntax               Syntax                  `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Syntax        Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Type) Reset() {
@@ -332,10 +331,9 @@ type Field struct {
 	// The field JSON name.
 	JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"`
 	// The string value of the default value of this field. Proto2 syntax only.
-	DefaultValue         string                  `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	DefaultValue  string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Field) Reset() {
@@ -442,10 +440,9 @@ type Enum struct {
 	// The source context.
 	SourceContext *sourcecontextpb.SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"`
 	// The source syntax.
-	Syntax               Syntax                  `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Syntax        Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Enum) Reset() {
@@ -513,10 +510,9 @@ type EnumValue struct {
 	// Enum value number.
 	Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
 	// Protocol buffer options.
-	Options              []*Option               `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Options       []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *EnumValue) Reset() {
@@ -575,10 +571,9 @@ type Option struct {
 	// the corresponding wrapper type defined in google/protobuf/wrappers.proto
 	// should be used. If the value is an enum, it should be stored as an int32
 	// value using the google.protobuf.Int32Value type.
-	Value                *anypb.Any              `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         *anypb.Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Option) Reset() {
@@ -790,6 +785,58 @@ func file_google_protobuf_type_proto_init() {
 	if File_google_protobuf_type_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_type_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Type); i {
+			case 6:
+				return &v.sizeCache
+			case 7:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_type_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Field); i {
+			case 10:
+				return &v.sizeCache
+			case 11:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_type_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Enum); i {
+			case 5:
+				return &v.sizeCache
+			case 6:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_type_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EnumValue); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_type_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Option); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_type_proto_rawDesc,

+ 119 - 36
types/known/wrapperspb/wrappers.pb.go

@@ -22,10 +22,9 @@ const (
 // The JSON representation for `DoubleValue` is JSON number.
 type DoubleValue struct {
 	// The double value.
-	Value                float64                 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *DoubleValue) Reset() {
@@ -65,10 +64,9 @@ func (x *DoubleValue) GetValue() float64 {
 // The JSON representation for `FloatValue` is JSON number.
 type FloatValue struct {
 	// The float value.
-	Value                float32                 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *FloatValue) Reset() {
@@ -108,10 +106,9 @@ func (x *FloatValue) GetValue() float32 {
 // The JSON representation for `Int64Value` is JSON string.
 type Int64Value struct {
 	// The int64 value.
-	Value                int64                   `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Int64Value) Reset() {
@@ -151,10 +148,9 @@ func (x *Int64Value) GetValue() int64 {
 // The JSON representation for `UInt64Value` is JSON string.
 type UInt64Value struct {
 	// The uint64 value.
-	Value                uint64                  `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *UInt64Value) Reset() {
@@ -194,10 +190,9 @@ func (x *UInt64Value) GetValue() uint64 {
 // The JSON representation for `Int32Value` is JSON number.
 type Int32Value struct {
 	// The int32 value.
-	Value                int32                   `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Int32Value) Reset() {
@@ -237,10 +232,9 @@ func (x *Int32Value) GetValue() int32 {
 // The JSON representation for `UInt32Value` is JSON number.
 type UInt32Value struct {
 	// The uint32 value.
-	Value                uint32                  `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *UInt32Value) Reset() {
@@ -280,10 +274,9 @@ func (x *UInt32Value) GetValue() uint32 {
 // The JSON representation for `BoolValue` is JSON `true` and `false`.
 type BoolValue struct {
 	// The bool value.
-	Value                bool                    `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *BoolValue) Reset() {
@@ -323,10 +316,9 @@ func (x *BoolValue) GetValue() bool {
 // The JSON representation for `StringValue` is JSON string.
 type StringValue struct {
 	// The string value.
-	Value                string                  `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *StringValue) Reset() {
@@ -366,10 +358,9 @@ func (x *StringValue) GetValue() string {
 // The JSON representation for `BytesValue` is JSON string.
 type BytesValue struct {
 	// The bytes value.
-	Value                []byte                  `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Value         []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *BytesValue) Reset() {
@@ -479,6 +470,98 @@ func file_google_protobuf_wrappers_proto_init() {
 	if File_google_protobuf_wrappers_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DoubleValue); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FloatValue); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Int64Value); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UInt64Value); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Int32Value); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UInt32Value); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BoolValue); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*StringValue); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BytesValue); i {
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_wrappers_proto_rawDesc,

+ 55 - 17
types/pluginpb/plugin.pb.go

@@ -25,10 +25,9 @@ type Version struct {
 	Patch *int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
 	// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
 	// be empty for mainline stable releases.
-	Suffix               *string                 `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Suffix        *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *Version) Reset() {
@@ -106,10 +105,9 @@ type CodeGeneratorRequest struct {
 	// fully qualified.
 	ProtoFile []*descriptorpb.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"`
 	// The version number of protocol compiler.
-	CompilerVersion      *Version                `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
+	sizeCache       protoimpl.SizeCache
+	unknownFields   protoimpl.UnknownFields
 }
 
 func (x *CodeGeneratorRequest) Reset() {
@@ -173,11 +171,10 @@ type CodeGeneratorResponse struct {
 	// problem in protoc itself -- such as the input CodeGeneratorRequest being
 	// unparseable -- should be reported by writing a message to stderr and
 	// exiting with a non-zero status code.
-	Error                *string                       `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
-	File                 []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                      `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields       `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache           `json:"-"`
+	Error         *string                       `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
+	File          []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *CodeGeneratorResponse) Reset() {
@@ -270,10 +267,9 @@ type CodeGeneratorResponse_File struct {
 	// If |insertion_point| is present, |name| must also be present.
 	InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"`
 	// The file contents.
-	Content              *string                 `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
-	XXX_unrecognized     protoimpl.UnknownFields `json:"-"`
-	XXX_sizecache        protoimpl.SizeCache     `json:"-"`
+	Content       *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
 func (x *CodeGeneratorResponse_File) Reset() {
@@ -408,6 +404,48 @@ func file_google_protobuf_compiler_plugin_proto_init() {
 	if File_google_protobuf_compiler_plugin_proto != nil {
 		return
 	}
+	if !protoimpl.UnsafeEnabled {
+		file_google_protobuf_compiler_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Version); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_compiler_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CodeGeneratorRequest); i {
+			case 4:
+				return &v.sizeCache
+			case 5:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_compiler_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CodeGeneratorResponse); i {
+			case 2:
+				return &v.sizeCache
+			case 3:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_google_protobuf_compiler_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CodeGeneratorResponse_File); i {
+			case 3:
+				return &v.sizeCache
+			case 4:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			RawDescriptor: file_google_protobuf_compiler_plugin_proto_rawDesc,

Some files were not shown because too many files changed in this diff