From 818129adff9f77becc20992270b48f09d83129b5 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Tue, 7 Mar 2023 19:17:04 +0000 Subject: [PATCH] Auto-generate files after cl/514783686 --- csharp/src/Google.Protobuf.Test/testprotos.pb | Bin 366872 -> 367275 bytes .../Google.Protobuf/WellKnownTypes/Type.pb.cs | 149 +++++++++++--- src/google/protobuf/type.pb.cc | 183 ++++++++++++++---- src/google/protobuf/type.pb.h | 145 +++++++++++++- 4 files changed, 404 insertions(+), 73 deletions(-) diff --git a/csharp/src/Google.Protobuf.Test/testprotos.pb b/csharp/src/Google.Protobuf.Test/testprotos.pb index c783813c973d8f403a068aa7e9eeba61af5fec28..8fb22bcc89012db23ea7ea311264073e77c0b3cd 100644 GIT binary patch delta 2750 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 [pbr::OriginalName("SYNTAX_PROTO3")] Proto3 = 1, + /// + /// Syntax `editions`. + /// + [pbr::OriginalName("SYNTAX_EDITIONS")] Editions = 2, } #endregion @@ -134,6 +139,7 @@ namespace Google.Protobuf.WellKnownTypes { options_ = other.options_.Clone(); sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; syntax_ = other.syntax_; + edition_ = other.edition_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -230,6 +236,21 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "edition" field. + public const int EditionFieldNumber = 7; + private string edition_ = ""; + /// + /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Edition { + get { return edition_; } + set { + edition_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -251,6 +272,7 @@ namespace Google.Protobuf.WellKnownTypes { if(!options_.Equals(other.options_)) return false; if (!object.Equals(SourceContext, other.SourceContext)) return false; if (Syntax != other.Syntax) return false; + if (Edition != other.Edition) return false; return Equals(_unknownFields, other._unknownFields); } @@ -264,6 +286,7 @@ namespace Google.Protobuf.WellKnownTypes { hash ^= options_.GetHashCode(); if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); + if (Edition.Length != 0) hash ^= Edition.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -297,6 +320,10 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(48); output.WriteEnum((int) Syntax); } + if (Edition.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Edition); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -322,6 +349,10 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(48); output.WriteEnum((int) Syntax); } + if (Edition.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Edition); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -344,6 +375,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } + if (Edition.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Edition); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -371,6 +405,9 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { Syntax = other.Syntax; } + if (other.Edition.Length != 0) { + Edition = other.Edition; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -413,6 +450,10 @@ namespace Google.Protobuf.WellKnownTypes { Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); break; } + case 58: { + Edition = input.ReadString(); + break; + } } } #endif @@ -455,6 +496,10 @@ namespace Google.Protobuf.WellKnownTypes { Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); break; } + case 58: { + Edition = input.ReadString(); + break; + } } } } @@ -1162,6 +1207,7 @@ namespace Google.Protobuf.WellKnownTypes { options_ = other.options_.Clone(); sourceContext_ = other.sourceContext_ != null ? other.sourceContext_.Clone() : null; syntax_ = other.syntax_; + edition_ = other.edition_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1244,6 +1290,21 @@ namespace Google.Protobuf.WellKnownTypes { } } + /// Field number for the "edition" field. + public const int EditionFieldNumber = 6; + private string edition_ = ""; + /// + /// The source edition string, only valid when syntax is SYNTAX_EDITIONS. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Edition { + get { return edition_; } + set { + edition_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { @@ -1264,6 +1325,7 @@ namespace Google.Protobuf.WellKnownTypes { if(!options_.Equals(other.options_)) return false; if (!object.Equals(SourceContext, other.SourceContext)) return false; if (Syntax != other.Syntax) return false; + if (Edition != other.Edition) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1276,6 +1338,7 @@ namespace Google.Protobuf.WellKnownTypes { hash ^= options_.GetHashCode(); if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) hash ^= Syntax.GetHashCode(); + if (Edition.Length != 0) hash ^= Edition.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1308,6 +1371,10 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(40); output.WriteEnum((int) Syntax); } + if (Edition.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Edition); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1332,6 +1399,10 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(40); output.WriteEnum((int) Syntax); } + if (Edition.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Edition); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1353,6 +1424,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } + if (Edition.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Edition); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1379,6 +1453,9 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Syntax != global::Google.Protobuf.WellKnownTypes.Syntax.Proto2) { Syntax = other.Syntax; } + if (other.Edition.Length != 0) { + Edition = other.Edition; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1417,6 +1494,10 @@ namespace Google.Protobuf.WellKnownTypes { Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); break; } + case 50: { + Edition = input.ReadString(); + break; + } } } #endif @@ -1455,6 +1536,10 @@ namespace Google.Protobuf.WellKnownTypes { Syntax = (global::Google.Protobuf.WellKnownTypes.Syntax) input.ReadEnum(); break; } + case 50: { + Edition = input.ReadString(); + break; + } } } } diff --git a/src/google/protobuf/type.pb.cc b/src/google/protobuf/type.pb.cc index 49c5c37c97..15a9d80884 100644 --- a/src/google/protobuf/type.pb.cc +++ b/src/google/protobuf/type.pb.cc @@ -28,6 +28,10 @@ PROTOBUF_CONSTEXPR Type::Type( &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {} } + , /*decltype(_impl_.edition_)*/ { + &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {} + } + , /*decltype(_impl_.source_context_)*/nullptr , /*decltype(_impl_.syntax_)*/ 0 @@ -90,6 +94,10 @@ PROTOBUF_CONSTEXPR Enum::Enum( &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {} } + , /*decltype(_impl_.edition_)*/ { + &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {} + } + , /*decltype(_impl_.source_context_)*/nullptr , /*decltype(_impl_.syntax_)*/ 0 @@ -163,6 +171,7 @@ const ::uint32_t TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBU PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.options_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.source_context_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.syntax_), + PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Type, _impl_.edition_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Field, _internal_metadata_), ~0u, // no _extensions_ @@ -194,6 +203,7 @@ const ::uint32_t TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBU PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.options_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.source_context_), PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.syntax_), + PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Enum, _impl_.edition_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::EnumValue, _internal_metadata_), ~0u, // no _extensions_ @@ -220,10 +230,10 @@ const ::uint32_t TableStruct_google_2fprotobuf_2ftype_2eproto::offsets[] PROTOBU static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Type)}, - { 14, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Field)}, - { 32, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Enum)}, - { 45, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumValue)}, - { 56, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Option)}, + { 15, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Field)}, + { 33, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Enum)}, + { 47, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::EnumValue)}, + { 58, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Option)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -236,44 +246,46 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { "\n\032google/protobuf/type.proto\022\017google.pro" "tobuf\032\031google/protobuf/any.proto\032$google" - "/protobuf/source_context.proto\"\327\001\n\004Type\022" + "/protobuf/source_context.proto\"\350\001\n\004Type\022" "\014\n\004name\030\001 \001(\t\022&\n\006fields\030\002 \003(\0132\026.google.p" "rotobuf.Field\022\016\n\006oneofs\030\003 \003(\t\022(\n\007options" "\030\004 \003(\0132\027.google.protobuf.Option\0226\n\016sourc" "e_context\030\005 \001(\0132\036.google.protobuf.Source" "Context\022\'\n\006syntax\030\006 \001(\0162\027.google.protobu" - "f.Syntax\"\325\005\n\005Field\022)\n\004kind\030\001 \001(\0162\033.googl" - "e.protobuf.Field.Kind\0227\n\013cardinality\030\002 \001" - "(\0162\".google.protobuf.Field.Cardinality\022\016" - "\n\006number\030\003 \001(\005\022\014\n\004name\030\004 \001(\t\022\020\n\010type_url" - "\030\006 \001(\t\022\023\n\013oneof_index\030\007 \001(\005\022\016\n\006packed\030\010 " - "\001(\010\022(\n\007options\030\t \003(\0132\027.google.protobuf.O" - "ption\022\021\n\tjson_name\030\n \001(\t\022\025\n\rdefault_valu" - "e\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYPE_UNKNOWN\020\000\022\017\n\013TY" - "PE_DOUBLE\020\001\022\016\n\nTYPE_FLOAT\020\002\022\016\n\nTYPE_INT6" - "4\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n\nTYPE_INT32\020\005\022\020\n\014" - "TYPE_FIXED64\020\006\022\020\n\014TYPE_FIXED32\020\007\022\r\n\tTYPE" - "_BOOL\020\010\022\017\n\013TYPE_STRING\020\t\022\016\n\nTYPE_GROUP\020\n" - "\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nTYPE_BYTES\020\014\022\017\n\013TY" - "PE_UINT32\020\r\022\r\n\tTYPE_ENUM\020\016\022\021\n\rTYPE_SFIXE" - "D32\020\017\022\021\n\rTYPE_SFIXED64\020\020\022\017\n\013TYPE_SINT32\020" - "\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013Cardinality\022\027\n\023CAR" - "DINALITY_UNKNOWN\020\000\022\030\n\024CARDINALITY_OPTION" - "AL\020\001\022\030\n\024CARDINALITY_REQUIRED\020\002\022\030\n\024CARDIN" - "ALITY_REPEATED\020\003\"\316\001\n\004Enum\022\014\n\004name\030\001 \001(\t\022" - "-\n\tenumvalue\030\002 \003(\0132\032.google.protobuf.Enu" - "mValue\022(\n\007options\030\003 \003(\0132\027.google.protobu" - "f.Option\0226\n\016source_context\030\004 \001(\0132\036.googl" - "e.protobuf.SourceContext\022\'\n\006syntax\030\005 \001(\016" - "2\027.google.protobuf.Syntax\"S\n\tEnumValue\022\014" - "\n\004name\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030" - "\003 \003(\0132\027.google.protobuf.Option\";\n\006Option" - "\022\014\n\004name\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.p" - "rotobuf.Any*.\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000" - "\022\021\n\rSYNTAX_PROTO3\020\001B{\n\023com.google.protob" - "ufB\tTypeProtoP\001Z-google.golang.org/proto" - "buf/types/known/typepb\370\001\001\242\002\003GPB\252\002\036Google" - ".Protobuf.WellKnownTypesb\006proto3" + "f.Syntax\022\017\n\007edition\030\007 \001(\t\"\325\005\n\005Field\022)\n\004k" + "ind\030\001 \001(\0162\033.google.protobuf.Field.Kind\0227" + "\n\013cardinality\030\002 \001(\0162\".google.protobuf.Fi" + "eld.Cardinality\022\016\n\006number\030\003 \001(\005\022\014\n\004name\030" + "\004 \001(\t\022\020\n\010type_url\030\006 \001(\t\022\023\n\013oneof_index\030\007" + " \001(\005\022\016\n\006packed\030\010 \001(\010\022(\n\007options\030\t \003(\0132\027." + "google.protobuf.Option\022\021\n\tjson_name\030\n \001(" + "\t\022\025\n\rdefault_value\030\013 \001(\t\"\310\002\n\004Kind\022\020\n\014TYP" + "E_UNKNOWN\020\000\022\017\n\013TYPE_DOUBLE\020\001\022\016\n\nTYPE_FLO" + "AT\020\002\022\016\n\nTYPE_INT64\020\003\022\017\n\013TYPE_UINT64\020\004\022\016\n" + "\nTYPE_INT32\020\005\022\020\n\014TYPE_FIXED64\020\006\022\020\n\014TYPE_" + "FIXED32\020\007\022\r\n\tTYPE_BOOL\020\010\022\017\n\013TYPE_STRING\020" + "\t\022\016\n\nTYPE_GROUP\020\n\022\020\n\014TYPE_MESSAGE\020\013\022\016\n\nT" + "YPE_BYTES\020\014\022\017\n\013TYPE_UINT32\020\r\022\r\n\tTYPE_ENU" + "M\020\016\022\021\n\rTYPE_SFIXED32\020\017\022\021\n\rTYPE_SFIXED64\020" + "\020\022\017\n\013TYPE_SINT32\020\021\022\017\n\013TYPE_SINT64\020\022\"t\n\013C" + "ardinality\022\027\n\023CARDINALITY_UNKNOWN\020\000\022\030\n\024C" + "ARDINALITY_OPTIONAL\020\001\022\030\n\024CARDINALITY_REQ" + "UIRED\020\002\022\030\n\024CARDINALITY_REPEATED\020\003\"\337\001\n\004En" + "um\022\014\n\004name\030\001 \001(\t\022-\n\tenumvalue\030\002 \003(\0132\032.go" + "ogle.protobuf.EnumValue\022(\n\007options\030\003 \003(\013" + "2\027.google.protobuf.Option\0226\n\016source_cont" + "ext\030\004 \001(\0132\036.google.protobuf.SourceContex" + "t\022\'\n\006syntax\030\005 \001(\0162\027.google.protobuf.Synt" + "ax\022\017\n\007edition\030\006 \001(\t\"S\n\tEnumValue\022\014\n\004name" + "\030\001 \001(\t\022\016\n\006number\030\002 \001(\005\022(\n\007options\030\003 \003(\0132" + "\027.google.protobuf.Option\";\n\006Option\022\014\n\004na" + "me\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.protobu" + "f.Any*C\n\006Syntax\022\021\n\rSYNTAX_PROTO2\020\000\022\021\n\rSY" + "NTAX_PROTO3\020\001\022\023\n\017SYNTAX_EDITIONS\020\002B{\n\023co" + "m.google.protobufB\tTypeProtoP\001Z-google.g" + "olang.org/protobuf/types/known/typepb\370\001\001" + "\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypesb" + "\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_google_2fprotobuf_2ftype_2eproto_deps[2] = { @@ -284,7 +296,7 @@ static ::absl::once_flag descriptor_table_google_2fprotobuf_2ftype_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ftype_2eproto = { false, false, - 1592, + 1647, descriptor_table_protodef_google_2fprotobuf_2ftype_2eproto, "google/protobuf/type.proto", &descriptor_table_google_2fprotobuf_2ftype_2eproto_once, @@ -411,6 +423,7 @@ bool Syntax_IsValid(int value) { switch (value) { case 0: case 1: + case 2: return true; default: return false; @@ -447,6 +460,8 @@ Type::Type(const Type& from) , decltype(_impl_.options_){from._impl_.options_} , decltype(_impl_.name_) {} + , decltype(_impl_.edition_) {} + , decltype(_impl_.source_context_){nullptr} , decltype(_impl_.syntax_) {} @@ -460,6 +475,13 @@ Type::Type(const Type& from) if (!from._internal_name().empty()) { _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); } + _impl_.edition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.edition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_edition().empty()) { + _this->_impl_.edition_.Set(from._internal_edition(), _this->GetArenaForAllocation()); + } if (from._internal_has_source_context()) { _this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_); } @@ -475,6 +497,8 @@ inline void Type::SharedCtor(::_pb::Arena* arena) { , decltype(_impl_.options_){arena} , decltype(_impl_.name_) {} + , decltype(_impl_.edition_) {} + , decltype(_impl_.source_context_){nullptr} , decltype(_impl_.syntax_) { 0 } @@ -484,6 +508,10 @@ inline void Type::SharedCtor(::_pb::Arena* arena) { #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.name_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.edition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.edition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } Type::~Type() { @@ -501,6 +529,7 @@ inline void Type::SharedDtor() { _impl_.oneofs_.~RepeatedPtrField(); _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); + _impl_.edition_.Destroy(); if (this != internal_default_instance()) delete _impl_.source_context_; } @@ -518,6 +547,7 @@ void Type::Clear() { _impl_.oneofs_.Clear(); _impl_.options_.Clear(); _impl_.name_.ClearToEmpty(); + _impl_.edition_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) { delete _impl_.source_context_; } @@ -606,6 +636,17 @@ const char* Type::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { goto handle_unusual; } continue; + // string edition = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) { + auto str = _internal_mutable_edition(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Type.edition")); + } else { + goto handle_unusual; + } + continue; default: goto handle_unusual; } // switch @@ -681,6 +722,14 @@ failure: 6, this->_internal_syntax(), target); } + // string edition = 7; + if (!this->_internal_edition().empty()) { + const std::string& _s = this->_internal_edition(); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.edition"); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -723,6 +772,12 @@ failure: this->_internal_name()); } + // string edition = 7; + if (!this->_internal_edition().empty()) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_edition()); + } + // .google.protobuf.SourceContext source_context = 5; if (this->_internal_has_source_context()) { total_size += 1 + @@ -760,6 +815,9 @@ void Type::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_ if (!from._internal_name().empty()) { _this->_internal_set_name(from._internal_name()); } + if (!from._internal_edition().empty()) { + _this->_internal_set_edition(from._internal_edition()); + } if (from._internal_has_source_context()) { _this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom( from._internal_source_context()); @@ -791,6 +849,8 @@ void Type::InternalSwap(Type* other) { _impl_.options_.InternalSwap(&other->_impl_.options_); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, lhs_arena, + &other->_impl_.edition_, rhs_arena); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(Type, _impl_.syntax_) + sizeof(Type::_impl_.syntax_) @@ -1364,6 +1424,8 @@ Enum::Enum(const Enum& from) , decltype(_impl_.options_){from._impl_.options_} , decltype(_impl_.name_) {} + , decltype(_impl_.edition_) {} + , decltype(_impl_.source_context_){nullptr} , decltype(_impl_.syntax_) {} @@ -1377,6 +1439,13 @@ Enum::Enum(const Enum& from) if (!from._internal_name().empty()) { _this->_impl_.name_.Set(from._internal_name(), _this->GetArenaForAllocation()); } + _impl_.edition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.edition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_edition().empty()) { + _this->_impl_.edition_.Set(from._internal_edition(), _this->GetArenaForAllocation()); + } if (from._internal_has_source_context()) { _this->_impl_.source_context_ = new ::PROTOBUF_NAMESPACE_ID::SourceContext(*from._impl_.source_context_); } @@ -1391,6 +1460,8 @@ inline void Enum::SharedCtor(::_pb::Arena* arena) { , decltype(_impl_.options_){arena} , decltype(_impl_.name_) {} + , decltype(_impl_.edition_) {} + , decltype(_impl_.source_context_){nullptr} , decltype(_impl_.syntax_) { 0 } @@ -1400,6 +1471,10 @@ inline void Enum::SharedCtor(::_pb::Arena* arena) { #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.name_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.edition_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.edition_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } Enum::~Enum() { @@ -1416,6 +1491,7 @@ inline void Enum::SharedDtor() { _impl_.enumvalue_.~RepeatedPtrField(); _impl_.options_.~RepeatedPtrField(); _impl_.name_.Destroy(); + _impl_.edition_.Destroy(); if (this != internal_default_instance()) delete _impl_.source_context_; } @@ -1432,6 +1508,7 @@ void Enum::Clear() { _impl_.enumvalue_.Clear(); _impl_.options_.Clear(); _impl_.name_.ClearToEmpty(); + _impl_.edition_.ClearToEmpty(); if (GetArenaForAllocation() == nullptr && _impl_.source_context_ != nullptr) { delete _impl_.source_context_; } @@ -1504,6 +1581,17 @@ const char* Enum::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { goto handle_unusual; } continue; + // string edition = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) { + auto str = _internal_mutable_edition(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Enum.edition")); + } else { + goto handle_unusual; + } + continue; default: goto handle_unusual; } // switch @@ -1571,6 +1659,14 @@ failure: 5, this->_internal_syntax(), target); } + // string edition = 6; + if (!this->_internal_edition().empty()) { + const std::string& _s = this->_internal_edition(); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Enum.edition"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -1607,6 +1703,12 @@ failure: this->_internal_name()); } + // string edition = 6; + if (!this->_internal_edition().empty()) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_edition()); + } + // .google.protobuf.SourceContext source_context = 4; if (this->_internal_has_source_context()) { total_size += 1 + @@ -1643,6 +1745,9 @@ void Enum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_ if (!from._internal_name().empty()) { _this->_internal_set_name(from._internal_name()); } + if (!from._internal_edition().empty()) { + _this->_internal_set_edition(from._internal_edition()); + } if (from._internal_has_source_context()) { _this->_internal_mutable_source_context()->::PROTOBUF_NAMESPACE_ID::SourceContext::MergeFrom( from._internal_source_context()); @@ -1673,6 +1778,8 @@ void Enum::InternalSwap(Enum* other) { _impl_.options_.InternalSwap(&other->_impl_.options_); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.edition_, lhs_arena, + &other->_impl_.edition_, rhs_arena); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(Enum, _impl_.syntax_) + sizeof(Enum::_impl_.syntax_) diff --git a/src/google/protobuf/type.pb.h b/src/google/protobuf/type.pb.h index 98ca6fdcfe..59e4976222 100644 --- a/src/google/protobuf/type.pb.h +++ b/src/google/protobuf/type.pb.h @@ -168,6 +168,7 @@ inline bool Field_Cardinality_Parse(absl::string_view name, Field_Cardinality* v enum Syntax : int { SYNTAX_PROTO2 = 0, SYNTAX_PROTO3 = 1, + SYNTAX_EDITIONS = 2, Syntax_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::int32_t>::min(), Syntax_INT_MAX_SENTINEL_DO_NOT_USE_ = @@ -176,8 +177,8 @@ enum Syntax : int { PROTOBUF_EXPORT bool Syntax_IsValid(int value); constexpr Syntax Syntax_MIN = static_cast(0); -constexpr Syntax Syntax_MAX = static_cast(1); -constexpr int Syntax_ARRAYSIZE = 1 + 1; +constexpr Syntax Syntax_MAX = static_cast(2); +constexpr int Syntax_ARRAYSIZE = 2 + 1; PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Syntax_descriptor(); template @@ -190,7 +191,7 @@ const std::string& Syntax_Name(T value) { template <> inline const std::string& Syntax_Name(Syntax value) { return ::PROTOBUF_NAMESPACE_ID::internal::NameOfDenseEnum( + 0, 2>( static_cast(value)); } inline bool Syntax_Parse(absl::string_view name, Syntax* value) { @@ -334,6 +335,7 @@ class PROTOBUF_EXPORT Type final : kOneofsFieldNumber = 3, kOptionsFieldNumber = 4, kNameFieldNumber = 1, + kEditionFieldNumber = 7, kSourceContextFieldNumber = 5, kSyntaxFieldNumber = 6, }; @@ -420,6 +422,26 @@ class PROTOBUF_EXPORT Type final : const std::string& value); std::string* _internal_mutable_name(); + public: + // string edition = 7; + void clear_edition() ; + const std::string& edition() const; + + + + + template + void set_edition(Arg_&& arg, Args_... args); + std::string* mutable_edition(); + PROTOBUF_NODISCARD std::string* release_edition(); + void set_allocated_edition(std::string* ptr); + + private: + const std::string& _internal_edition() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_edition( + const std::string& value); + std::string* _internal_mutable_edition(); + public: // .google.protobuf.SourceContext source_context = 5; bool has_source_context() const; @@ -461,6 +483,7 @@ class PROTOBUF_EXPORT Type final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField oneofs_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr edition_; ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_; int syntax_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -968,6 +991,7 @@ class PROTOBUF_EXPORT Enum final : kEnumvalueFieldNumber = 2, kOptionsFieldNumber = 3, kNameFieldNumber = 1, + kEditionFieldNumber = 6, kSourceContextFieldNumber = 4, kSyntaxFieldNumber = 5, }; @@ -1026,6 +1050,26 @@ class PROTOBUF_EXPORT Enum final : const std::string& value); std::string* _internal_mutable_name(); + public: + // string edition = 6; + void clear_edition() ; + const std::string& edition() const; + + + + + template + void set_edition(Arg_&& arg, Args_... args); + std::string* mutable_edition(); + PROTOBUF_NODISCARD std::string* release_edition(); + void set_allocated_edition(std::string* ptr); + + private: + const std::string& _internal_edition() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_edition( + const std::string& value); + std::string* _internal_mutable_edition(); + public: // .google.protobuf.SourceContext source_context = 4; bool has_source_context() const; @@ -1066,6 +1110,7 @@ class PROTOBUF_EXPORT Enum final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::EnumValue > enumvalue_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::PROTOBUF_NAMESPACE_ID::Option > options_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr edition_; ::PROTOBUF_NAMESPACE_ID::SourceContext* source_context_; int syntax_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -1777,6 +1822,53 @@ inline void Type::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) { _impl_.syntax_ = value; } +// string edition = 7; +inline void Type::clear_edition() { + _impl_.edition_.ClearToEmpty(); +} +inline const std::string& Type::edition() const { + // @@protoc_insertion_point(field_get:google.protobuf.Type.edition) + return _internal_edition(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Type::set_edition(Arg_&& arg, + Args_... args) { + ; + _impl_.edition_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:google.protobuf.Type.edition) +} +inline std::string* Type::mutable_edition() { + std::string* _s = _internal_mutable_edition(); + // @@protoc_insertion_point(field_mutable:google.protobuf.Type.edition) + return _s; +} +inline const std::string& Type::_internal_edition() const { + return _impl_.edition_.Get(); +} +inline void Type::_internal_set_edition(const std::string& value) { + ; + + + _impl_.edition_.Set(value, GetArenaForAllocation()); +} +inline std::string* Type::_internal_mutable_edition() { + ; + return _impl_.edition_.Mutable( GetArenaForAllocation()); +} +inline std::string* Type::release_edition() { + // @@protoc_insertion_point(field_release:google.protobuf.Type.edition) + return _impl_.edition_.Release(); +} +inline void Type::set_allocated_edition(std::string* value) { + _impl_.edition_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.edition_.IsDefault()) { + _impl_.edition_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:google.protobuf.Type.edition) +} + // ------------------------------------------------------------------- // Field @@ -2340,6 +2432,53 @@ inline void Enum::_internal_set_syntax(::PROTOBUF_NAMESPACE_ID::Syntax value) { _impl_.syntax_ = value; } +// string edition = 6; +inline void Enum::clear_edition() { + _impl_.edition_.ClearToEmpty(); +} +inline const std::string& Enum::edition() const { + // @@protoc_insertion_point(field_get:google.protobuf.Enum.edition) + return _internal_edition(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Enum::set_edition(Arg_&& arg, + Args_... args) { + ; + _impl_.edition_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:google.protobuf.Enum.edition) +} +inline std::string* Enum::mutable_edition() { + std::string* _s = _internal_mutable_edition(); + // @@protoc_insertion_point(field_mutable:google.protobuf.Enum.edition) + return _s; +} +inline const std::string& Enum::_internal_edition() const { + return _impl_.edition_.Get(); +} +inline void Enum::_internal_set_edition(const std::string& value) { + ; + + + _impl_.edition_.Set(value, GetArenaForAllocation()); +} +inline std::string* Enum::_internal_mutable_edition() { + ; + return _impl_.edition_.Mutable( GetArenaForAllocation()); +} +inline std::string* Enum::release_edition() { + // @@protoc_insertion_point(field_release:google.protobuf.Enum.edition) + return _impl_.edition_.Release(); +} +inline void Enum::set_allocated_edition(std::string* value) { + _impl_.edition_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.edition_.IsDefault()) { + _impl_.edition_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:google.protobuf.Enum.edition) +} + // ------------------------------------------------------------------- // EnumValue