1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/field_mask.proto
3
4#include <google/protobuf/field_mask.pb.h>
5
6#include <algorithm>
7
8#include <google/protobuf/io/coded_stream.h>
9#include <google/protobuf/extension_set.h>
10#include <google/protobuf/wire_format_lite.h>
11#include <google/protobuf/descriptor.h>
12#include <google/protobuf/generated_message_reflection.h>
13#include <google/protobuf/reflection_ops.h>
14#include <google/protobuf/wire_format.h>
15// @@protoc_insertion_point(includes)
16#include <google/protobuf/port_def.inc>
17
18PROTOBUF_PRAGMA_INIT_SEG
19
20namespace _pb = ::PROTOBUF_NAMESPACE_ID;
21namespace _pbi = _pb::internal;
22
23PROTOBUF_NAMESPACE_OPEN
24PROTOBUF_CONSTEXPR FieldMask::FieldMask(
25 ::_pbi::ConstantInitialized): _impl_{
26 /*decltype(_impl_.paths_)*/.paths_: {}
27 , /*decltype(_impl_._cached_size_)*/._cached_size_: {}} {}
28struct FieldMaskDefaultTypeInternal {
29 PROTOBUF_CONSTEXPR FieldMaskDefaultTypeInternal()
30 : _instance(::_pbi::ConstantInitialized{}) {}
31 ~FieldMaskDefaultTypeInternal() {}
32 union {
33 FieldMask _instance;
34 };
35};
36PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
37PROTOBUF_NAMESPACE_CLOSE
38static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1];
39static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
40static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
41
42const uint32_t TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
43 ~0u, // no _has_bits_
44 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, _internal_metadata_),
45 ~0u, // no _extensions_
46 ~0u, // no _oneof_case_
47 ~0u, // no _weak_field_map_
48 ~0u, // no _inlined_string_donated_
49 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, _impl_.paths_),
50};
51static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
52 { .offsets_index: 0, .has_bit_indices_index: -1, .inlined_string_indices_index: -1, .object_size: sizeof(::PROTOBUF_NAMESPACE_ID::FieldMask)},
53};
54
55static const ::_pb::Message* const file_default_instances[] = {
56 &::PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_._instance,
57};
58
59const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
60 "\n google/protobuf/field_mask.proto\022\017goog"
61 "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
62 "\205\001\n\023com.google.protobufB\016FieldMaskProtoP"
63 "\001Z2google.golang.org/protobuf/types/know"
64 "n/fieldmaskpb\370\001\001\242\002\003GPB\252\002\036Google.Protobuf"
65 ".WellKnownTypesb\006proto3"
66 ;
67static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once;
68const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
69 .is_initialized: false, .is_eager: false, .size: 223, .descriptor: descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto,
70 .filename: "google/protobuf/field_mask.proto",
71 .once: &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once, .deps: nullptr, .num_deps: 0, .num_messages: 1,
72 .schemas: schemas, .default_instances: file_default_instances, .offsets: TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
73 .file_level_metadata: file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, .file_level_enum_descriptors: file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
74 .file_level_service_descriptors: file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
75};
76PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter() {
77 return &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto;
78}
79
80// Force running AddDescriptors() at dynamic initialization time.
81PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto);
82PROTOBUF_NAMESPACE_OPEN
83
84// ===================================================================
85
86class FieldMask::_Internal {
87 public:
88};
89
90FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena,
91 bool is_message_owned)
92 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
93 SharedCtor(arena, is_message_owned);
94 // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask)
95}
96FieldMask::FieldMask(const FieldMask& from)
97 : ::PROTOBUF_NAMESPACE_ID::Message() {
98 FieldMask* const _this = this; (void)_this;
99 new (&_impl_) Impl_{
100 .paths_: decltype(_impl_.paths_){from._impl_.paths_}
101 , /*decltype(_impl_._cached_size_)*/._cached_size_: {}};
102
103 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(other: from._internal_metadata_);
104 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
105}
106
107inline void FieldMask::SharedCtor(
108 ::_pb::Arena* arena, bool is_message_owned) {
109 (void)arena;
110 (void)is_message_owned;
111 new (&_impl_) Impl_{
112 .paths_: decltype(_impl_.paths_){arena}
113 , /*decltype(_impl_._cached_size_)*/._cached_size_: {}
114 };
115}
116
117FieldMask::~FieldMask() {
118 // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
119 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
120 (void)arena;
121 return;
122 }
123 SharedDtor();
124}
125
126inline void FieldMask::SharedDtor() {
127 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
128 _impl_.paths_.~RepeatedPtrField();
129}
130
131void FieldMask::SetCachedSize(int size) const {
132 _impl_._cached_size_.Set(size);
133}
134
135void FieldMask::Clear() {
136// @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
137 uint32_t cached_has_bits = 0;
138 // Prevent compiler warnings about cached_has_bits being unused
139 (void) cached_has_bits;
140
141 _impl_.paths_.Clear();
142 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
143}
144
145const char* FieldMask::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
146#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
147 while (!ctx->Done(ptr: &ptr)) {
148 uint32_t tag;
149 ptr = ::_pbi::ReadTag(p: ptr, out: &tag);
150 switch (tag >> 3) {
151 // repeated string paths = 1;
152 case 1:
153 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
154 ptr -= 1;
155 do {
156 ptr += 1;
157 auto str = _internal_add_paths();
158 ptr = ::_pbi::InlineGreedyStringParser(s: str, ptr, ctx);
159 CHK_(ptr);
160 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.FieldMask.paths"));
161 if (!ctx->DataAvailable(ptr)) break;
162 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
163 } else
164 goto handle_unusual;
165 continue;
166 default:
167 goto handle_unusual;
168 } // switch
169 handle_unusual:
170 if ((tag == 0) || ((tag & 7) == 4)) {
171 CHK_(ptr);
172 ctx->SetLastTag(tag);
173 goto message_done;
174 }
175 ptr = UnknownFieldParse(
176 tag,
177 unknown: _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
178 ptr, ctx);
179 CHK_(ptr != nullptr);
180 } // while
181message_done:
182 return ptr;
183failure:
184 ptr = nullptr;
185 goto message_done;
186#undef CHK_
187}
188
189uint8_t* FieldMask::_InternalSerialize(
190 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
191 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
192 uint32_t cached_has_bits = 0;
193 (void) cached_has_bits;
194
195 // repeated string paths = 1;
196 for (int i = 0, n = this->_internal_paths_size(); i < n; i++) {
197 const auto& s = this->_internal_paths(index: i);
198 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
199 data: s.data(), size: static_cast<int>(s.length()),
200 op: ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
201 field_name: "google.protobuf.FieldMask.paths");
202 target = stream->WriteString(num: 1, s, ptr: target);
203 }
204
205 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
206 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
207 unknown_fields: _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(default_instance: ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
208 }
209 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
210 return target;
211}
212
213size_t FieldMask::ByteSizeLong() const {
214// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
215 size_t total_size = 0;
216
217 uint32_t cached_has_bits = 0;
218 // Prevent compiler warnings about cached_has_bits being unused
219 (void) cached_has_bits;
220
221 // repeated string paths = 1;
222 total_size += 1 *
223 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(size: _impl_.paths_.size());
224 for (int i = 0, n = _impl_.paths_.size(); i < n; i++) {
225 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
226 value: _impl_.paths_.Get(index: i));
227 }
228
229 return MaybeComputeUnknownFieldsSize(total_size, cached_size: &_impl_._cached_size_);
230}
231
232const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FieldMask::_class_data_ = {
233 .copy_to_from: ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
234 .merge_to_from: FieldMask::MergeImpl
235};
236const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FieldMask::GetClassData() const { return &_class_data_; }
237
238
239void FieldMask::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
240 auto* const _this = static_cast<FieldMask*>(&to_msg);
241 auto& from = static_cast<const FieldMask&>(from_msg);
242 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
243 GOOGLE_DCHECK_NE(&from, _this);
244 uint32_t cached_has_bits = 0;
245 (void) cached_has_bits;
246
247 _this->_impl_.paths_.MergeFrom(other: from._impl_.paths_);
248 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(other: from._internal_metadata_);
249}
250
251void FieldMask::CopyFrom(const FieldMask& from) {
252// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
253 if (&from == this) return;
254 Clear();
255 MergeFrom(from);
256}
257
258bool FieldMask::IsInitialized() const {
259 return true;
260}
261
262void FieldMask::InternalSwap(FieldMask* other) {
263 using std::swap;
264 _internal_metadata_.InternalSwap(other: &other->_internal_metadata_);
265 _impl_.paths_.InternalSwap(other: &other->_impl_.paths_);
266}
267
268::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
269 return ::_pbi::AssignDescriptors(
270 table: &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter, once: &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once,
271 metadata: file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[0]);
272}
273
274// @@protoc_insertion_point(namespace_scope)
275PROTOBUF_NAMESPACE_CLOSE
276PROTOBUF_NAMESPACE_OPEN
277template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::FieldMask*
278Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) {
279 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::FieldMask >(arena);
280}
281PROTOBUF_NAMESPACE_CLOSE
282
283// @@protoc_insertion_point(global_scope)
284#include <google/protobuf/port_undef.inc>
285