types: regenerate using latest protobuf v32 release Change-Id: I4e10652b6b2cbf228197f6189926feeb6a239e5c Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/696315 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Lasse Folger <lassefolger@google.com>
diff --git a/integration_test.go b/integration_test.go index 47e13c0..62f6b29 100644 --- a/integration_test.go +++ b/integration_test.go
@@ -33,7 +33,7 @@ regenerate = flag.Bool("regenerate", false, "regenerate files") buildRelease = flag.Bool("buildRelease", false, "build release binaries") - protobufVersion = "31.0" + protobufVersion = "32.0" golangVersions = func() []string { // Version policy: oldest supported version of Go, plus the version before that.
diff --git a/internal/genid/api_gen.go b/internal/genid/api_gen.go index df8f918..3ceb6fa 100644 --- a/internal/genid/api_gen.go +++ b/internal/genid/api_gen.go
@@ -27,6 +27,7 @@ Api_SourceContext_field_name protoreflect.Name = "source_context" Api_Mixins_field_name protoreflect.Name = "mixins" Api_Syntax_field_name protoreflect.Name = "syntax" + Api_Edition_field_name protoreflect.Name = "edition" Api_Name_field_fullname protoreflect.FullName = "google.protobuf.Api.name" Api_Methods_field_fullname protoreflect.FullName = "google.protobuf.Api.methods" @@ -35,6 +36,7 @@ Api_SourceContext_field_fullname protoreflect.FullName = "google.protobuf.Api.source_context" Api_Mixins_field_fullname protoreflect.FullName = "google.protobuf.Api.mixins" Api_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Api.syntax" + Api_Edition_field_fullname protoreflect.FullName = "google.protobuf.Api.edition" ) // Field numbers for google.protobuf.Api. @@ -46,6 +48,7 @@ Api_SourceContext_field_number protoreflect.FieldNumber = 5 Api_Mixins_field_number protoreflect.FieldNumber = 6 Api_Syntax_field_number protoreflect.FieldNumber = 7 + Api_Edition_field_number protoreflect.FieldNumber = 8 ) // Names for google.protobuf.Method. @@ -63,6 +66,7 @@ Method_ResponseStreaming_field_name protoreflect.Name = "response_streaming" Method_Options_field_name protoreflect.Name = "options" Method_Syntax_field_name protoreflect.Name = "syntax" + Method_Edition_field_name protoreflect.Name = "edition" Method_Name_field_fullname protoreflect.FullName = "google.protobuf.Method.name" Method_RequestTypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Method.request_type_url" @@ -71,6 +75,7 @@ Method_ResponseStreaming_field_fullname protoreflect.FullName = "google.protobuf.Method.response_streaming" Method_Options_field_fullname protoreflect.FullName = "google.protobuf.Method.options" Method_Syntax_field_fullname protoreflect.FullName = "google.protobuf.Method.syntax" + Method_Edition_field_fullname protoreflect.FullName = "google.protobuf.Method.edition" ) // Field numbers for google.protobuf.Method. @@ -82,6 +87,7 @@ Method_ResponseStreaming_field_number protoreflect.FieldNumber = 5 Method_Options_field_number protoreflect.FieldNumber = 6 Method_Syntax_field_number protoreflect.FieldNumber = 7 + Method_Edition_field_number protoreflect.FieldNumber = 8 ) // Names for google.protobuf.Mixin.
diff --git a/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go b/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go index f7b4f62..1935e12 100644 --- a/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go +++ b/internal/testprotos/conformance/editionsmigration/test_messages_proto2_editions.pb.go
@@ -3260,7 +3260,7 @@ const file_editions_golden_test_messages_proto2_editions_proto_rawDesc = "" + "\n" + - "3editions/golden/test_messages_proto2_editions.proto\x12&protobuf_test_messages.editions.proto2\"\x90]\n" + + "3editions/golden/test_messages_proto2_editions.proto\x12&protobuf_test_messages.editions.proto2\"\xaa]\n" + "\x12TestAllTypesProto2\x12%\n" + "\x0eoptional_int32\x18\x01 \x01(\x05R\roptionalInt32\x12%\n" + "\x0eoptional_int64\x18\x02 \x01(\x03R\roptionalInt64\x12'\n" + @@ -3512,7 +3512,7 @@ "\x03BAR\x10\x01\x12\a\n" + "\x03BAZ\x10\x02\x12\x10\n" + "\x03NEG\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01*\x05\bx\x10\xc9\x01B\r\n" + - "\voneof_fieldJ\x06\b\xe8\a\x10\x90N\"$\n" + + "\voneof_fieldJ\x06\b\xe8\a\x10\x90NJ\b\b\xbf\x84=\x10\xc0\x84=R\x0ereserved_field\"$\n" + "\x14ForeignMessageProto2\x12\f\n" + "\x01c\x18\x01 \x01(\x05R\x01c\"P\n" + "\n" +
diff --git a/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go b/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go index 7191149..1aa0df6 100644 --- a/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go +++ b/internal/testprotos/conformance/editionsmigration/test_messages_proto3_editions.pb.go
@@ -1762,7 +1762,7 @@ const file_editions_golden_test_messages_proto3_editions_proto_rawDesc = "" + "\n" + - "3editions/golden/test_messages_proto3_editions.proto\x12&protobuf_test_messages.editions.proto3\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xe9]\n" + + "3editions/golden/test_messages_proto3_editions.proto\x12&protobuf_test_messages.editions.proto3\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x83^\n" + "\x12TestAllTypesProto3\x12%\n" + "\x0eoptional_int32\x18\x01 \x01(\x05R\roptionalInt32\x12%\n" + "\x0eoptional_int64\x18\x02 \x01(\x03R\roptionalInt64\x12'\n" + @@ -2004,7 +2004,7 @@ "\x03MOO\x10\x02\x12\a\n" + "\x03moo\x10\x02\x12\a\n" + "\x03bAz\x10\x02\x1a\x02\x10\x01B\r\n" + - "\voneof_fieldJ\x06\b\xf5\x03\x10\xff\x03\"\x1e\n" + + "\voneof_fieldJ\x06\b\xf5\x03\x10\xff\x03J\b\b\xbf\x84=\x10\xc0\x84=R\x0ereserved_field\"\x1e\n" + "\x0eForeignMessage\x12\f\n" + "\x01c\x18\x01 \x01(\x05R\x01c\"\x16\n" + "\x14NullHypothesisProto3\"/\n" +
diff --git a/internal/testprotos/conformance/test_messages_proto2.pb.go b/internal/testprotos/conformance/test_messages_proto2.pb.go index 367f95f..29ad41c 100644 --- a/internal/testprotos/conformance/test_messages_proto2.pb.go +++ b/internal/testprotos/conformance/test_messages_proto2.pb.go
@@ -3300,7 +3300,7 @@ const file_google_protobuf_test_messages_proto2_proto_rawDesc = "" + "\n" + - "*google/protobuf/test_messages_proto2.proto\x12\x1dprotobuf_test_messages.proto2\"\xcdY\n" + + "*google/protobuf/test_messages_proto2.proto\x12\x1dprotobuf_test_messages.proto2\"\xe7Y\n" + "\x12TestAllTypesProto2\x12%\n" + "\x0eoptional_int32\x18\x01 \x01(\x05R\roptionalInt32\x12%\n" + "\x0eoptional_int64\x18\x02 \x01(\x03R\roptionalInt64\x12'\n" + @@ -3554,7 +3554,7 @@ "\x03BAR\x10\x01\x12\a\n" + "\x03BAZ\x10\x02\x12\x10\n" + "\x03NEG\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01*\x05\bx\x10\xc9\x01B\r\n" + - "\voneof_fieldJ\x06\b\xe8\a\x10\x90N\"$\n" + + "\voneof_fieldJ\x06\b\xe8\a\x10\x90NJ\b\b\xbf\x84=\x10\xc0\x84=R\x0ereserved_field\"$\n" + "\x14ForeignMessageProto2\x12\f\n" + "\x01c\x18\x01 \x01(\x05R\x01c\"P\n" + "\n" +
diff --git a/internal/testprotos/conformance/test_messages_proto3.pb.go b/internal/testprotos/conformance/test_messages_proto3.pb.go index 93d44f7..c325dc2 100644 --- a/internal/testprotos/conformance/test_messages_proto3.pb.go +++ b/internal/testprotos/conformance/test_messages_proto3.pb.go
@@ -1762,7 +1762,7 @@ const file_google_protobuf_test_messages_proto3_proto_rawDesc = "" + "\n" + - "*google/protobuf/test_messages_proto3.proto\x12\x1dprotobuf_test_messages.proto3\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x99[\n" + + "*google/protobuf/test_messages_proto3.proto\x12\x1dprotobuf_test_messages.proto3\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xb3[\n" + "\x12TestAllTypesProto3\x12%\n" + "\x0eoptional_int32\x18\x01 \x01(\x05R\roptionalInt32\x12%\n" + "\x0eoptional_int64\x18\x02 \x01(\x03R\roptionalInt64\x12'\n" + @@ -2004,7 +2004,7 @@ "\x03MOO\x10\x02\x12\a\n" + "\x03moo\x10\x02\x12\a\n" + "\x03bAz\x10\x02\x1a\x02\x10\x01B\r\n" + - "\voneof_fieldJ\x06\b\xf5\x03\x10\xff\x03\"\x1e\n" + + "\voneof_fieldJ\x06\b\xf5\x03\x10\xff\x03J\b\b\xbf\x84=\x10\xc0\x84=R\x0ereserved_field\"\x1e\n" + "\x0eForeignMessage\x12\f\n" + "\x01c\x18\x01 \x01(\x05R\x01c\"\x16\n" + "\x14NullHypothesisProto3\"/\n" +
diff --git a/types/descriptorpb/descriptor.pb.go b/types/descriptorpb/descriptor.pb.go index 6843b0b..4eacb52 100644 --- a/types/descriptorpb/descriptor.pb.go +++ b/types/descriptorpb/descriptor.pb.go
@@ -2873,7 +2873,10 @@ // for accessors, or it will be completely ignored; in the very least, this // is a formalization for deprecating fields. Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // DEPRECATED. DO NOT USE! // For Google-internal migration only. Do not use. + // + // Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` // Indicate that the field value should not be printed out when using debug // formats, e.g. when the field contains sensitive credentials. @@ -2977,6 +2980,7 @@ return Default_FieldOptions_Deprecated } +// Deprecated: Marked as deprecated in google/protobuf/descriptor.proto. func (x *FieldOptions) GetWeak() bool { if x != nil && x.Weak != nil { return *x.Weak @@ -4843,7 +4847,7 @@ "&deprecated_legacy_json_field_conflicts\x18\v \x01(\bB\x02\x18\x01R\"deprecatedLegacyJsonFieldConflicts\x127\n" + "\bfeatures\x18\f \x01(\v2\x1b.google.protobuf.FeatureSetR\bfeatures\x12X\n" + "\x14uninterpreted_option\x18\xe7\a \x03(\v2$.google.protobuf.UninterpretedOptionR\x13uninterpretedOption*\t\b\xe8\a\x10\x80\x80\x80\x80\x02J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\x06\x10\aJ\x04\b\b\x10\tJ\x04\b\t\x10\n" + - "\"\x9d\r\n" + + "\"\xa1\r\n" + "\fFieldOptions\x12A\n" + "\x05ctype\x18\x01 \x01(\x0e2#.google.protobuf.FieldOptions.CType:\x06STRINGR\x05ctype\x12\x16\n" + "\x06packed\x18\x02 \x01(\bR\x06packed\x12G\n" + @@ -4852,9 +4856,9 @@ "\x0funverified_lazy\x18\x0f \x01(\b:\x05falseR\x0eunverifiedLazy\x12%\n" + "\n" + "deprecated\x18\x03 \x01(\b:\x05falseR\n" + - "deprecated\x12\x19\n" + + "deprecated\x12\x1d\n" + "\x04weak\x18\n" + - " \x01(\b:\x05falseR\x04weak\x12(\n" + + " \x01(\b:\x05falseB\x02\x18\x01R\x04weak\x12(\n" + "\fdebug_redact\x18\x10 \x01(\b:\x05falseR\vdebugRedact\x12K\n" + "\tretention\x18\x11 \x01(\x0e2-.google.protobuf.FieldOptions.OptionRetentionR\tretention\x12H\n" + "\atargets\x18\x13 \x03(\x0e2..google.protobuf.FieldOptions.OptionTargetTypeR\atargets\x12W\n" +
diff --git a/types/known/apipb/api.pb.go b/types/known/apipb/api.pb.go index b466aea..63ed10e 100644 --- a/types/known/apipb/api.pb.go +++ b/types/known/apipb/api.pb.go
@@ -52,6 +52,11 @@ // sometimes simply referred to as "APIs" in other contexts, such as the name of // this message itself. See https://cloud.google.com/apis/design/glossary for // detailed terminology. +// +// New usages of this message as an alternative to ServiceDescriptorProto are +// strongly discouraged. This message does not reliability preserve all +// information necessary to model the schema and preserve semantics. Instead +// make use of FileDescriptorSet which preserves the necessary information. type Api struct { state protoimpl.MessageState `protogen:"open.v1"` // The fully qualified name of this interface, including package name @@ -87,7 +92,9 @@ // 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"` + Syntax typepb.Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + // The source edition string, only valid when syntax is SYNTAX_EDITIONS. + Edition string `protobuf:"bytes,8,opt,name=edition,proto3" json:"edition,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -171,7 +178,19 @@ return typepb.Syntax(0) } +func (x *Api) GetEdition() string { + if x != nil { + return x.Edition + } + return "" +} + // Method represents a method of an API interface. +// +// New usages of this message as an alternative to MethodDescriptorProto are +// strongly discouraged. This message does not reliability preserve all +// information necessary to model the schema and preserve semantics. Instead +// make use of FileDescriptorSet which preserves the necessary information. type Method struct { state protoimpl.MessageState `protogen:"open.v1"` // The simple name of this method. @@ -187,7 +206,19 @@ // 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"` + // + // This field should be ignored, instead the syntax should be inherited from + // Api. This is similar to Field and EnumValue. + // + // Deprecated: Marked as deprecated in google/protobuf/api.proto. + Syntax typepb.Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + // The source edition string, only valid when syntax is SYNTAX_EDITIONS. + // + // This field should be ignored, instead the edition should be inherited from + // Api. This is similar to Field and EnumValue. + // + // Deprecated: Marked as deprecated in google/protobuf/api.proto. + Edition string `protobuf:"bytes,8,opt,name=edition,proto3" json:"edition,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -264,6 +295,7 @@ return nil } +// Deprecated: Marked as deprecated in google/protobuf/api.proto. func (x *Method) GetSyntax() typepb.Syntax { if x != nil { return x.Syntax @@ -271,6 +303,14 @@ return typepb.Syntax(0) } +// Deprecated: Marked as deprecated in google/protobuf/api.proto. +func (x *Method) GetEdition() string { + if x != nil { + return x.Edition + } + return "" +} + // Declares an API Interface to be included in this interface. The including // interface must redeclare all the methods from the included interface, but // documentation and options are inherited as follows: @@ -408,7 +448,7 @@ const file_google_protobuf_api_proto_rawDesc = "" + "\n" + - "\x19google/protobuf/api.proto\x12\x0fgoogle.protobuf\x1a$google/protobuf/source_context.proto\x1a\x1agoogle/protobuf/type.proto\"\xc1\x02\n" + + "\x19google/protobuf/api.proto\x12\x0fgoogle.protobuf\x1a$google/protobuf/source_context.proto\x1a\x1agoogle/protobuf/type.proto\"\xdb\x02\n" + "\x03Api\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x121\n" + "\amethods\x18\x02 \x03(\v2\x17.google.protobuf.MethodR\amethods\x121\n" + @@ -416,15 +456,17 @@ "\aversion\x18\x04 \x01(\tR\aversion\x12E\n" + "\x0esource_context\x18\x05 \x01(\v2\x1e.google.protobuf.SourceContextR\rsourceContext\x12.\n" + "\x06mixins\x18\x06 \x03(\v2\x16.google.protobuf.MixinR\x06mixins\x12/\n" + - "\x06syntax\x18\a \x01(\x0e2\x17.google.protobuf.SyntaxR\x06syntax\"\xb2\x02\n" + + "\x06syntax\x18\a \x01(\x0e2\x17.google.protobuf.SyntaxR\x06syntax\x12\x18\n" + + "\aedition\x18\b \x01(\tR\aedition\"\xd4\x02\n" + "\x06Method\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12(\n" + "\x10request_type_url\x18\x02 \x01(\tR\x0erequestTypeUrl\x12+\n" + "\x11request_streaming\x18\x03 \x01(\bR\x10requestStreaming\x12*\n" + "\x11response_type_url\x18\x04 \x01(\tR\x0fresponseTypeUrl\x12-\n" + "\x12response_streaming\x18\x05 \x01(\bR\x11responseStreaming\x121\n" + - "\aoptions\x18\x06 \x03(\v2\x17.google.protobuf.OptionR\aoptions\x12/\n" + - "\x06syntax\x18\a \x01(\x0e2\x17.google.protobuf.SyntaxR\x06syntax\"/\n" + + "\aoptions\x18\x06 \x03(\v2\x17.google.protobuf.OptionR\aoptions\x123\n" + + "\x06syntax\x18\a \x01(\x0e2\x17.google.protobuf.SyntaxB\x02\x18\x01R\x06syntax\x12\x1c\n" + + "\aedition\x18\b \x01(\tB\x02\x18\x01R\aedition\"/\n" + "\x05Mixin\x12\x12\n" + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + "\x04root\x18\x02 \x01(\tR\x04rootBv\n" +
diff --git a/types/known/typepb/type.pb.go b/types/known/typepb/type.pb.go index 0c92d48..bd6c25e 100644 --- a/types/known/typepb/type.pb.go +++ b/types/known/typepb/type.pb.go
@@ -271,6 +271,11 @@ } // A protocol buffer message type. +// +// New usages of this message as an alternative to DescriptorProto are strongly +// discouraged. This message does not reliability preserve all information +// necessary to model the schema and preserve semantics. Instead make use of +// FileDescriptorSet which preserves the necessary information. type Type struct { state protoimpl.MessageState `protogen:"open.v1"` // The fully qualified message name. @@ -371,6 +376,11 @@ } // A single field of a message type. +// +// New usages of this message as an alternative to FieldDescriptorProto are +// strongly discouraged. This message does not reliability preserve all +// information necessary to model the schema and preserve semantics. Instead +// make use of FileDescriptorSet which preserves the necessary information. type Field struct { state protoimpl.MessageState `protogen:"open.v1"` // The field type. @@ -500,6 +510,11 @@ } // Enum type definition. +// +// New usages of this message as an alternative to EnumDescriptorProto are +// strongly discouraged. This message does not reliability preserve all +// information necessary to model the schema and preserve semantics. Instead +// make use of FileDescriptorSet which preserves the necessary information. type Enum struct { state protoimpl.MessageState `protogen:"open.v1"` // Enum type name. @@ -591,6 +606,11 @@ } // Enum value definition. +// +// New usages of this message as an alternative to EnumValueDescriptorProto are +// strongly discouraged. This message does not reliability preserve all +// information necessary to model the schema and preserve semantics. Instead +// make use of FileDescriptorSet which preserves the necessary information. type EnumValue struct { state protoimpl.MessageState `protogen:"open.v1"` // Enum value name. @@ -656,6 +676,10 @@ // A protocol buffer option, which can be attached to a message, field, // enumeration, etc. +// +// New usages of this message as an alternative to FileOptions, MessageOptions, +// FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions +// are strongly discouraged. type Option struct { state protoimpl.MessageState `protogen:"open.v1"` // The option's name. For protobuf built-in options (options defined in