• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/stubs/common.h>
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/descriptor.h>
13 #include <google/protobuf/generated_message_reflection.h>
14 #include <google/protobuf/reflection_ops.h>
15 #include <google/protobuf/wire_format.h>
16 // @@protoc_insertion_point(includes)
17 #include <google/protobuf/port_def.inc>
18 PROTOBUF_NAMESPACE_OPEN
19 class FieldMaskDefaultTypeInternal {
20  public:
21   ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<FieldMask> _instance;
22 } _FieldMask_default_instance_;
23 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto()24 static void InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto() {
25   GOOGLE_PROTOBUF_VERIFY_VERSION;
26 
27   {
28     void* ptr = &PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_;
29     new (ptr) PROTOBUF_NAMESPACE_ID::FieldMask();
30     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
31   }
32   PROTOBUF_NAMESPACE_ID::FieldMask::InitAsDefaultInstance();
33 }
34 
35 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto =
36     {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto}, {}};
37 
38 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1];
39 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
40 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
41 
42 const ::PROTOBUF_NAMESPACE_ID::uint32 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   PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, paths_),
49 };
50 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
51   { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::FieldMask)},
52 };
53 
54 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
55   reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_),
56 };
57 
58 const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
59   "\n google/protobuf/field_mask.proto\022\017goog"
60   "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
61   "\214\001\n\023com.google.protobufB\016FieldMaskProtoP"
62   "\001Z9google.golang.org/genproto/protobuf/f"
63   "ield_mask;field_mask\370\001\001\242\002\003GPB\252\002\036Google.P"
64   "rotobuf.WellKnownTypesb\006proto3"
65   ;
66 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_deps[1] = {
67 };
68 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_sccs[1] = {
69   &scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base,
70 };
71 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once;
72 static bool descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_initialized = false;
73 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
74   &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_initialized, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", 230,
75   &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once, descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_sccs, descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_deps, 1, 0,
76   schemas, file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
77   file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, 1, file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto, file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
78 };
79 
80 // Force running AddDescriptors() at dynamic initialization time.
81 static bool dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto = (  ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto), true);
82 PROTOBUF_NAMESPACE_OPEN
83 
84 // ===================================================================
85 
InitAsDefaultInstance()86 void FieldMask::InitAsDefaultInstance() {
87 }
88 class FieldMask::_Internal {
89  public:
90 };
91 
FieldMask()92 FieldMask::FieldMask()
93   : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
94   SharedCtor();
95   // @@protoc_insertion_point(constructor:google.protobuf.FieldMask)
96 }
FieldMask(::PROTOBUF_NAMESPACE_ID::Arena * arena)97 FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena)
98   : ::PROTOBUF_NAMESPACE_ID::Message(),
99   _internal_metadata_(arena),
100   paths_(arena) {
101   SharedCtor();
102   RegisterArenaDtor(arena);
103   // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask)
104 }
FieldMask(const FieldMask & from)105 FieldMask::FieldMask(const FieldMask& from)
106   : ::PROTOBUF_NAMESPACE_ID::Message(),
107       _internal_metadata_(nullptr),
108       paths_(from.paths_) {
109   _internal_metadata_.MergeFrom(from._internal_metadata_);
110   // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
111 }
112 
SharedCtor()113 void FieldMask::SharedCtor() {
114   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base);
115 }
116 
~FieldMask()117 FieldMask::~FieldMask() {
118   // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
119   SharedDtor();
120 }
121 
SharedDtor()122 void FieldMask::SharedDtor() {
123   GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
124 }
125 
ArenaDtor(void * object)126 void FieldMask::ArenaDtor(void* object) {
127   FieldMask* _this = reinterpret_cast< FieldMask* >(object);
128   (void)_this;
129 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)130 void FieldMask::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
131 }
SetCachedSize(int size) const132 void FieldMask::SetCachedSize(int size) const {
133   _cached_size_.Set(size);
134 }
default_instance()135 const FieldMask& FieldMask::default_instance() {
136   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base);
137   return *internal_default_instance();
138 }
139 
140 
Clear()141 void FieldMask::Clear() {
142 // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
143   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
144   // Prevent compiler warnings about cached_has_bits being unused
145   (void) cached_has_bits;
146 
147   paths_.Clear();
148   _internal_metadata_.Clear();
149 }
150 
151 #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)152 const char* FieldMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
153 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
154   ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
155   while (!ctx->Done(&ptr)) {
156     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
157     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
158     CHK_(ptr);
159     switch (tag >> 3) {
160       // repeated string paths = 1;
161       case 1:
162         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
163           ptr -= 1;
164           do {
165             ptr += 1;
166             ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_paths(), ptr, ctx, "google.protobuf.FieldMask.paths");
167             CHK_(ptr);
168             if (!ctx->DataAvailable(ptr)) break;
169           } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
170         } else goto handle_unusual;
171         continue;
172       default: {
173       handle_unusual:
174         if ((tag & 7) == 4 || tag == 0) {
175           ctx->SetLastTag(tag);
176           goto success;
177         }
178         ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
179         CHK_(ptr != nullptr);
180         continue;
181       }
182     }  // switch
183   }  // while
184 success:
185   return ptr;
186 failure:
187   ptr = nullptr;
188   goto success;
189 #undef CHK_
190 }
191 #else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
MergePartialFromCodedStream(::PROTOBUF_NAMESPACE_ID::io::CodedInputStream * input)192 bool FieldMask::MergePartialFromCodedStream(
193     ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
194 #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
195   ::PROTOBUF_NAMESPACE_ID::uint32 tag;
196   // @@protoc_insertion_point(parse_start:google.protobuf.FieldMask)
197   for (;;) {
198     ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
199     tag = p.first;
200     if (!p.second) goto handle_unusual;
201     switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
202       // repeated string paths = 1;
203       case 1: {
204         if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
205           DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
206                 input, this->add_paths()));
207           DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
208             this->paths(this->paths_size() - 1).data(),
209             static_cast<int>(this->paths(this->paths_size() - 1).length()),
210             ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
211             "google.protobuf.FieldMask.paths"));
212         } else {
213           goto handle_unusual;
214         }
215         break;
216       }
217 
218       default: {
219       handle_unusual:
220         if (tag == 0) {
221           goto success;
222         }
223         DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
224               input, tag, _internal_metadata_.mutable_unknown_fields()));
225         break;
226       }
227     }
228   }
229 success:
230   // @@protoc_insertion_point(parse_success:google.protobuf.FieldMask)
231   return true;
232 failure:
233   // @@protoc_insertion_point(parse_failure:google.protobuf.FieldMask)
234   return false;
235 #undef DO_
236 }
237 #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
238 
SerializeWithCachedSizes(::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream * output) const239 void FieldMask::SerializeWithCachedSizes(
240     ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
241   // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask)
242   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
243   (void) cached_has_bits;
244 
245   // repeated string paths = 1;
246   for (int i = 0, n = this->paths_size(); i < n; i++) {
247     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
248       this->paths(i).data(), static_cast<int>(this->paths(i).length()),
249       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
250       "google.protobuf.FieldMask.paths");
251     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
252       1, this->paths(i), output);
253   }
254 
255   if (_internal_metadata_.have_unknown_fields()) {
256     ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
257         _internal_metadata_.unknown_fields(), output);
258   }
259   // @@protoc_insertion_point(serialize_end:google.protobuf.FieldMask)
260 }
261 
InternalSerializeWithCachedSizesToArray(::PROTOBUF_NAMESPACE_ID::uint8 * target) const262 ::PROTOBUF_NAMESPACE_ID::uint8* FieldMask::InternalSerializeWithCachedSizesToArray(
263     ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
264   // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
265   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
266   (void) cached_has_bits;
267 
268   // repeated string paths = 1;
269   for (int i = 0, n = this->paths_size(); i < n; i++) {
270     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
271       this->paths(i).data(), static_cast<int>(this->paths(i).length()),
272       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
273       "google.protobuf.FieldMask.paths");
274     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
275       WriteStringToArray(1, this->paths(i), target);
276   }
277 
278   if (_internal_metadata_.have_unknown_fields()) {
279     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
280         _internal_metadata_.unknown_fields(), target);
281   }
282   // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
283   return target;
284 }
285 
ByteSizeLong() const286 size_t FieldMask::ByteSizeLong() const {
287 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
288   size_t total_size = 0;
289 
290   if (_internal_metadata_.have_unknown_fields()) {
291     total_size +=
292       ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
293         _internal_metadata_.unknown_fields());
294   }
295   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
296   // Prevent compiler warnings about cached_has_bits being unused
297   (void) cached_has_bits;
298 
299   // repeated string paths = 1;
300   total_size += 1 *
301       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->paths_size());
302   for (int i = 0, n = this->paths_size(); i < n; i++) {
303     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
304       this->paths(i));
305   }
306 
307   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
308   SetCachedSize(cached_size);
309   return total_size;
310 }
311 
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)312 void FieldMask::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
313 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldMask)
314   GOOGLE_DCHECK_NE(&from, this);
315   const FieldMask* source =
316       ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<FieldMask>(
317           &from);
318   if (source == nullptr) {
319   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldMask)
320     ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
321   } else {
322   // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldMask)
323     MergeFrom(*source);
324   }
325 }
326 
MergeFrom(const FieldMask & from)327 void FieldMask::MergeFrom(const FieldMask& from) {
328 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
329   GOOGLE_DCHECK_NE(&from, this);
330   _internal_metadata_.MergeFrom(from._internal_metadata_);
331   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
332   (void) cached_has_bits;
333 
334   paths_.MergeFrom(from.paths_);
335 }
336 
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)337 void FieldMask::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
338 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldMask)
339   if (&from == this) return;
340   Clear();
341   MergeFrom(from);
342 }
343 
CopyFrom(const FieldMask & from)344 void FieldMask::CopyFrom(const FieldMask& from) {
345 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
346   if (&from == this) return;
347   Clear();
348   MergeFrom(from);
349 }
350 
IsInitialized() const351 bool FieldMask::IsInitialized() const {
352   return true;
353 }
354 
InternalSwap(FieldMask * other)355 void FieldMask::InternalSwap(FieldMask* other) {
356   using std::swap;
357   _internal_metadata_.Swap(&other->_internal_metadata_);
358   paths_.InternalSwap(CastToBase(&other->paths_));
359 }
360 
GetMetadata() const361 ::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
362   return GetMetadataStatic();
363 }
364 
365 
366 // @@protoc_insertion_point(namespace_scope)
367 PROTOBUF_NAMESPACE_CLOSE
368 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)369 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) {
370   return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FieldMask >(arena);
371 }
372 PROTOBUF_NAMESPACE_CLOSE
373 
374 // @@protoc_insertion_point(global_scope)
375 #include <google/protobuf/port_undef.inc>
376