Internal feature.

PiperOrigin-RevId: 536519387
pull/12936/head
Protobuf Team Bot 2 years ago committed by Copybara-Service
parent 4ad5f54fe6
commit 64bcdfffe8
  1. 164
      src/google/protobuf/descriptor.pb.cc
  2. 40
      src/google/protobuf/descriptor.pb.h
  3. 5
      src/google/protobuf/descriptor.proto

@ -634,6 +634,7 @@ PROTOBUF_CONSTEXPR EnumValueOptions::EnumValueOptions(::_pbi::ConstantInitialize
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
/*decltype(_impl_.uninterpreted_option_)*/ {}, /*decltype(_impl_.uninterpreted_option_)*/ {},
/*decltype(_impl_.deprecated_)*/ false, /*decltype(_impl_.deprecated_)*/ false,
/*decltype(_impl_.debug_redact_)*/ false,
} {} } {}
struct EnumValueOptionsDefaultTypeInternal { struct EnumValueOptionsDefaultTypeInternal {
#if defined(PROTOBUF_CONSTINIT_DEFAULT_INSTANCES) #if defined(PROTOBUF_CONSTINIT_DEFAULT_INSTANCES)
@ -1263,8 +1264,10 @@ const ::uint32_t TableStruct_google_2fprotobuf_2fdescriptor_2eproto::offsets[] P
~0u, // no _split_ ~0u, // no _split_
~0u, // no sizeof(Split) ~0u, // no sizeof(Split)
PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _impl_.deprecated_), PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _impl_.deprecated_),
PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _impl_.debug_redact_),
PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _impl_.uninterpreted_option_), PROTOBUF_FIELD_OFFSET(::google::protobuf::EnumValueOptions, _impl_.uninterpreted_option_),
0, 0,
1,
~0u, ~0u,
PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::google::protobuf::ServiceOptions, _internal_metadata_),
@ -1403,15 +1406,15 @@ static const ::_pbi::MigrationSchema
{321, 341, -1, sizeof(::google::protobuf::FieldOptions)}, {321, 341, -1, sizeof(::google::protobuf::FieldOptions)},
{353, -1, -1, sizeof(::google::protobuf::OneofOptions)}, {353, -1, -1, sizeof(::google::protobuf::OneofOptions)},
{362, 374, -1, sizeof(::google::protobuf::EnumOptions)}, {362, 374, -1, sizeof(::google::protobuf::EnumOptions)},
{378, 388, -1, sizeof(::google::protobuf::EnumValueOptions)}, {378, 389, -1, sizeof(::google::protobuf::EnumValueOptions)},
{390, 400, -1, sizeof(::google::protobuf::ServiceOptions)}, {392, 402, -1, sizeof(::google::protobuf::ServiceOptions)},
{402, 413, -1, sizeof(::google::protobuf::MethodOptions)}, {404, 415, -1, sizeof(::google::protobuf::MethodOptions)},
{416, 426, -1, sizeof(::google::protobuf::UninterpretedOption_NamePart)}, {418, 428, -1, sizeof(::google::protobuf::UninterpretedOption_NamePart)},
{428, 443, -1, sizeof(::google::protobuf::UninterpretedOption)}, {430, 445, -1, sizeof(::google::protobuf::UninterpretedOption)},
{450, 463, -1, sizeof(::google::protobuf::SourceCodeInfo_Location)}, {452, 465, -1, sizeof(::google::protobuf::SourceCodeInfo_Location)},
{468, -1, -1, sizeof(::google::protobuf::SourceCodeInfo)}, {470, -1, -1, sizeof(::google::protobuf::SourceCodeInfo)},
{477, 490, -1, sizeof(::google::protobuf::GeneratedCodeInfo_Annotation)}, {479, 492, -1, sizeof(::google::protobuf::GeneratedCodeInfo_Annotation)},
{495, -1, -1, sizeof(::google::protobuf::GeneratedCodeInfo)}, {497, -1, -1, sizeof(::google::protobuf::GeneratedCodeInfo)},
}; };
static const ::_pb::Message* const file_default_instances[] = { static const ::_pb::Message* const file_default_instances[] = {
@ -1589,50 +1592,51 @@ const char descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto[] PR
"cated\030\003 \001(\010:\005false\0222\n&deprecated_legacy_" "cated\030\003 \001(\010:\005false\0222\n&deprecated_legacy_"
"json_field_conflicts\030\006 \001(\010B\002\030\001\022C\n\024uninte" "json_field_conflicts\030\006 \001(\010B\002\030\001\022C\n\024uninte"
"rpreted_option\030\347\007 \003(\0132$.google.protobuf." "rpreted_option\030\347\007 \003(\0132$.google.protobuf."
"UninterpretedOption*\t\010\350\007\020\200\200\200\200\002J\004\010\005\020\006\"}\n\020" "UninterpretedOption*\t\010\350\007\020\200\200\200\200\002J\004\010\005\020\006\"\232\001\n"
"EnumValueOptions\022\031\n\ndeprecated\030\001 \001(\010:\005fa" "\020EnumValueOptions\022\031\n\ndeprecated\030\001 \001(\010:\005f"
"lse\022C\n\024uninterpreted_option\030\347\007 \003(\0132$.goo" "alse\022\033\n\014debug_redact\030\003 \001(\010:\005false\022C\n\024uni"
"gle.protobuf.UninterpretedOption*\t\010\350\007\020\200\200" "nterpreted_option\030\347\007 \003(\0132$.google.protob"
"\200\200\002\"{\n\016ServiceOptions\022\031\n\ndeprecated\030! \001(" "uf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"{\n\016Ser"
"\010:\005false\022C\n\024uninterpreted_option\030\347\007 \003(\0132" "viceOptions\022\031\n\ndeprecated\030! \001(\010:\005false\022C"
"$.google.protobuf.UninterpretedOption*\t\010" "\n\024uninterpreted_option\030\347\007 \003(\0132$.google.p"
"\350\007\020\200\200\200\200\002\"\255\002\n\rMethodOptions\022\031\n\ndeprecated" "rotobuf.UninterpretedOption*\t\010\350\007\020\200\200\200\200\002\"\255"
"\030! \001(\010:\005false\022_\n\021idempotency_level\030\" \001(\016" "\002\n\rMethodOptions\022\031\n\ndeprecated\030! \001(\010:\005fa"
"2/.google.protobuf.MethodOptions.Idempot" "lse\022_\n\021idempotency_level\030\" \001(\0162/.google."
"encyLevel:\023IDEMPOTENCY_UNKNOWN\022C\n\024uninte" "protobuf.MethodOptions.IdempotencyLevel:"
"rpreted_option\030\347\007 \003(\0132$.google.protobuf." "\023IDEMPOTENCY_UNKNOWN\022C\n\024uninterpreted_op"
"UninterpretedOption\"P\n\020IdempotencyLevel\022" "tion\030\347\007 \003(\0132$.google.protobuf.Uninterpre"
"\027\n\023IDEMPOTENCY_UNKNOWN\020\000\022\023\n\017NO_SIDE_EFFE" "tedOption\"P\n\020IdempotencyLevel\022\027\n\023IDEMPOT"
"CTS\020\001\022\016\n\nIDEMPOTENT\020\002*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023Uni" "ENCY_UNKNOWN\020\000\022\023\n\017NO_SIDE_EFFECTS\020\001\022\016\n\nI"
"nterpretedOption\022;\n\004name\030\002 \003(\0132-.google." "DEMPOTENT\020\002*\t\010\350\007\020\200\200\200\200\002\"\236\002\n\023Uninterpreted"
"protobuf.UninterpretedOption.NamePart\022\030\n" "Option\022;\n\004name\030\002 \003(\0132-.google.protobuf.U"
"\020identifier_value\030\003 \001(\t\022\032\n\022positive_int_" "ninterpretedOption.NamePart\022\030\n\020identifie"
"value\030\004 \001(\004\022\032\n\022negative_int_value\030\005 \001(\003\022" "r_value\030\003 \001(\t\022\032\n\022positive_int_value\030\004 \001("
"\024\n\014double_value\030\006 \001(\001\022\024\n\014string_value\030\007 " "\004\022\032\n\022negative_int_value\030\005 \001(\003\022\024\n\014double_"
"\001(\014\022\027\n\017aggregate_value\030\010 \001(\t\0323\n\010NamePart" "value\030\006 \001(\001\022\024\n\014string_value\030\007 \001(\014\022\027\n\017agg"
"\022\021\n\tname_part\030\001 \002(\t\022\024\n\014is_extension\030\002 \002(" "regate_value\030\010 \001(\t\0323\n\010NamePart\022\021\n\tname_p"
"\010\"\325\001\n\016SourceCodeInfo\022:\n\010location\030\001 \003(\0132(" "art\030\001 \002(\t\022\024\n\014is_extension\030\002 \002(\010\"\325\001\n\016Sour"
".google.protobuf.SourceCodeInfo.Location" "ceCodeInfo\022:\n\010location\030\001 \003(\0132(.google.pr"
"\032\206\001\n\010Location\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004span\030" "otobuf.SourceCodeInfo.Location\032\206\001\n\010Locat"
"\002 \003(\005B\002\020\001\022\030\n\020leading_comments\030\003 \001(\t\022\031\n\021t" "ion\022\020\n\004path\030\001 \003(\005B\002\020\001\022\020\n\004span\030\002 \003(\005B\002\020\001\022"
"railing_comments\030\004 \001(\t\022!\n\031leading_detach" "\030\n\020leading_comments\030\003 \001(\t\022\031\n\021trailing_co"
"ed_comments\030\006 \003(\t\"\234\002\n\021GeneratedCodeInfo\022" "mments\030\004 \001(\t\022!\n\031leading_detached_comment"
"A\n\nannotation\030\001 \003(\0132-.google.protobuf.Ge" "s\030\006 \003(\t\"\234\002\n\021GeneratedCodeInfo\022A\n\nannotat"
"neratedCodeInfo.Annotation\032\303\001\n\nAnnotatio" "ion\030\001 \003(\0132-.google.protobuf.GeneratedCod"
"n\022\020\n\004path\030\001 \003(\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t" "eInfo.Annotation\032\303\001\n\nAnnotation\022\020\n\004path\030"
"\022\r\n\005begin\030\003 \001(\005\022\013\n\003end\030\004 \001(\005\022H\n\010semantic" "\001 \003(\005B\002\020\001\022\023\n\013source_file\030\002 \001(\t\022\r\n\005begin\030"
"\030\005 \001(\01626.google.protobuf.GeneratedCodeIn" "\003 \001(\005\022\013\n\003end\030\004 \001(\005\022H\n\010semantic\030\005 \001(\01626.g"
"fo.Annotation.Semantic\"(\n\010Semantic\022\010\n\004NO" "oogle.protobuf.GeneratedCodeInfo.Annotat"
"NE\020\000\022\007\n\003SET\020\001\022\t\n\005ALIAS\020\002B~\n\023com.google.p" "ion.Semantic\"(\n\010Semantic\022\010\n\004NONE\020\000\022\007\n\003SE"
"rotobufB\020DescriptorProtosH\001Z-google.gola" "T\020\001\022\t\n\005ALIAS\020\002B~\n\023com.google.protobufB\020D"
"ng.org/protobuf/types/descriptorpb\370\001\001\242\002\003" "escriptorProtosH\001Z-google.golang.org/pro"
"GPB\252\002\032Google.Protobuf.Reflection" "tobuf/types/descriptorpb\370\001\001\242\002\003GPB\252\002\032Goog"
"le.Protobuf.Reflection"
}; };
static ::absl::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once; static ::absl::once_flag descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = { const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fdescriptor_2eproto = {
false, false,
false, false,
7272, 7302,
descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto, descriptor_table_protodef_google_2fprotobuf_2fdescriptor_2eproto,
"google/protobuf/descriptor.proto", "google/protobuf/descriptor.proto",
&descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once, &descriptor_table_google_2fprotobuf_2fdescriptor_2eproto_once,
@ -9220,6 +9224,9 @@ class EnumValueOptions::_Internal {
static void set_has_deprecated(HasBits* has_bits) { static void set_has_deprecated(HasBits* has_bits) {
(*has_bits)[0] |= 1u; (*has_bits)[0] |= 1u;
} }
static void set_has_debug_redact(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
}; };
EnumValueOptions::EnumValueOptions(::google::protobuf::Arena* arena) EnumValueOptions::EnumValueOptions(::google::protobuf::Arena* arena)
@ -9236,12 +9243,15 @@ EnumValueOptions::EnumValueOptions(const EnumValueOptions& from) : ::google::pro
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_}, decltype(_impl_.uninterpreted_option_){from._impl_.uninterpreted_option_},
decltype(_impl_.deprecated_){}, decltype(_impl_.deprecated_){},
decltype(_impl_.debug_redact_){},
}; };
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_); from._internal_metadata_);
_impl_._extensions_.MergeFrom(internal_default_instance(), _impl_._extensions_.MergeFrom(internal_default_instance(),
from._impl_._extensions_); from._impl_._extensions_);
_this->_impl_.deprecated_ = from._impl_.deprecated_; ::memcpy(&_impl_.deprecated_, &from._impl_.deprecated_,
static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.debug_redact_) -
reinterpret_cast<char*>(&_impl_.deprecated_)) + sizeof(_impl_.debug_redact_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions) // @@protoc_insertion_point(copy_constructor:google.protobuf.EnumValueOptions)
} }
@ -9253,6 +9263,7 @@ inline void EnumValueOptions::SharedCtor(::_pb::Arena* arena) {
/*decltype(_impl_._cached_size_)*/ {}, /*decltype(_impl_._cached_size_)*/ {},
decltype(_impl_.uninterpreted_option_){arena}, decltype(_impl_.uninterpreted_option_){arena},
decltype(_impl_.deprecated_){false}, decltype(_impl_.deprecated_){false},
decltype(_impl_.debug_redact_){false},
}; };
} }
EnumValueOptions::~EnumValueOptions() { EnumValueOptions::~EnumValueOptions() {
@ -9277,7 +9288,9 @@ PROTOBUF_NOINLINE void EnumValueOptions::Clear() {
_impl_._extensions_.Clear(); _impl_._extensions_.Clear();
_internal_mutable_uninterpreted_option()->Clear(); _internal_mutable_uninterpreted_option()->Clear();
_impl_.deprecated_ = false; ::memset(&_impl_.deprecated_, 0, static_cast<::size_t>(
reinterpret_cast<char*>(&_impl_.debug_redact_) -
reinterpret_cast<char*>(&_impl_.deprecated_)) + sizeof(_impl_.debug_redact_));
_impl_._has_bits_.Clear(); _impl_._has_bits_.Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
} }
@ -9289,15 +9302,15 @@ const char* EnumValueOptions::_InternalParse(
} }
constexpr ::_pbi::TcParseTable<2, 2, 1, 0, 7> EnumValueOptions::_table_ = { constexpr ::_pbi::TcParseTable<2, 3, 1, 0, 7> EnumValueOptions::_table_ = {
{ {
PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_._has_bits_),
PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_._extensions_), PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_._extensions_),
999, 24, // max_field_number, fast_idx_mask 999, 24, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table), offsetof(decltype(_table_), field_lookup_table),
4294967294, // skipmap 4294967290, // skipmap
offsetof(decltype(_table_), field_entries), offsetof(decltype(_table_), field_entries),
2, // num_field_entries 3, // num_field_entries
1, // num_aux_entries 1, // num_aux_entries
offsetof(decltype(_table_), aux_entries), offsetof(decltype(_table_), aux_entries),
&_EnumValueOptions_default_instance_._instance, &_EnumValueOptions_default_instance_._instance,
@ -9308,17 +9321,20 @@ constexpr ::_pbi::TcParseTable<2, 2, 1, 0, 7> EnumValueOptions::_table_ = {
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(EnumValueOptions, _impl_.deprecated_), 0>(), {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(EnumValueOptions, _impl_.deprecated_), 0>(),
{8, 0, 0, PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.deprecated_)}}, {8, 0, 0, PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.deprecated_)}},
{::_pbi::TcParser::MiniParse, {}}, {::_pbi::TcParser::MiniParse, {}},
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; // optional bool debug_redact = 3 [default = false];
{::_pbi::TcParser::FastMtR2, {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(EnumValueOptions, _impl_.debug_redact_), 1>(),
{16058, 63, 0, PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.uninterpreted_option_)}}, {24, 1, 0, PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.debug_redact_)}},
}}, {{ }}, {{
999, 0, 1, 999, 0, 1,
65534, 1, 65534, 2,
65535, 65535 65535, 65535
}}, {{ }}, {{
// optional bool deprecated = 1 [default = false]; // optional bool deprecated = 1 [default = false];
{PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.deprecated_), _Internal::kHasBitsOffset + 0, 0, {PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.deprecated_), _Internal::kHasBitsOffset + 0, 0,
(0 | ::_fl::kFcOptional | ::_fl::kBool)}, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
// optional bool debug_redact = 3 [default = false];
{PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.debug_redact_), _Internal::kHasBitsOffset + 1, 0,
(0 | ::_fl::kFcOptional | ::_fl::kBool)},
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
{PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.uninterpreted_option_), -1, 0, {PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.uninterpreted_option_), -1, 0,
(0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
@ -9343,6 +9359,13 @@ constexpr ::_pbi::TcParseTable<2, 2, 1, 0, 7> EnumValueOptions::_table_ = {
1, this->_internal_deprecated(), target); 1, this->_internal_deprecated(), target);
} }
// optional bool debug_redact = 3 [default = false];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(
3, this->_internal_debug_redact(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (unsigned i = 0, for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_uninterpreted_option_size()); i < n; i++) { n = static_cast<unsigned>(this->_internal_uninterpreted_option_size()); i < n; i++) {
@ -9379,12 +9402,19 @@ constexpr ::_pbi::TcParseTable<2, 2, 1, 0, 7> EnumValueOptions::_table_ = {
total_size += total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(msg); ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
} }
// optional bool deprecated = 1 [default = false];
cached_has_bits = _impl_._has_bits_[0]; cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional bool deprecated = 1 [default = false];
if (cached_has_bits & 0x00000001u) { if (cached_has_bits & 0x00000001u) {
total_size += 2; total_size += 2;
} }
// optional bool debug_redact = 3 [default = false];
if (cached_has_bits & 0x00000002u) {
total_size += 2;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} }
@ -9404,8 +9434,15 @@ void EnumValueOptions::MergeImpl(::google::protobuf::Message& to_msg, const ::go
(void) cached_has_bits; (void) cached_has_bits;
_this->_internal_mutable_uninterpreted_option()->MergeFrom(from._internal_uninterpreted_option()); _this->_internal_mutable_uninterpreted_option()->MergeFrom(from._internal_uninterpreted_option());
if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) { cached_has_bits = from._impl_._has_bits_[0];
_this->_internal_set_deprecated(from._internal_deprecated()); if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_this->_impl_.deprecated_ = from._impl_.deprecated_;
}
if (cached_has_bits & 0x00000002u) {
_this->_impl_.debug_redact_ = from._impl_.debug_redact_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
} }
_this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_); _this->_impl_._extensions_.MergeFrom(internal_default_instance(), from._impl_._extensions_);
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
@ -9433,7 +9470,12 @@ void EnumValueOptions::InternalSwap(EnumValueOptions* other) {
_internal_metadata_.InternalSwap(&other->_internal_metadata_); _internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_internal_mutable_uninterpreted_option()->InternalSwap(other->_internal_mutable_uninterpreted_option()); _internal_mutable_uninterpreted_option()->InternalSwap(other->_internal_mutable_uninterpreted_option());
swap(_impl_.deprecated_, other->_impl_.deprecated_); ::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.debug_redact_)
+ sizeof(EnumValueOptions::_impl_.debug_redact_)
- PROTOBUF_FIELD_OFFSET(EnumValueOptions, _impl_.deprecated_)>(
reinterpret_cast<char*>(&_impl_.deprecated_),
reinterpret_cast<char*>(&other->_impl_.deprecated_));
} }
::google::protobuf::Metadata EnumValueOptions::GetMetadata() const { ::google::protobuf::Metadata EnumValueOptions::GetMetadata() const {

@ -6462,6 +6462,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
enum : int { enum : int {
kUninterpretedOptionFieldNumber = 999, kUninterpretedOptionFieldNumber = 999,
kDeprecatedFieldNumber = 1, kDeprecatedFieldNumber = 1,
kDebugRedactFieldNumber = 3,
}; };
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
int uninterpreted_option_size() const; int uninterpreted_option_size() const;
@ -6491,6 +6492,17 @@ class PROTOBUF_EXPORT EnumValueOptions final :
bool _internal_deprecated() const; bool _internal_deprecated() const;
void _internal_set_deprecated(bool value); void _internal_set_deprecated(bool value);
public:
// optional bool debug_redact = 3 [default = false];
bool has_debug_redact() const;
void clear_debug_redact() ;
bool debug_redact() const;
void set_debug_redact(bool value);
private:
bool _internal_debug_redact() const;
void _internal_set_debug_redact(bool value);
public: public:
template <typename _proto_TypeTraits, ::google::protobuf::internal::FieldType _field_type, template <typename _proto_TypeTraits, ::google::protobuf::internal::FieldType _field_type,
bool _is_packed> bool _is_packed>
@ -6648,7 +6660,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
class _Internal; class _Internal;
friend class ::google::protobuf::internal::TcParser; friend class ::google::protobuf::internal::TcParser;
static const ::google::protobuf::internal::TcParseTable<2, 2, 1, 0, 7> _table_; static const ::google::protobuf::internal::TcParseTable<2, 3, 1, 0, 7> _table_;
template <typename T> friend class ::google::protobuf::Arena::InternalHelper; template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
typedef void InternalArenaConstructable_; typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_; typedef void DestructorSkippable_;
@ -6659,6 +6671,7 @@ class PROTOBUF_EXPORT EnumValueOptions final :
mutable ::google::protobuf::internal::CachedSize _cached_size_; mutable ::google::protobuf::internal::CachedSize _cached_size_;
::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_; ::google::protobuf::RepeatedPtrField< ::google::protobuf::UninterpretedOption > uninterpreted_option_;
bool deprecated_; bool deprecated_;
bool debug_redact_;
}; };
union { Impl_ _impl_; }; union { Impl_ _impl_; };
friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto; friend struct ::TableStruct_google_2fprotobuf_2fdescriptor_2eproto;
@ -13967,6 +13980,31 @@ inline void EnumValueOptions::_internal_set_deprecated(bool value) {
_impl_.deprecated_ = value; _impl_.deprecated_ = value;
} }
// optional bool debug_redact = 3 [default = false];
inline bool EnumValueOptions::has_debug_redact() const {
bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
return value;
}
inline void EnumValueOptions::clear_debug_redact() {
_impl_.debug_redact_ = false;
_impl_._has_bits_[0] &= ~0x00000002u;
}
inline bool EnumValueOptions::debug_redact() const {
// @@protoc_insertion_point(field_get:google.protobuf.EnumValueOptions.debug_redact)
return _internal_debug_redact();
}
inline void EnumValueOptions::set_debug_redact(bool value) {
_internal_set_debug_redact(value);
// @@protoc_insertion_point(field_set:google.protobuf.EnumValueOptions.debug_redact)
}
inline bool EnumValueOptions::_internal_debug_redact() const {
return _impl_.debug_redact_;
}
inline void EnumValueOptions::_internal_set_debug_redact(bool value) {
_impl_._has_bits_[0] |= 0x00000002u;
_impl_.debug_redact_ = value;
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; // repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
inline int EnumValueOptions::_internal_uninterpreted_option_size() const { inline int EnumValueOptions::_internal_uninterpreted_option_size() const {
return _internal_uninterpreted_option().size(); return _internal_uninterpreted_option().size();

@ -767,6 +767,11 @@ message EnumValueOptions {
// this is a formalization for deprecating enum values. // this is a formalization for deprecating enum values.
optional bool deprecated = 1 [default = false]; optional bool deprecated = 1 [default = false];
// Indicate that fields annotated with this enum value should not be printed
// out when using debug formats, e.g. when the field contains sensitive
// credentials.
optional bool debug_redact = 3 [default = false];
// The parser stores options it doesn't recognize here. See above. // The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999; repeated UninterpretedOption uninterpreted_option = 999;

Loading…
Cancel
Save