Auto-generate files after cl/538323872

pull/12564/head
Protobuf Team Bot 1 year ago
parent 92e81e7cd5
commit 947d4c37cf
  1. 20
      src/google/protobuf/field_mask.pb.cc
  2. 35
      src/google/protobuf/field_mask.pb.h
  3. 20
      src/google/protobuf/type.pb.cc
  4. 35
      src/google/protobuf/type.pb.h

@ -149,7 +149,7 @@ FieldMask::~FieldMask() {
} }
inline void FieldMask::SharedDtor() { inline void FieldMask::SharedDtor() {
ABSL_DCHECK(GetArenaForAllocation() == nullptr); ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.paths_.~RepeatedPtrField(); _internal_mutable_paths()->~RepeatedPtrField();
} }
void FieldMask::SetCachedSize(int size) const { void FieldMask::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size); _impl_._cached_size_.Set(size);
@ -161,7 +161,7 @@ PROTOBUF_NOINLINE void FieldMask::Clear() {
// Prevent compiler warnings about cached_has_bits being unused // Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits; (void) cached_has_bits;
_impl_.paths_.Clear(); _internal_mutable_paths()->Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
} }
@ -213,8 +213,8 @@ const ::_pbi::TcParseTable<0, 1, 0, 39, 2> FieldMask::_table_ = {
(void)cached_has_bits; (void)cached_has_bits;
// repeated string paths = 1; // repeated string paths = 1;
for (int i = 0, n = this->_impl_.paths_.size(); i < n; ++i) { for (int i = 0, n = this->_internal_paths_size(); i < n; ++i) {
const auto& s = this->_impl_.paths_.Get(i); const auto& s = this->_internal_paths().Get(i);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths"); s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.FieldMask.paths");
target = stream->WriteString(1, s, target); target = stream->WriteString(1, s, target);
@ -238,9 +238,10 @@ const ::_pbi::TcParseTable<0, 1, 0, 39, 2> FieldMask::_table_ = {
(void) cached_has_bits; (void) cached_has_bits;
// repeated string paths = 1; // repeated string paths = 1;
total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.paths_.size()); total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_paths().size());
for (int i = 0, n = _impl_.paths_.size(); i < n; ++i) { for (int i = 0, n = _internal_paths().size(); i < n; ++i) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.paths_.Get(i)); total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
_internal_paths().Get(i));
} }
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} }
@ -260,7 +261,7 @@ void FieldMask::MergeImpl(::google::protobuf::Message& to_msg, const ::google::p
::uint32_t cached_has_bits = 0; ::uint32_t cached_has_bits = 0;
(void) cached_has_bits; (void) cached_has_bits;
_this->_impl_.paths_.MergeFrom(from._impl_.paths_); _this->_internal_mutable_paths()->MergeFrom(from._internal_paths());
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
} }
@ -278,7 +279,8 @@ PROTOBUF_NOINLINE bool FieldMask::IsInitialized() const {
void FieldMask::InternalSwap(FieldMask* other) { void FieldMask::InternalSwap(FieldMask* other) {
using std::swap; using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_); _internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.paths_.InternalSwap(&other->_impl_.paths_); _internal_mutable_paths()->InternalSwap(
other->_internal_mutable_paths());
} }
::google::protobuf::Metadata FieldMask::GetMetadata() const { ::google::protobuf::Metadata FieldMask::GetMetadata() const {

@ -270,72 +270,75 @@ inline int FieldMask::paths_size() const {
return _internal_paths_size(); return _internal_paths_size();
} }
inline void FieldMask::clear_paths() { inline void FieldMask::clear_paths() {
_impl_.paths_.Clear(); _internal_mutable_paths()->Clear();
} }
inline std::string* FieldMask::add_paths() { inline std::string* FieldMask::add_paths() {
std::string* _s = _impl_.paths_.Add(); std::string* _s = _internal_mutable_paths()->Add();
// @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths)
return _s; return _s;
} }
inline const std::string& FieldMask::paths(int index) const { inline const std::string& FieldMask::paths(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths)
return _impl_.paths_.Get(index); return _internal_paths().Get(index);
} }
inline std::string* FieldMask::mutable_paths(int index) { inline std::string* FieldMask::mutable_paths(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths)
return _impl_.paths_.Mutable(index); return _internal_mutable_paths()->Mutable(index);
} }
inline void FieldMask::set_paths(int index, const std::string& value) { inline void FieldMask::set_paths(int index, const std::string& value) {
_impl_.paths_.Mutable(index)->assign(value); _internal_mutable_paths()->Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::set_paths(int index, std::string&& value) { inline void FieldMask::set_paths(int index, std::string&& value) {
_impl_.paths_.Mutable(index)->assign(std::move(value)); _internal_mutable_paths()->Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::set_paths(int index, const char* value) { inline void FieldMask::set_paths(int index, const char* value) {
ABSL_DCHECK(value != nullptr); ABSL_DCHECK(value != nullptr);
_impl_.paths_.Mutable(index)->assign(value); _internal_mutable_paths()->Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::set_paths(int index, const char* value, inline void FieldMask::set_paths(int index, const char* value,
std::size_t size) { std::size_t size) {
_impl_.paths_.Mutable(index)->assign(reinterpret_cast<const char*>(value), size); _internal_mutable_paths()->Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::set_paths(int index, absl::string_view value) { inline void FieldMask::set_paths(int index, absl::string_view value) {
_impl_.paths_.Mutable(index)->assign(value.data(), value.size()); _internal_mutable_paths()->Mutable(index)->assign(value.data(),
value.size());
// @@protoc_insertion_point(field_set_string_piece:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_set_string_piece:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::add_paths(const std::string& value) { inline void FieldMask::add_paths(const std::string& value) {
_impl_.paths_.Add()->assign(value); _internal_mutable_paths()->Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::add_paths(std::string&& value) { inline void FieldMask::add_paths(std::string&& value) {
_impl_.paths_.Add(std::move(value)); _internal_mutable_paths()->Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::add_paths(const char* value) { inline void FieldMask::add_paths(const char* value) {
ABSL_DCHECK(value != nullptr); ABSL_DCHECK(value != nullptr);
_impl_.paths_.Add()->assign(value); _internal_mutable_paths()->Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::add_paths(const char* value, std::size_t size) { inline void FieldMask::add_paths(const char* value, std::size_t size) {
_impl_.paths_.Add()->assign(reinterpret_cast<const char*>(value), size); _internal_mutable_paths()->Add()->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths)
} }
inline void FieldMask::add_paths(absl::string_view value) { inline void FieldMask::add_paths(absl::string_view value) {
_impl_.paths_.Add()->assign(value.data(), value.size()); _internal_mutable_paths()->Add()->assign(value.data(), value.size());
// @@protoc_insertion_point(field_add_string_piece:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_add_string_piece:google.protobuf.FieldMask.paths)
} }
inline const ::google::protobuf::RepeatedPtrField<std::string>& inline const ::google::protobuf::RepeatedPtrField<std::string>&
FieldMask::paths() const { FieldMask::paths() const {
// @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths)
return _impl_.paths_; return _internal_paths();
} }
inline ::google::protobuf::RepeatedPtrField<std::string>* FieldMask::mutable_paths() { inline ::google::protobuf::RepeatedPtrField<std::string>* FieldMask::mutable_paths() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths) // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths)
return &_impl_.paths_; return _internal_mutable_paths();
} }
inline const ::google::protobuf::RepeatedPtrField<std::string>& inline const ::google::protobuf::RepeatedPtrField<std::string>&
FieldMask::_internal_paths() const { FieldMask::_internal_paths() const {

@ -546,7 +546,7 @@ Type::~Type() {
inline void Type::SharedDtor() { inline void Type::SharedDtor() {
ABSL_DCHECK(GetArenaForAllocation() == nullptr); ABSL_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.fields_.~RepeatedPtrField(); _impl_.fields_.~RepeatedPtrField();
_impl_.oneofs_.~RepeatedPtrField(); _internal_mutable_oneofs()->~RepeatedPtrField();
_impl_.options_.~RepeatedPtrField(); _impl_.options_.~RepeatedPtrField();
_impl_.name_.Destroy(); _impl_.name_.Destroy();
_impl_.edition_.Destroy(); _impl_.edition_.Destroy();
@ -563,7 +563,7 @@ PROTOBUF_NOINLINE void Type::Clear() {
(void) cached_has_bits; (void) cached_has_bits;
_internal_mutable_fields()->Clear(); _internal_mutable_fields()->Clear();
_impl_.oneofs_.Clear(); _internal_mutable_oneofs()->Clear();
_internal_mutable_options()->Clear(); _internal_mutable_options()->Clear();
_impl_.name_.ClearToEmpty(); _impl_.name_.ClearToEmpty();
_impl_.edition_.ClearToEmpty(); _impl_.edition_.ClearToEmpty();
@ -682,8 +682,8 @@ const ::_pbi::TcParseTable<3, 7, 3, 46, 2> Type::_table_ = {
} }
// repeated string oneofs = 3; // repeated string oneofs = 3;
for (int i = 0, n = this->_impl_.oneofs_.size(); i < n; ++i) { for (int i = 0, n = this->_internal_oneofs_size(); i < n; ++i) {
const auto& s = this->_impl_.oneofs_.Get(i); const auto& s = this->_internal_oneofs().Get(i);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs"); s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Type.oneofs");
target = stream->WriteString(3, s, target); target = stream->WriteString(3, s, target);
@ -744,9 +744,10 @@ const ::_pbi::TcParseTable<3, 7, 3, 46, 2> Type::_table_ = {
::google::protobuf::internal::WireFormatLite::MessageSize(msg); ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
} }
// repeated string oneofs = 3; // repeated string oneofs = 3;
total_size += 1 * ::google::protobuf::internal::FromIntSize(_impl_.oneofs_.size()); total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_oneofs().size());
for (int i = 0, n = _impl_.oneofs_.size(); i < n; ++i) { for (int i = 0, n = _internal_oneofs().size(); i < n; ++i) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(_impl_.oneofs_.Get(i)); total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
_internal_oneofs().Get(i));
} }
// repeated .google.protobuf.Option options = 4; // repeated .google.protobuf.Option options = 4;
total_size += 1UL * this->_internal_options_size(); total_size += 1UL * this->_internal_options_size();
@ -799,7 +800,7 @@ void Type::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protob
(void) cached_has_bits; (void) cached_has_bits;
_this->_internal_mutable_fields()->MergeFrom(from._internal_fields()); _this->_internal_mutable_fields()->MergeFrom(from._internal_fields());
_this->_impl_.oneofs_.MergeFrom(from._impl_.oneofs_); _this->_internal_mutable_oneofs()->MergeFrom(from._internal_oneofs());
_this->_internal_mutable_options()->MergeFrom(from._internal_options()); _this->_internal_mutable_options()->MergeFrom(from._internal_options());
if (!from._internal_name().empty()) { if (!from._internal_name().empty()) {
_this->_internal_set_name(from._internal_name()); _this->_internal_set_name(from._internal_name());
@ -835,7 +836,8 @@ void Type::InternalSwap(Type* 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_fields()->InternalSwap(other->_internal_mutable_fields()); _internal_mutable_fields()->InternalSwap(other->_internal_mutable_fields());
_impl_.oneofs_.InternalSwap(&other->_impl_.oneofs_); _internal_mutable_oneofs()->InternalSwap(
other->_internal_mutable_oneofs());
_internal_mutable_options()->InternalSwap(other->_internal_mutable_options()); _internal_mutable_options()->InternalSwap(other->_internal_mutable_options());
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena, ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, lhs_arena,
&other->_impl_.name_, rhs_arena); &other->_impl_.name_, rhs_arena);

@ -1585,72 +1585,75 @@ inline int Type::oneofs_size() const {
return _internal_oneofs_size(); return _internal_oneofs_size();
} }
inline void Type::clear_oneofs() { inline void Type::clear_oneofs() {
_impl_.oneofs_.Clear(); _internal_mutable_oneofs()->Clear();
} }
inline std::string* Type::add_oneofs() { inline std::string* Type::add_oneofs() {
std::string* _s = _impl_.oneofs_.Add(); std::string* _s = _internal_mutable_oneofs()->Add();
// @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_add_mutable:google.protobuf.Type.oneofs)
return _s; return _s;
} }
inline const std::string& Type::oneofs(int index) const { inline const std::string& Type::oneofs(int index) const {
// @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_get:google.protobuf.Type.oneofs)
return _impl_.oneofs_.Get(index); return _internal_oneofs().Get(index);
} }
inline std::string* Type::mutable_oneofs(int index) { inline std::string* Type::mutable_oneofs(int index) {
// @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_mutable:google.protobuf.Type.oneofs)
return _impl_.oneofs_.Mutable(index); return _internal_mutable_oneofs()->Mutable(index);
} }
inline void Type::set_oneofs(int index, const std::string& value) { inline void Type::set_oneofs(int index, const std::string& value) {
_impl_.oneofs_.Mutable(index)->assign(value); _internal_mutable_oneofs()->Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
} }
inline void Type::set_oneofs(int index, std::string&& value) { inline void Type::set_oneofs(int index, std::string&& value) {
_impl_.oneofs_.Mutable(index)->assign(std::move(value)); _internal_mutable_oneofs()->Mutable(index)->assign(std::move(value));
// @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_set:google.protobuf.Type.oneofs)
} }
inline void Type::set_oneofs(int index, const char* value) { inline void Type::set_oneofs(int index, const char* value) {
ABSL_DCHECK(value != nullptr); ABSL_DCHECK(value != nullptr);
_impl_.oneofs_.Mutable(index)->assign(value); _internal_mutable_oneofs()->Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_set_char:google.protobuf.Type.oneofs)
} }
inline void Type::set_oneofs(int index, const char* value, inline void Type::set_oneofs(int index, const char* value,
std::size_t size) { std::size_t size) {
_impl_.oneofs_.Mutable(index)->assign(reinterpret_cast<const char*>(value), size); _internal_mutable_oneofs()->Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_set_pointer:google.protobuf.Type.oneofs)
} }
inline void Type::set_oneofs(int index, absl::string_view value) { inline void Type::set_oneofs(int index, absl::string_view value) {
_impl_.oneofs_.Mutable(index)->assign(value.data(), value.size()); _internal_mutable_oneofs()->Mutable(index)->assign(value.data(),
value.size());
// @@protoc_insertion_point(field_set_string_piece:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_set_string_piece:google.protobuf.Type.oneofs)
} }
inline void Type::add_oneofs(const std::string& value) { inline void Type::add_oneofs(const std::string& value) {
_impl_.oneofs_.Add()->assign(value); _internal_mutable_oneofs()->Add()->assign(value);
// @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
} }
inline void Type::add_oneofs(std::string&& value) { inline void Type::add_oneofs(std::string&& value) {
_impl_.oneofs_.Add(std::move(value)); _internal_mutable_oneofs()->Add(std::move(value));
// @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_add:google.protobuf.Type.oneofs)
} }
inline void Type::add_oneofs(const char* value) { inline void Type::add_oneofs(const char* value) {
ABSL_DCHECK(value != nullptr); ABSL_DCHECK(value != nullptr);
_impl_.oneofs_.Add()->assign(value); _internal_mutable_oneofs()->Add()->assign(value);
// @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_add_char:google.protobuf.Type.oneofs)
} }
inline void Type::add_oneofs(const char* value, std::size_t size) { inline void Type::add_oneofs(const char* value, std::size_t size) {
_impl_.oneofs_.Add()->assign(reinterpret_cast<const char*>(value), size); _internal_mutable_oneofs()->Add()->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_add_pointer:google.protobuf.Type.oneofs)
} }
inline void Type::add_oneofs(absl::string_view value) { inline void Type::add_oneofs(absl::string_view value) {
_impl_.oneofs_.Add()->assign(value.data(), value.size()); _internal_mutable_oneofs()->Add()->assign(value.data(), value.size());
// @@protoc_insertion_point(field_add_string_piece:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_add_string_piece:google.protobuf.Type.oneofs)
} }
inline const ::google::protobuf::RepeatedPtrField<std::string>& inline const ::google::protobuf::RepeatedPtrField<std::string>&
Type::oneofs() const { Type::oneofs() const {
// @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_list:google.protobuf.Type.oneofs)
return _impl_.oneofs_; return _internal_oneofs();
} }
inline ::google::protobuf::RepeatedPtrField<std::string>* Type::mutable_oneofs() { inline ::google::protobuf::RepeatedPtrField<std::string>* Type::mutable_oneofs() {
// @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs) // @@protoc_insertion_point(field_mutable_list:google.protobuf.Type.oneofs)
return &_impl_.oneofs_; return _internal_mutable_oneofs();
} }
inline const ::google::protobuf::RepeatedPtrField<std::string>& inline const ::google::protobuf::RepeatedPtrField<std::string>&
Type::_internal_oneofs() const { Type::_internal_oneofs() const {

Loading…
Cancel
Save