types/descriptorpb: regenerate using latest protobuf v22.0 release

This updates all generated code to match the contents of the latest
v22.0 release of Protobuf.

This involved a couple of changes to the script that does the sync'ing:
  1. The new Protobuf version no longer includes autoconf configuration
     and instead requires using bazel to build things.
  2. The new Protobuf release does not have an artifact named
     "protobuf-all-${VERSION}.tar.gz", but the one named
     "protobuf-${VERSION}.tar.gz" has all of the sources and was
     sufficient for the regenerate.bash script to complete.

This change does NOT regenerate the protos related to benchmarks.
The Protobuf repo no longer includes benchmarks. The CL removing them
says they are superceded by google/fleetbench:
    83c499de86
But that project's proto benchmark files are very different:
    https://github.com/google/fleetbench/tree/main/fleetbench/proto
So I commented out those steps in the generation code since the benchmarks
will need some work to reconcile with fleetbench.

This code adds known failing tests for conformance. New test cases were
added in https://github.com/protocolbuffers/protobuf/pull/9534, but the
Go protojson package does not behave according to the new tests. There
is an existing issue in GitHub about this:
    https://github.com/golang/protobuf/issues/1208

Change-Id: Iad796ec7889bc2a74b58db5224facf850cd1a1cd
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/469255
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
This commit is contained in:
Josh Humphries 2023-02-17 12:37:03 -05:00 committed by Michael Stapelberg
parent 246af0d153
commit bc1253ad37
37 changed files with 1582 additions and 1033 deletions

View File

@ -87,6 +87,7 @@ type Message1 struct {
// COMMENT: Oneof1A.Leading
//
// Types that are assignable to Oneof1A:
//
// *Message1_Oneof1AField1
Oneof1A isMessage1_Oneof1A `protobuf_oneof:"Oneof1a"`
}

View File

@ -45,17 +45,20 @@ type Message struct {
// Oneof that conflicts with its first field: The oneof is renamed.
//
// Types that are assignable to OneofConflictA_:
//
// *Message_OneofConflictA
OneofConflictA_ isMessage_OneofConflictA_ `protobuf_oneof:"oneof_conflict_a"`
// Oneof that conflicts with its second field: The field is renamed.
//
// Types that are assignable to OneofConflictB:
//
// *Message_OneofNoConflict
// *Message_OneofConflictB_
OneofConflictB isMessage_OneofConflictB `protobuf_oneof:"oneof_conflict_b"`
// Oneof with a field name that conflicts with a nested message.
//
// Types that are assignable to OneofConflictC:
//
// *Message_OneofMessageConflict_
OneofConflictC isMessage_OneofConflictC `protobuf_oneof:"oneof_conflict_c"`
}

View File

@ -191,6 +191,7 @@ type M struct {
B []byte `protobuf:"bytes,5,opt,name=b,def=default" json:"b,omitempty"`
F *float64 `protobuf:"fixed64,6,opt,name=f,def=nan" json:"f,omitempty"`
// Types that are assignable to OneofField:
//
// *M_OneofInt32
// *M_OneofInt64
OneofField isM_OneofField `protobuf_oneof:"oneof_field"`
@ -310,6 +311,7 @@ type M_Submessage struct {
unknownFields protoimpl.UnknownFields
// Types that are assignable to SubmessageOneofField:
//
// *M_Submessage_SubmessageOneofInt32
// *M_Submessage_SubmessageOneofInt64
SubmessageOneofField isM_Submessage_SubmessageOneofField `protobuf_oneof:"submessage_oneof_field"`

View File

@ -20,6 +20,7 @@ type Foo struct {
unknownFields protoimpl.UnknownFields
// Types that are assignable to Bar:
//
// *Foo_GetBar
Bar isFoo_Bar `protobuf_oneof:"bar"`
}

View File

@ -158,6 +158,7 @@ type FieldTestMessage struct {
MapStringMessage map[string]*FieldTestMessage_Message `protobuf:"bytes,501,rep,name=map_string_message,json=mapStringMessage" json:"map_string_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
MapFixed64Enum map[uint64]FieldTestMessage_Enum `protobuf:"bytes,502,rep,name=map_fixed64_enum,json=mapFixed64Enum" json:"map_fixed64_enum,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=goproto.protoc.proto2.FieldTestMessage_Enum"`
// Types that are assignable to OneofField:
//
// *FieldTestMessage_OneofBool
// *FieldTestMessage_OneofEnum
// *FieldTestMessage_OneofInt32
@ -179,6 +180,7 @@ type FieldTestMessage struct {
// *FieldTestMessage_OneofLargestTag
OneofField isFieldTestMessage_OneofField `protobuf_oneof:"oneof_field"`
// Types that are assignable to OneofTwo:
//
// *FieldTestMessage_OneofTwo_1
// *FieldTestMessage_OneofTwo_2
OneofTwo isFieldTestMessage_OneofTwo `protobuf_oneof:"oneof_two"`

View File

@ -35,7 +35,7 @@ var (
regenerate = flag.Bool("regenerate", false, "regenerate files")
buildRelease = flag.Bool("buildRelease", false, "build release binaries")
protobufVersion = "21.5"
protobufVersion = "22.0"
protobufSHA256 = "" // ignored if protobufVersion is a git hash
golangVersions = func() []string {
@ -45,7 +45,7 @@ var (
default:
vers = []string{"1.13.15", "1.14.15", "1.15.15"}
}
return append(vers, "1.16.15", "1.17.12", "1.18.4")
return append(vers, "1.16.15", "1.17.13", "1.18.10", "1.19.6")
}()
golangLatest = golangVersions[len(golangVersions)-1]
@ -244,23 +244,20 @@ func mustInitDeps(t *testing.T) {
protobufPath = startWork("protobuf-" + protobufVersion)
if _, err := os.Stat(protobufPath); err != nil {
fmt.Printf("download %v\n", filepath.Base(protobufPath))
if isCommit := strings.Trim(protobufVersion, "0123456789abcdef") == ""; isCommit {
command{Dir: testDir}.mustRun(t, "git", "clone", "https://github.com/protocolbuffers/protobuf", "protobuf-"+protobufVersion)
command{Dir: protobufPath}.mustRun(t, "git", "checkout", protobufVersion)
} else {
url := fmt.Sprintf("https://github.com/google/protobuf/releases/download/v%v/protobuf-all-%v.tar.gz", protobufVersion, protobufVersion)
downloadArchive(check, protobufPath, url, "protobuf-"+protobufVersion, protobufSHA256)
checkoutVersion := protobufVersion
if isCommit := strings.Trim(protobufVersion, "0123456789abcdef") == ""; !isCommit {
// release tags have "v" prefix
checkoutVersion = "v" + protobufVersion
}
command{Dir: testDir}.mustRun(t, "git", "clone", "https://github.com/protocolbuffers/protobuf", "protobuf-"+protobufVersion)
command{Dir: protobufPath}.mustRun(t, "git", "checkout", checkoutVersion)
fmt.Printf("build %v\n", filepath.Base(protobufPath))
command{Dir: protobufPath}.mustRun(t, "./autogen.sh")
command{Dir: protobufPath}.mustRun(t, "./configure")
command{Dir: protobufPath}.mustRun(t, "make")
command{Dir: filepath.Join(protobufPath, "conformance")}.mustRun(t, "make")
command{Dir: protobufPath}.mustRun(t, "bazel", "build", ":protoc", "//conformance:conformance_test_runner")
}
check(os.Setenv("PROTOBUF_ROOT", protobufPath)) // for generate-protos
registerBinary("conform-test-runner", filepath.Join(protobufPath, "conformance", "conformance-test-runner"))
registerBinary("protoc", filepath.Join(protobufPath, "src", "protoc"))
registerBinary("conform-test-runner", filepath.Join(protobufPath, "bazel-bin", "conformance", "conformance_test_runner"))
registerBinary("protoc", filepath.Join(protobufPath, "bazel-bin", "protoc"))
finishWork()
// Download each Go toolchain version.

View File

@ -195,23 +195,30 @@ func generateRemoteProtos() {
{"src", "google/protobuf/test_messages_proto3.proto", "google.golang.org/protobuf/internal/testprotos/conformance;conformance"},
// Benchmark protos.
{"benchmarks", "benchmarks.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks;benchmarks"},
{"benchmarks", "datasets/google_message1/proto2/benchmark_message1_proto2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message1/proto2;proto2"},
{"benchmarks", "datasets/google_message1/proto3/benchmark_message1_proto3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message1/proto3;proto3"},
{"benchmarks", "datasets/google_message2/benchmark_message2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message2;google_message2"},
{"benchmarks", "datasets/google_message3/benchmark_message3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_1.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_4.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_5.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_6.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_7.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message3/benchmark_message3_8.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
{"benchmarks", "datasets/google_message4/benchmark_message4.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
{"benchmarks", "datasets/google_message4/benchmark_message4_1.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
{"benchmarks", "datasets/google_message4/benchmark_message4_2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
{"benchmarks", "datasets/google_message4/benchmark_message4_3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
// TODO: The protobuf repo no longer includes benchmarks.
// CL removing them says they are superceded by google/fleetbench:
// https://github.com/protocolbuffers/protobuf/commit/83c499de86224538e5d59adc3d0fa7fdb45b2c72
// But that project's proto benchmark files are very different:
// https://github.com/google/fleetbench/tree/main/fleetbench/proto
// For now, commenting these out until benchmarks in this repo can be
// reconciled with new fleetbench stuff.
//{"benchmarks", "benchmarks.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks;benchmarks"},
//{"benchmarks", "datasets/google_message1/proto2/benchmark_message1_proto2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message1/proto2;proto2"},
//{"benchmarks", "datasets/google_message1/proto3/benchmark_message1_proto3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message1/proto3;proto3"},
//{"benchmarks", "datasets/google_message2/benchmark_message2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message2;google_message2"},
//{"benchmarks", "datasets/google_message3/benchmark_message3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_1.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_4.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_5.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_6.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_7.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message3/benchmark_message3_8.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message3;google_message3"},
//{"benchmarks", "datasets/google_message4/benchmark_message4.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
//{"benchmarks", "datasets/google_message4/benchmark_message4_1.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
//{"benchmarks", "datasets/google_message4/benchmark_message4_2.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
//{"benchmarks", "datasets/google_message4/benchmark_message4_3.proto", "google.golang.org/protobuf/internal/testprotos/benchmarks/datasets/google_message4;google_message4"},
}
opts := "module=" + modulePath

View File

@ -40,7 +40,7 @@ func Test(t *testing.T) {
if !*execute {
t.SkipNow()
}
binPath := filepath.Join(*protoRoot, "conformance", "conformance-test-runner")
binPath := filepath.Join(*protoRoot, "bazel-bin", "conformance", "conformance_test_runner")
cmd := exec.Command(binPath,
"--failure_list", "failing_tests.txt",
"--text_format_failure_list", "failing_tests_text_format.txt",

View File

@ -0,0 +1,3 @@
Recommended.Proto3.JsonInput.IgnoreUnknownEnumStringValueInMapValue.ProtobufOutput
Recommended.Proto3.JsonInput.IgnoreUnknownEnumStringValueInOptionalField.ProtobufOutput
Recommended.Proto3.JsonInput.IgnoreUnknownEnumStringValueInRepeatedField.ProtobufOutput

View File

@ -53,6 +53,8 @@ func TestInit(t *testing.T) {
// The protoreflect descriptors don't include source info.
descPkg.Append("FileDescriptorProto.source_code_info"): true,
descPkg.Append("FileDescriptorProto.syntax"): true,
// Nothing is using edition yet.
descPkg.Append("FileDescriptorProto.edition"): true,
// Impossible to test proto3 optional in a proto2 file.
descPkg.Append("FieldDescriptorProto.proto3_optional"): true,

View File

@ -50,6 +50,7 @@ const (
FileDescriptorProto_Options_field_name protoreflect.Name = "options"
FileDescriptorProto_SourceCodeInfo_field_name protoreflect.Name = "source_code_info"
FileDescriptorProto_Syntax_field_name protoreflect.Name = "syntax"
FileDescriptorProto_Edition_field_name protoreflect.Name = "edition"
FileDescriptorProto_Name_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.name"
FileDescriptorProto_Package_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.package"
@ -63,6 +64,7 @@ const (
FileDescriptorProto_Options_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.options"
FileDescriptorProto_SourceCodeInfo_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.source_code_info"
FileDescriptorProto_Syntax_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.syntax"
FileDescriptorProto_Edition_field_fullname protoreflect.FullName = "google.protobuf.FileDescriptorProto.edition"
)
// Field numbers for google.protobuf.FileDescriptorProto.
@ -79,6 +81,7 @@ const (
FileDescriptorProto_Options_field_number protoreflect.FieldNumber = 8
FileDescriptorProto_SourceCodeInfo_field_number protoreflect.FieldNumber = 9
FileDescriptorProto_Syntax_field_number protoreflect.FieldNumber = 12
FileDescriptorProto_Edition_field_number protoreflect.FieldNumber = 13
)
// Names for google.protobuf.DescriptorProto.
@ -498,12 +501,14 @@ const (
MessageOptions_NoStandardDescriptorAccessor_field_name protoreflect.Name = "no_standard_descriptor_accessor"
MessageOptions_Deprecated_field_name protoreflect.Name = "deprecated"
MessageOptions_MapEntry_field_name protoreflect.Name = "map_entry"
MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts"
MessageOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
MessageOptions_MessageSetWireFormat_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.message_set_wire_format"
MessageOptions_NoStandardDescriptorAccessor_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.no_standard_descriptor_accessor"
MessageOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated"
MessageOptions_MapEntry_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.map_entry"
MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.deprecated_legacy_json_field_conflicts"
MessageOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.MessageOptions.uninterpreted_option"
)
@ -513,6 +518,7 @@ const (
MessageOptions_NoStandardDescriptorAccessor_field_number protoreflect.FieldNumber = 2
MessageOptions_Deprecated_field_number protoreflect.FieldNumber = 3
MessageOptions_MapEntry_field_number protoreflect.FieldNumber = 7
MessageOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 11
MessageOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@ -531,6 +537,9 @@ const (
FieldOptions_UnverifiedLazy_field_name protoreflect.Name = "unverified_lazy"
FieldOptions_Deprecated_field_name protoreflect.Name = "deprecated"
FieldOptions_Weak_field_name protoreflect.Name = "weak"
FieldOptions_DebugRedact_field_name protoreflect.Name = "debug_redact"
FieldOptions_Retention_field_name protoreflect.Name = "retention"
FieldOptions_Target_field_name protoreflect.Name = "target"
FieldOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
FieldOptions_Ctype_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.ctype"
@ -540,6 +549,9 @@ const (
FieldOptions_UnverifiedLazy_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.unverified_lazy"
FieldOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.deprecated"
FieldOptions_Weak_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.weak"
FieldOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.debug_redact"
FieldOptions_Retention_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.retention"
FieldOptions_Target_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.target"
FieldOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option"
)
@ -552,6 +564,9 @@ const (
FieldOptions_UnverifiedLazy_field_number protoreflect.FieldNumber = 15
FieldOptions_Deprecated_field_number protoreflect.FieldNumber = 3
FieldOptions_Weak_field_number protoreflect.FieldNumber = 10
FieldOptions_DebugRedact_field_number protoreflect.FieldNumber = 16
FieldOptions_Retention_field_number protoreflect.FieldNumber = 17
FieldOptions_Target_field_number protoreflect.FieldNumber = 18
FieldOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@ -567,6 +582,18 @@ const (
FieldOptions_JSType_enum_name = "JSType"
)
// Full and short names for google.protobuf.FieldOptions.OptionRetention.
const (
FieldOptions_OptionRetention_enum_fullname = "google.protobuf.FieldOptions.OptionRetention"
FieldOptions_OptionRetention_enum_name = "OptionRetention"
)
// Full and short names for google.protobuf.FieldOptions.OptionTargetType.
const (
FieldOptions_OptionTargetType_enum_fullname = "google.protobuf.FieldOptions.OptionTargetType"
FieldOptions_OptionTargetType_enum_name = "OptionTargetType"
)
// Names for google.protobuf.OneofOptions.
const (
OneofOptions_message_name protoreflect.Name = "OneofOptions"
@ -595,10 +622,12 @@ const (
const (
EnumOptions_AllowAlias_field_name protoreflect.Name = "allow_alias"
EnumOptions_Deprecated_field_name protoreflect.Name = "deprecated"
EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_name protoreflect.Name = "deprecated_legacy_json_field_conflicts"
EnumOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
EnumOptions_AllowAlias_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.allow_alias"
EnumOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated"
EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.deprecated_legacy_json_field_conflicts"
EnumOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumOptions.uninterpreted_option"
)
@ -606,6 +635,7 @@ const (
const (
EnumOptions_AllowAlias_field_number protoreflect.FieldNumber = 2
EnumOptions_Deprecated_field_number protoreflect.FieldNumber = 3
EnumOptions_DeprecatedLegacyJsonFieldConflicts_field_number protoreflect.FieldNumber = 6
EnumOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999
)
@ -816,11 +846,13 @@ const (
GeneratedCodeInfo_Annotation_SourceFile_field_name protoreflect.Name = "source_file"
GeneratedCodeInfo_Annotation_Begin_field_name protoreflect.Name = "begin"
GeneratedCodeInfo_Annotation_End_field_name protoreflect.Name = "end"
GeneratedCodeInfo_Annotation_Semantic_field_name protoreflect.Name = "semantic"
GeneratedCodeInfo_Annotation_Path_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.path"
GeneratedCodeInfo_Annotation_SourceFile_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.source_file"
GeneratedCodeInfo_Annotation_Begin_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.begin"
GeneratedCodeInfo_Annotation_End_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.end"
GeneratedCodeInfo_Annotation_Semantic_field_fullname protoreflect.FullName = "google.protobuf.GeneratedCodeInfo.Annotation.semantic"
)
// Field numbers for google.protobuf.GeneratedCodeInfo.Annotation.
@ -829,4 +861,11 @@ const (
GeneratedCodeInfo_Annotation_SourceFile_field_number protoreflect.FieldNumber = 2
GeneratedCodeInfo_Annotation_Begin_field_number protoreflect.FieldNumber = 3
GeneratedCodeInfo_Annotation_End_field_number protoreflect.FieldNumber = 4
GeneratedCodeInfo_Annotation_Semantic_field_number protoreflect.FieldNumber = 5
)
// Full and short names for google.protobuf.GeneratedCodeInfo.Annotation.Semantic.
const (
GeneratedCodeInfo_Annotation_Semantic_enum_fullname = "google.protobuf.GeneratedCodeInfo.Annotation.Semantic"
GeneratedCodeInfo_Annotation_Semantic_enum_name = "Semantic"
)

View File

@ -46,7 +46,7 @@ const (
WireFormat_UNSPECIFIED WireFormat = 0
WireFormat_PROTOBUF WireFormat = 1
WireFormat_JSON WireFormat = 2
WireFormat_JSPB WireFormat = 3 // Google internal only. Opensource testees just skip it.
WireFormat_JSPB WireFormat = 3 // Only used inside Google. Opensource testees just skip it.
WireFormat_TEXT_FORMAT WireFormat = 4
)
@ -107,7 +107,8 @@ const (
// https://developers.google.com/protocol-buffers/docs/proto3#json_options
// for more detail.
TestCategory_JSON_IGNORE_UNKNOWN_PARSING_TEST TestCategory = 3
// Test jspb wire format. Google internal only. Opensource testees just skip it.
// Test jspb wire format. Only used inside Google. Opensource testees just
// skip it.
TestCategory_JSPB_TEST TestCategory = 4
// Test text format. For cpp, java and python, testees can already deal with
// this type. Testees of other languages can simply skip it.
@ -225,11 +226,8 @@ type ConformanceRequest struct {
// protobuf_test_messages.proto3.TestAllTypes proto (as defined in
// src/google/protobuf/proto3_test_messages.proto).
//
// TODO(haberman): if/when we expand the conformance tests to support proto2,
// we will want to include a field that lets the payload/response be a
// protobuf_test_messages.google.protobuf.TestAllTypes message instead.
//
// Types that are assignable to Payload:
//
// *ConformanceRequest_ProtobufPayload
// *ConformanceRequest_JsonPayload
// *ConformanceRequest_JspbPayload
@ -242,8 +240,8 @@ type ConformanceRequest struct {
// protobuf_test_messages.google.protobuf.TestAllTypesProto2.
MessageType string `protobuf:"bytes,4,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
// Each test is given a specific test category. Some category may need
// specific support in testee programs. Refer to the definition of TestCategory
// for more information.
// specific support in testee programs. Refer to the definition of
// TestCategory 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"`
@ -367,7 +365,7 @@ type ConformanceRequest_JsonPayload struct {
}
type ConformanceRequest_JspbPayload struct {
// Google internal only. Opensource testees just skip it.
// Only used inside Google. Opensource testees just skip it.
JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"`
}
@ -390,8 +388,10 @@ type ConformanceResponse struct {
unknownFields protoimpl.UnknownFields
// Types that are assignable to Result:
//
// *ConformanceResponse_ParseError
// *ConformanceResponse_SerializeError
// *ConformanceResponse_TimeoutError
// *ConformanceResponse_RuntimeError
// *ConformanceResponse_ProtobufPayload
// *ConformanceResponse_JsonPayload
@ -454,6 +454,13 @@ func (x *ConformanceResponse) GetSerializeError() string {
return ""
}
func (x *ConformanceResponse) GetTimeoutError() string {
if x, ok := x.GetResult().(*ConformanceResponse_TimeoutError); ok {
return x.TimeoutError
}
return ""
}
func (x *ConformanceResponse) GetRuntimeError() string {
if x, ok := x.GetResult().(*ConformanceResponse_RuntimeError); ok {
return x.RuntimeError
@ -516,6 +523,13 @@ type ConformanceResponse_SerializeError struct {
SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"`
}
type ConformanceResponse_TimeoutError struct {
// This should be set if the test program timed out. The string should
// provide more information about what the child process was doing when it
// was killed.
TimeoutError string `protobuf:"bytes,9,opt,name=timeout_error,json=timeoutError,proto3,oneof"`
}
type ConformanceResponse_RuntimeError struct {
// This should be set if some other error occurred. This will always
// indicate that the test failed. The string can provide more information
@ -543,8 +557,8 @@ type ConformanceResponse_Skipped struct {
type ConformanceResponse_JspbPayload struct {
// If the input was successfully parsed and the requested output was JSPB,
// serialize to JSPB and set it in this field. JSPB is google internal only
// format. Opensource testees can just skip it.
// serialize to JSPB and set it in this field. JSPB is only used inside
// Google. Opensource testees can just skip it.
JspbPayload string `protobuf:"bytes,7,opt,name=jspb_payload,json=jspbPayload,proto3,oneof"`
}
@ -558,6 +572,8 @@ func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {}
func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {}
func (*ConformanceResponse_TimeoutError) isConformanceResponse_Result() {}
func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {}
func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {}
@ -658,50 +674,53 @@ var file_conformance_conformance_proto_rawDesc = []byte{
0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77,
0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12,
0x70, 0x72, 0x69, 0x6e, 0x74, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x46, 0x69, 0x65, 0x6c,
0x64, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xcc, 0x02,
0x64, 0x73, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xf3, 0x02,
0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x5f, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x61,
0x72, 0x73, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x69,
0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2b, 0x0a, 0x10, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f,
0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x07,
0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x6a, 0x73, 0x70, 0x62,
0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,
0x52, 0x0b, 0x6a, 0x73, 0x70, 0x62, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a,
0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x08, 0x20,
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f,
0x61, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4e, 0x0a, 0x12,
0x4a, 0x73, 0x70, 0x62, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66,
0x69, 0x67, 0x12, 0x38, 0x0a, 0x19, 0x75, 0x73, 0x65, 0x5f, 0x6a, 0x73, 0x70, 0x62, 0x5f, 0x61,
0x72, 0x72, 0x61, 0x79, 0x5f, 0x61, 0x6e, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x73, 0x65, 0x4a, 0x73, 0x70, 0x62, 0x41, 0x72,
0x72, 0x61, 0x79, 0x41, 0x6e, 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2a, 0x50, 0x0a, 0x0a,
0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e,
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50,
0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f,
0x4e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x50, 0x42, 0x10, 0x03, 0x12, 0x0f, 0x0a,
0x0b, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x10, 0x04, 0x2a, 0x8f,
0x01, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12,
0x14, 0x0a, 0x10, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54,
0x45, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f,
0x54, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x54,
0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x47,
0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x41, 0x52,
0x53, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4a,
0x53, 0x50, 0x42, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x45,
0x58, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x05,
0x42, 0x21, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x69,
0x6d, 0x65, 0x6f, 0x75, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0d, 0x72, 0x75,
0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x12, 0x2b, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23,
0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x12,
0x23, 0x0a, 0x0c, 0x6a, 0x73, 0x70, 0x62, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x6a, 0x73, 0x70, 0x62, 0x50, 0x61, 0x79,
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0c, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x79,
0x6c, 0x6f, 0x61, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x65,
0x78, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x22, 0x4e, 0x0a, 0x12, 0x4a, 0x73, 0x70, 0x62, 0x45, 0x6e, 0x63, 0x6f, 0x64,
0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x19, 0x75, 0x73, 0x65,
0x5f, 0x6a, 0x73, 0x70, 0x62, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x61, 0x6e, 0x79, 0x5f,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x73,
0x65, 0x4a, 0x73, 0x70, 0x62, 0x41, 0x72, 0x72, 0x61, 0x79, 0x41, 0x6e, 0x79, 0x46, 0x6f, 0x72,
0x6d, 0x61, 0x74, 0x2a, 0x50, 0x0a, 0x0a, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x10, 0x01,
0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53,
0x50, 0x42, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x46, 0x4f, 0x52,
0x4d, 0x41, 0x54, 0x10, 0x04, 0x2a, 0x8f, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61,
0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b,
0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0d, 0x0a,
0x09, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20,
0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e,
0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x41, 0x52, 0x53, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x45, 0x53, 0x54,
0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x50, 0x42, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x10,
0x04, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x45, 0x58, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54,
0x5f, 0x54, 0x45, 0x53, 0x54, 0x10, 0x05, 0x42, 0x2f, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63,
0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0xa2, 0x02, 0x0b, 0x43, 0x6f, 0x6e,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -801,6 +820,7 @@ func file_conformance_conformance_proto_init() {
file_conformance_conformance_proto_msgTypes[2].OneofWrappers = []interface{}{
(*ConformanceResponse_ParseError)(nil),
(*ConformanceResponse_SerializeError)(nil),
(*ConformanceResponse_TimeoutError)(nil),
(*ConformanceResponse_RuntimeError)(nil),
(*ConformanceResponse_ProtobufPayload)(nil),
(*ConformanceResponse_JsonPayload)(nil),

View File

@ -333,6 +333,7 @@ type TestAllTypesProto2 struct {
MapStringNestedEnum map[string]TestAllTypesProto2_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=protobuf_test_messages.proto2.TestAllTypesProto2_NestedEnum"`
MapStringForeignEnum map[string]ForeignEnumProto2 `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=protobuf_test_messages.proto2.ForeignEnumProto2"`
// Types that are assignable to OneofField:
//
// *TestAllTypesProto2_OneofUint32
// *TestAllTypesProto2_OneofNestedMessage
// *TestAllTypesProto2_OneofString
@ -1690,6 +1691,69 @@ func (x *OneStringProto2) GetData() string {
return ""
}
type ProtoWithKeywords struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Inline *int32 `protobuf:"varint,1,opt,name=inline" json:"inline,omitempty"`
Concept *string `protobuf:"bytes,2,opt,name=concept" json:"concept,omitempty"`
Requires []string `protobuf:"bytes,3,rep,name=requires" json:"requires,omitempty"`
}
func (x *ProtoWithKeywords) Reset() {
*x = ProtoWithKeywords{}
if protoimpl.UnsafeEnabled {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ProtoWithKeywords) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ProtoWithKeywords) ProtoMessage() {}
func (x *ProtoWithKeywords) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ProtoWithKeywords.ProtoReflect.Descriptor instead.
func (*ProtoWithKeywords) Descriptor() ([]byte, []int) {
return file_google_protobuf_test_messages_proto2_proto_rawDescGZIP(), []int{6}
}
func (x *ProtoWithKeywords) GetInline() int32 {
if x != nil && x.Inline != nil {
return *x.Inline
}
return 0
}
func (x *ProtoWithKeywords) GetConcept() string {
if x != nil && x.Concept != nil {
return *x.Concept
}
return ""
}
func (x *ProtoWithKeywords) GetRequires() []string {
if x != nil {
return x.Requires
}
return nil
}
type TestAllTypesProto2_NestedMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1702,7 +1766,7 @@ type TestAllTypesProto2_NestedMessage struct {
func (x *TestAllTypesProto2_NestedMessage) Reset() {
*x = TestAllTypesProto2_NestedMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[6]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1715,7 +1779,7 @@ func (x *TestAllTypesProto2_NestedMessage) String() string {
func (*TestAllTypesProto2_NestedMessage) ProtoMessage() {}
func (x *TestAllTypesProto2_NestedMessage) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[6]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1758,7 +1822,7 @@ type TestAllTypesProto2_Data struct {
func (x *TestAllTypesProto2_Data) Reset() {
*x = TestAllTypesProto2_Data{}
if protoimpl.UnsafeEnabled {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[26]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1771,7 +1835,7 @@ func (x *TestAllTypesProto2_Data) String() string {
func (*TestAllTypesProto2_Data) ProtoMessage() {}
func (x *TestAllTypesProto2_Data) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[26]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1812,7 +1876,7 @@ type TestAllTypesProto2_MessageSetCorrect struct {
func (x *TestAllTypesProto2_MessageSetCorrect) Reset() {
*x = TestAllTypesProto2_MessageSetCorrect{}
if protoimpl.UnsafeEnabled {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[27]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1825,7 +1889,7 @@ func (x *TestAllTypesProto2_MessageSetCorrect) String() string {
func (*TestAllTypesProto2_MessageSetCorrect) ProtoMessage() {}
func (x *TestAllTypesProto2_MessageSetCorrect) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[27]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1852,7 +1916,7 @@ type TestAllTypesProto2_MessageSetCorrectExtension1 struct {
func (x *TestAllTypesProto2_MessageSetCorrectExtension1) Reset() {
*x = TestAllTypesProto2_MessageSetCorrectExtension1{}
if protoimpl.UnsafeEnabled {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[28]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1865,7 +1929,7 @@ func (x *TestAllTypesProto2_MessageSetCorrectExtension1) String() string {
func (*TestAllTypesProto2_MessageSetCorrectExtension1) ProtoMessage() {}
func (x *TestAllTypesProto2_MessageSetCorrectExtension1) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[28]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1899,7 +1963,7 @@ type TestAllTypesProto2_MessageSetCorrectExtension2 struct {
func (x *TestAllTypesProto2_MessageSetCorrectExtension2) Reset() {
*x = TestAllTypesProto2_MessageSetCorrectExtension2{}
if protoimpl.UnsafeEnabled {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[29]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1912,7 +1976,7 @@ func (x *TestAllTypesProto2_MessageSetCorrectExtension2) String() string {
func (*TestAllTypesProto2_MessageSetCorrectExtension2) ProtoMessage() {}
func (x *TestAllTypesProto2_MessageSetCorrectExtension2) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[29]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -1946,7 +2010,7 @@ type UnknownToTestAllTypes_OptionalGroup struct {
func (x *UnknownToTestAllTypes_OptionalGroup) Reset() {
*x = UnknownToTestAllTypes_OptionalGroup{}
if protoimpl.UnsafeEnabled {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[30]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -1959,7 +2023,7 @@ func (x *UnknownToTestAllTypes_OptionalGroup) String() string {
func (*UnknownToTestAllTypes_OptionalGroup) ProtoMessage() {}
func (x *UnknownToTestAllTypes_OptionalGroup) ProtoReflect() protoreflect.Message {
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[30]
mi := &file_google_protobuf_test_messages_proto2_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -2717,21 +2781,27 @@ var file_google_protobuf_test_messages_proto2_proto_rawDesc = []byte{
0x12, 0x0a, 0x0a, 0x06, 0x6b, 0x46, 0x61, 0x6c, 0x73, 0x65, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
0x6b, 0x54, 0x72, 0x75, 0x65, 0x10, 0x01, 0x22, 0x25, 0x0a, 0x0f, 0x4f, 0x6e, 0x65, 0x53, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61,
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x46,
0x0a, 0x11, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x32, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f, 0x46,
0x4f, 0x4f, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e, 0x5f,
0x42, 0x41, 0x52, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47, 0x4e,
0x5f, 0x42, 0x41, 0x5a, 0x10, 0x02, 0x3a, 0x5a, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6c,
0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x18, 0x78, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74,
0x33, 0x32, 0x42, 0x2f, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x48, 0x01,
0xf8, 0x01, 0x01,
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x61,
0x0a, 0x11, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x77, 0x6f,
0x72, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x6f, 0x6e, 0x63, 0x65, 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
0x6e, 0x63, 0x65, 0x70, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x73, 0x2a, 0x46, 0x0a, 0x11, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x45, 0x6e, 0x75, 0x6d,
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49, 0x47,
0x4e, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45, 0x49,
0x47, 0x4e, 0x5f, 0x42, 0x41, 0x52, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, 0x52, 0x45,
0x49, 0x47, 0x4e, 0x5f, 0x42, 0x41, 0x5a, 0x10, 0x02, 0x3a, 0x5a, 0x0a, 0x0f, 0x65, 0x78, 0x74,
0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x31, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x54, 0x65, 0x73,
0x74, 0x41, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x18,
0x78, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
0x49, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x38, 0x0a, 0x28, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x74, 0x65, 0x73,
0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x32, 0x48, 0x01, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x06, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32,
}
var (
@ -2747,7 +2817,7 @@ func file_google_protobuf_test_messages_proto2_proto_rawDescGZIP() []byte {
}
var file_google_protobuf_test_messages_proto2_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_google_protobuf_test_messages_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
var file_google_protobuf_test_messages_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 32)
var file_google_protobuf_test_messages_proto2_proto_goTypes = []interface{}{
(ForeignEnumProto2)(0), // 0: protobuf_test_messages.proto2.ForeignEnumProto2
(TestAllTypesProto2_NestedEnum)(0), // 1: protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
@ -2758,78 +2828,79 @@ var file_google_protobuf_test_messages_proto2_proto_goTypes = []interface{}{
(*NullHypothesisProto2)(nil), // 6: protobuf_test_messages.proto2.NullHypothesisProto2
(*EnumOnlyProto2)(nil), // 7: protobuf_test_messages.proto2.EnumOnlyProto2
(*OneStringProto2)(nil), // 8: protobuf_test_messages.proto2.OneStringProto2
(*TestAllTypesProto2_NestedMessage)(nil), // 9: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
nil, // 10: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry
nil, // 11: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry
nil, // 12: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry
nil, // 13: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry
nil, // 14: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry
nil, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry
nil, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry
nil, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry
nil, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry
nil, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry
nil, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry
nil, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry
nil, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry
nil, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry
nil, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry
nil, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry
nil, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry
nil, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry
nil, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry
(*TestAllTypesProto2_Data)(nil), // 29: protobuf_test_messages.proto2.TestAllTypesProto2.Data
(*TestAllTypesProto2_MessageSetCorrect)(nil), // 30: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect
(*TestAllTypesProto2_MessageSetCorrectExtension1)(nil), // 31: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1
(*TestAllTypesProto2_MessageSetCorrectExtension2)(nil), // 32: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2
(*UnknownToTestAllTypes_OptionalGroup)(nil), // 33: protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup
(*ProtoWithKeywords)(nil), // 9: protobuf_test_messages.proto2.ProtoWithKeywords
(*TestAllTypesProto2_NestedMessage)(nil), // 10: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
nil, // 11: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry
nil, // 12: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry
nil, // 13: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry
nil, // 14: protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry
nil, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry
nil, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry
nil, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry
nil, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry
nil, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry
nil, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry
nil, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry
nil, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry
nil, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry
nil, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry
nil, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry
nil, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry
nil, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry
nil, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry
nil, // 29: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry
(*TestAllTypesProto2_Data)(nil), // 30: protobuf_test_messages.proto2.TestAllTypesProto2.Data
(*TestAllTypesProto2_MessageSetCorrect)(nil), // 31: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect
(*TestAllTypesProto2_MessageSetCorrectExtension1)(nil), // 32: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1
(*TestAllTypesProto2_MessageSetCorrectExtension2)(nil), // 33: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2
(*UnknownToTestAllTypes_OptionalGroup)(nil), // 34: protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup
}
var file_google_protobuf_test_messages_proto2_proto_depIdxs = []int32{
9, // 0: protobuf_test_messages.proto2.TestAllTypesProto2.optional_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
10, // 0: protobuf_test_messages.proto2.TestAllTypesProto2.optional_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
4, // 1: protobuf_test_messages.proto2.TestAllTypesProto2.optional_foreign_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2
1, // 2: protobuf_test_messages.proto2.TestAllTypesProto2.optional_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
0, // 3: protobuf_test_messages.proto2.TestAllTypesProto2.optional_foreign_enum:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2
3, // 4: protobuf_test_messages.proto2.TestAllTypesProto2.recursive_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2
9, // 5: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
10, // 5: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
4, // 6: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_foreign_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2
1, // 7: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
0, // 8: protobuf_test_messages.proto2.TestAllTypesProto2.repeated_foreign_enum:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2
1, // 9: protobuf_test_messages.proto2.TestAllTypesProto2.packed_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
1, // 10: protobuf_test_messages.proto2.TestAllTypesProto2.unpacked_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
10, // 11: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_int32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry
11, // 12: protobuf_test_messages.proto2.TestAllTypesProto2.map_int64_int64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry
12, // 13: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint32_uint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry
13, // 14: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint64_uint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry
14, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint32_sint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry
15, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint64_sint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry
16, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed32_fixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry
17, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed64_fixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry
18, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed32_sfixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry
19, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed64_sfixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry
20, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_float:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry
21, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_double:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry
22, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.map_bool_bool:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry
23, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_string:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry
24, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_bytes:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry
25, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry
26, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry
27, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry
28, // 29: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry
9, // 30: protobuf_test_messages.proto2.TestAllTypesProto2.oneof_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
11, // 11: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_int32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32Int32Entry
12, // 12: protobuf_test_messages.proto2.TestAllTypesProto2.map_int64_int64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt64Int64Entry
13, // 13: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint32_uint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint32Uint32Entry
14, // 14: protobuf_test_messages.proto2.TestAllTypesProto2.map_uint64_uint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapUint64Uint64Entry
15, // 15: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint32_sint32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint32Sint32Entry
16, // 16: protobuf_test_messages.proto2.TestAllTypesProto2.map_sint64_sint64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSint64Sint64Entry
17, // 17: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed32_fixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed32Fixed32Entry
18, // 18: protobuf_test_messages.proto2.TestAllTypesProto2.map_fixed64_fixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapFixed64Fixed64Entry
19, // 19: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed32_sfixed32:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed32Sfixed32Entry
20, // 20: protobuf_test_messages.proto2.TestAllTypesProto2.map_sfixed64_sfixed64:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapSfixed64Sfixed64Entry
21, // 21: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_float:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32FloatEntry
22, // 22: protobuf_test_messages.proto2.TestAllTypesProto2.map_int32_double:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapInt32DoubleEntry
23, // 23: protobuf_test_messages.proto2.TestAllTypesProto2.map_bool_bool:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapBoolBoolEntry
24, // 24: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_string:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringStringEntry
25, // 25: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_bytes:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringBytesEntry
26, // 26: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry
27, // 27: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry
28, // 28: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_nested_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry
29, // 29: protobuf_test_messages.proto2.TestAllTypesProto2.map_string_foreign_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry
10, // 30: protobuf_test_messages.proto2.TestAllTypesProto2.oneof_nested_message:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
1, // 31: protobuf_test_messages.proto2.TestAllTypesProto2.oneof_enum:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
29, // 32: protobuf_test_messages.proto2.TestAllTypesProto2.data:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.Data
30, // 32: protobuf_test_messages.proto2.TestAllTypesProto2.data:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.Data
4, // 33: protobuf_test_messages.proto2.UnknownToTestAllTypes.nested_message:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2
33, // 34: protobuf_test_messages.proto2.UnknownToTestAllTypes.optionalgroup:type_name -> protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup
34, // 34: protobuf_test_messages.proto2.UnknownToTestAllTypes.optionalgroup:type_name -> protobuf_test_messages.proto2.UnknownToTestAllTypes.OptionalGroup
3, // 35: protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage.corecursive:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2
9, // 36: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry.value:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
10, // 36: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedMessageEntry.value:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedMessage
4, // 37: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignMessageEntry.value:type_name -> protobuf_test_messages.proto2.ForeignMessageProto2
1, // 38: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringNestedEnumEntry.value:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.NestedEnum
0, // 39: protobuf_test_messages.proto2.TestAllTypesProto2.MapStringForeignEnumEntry.value:type_name -> protobuf_test_messages.proto2.ForeignEnumProto2
3, // 40: protobuf_test_messages.proto2.extension_int32:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2
30, // 41: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect
30, // 42: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect
31, // 43: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1
32, // 44: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2
31, // 41: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect
31, // 42: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:extendee -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrect
32, // 43: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension1
33, // 44: protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2.message_set_extension:type_name -> protobuf_test_messages.proto2.TestAllTypesProto2.MessageSetCorrectExtension2
45, // [45:45] is the sub-list for method output_type
45, // [45:45] is the sub-list for method input_type
43, // [43:45] is the sub-list for extension type_name
@ -2918,6 +2989,18 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ProtoWithKeywords); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TestAllTypesProto2_NestedMessage); i {
case 0:
return &v.state
@ -2929,7 +3012,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
return nil
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
file_google_protobuf_test_messages_proto2_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TestAllTypesProto2_Data); i {
case 0:
return &v.state
@ -2941,7 +3024,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
return nil
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
file_google_protobuf_test_messages_proto2_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TestAllTypesProto2_MessageSetCorrect); i {
case 0:
return &v.state
@ -2955,7 +3038,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
return nil
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
file_google_protobuf_test_messages_proto2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension1); i {
case 0:
return &v.state
@ -2967,7 +3050,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
return nil
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
file_google_protobuf_test_messages_proto2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TestAllTypesProto2_MessageSetCorrectExtension2); i {
case 0:
return &v.state
@ -2979,7 +3062,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
return nil
}
}
file_google_protobuf_test_messages_proto2_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
file_google_protobuf_test_messages_proto2_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnknownToTestAllTypes_OptionalGroup); i {
case 0:
return &v.state
@ -3009,7 +3092,7 @@ func file_google_protobuf_test_messages_proto2_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_google_protobuf_test_messages_proto2_proto_rawDesc,
NumEnums: 3,
NumMessages: 31,
NumMessages: 32,
NumExtensions: 3,
NumServices: 0,
},

View File

@ -367,6 +367,7 @@ type TestAllTypesProto3 struct {
MapStringNestedEnum map[string]TestAllTypesProto3_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum,proto3" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=protobuf_test_messages.proto3.TestAllTypesProto3_NestedEnum"`
MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum,proto3" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=protobuf_test_messages.proto3.ForeignEnum"`
// Types that are assignable to OneofField:
//
// *TestAllTypesProto3_OneofUint32
// *TestAllTypesProto3_OneofNestedMessage
// *TestAllTypesProto3_OneofString

View File

@ -28,6 +28,7 @@ type Message struct {
RequiredMessage *IrregularMessage `protobuf:"bytes,3,req,name=required_message,json=requiredMessage" json:"required_message,omitempty"`
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 assignable to Union:
//
// *Message_OneofMessage
// *Message_OneofAberrantMessage
Union isMessage_Union `protobuf_oneof:"union"`

View File

@ -10,9 +10,11 @@
Package proto2_20160225_2fc053c5 is a generated protocol buffer package.
It is generated from these files:
proto2_20160225_2fc053c5/test.proto
It has these top-level messages:
SiblingMessage
Message
*/

View File

@ -10,9 +10,11 @@
Package proto2_20160519_a4ab9ec5 is a generated protocol buffer package.
It is generated from these files:
proto2_20160519_a4ab9ec5/test.proto
It has these top-level messages:
SiblingMessage
Message
*/

View File

@ -9,9 +9,11 @@
Package proto2_20180125_92554152 is a generated protocol buffer package.
It is generated from these files:
proto2_20180125_92554152/test.proto
It has these top-level messages:
SiblingMessage
Message
*/

View File

@ -10,9 +10,11 @@
Package proto3_20160225_2fc053c5 is a generated protocol buffer package.
It is generated from these files:
proto3_20160225_2fc053c5/test.proto
It has these top-level messages:
SiblingMessage
Message
*/

View File

@ -10,9 +10,11 @@
Package proto3_20160519_a4ab9ec5 is a generated protocol buffer package.
It is generated from these files:
proto3_20160519_a4ab9ec5/test.proto
It has these top-level messages:
SiblingMessage
Message
*/

View File

@ -9,9 +9,11 @@
Package proto3_20180125_92554152 is a generated protocol buffer package.
It is generated from these files:
proto3_20180125_92554152/test.proto
It has these top-level messages:
SiblingMessage
Message
*/

View File

@ -25,6 +25,7 @@ type Message struct {
Field_2 *string `protobuf:"bytes,2,opt,name=field_2,json=field2" json:"field_2,omitempty"`
Field_1 *string `protobuf:"bytes,1,opt,name=field_1,json=field1" json:"field_1,omitempty"`
// Types that are assignable to Oneof_1:
//
// *Message_Field_10
Oneof_1 isMessage_Oneof_1 `protobuf_oneof:"oneof_1"`
Field_20 *string `protobuf:"bytes,20,opt,name=field_20,json=field20" json:"field_20,omitempty"`

View File

@ -330,6 +330,7 @@ type TestAllTypes struct {
DefaultNestedEnum *TestAllTypes_NestedEnum `protobuf:"varint,96,opt,name=default_nested_enum,json=defaultNestedEnum,enum=goproto.proto.test.TestAllTypes_NestedEnum,def=1" json:"default_nested_enum,omitempty"`
DefaultForeignEnum *ForeignEnum `protobuf:"varint,97,opt,name=default_foreign_enum,json=defaultForeignEnum,enum=goproto.proto.test.ForeignEnum,def=5" json:"default_foreign_enum,omitempty"`
// Types that are assignable to OneofField:
//
// *TestAllTypes_OneofUint32
// *TestAllTypes_OneofNestedMessage
// *TestAllTypes_OneofString
@ -344,6 +345,7 @@ type TestAllTypes struct {
// A oneof with exactly one field.
//
// Types that are assignable to OneofOptional:
//
// *TestAllTypes_OneofOptionalUint32
OneofOptional isTestAllTypes_OneofOptional `protobuf_oneof:"oneof_optional"`
}
@ -1125,6 +1127,7 @@ type TestDeprecatedMessage struct {
// Deprecated: Marked as deprecated in internal/testprotos/test/test.proto.
DeprecatedInt32 *int32 `protobuf:"varint,1,opt,name=deprecated_int32,json=deprecatedInt32" json:"deprecated_int32,omitempty"`
// Types that are assignable to DeprecatedOneof:
//
// *TestDeprecatedMessage_DeprecatedOneofField
DeprecatedOneof isTestDeprecatedMessage_DeprecatedOneof `protobuf_oneof:"deprecated_oneof"`
}
@ -1539,6 +1542,7 @@ type TestRequiredForeign struct {
RepeatedMessage []*TestRequired `protobuf:"bytes,2,rep,name=repeated_message,json=repeatedMessage" json:"repeated_message,omitempty"`
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 assignable to OneofField:
//
// *TestRequiredForeign_OneofMessage
OneofField isTestRequiredForeign_OneofField `protobuf_oneof:"oneof_field"`
}

View File

@ -204,6 +204,7 @@ type TestAllTypes struct {
MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage,proto3" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum,proto3" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=goproto.proto.test3.TestAllTypes_NestedEnum"`
// Types that are assignable to OneofField:
//
// *TestAllTypes_OneofUint32
// *TestAllTypes_OneofNestedMessage
// *TestAllTypes_OneofString

View File

@ -869,6 +869,7 @@ type IndirectRequired struct {
RptNested []*NestedWithRequired `protobuf:"bytes,2,rep,name=rpt_nested,json=rptNested" json:"rpt_nested,omitempty"`
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 assignable to Union:
//
// *IndirectRequired_OneofNested
Union isIndirectRequired_Union `protobuf_oneof:"union"`
}

View File

@ -686,6 +686,7 @@ type Oneofs struct {
unknownFields protoimpl.UnknownFields
// Types that are assignable to Union:
//
// *Oneofs_OneofEnum
// *Oneofs_OneofString
// *Oneofs_OneofNested

View File

@ -35,6 +35,8 @@ func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {
b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo)
case 12:
b = p.appendSingularField(b, "syntax", nil)
case 13:
b = p.appendSingularField(b, "edition", nil)
}
return b
}
@ -236,6 +238,8 @@ func (p *SourcePath) appendMessageOptions(b []byte) []byte {
b = p.appendSingularField(b, "deprecated", nil)
case 7:
b = p.appendSingularField(b, "map_entry", nil)
case 11:
b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
@ -279,6 +283,8 @@ func (p *SourcePath) appendEnumOptions(b []byte) []byte {
b = p.appendSingularField(b, "allow_alias", nil)
case 3:
b = p.appendSingularField(b, "deprecated", nil)
case 6:
b = p.appendSingularField(b, "deprecated_legacy_json_field_conflicts", nil)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}
@ -351,6 +357,12 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte {
b = p.appendSingularField(b, "deprecated", nil)
case 10:
b = p.appendSingularField(b, "weak", nil)
case 16:
b = p.appendSingularField(b, "debug_redact", nil)
case 17:
b = p.appendSingularField(b, "retention", nil)
case 18:
b = p.appendSingularField(b, "target", nil)
case 999:
b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
}

File diff suppressed because it is too large Load Diff

View File

@ -37,8 +37,7 @@
// It is functionally a tuple of the full name of the remote message type and
// the serialized bytes of the remote message value.
//
//
// Constructing an Any
// # Constructing an Any
//
// An Any message containing another message value is constructed using New:
//
@ -48,8 +47,7 @@
// }
// ... // make use of any
//
//
// Unmarshaling an Any
// # Unmarshaling an Any
//
// With a populated Any message, the underlying message can be serialized into
// a remote concrete message value in a few ways.
@ -95,8 +93,7 @@
// listed in the case clauses are linked into the Go binary and therefore also
// registered in the global registry.
//
//
// Type checking an Any
// # Type checking an Any
//
// In order to type check whether an Any message represents some other message,
// then use the MessageIs method:
@ -115,7 +112,6 @@
// }
// ... // make use of m
// }
//
package anypb
import (
@ -152,6 +148,10 @@ import (
// if (any.is(Foo.class)) {
// foo = any.unpack(Foo.class);
// }
// // or ...
// if (any.isSameTypeAs(Foo.getDefaultInstance())) {
// foo = any.unpack(Foo.getDefaultInstance());
// }
//
// Example 3: Pack and unpack a message in Python.
//
@ -182,8 +182,7 @@ import (
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
// name "y.z".
//
//
// JSON
// # JSON
//
// The JSON representation of an `Any` value uses the regular
// representation of the deserialized, embedded message, with an
@ -210,7 +209,6 @@ import (
// "@type": "type.googleapis.com/google.protobuf.Duration",
// "value": "1.212s"
// }
//
type Any struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -228,10 +226,10 @@ type Any struct {
// scheme `http`, `https`, or no scheme, one can optionally set up a type
// server that maps type URLs to message definitions as follows:
//
// * If no scheme is provided, `https` is assumed.
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
// - If no scheme is provided, `https` is assumed.
// - An HTTP GET on the URL must yield a [google.protobuf.Type][]
// value in binary format, or produce an error.
// * Applications are allowed to cache lookup results based on the
// - Applications are allowed to cache lookup results based on the
// URL, or have them precompiled into a binary to avoid any
// lookup. Therefore, binary compatibility needs to be preserved
// on changes to types. (Use versioned type names to manage
@ -243,7 +241,6 @@ type Any struct {
//
// Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
//
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"`

View File

@ -82,8 +82,6 @@ type Api struct {
// `google.feature.v1`. For major versions 0 and 1, the suffix can
// be omitted. Zero major versions must only be used for
// experimental, non-GA interfaces.
//
//
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
// Source context for the protocol buffer service represented by this
// message.

View File

@ -35,8 +35,7 @@
//
// The Duration message represents a signed span of time.
//
//
// Conversion to a Go Duration
// # Conversion to a Go Duration
//
// The AsDuration method can be used to convert a Duration message to a
// standard Go time.Duration value:
@ -65,15 +64,13 @@
// the resulting value to the closest representable value (e.g., math.MaxInt64
// for positive overflow and math.MinInt64 for negative overflow).
//
//
// Conversion from a Go Duration
// # Conversion from a Go Duration
//
// The durationpb.New function can be used to construct a Duration message
// from a standard Go time.Duration value:
//
// dur := durationpb.New(d)
// ... // make use of d as a *durationpb.Duration
//
package durationpb
import (
@ -143,8 +140,6 @@ import (
// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
// microsecond should be expressed in JSON format as "3.000001s".
//
//
type Duration struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache

View File

@ -47,7 +47,6 @@ import (
// service Foo {
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
// }
//
type Empty struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache

View File

@ -37,8 +37,7 @@
// The paths are specific to some target message type,
// which is not stored within the FieldMask message itself.
//
//
// Constructing a FieldMask
// # Constructing a FieldMask
//
// The New function is used construct a FieldMask:
//
@ -61,8 +60,7 @@
// ... // handle error
// }
//
//
// Type checking a FieldMask
// # Type checking a FieldMask
//
// In order to verify that a FieldMask represents a set of fields that are
// reachable from some target message type, use the IsValid method:
@ -121,7 +119,6 @@ import (
// (their value will be set to the default, and omitted in proto text
// output):
//
//
// f {
// a : 22
// b {

View File

@ -284,6 +284,7 @@ type Value struct {
// The kind of value.
//
// Types that are assignable to Kind:
//
// *Value_NullValue
// *Value_NumberValue
// *Value_StringValue

View File

@ -36,8 +36,7 @@
// The Timestamp message represents a timestamp,
// an instant in time since the Unix epoch (January 1st, 1970).
//
//
// Conversion to a Go Time
// # Conversion to a Go Time
//
// The AsTime method can be used to convert a Timestamp message to a
// standard Go time.Time value in UTC:
@ -59,8 +58,7 @@
// ... // handle error
// }
//
//
// Conversion from a Go Time
// # Conversion from a Go Time
//
// The timestamppb.New function can be used to construct a Timestamp message
// from a standard Go time.Time value:
@ -72,7 +70,6 @@
//
// ts := timestamppb.Now()
// ... // make use of ts as a *timestamppb.Timestamp
//
package timestamppb
import (
@ -133,7 +130,6 @@ import (
// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
// .setNanos((int) ((millis % 1000) * 1000000)).build();
//
//
// Example 5: Compute Timestamp from Java `Instant.now()`.
//
// Instant now = Instant.now();
@ -142,7 +138,6 @@ import (
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
// .setNanos(now.getNano()).build();
//
//
// Example 6: Compute Timestamp from current time in Python.
//
// timestamp = Timestamp()
@ -174,8 +169,6 @@ import (
// the Joda Time's [`ISODateTimeFormat.dateTime()`](
// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
// ) to obtain a formatter capable of generating timestamps in this format.
//
//
type Timestamp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache

View File

@ -27,7 +27,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Wrappers for primitive (non-message) types. These types are useful
// for embedding primitives in the `google.protobuf.Any` type and for places
// where we need to distinguish between the absence of a primitive

View File

@ -30,9 +30,6 @@
// Author: kenton@google.com (Kenton Varda)
//
// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
// change.
//
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
// just a program that reads a CodeGeneratorRequest from stdin and writes a
// CodeGeneratorResponse to stdout.
@ -377,7 +374,9 @@ type CodeGeneratorResponse_File struct {
// produced by another code generator. The original generator may provide
// insertion points by placing special annotations in the file that look
// like:
//
// @@protoc_insertion_point(NAME)
//
// The annotation can have arbitrary text before and after it on the line,
// which allows it to be placed in a comment. NAME should be replaced with
// an identifier naming the point -- this is what other generators will use
@ -389,7 +388,9 @@ type CodeGeneratorResponse_File struct {
//
// For example, the C++ code generator places the following line in the
// .pb.h files that it generates:
//
// // @@protoc_insertion_point(namespace_scope)
//
// This line appears within the scope of the file's package namespace, but
// outside of any particular class. Another plugin can then specify the
// insertion_point "namespace_scope" to generate additional classes or
@ -533,12 +534,14 @@ var file_google_protobuf_compiler_plugin_proto_rawDesc = []byte{
0x74, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f,
0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52,
0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41,
0x4c, 0x10, 0x01, 0x42, 0x57, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x4c, 0x10, 0x01, 0x42, 0x72, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69,
0x6c, 0x65, 0x72, 0x42, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x73, 0x5a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67,
0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79,
0x70, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x70, 0x62,
0x70, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x70, 0x62, 0xaa, 0x02, 0x18, 0x47,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43,
0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72,
}
var (