• 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 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
5 #include <google/protobuf/field_mask.pb.h>
6 
7 #include <algorithm>
8 
9 #include <google/protobuf/stubs/common.h>
10 #include <google/protobuf/stubs/port.h>
11 #include <google/protobuf/stubs/once.h>
12 #include <google/protobuf/io/coded_stream.h>
13 #include <google/protobuf/wire_format_lite_inl.h>
14 #include <google/protobuf/descriptor.h>
15 #include <google/protobuf/generated_message_reflection.h>
16 #include <google/protobuf/reflection_ops.h>
17 #include <google/protobuf/wire_format.h>
18 // @@protoc_insertion_point(includes)
19 
20 namespace google {
21 namespace protobuf {
22 
23 namespace {
24 
25 const ::google::protobuf::Descriptor* FieldMask_descriptor_ = NULL;
26 const ::google::protobuf::internal::GeneratedMessageReflection*
27   FieldMask_reflection_ = NULL;
28 
29 }  // namespace
30 
31 
32 void protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto() GOOGLE_ATTRIBUTE_COLD;
protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto()33 void protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto() {
34   protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
35   const ::google::protobuf::FileDescriptor* file =
36     ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
37       "google/protobuf/field_mask.proto");
38   GOOGLE_CHECK(file != NULL);
39   FieldMask_descriptor_ = file->message_type(0);
40   static const int FieldMask_offsets_[1] = {
41     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, paths_),
42   };
43   FieldMask_reflection_ =
44     ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
45       FieldMask_descriptor_,
46       FieldMask::default_instance_,
47       FieldMask_offsets_,
48       -1,
49       -1,
50       -1,
51       sizeof(FieldMask),
52       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, _internal_metadata_),
53       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, _is_default_instance_));
54 }
55 
56 namespace {
57 
58 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
protobuf_AssignDescriptorsOnce()59 inline void protobuf_AssignDescriptorsOnce() {
60   ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
61                  &protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto);
62 }
63 
64 void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
protobuf_RegisterTypes(const::std::string &)65 void protobuf_RegisterTypes(const ::std::string&) {
66   protobuf_AssignDescriptorsOnce();
67   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
68       FieldMask_descriptor_, &FieldMask::default_instance());
69 }
70 
71 }  // namespace
72 
protobuf_ShutdownFile_google_2fprotobuf_2ffield_5fmask_2eproto()73 void protobuf_ShutdownFile_google_2fprotobuf_2ffield_5fmask_2eproto() {
74   delete FieldMask::default_instance_;
75   delete FieldMask_reflection_;
76 }
77 
78 void protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto() GOOGLE_ATTRIBUTE_COLD;
protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto()79 void protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto() {
80   static bool already_here = false;
81   if (already_here) return;
82   already_here = true;
83   GOOGLE_PROTOBUF_VERIFY_VERSION;
84 
85   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
86     "\n google/protobuf/field_mask.proto\022\017goog"
87     "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
88     "Q\n\023com.google.protobufB\016FieldMaskProtoP\001"
89     "\240\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTyp"
90     "esb\006proto3", 170);
91   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
92     "google/protobuf/field_mask.proto", &protobuf_RegisterTypes);
93   FieldMask::default_instance_ = new FieldMask();
94   FieldMask::default_instance_->InitAsDefaultInstance();
95   ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2ffield_5fmask_2eproto);
96 }
97 
98 // Force AddDescriptors() to be called at static initialization time.
99 struct StaticDescriptorInitializer_google_2fprotobuf_2ffield_5fmask_2eproto {
StaticDescriptorInitializer_google_2fprotobuf_2ffield_5fmask_2eprotogoogle::protobuf::StaticDescriptorInitializer_google_2fprotobuf_2ffield_5fmask_2eproto100   StaticDescriptorInitializer_google_2fprotobuf_2ffield_5fmask_2eproto() {
101     protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
102   }
103 } static_descriptor_initializer_google_2fprotobuf_2ffield_5fmask_2eproto_;
104 
105 // ===================================================================
106 
107 #if !defined(_MSC_VER) || _MSC_VER >= 1900
108 const int FieldMask::kPathsFieldNumber;
109 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
110 
FieldMask()111 FieldMask::FieldMask()
112   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
113   SharedCtor();
114   // @@protoc_insertion_point(constructor:google.protobuf.FieldMask)
115 }
116 
InitAsDefaultInstance()117 void FieldMask::InitAsDefaultInstance() {
118   _is_default_instance_ = true;
119 }
120 
FieldMask(const FieldMask & from)121 FieldMask::FieldMask(const FieldMask& from)
122   : ::google::protobuf::Message(),
123     _internal_metadata_(NULL) {
124   SharedCtor();
125   MergeFrom(from);
126   // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
127 }
128 
SharedCtor()129 void FieldMask::SharedCtor() {
130     _is_default_instance_ = false;
131   ::google::protobuf::internal::GetEmptyString();
132   _cached_size_ = 0;
133 }
134 
~FieldMask()135 FieldMask::~FieldMask() {
136   // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
137   SharedDtor();
138 }
139 
SharedDtor()140 void FieldMask::SharedDtor() {
141   if (this != default_instance_) {
142   }
143 }
144 
SetCachedSize(int size) const145 void FieldMask::SetCachedSize(int size) const {
146   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
147   _cached_size_ = size;
148   GOOGLE_SAFE_CONCURRENT_WRITES_END();
149 }
descriptor()150 const ::google::protobuf::Descriptor* FieldMask::descriptor() {
151   protobuf_AssignDescriptorsOnce();
152   return FieldMask_descriptor_;
153 }
154 
default_instance()155 const FieldMask& FieldMask::default_instance() {
156   if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
157   return *default_instance_;
158 }
159 
160 FieldMask* FieldMask::default_instance_ = NULL;
161 
New(::google::protobuf::Arena * arena) const162 FieldMask* FieldMask::New(::google::protobuf::Arena* arena) const {
163   FieldMask* n = new FieldMask;
164   if (arena != NULL) {
165     arena->Own(n);
166   }
167   return n;
168 }
169 
Clear()170 void FieldMask::Clear() {
171 // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
172   paths_.Clear();
173 }
174 
MergePartialFromCodedStream(::google::protobuf::io::CodedInputStream * input)175 bool FieldMask::MergePartialFromCodedStream(
176     ::google::protobuf::io::CodedInputStream* input) {
177 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
178   ::google::protobuf::uint32 tag;
179   // @@protoc_insertion_point(parse_start:google.protobuf.FieldMask)
180   for (;;) {
181     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
182     tag = p.first;
183     if (!p.second) goto handle_unusual;
184     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
185       // repeated string paths = 1;
186       case 1: {
187         if (tag == 10) {
188          parse_paths:
189           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
190                 input, this->add_paths()));
191           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
192             this->paths(this->paths_size() - 1).data(),
193             this->paths(this->paths_size() - 1).length(),
194             ::google::protobuf::internal::WireFormatLite::PARSE,
195             "google.protobuf.FieldMask.paths"));
196         } else {
197           goto handle_unusual;
198         }
199         if (input->ExpectTag(10)) goto parse_paths;
200         if (input->ExpectAtEnd()) goto success;
201         break;
202       }
203 
204       default: {
205       handle_unusual:
206         if (tag == 0 ||
207             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
208             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
209           goto success;
210         }
211         DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
212         break;
213       }
214     }
215   }
216 success:
217   // @@protoc_insertion_point(parse_success:google.protobuf.FieldMask)
218   return true;
219 failure:
220   // @@protoc_insertion_point(parse_failure:google.protobuf.FieldMask)
221   return false;
222 #undef DO_
223 }
224 
SerializeWithCachedSizes(::google::protobuf::io::CodedOutputStream * output) const225 void FieldMask::SerializeWithCachedSizes(
226     ::google::protobuf::io::CodedOutputStream* output) const {
227   // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask)
228   // repeated string paths = 1;
229   for (int i = 0; i < this->paths_size(); i++) {
230     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
231       this->paths(i).data(), this->paths(i).length(),
232       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
233       "google.protobuf.FieldMask.paths");
234     ::google::protobuf::internal::WireFormatLite::WriteString(
235       1, this->paths(i), output);
236   }
237 
238   // @@protoc_insertion_point(serialize_end:google.protobuf.FieldMask)
239 }
240 
InternalSerializeWithCachedSizesToArray(bool deterministic,::google::protobuf::uint8 * target) const241 ::google::protobuf::uint8* FieldMask::InternalSerializeWithCachedSizesToArray(
242     bool deterministic, ::google::protobuf::uint8* target) const {
243   // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
244   // repeated string paths = 1;
245   for (int i = 0; i < this->paths_size(); i++) {
246     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
247       this->paths(i).data(), this->paths(i).length(),
248       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
249       "google.protobuf.FieldMask.paths");
250     target = ::google::protobuf::internal::WireFormatLite::
251       WriteStringToArray(1, this->paths(i), target);
252   }
253 
254   // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
255   return target;
256 }
257 
ByteSize() const258 int FieldMask::ByteSize() const {
259 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
260   int total_size = 0;
261 
262   // repeated string paths = 1;
263   total_size += 1 * this->paths_size();
264   for (int i = 0; i < this->paths_size(); i++) {
265     total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
266       this->paths(i));
267   }
268 
269   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
270   _cached_size_ = total_size;
271   GOOGLE_SAFE_CONCURRENT_WRITES_END();
272   return total_size;
273 }
274 
MergeFrom(const::google::protobuf::Message & from)275 void FieldMask::MergeFrom(const ::google::protobuf::Message& from) {
276 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldMask)
277   if (GOOGLE_PREDICT_FALSE(&from == this)) {
278     ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
279   }
280   const FieldMask* source =
281       ::google::protobuf::internal::DynamicCastToGenerated<const FieldMask>(
282           &from);
283   if (source == NULL) {
284   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldMask)
285     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
286   } else {
287   // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldMask)
288     MergeFrom(*source);
289   }
290 }
291 
MergeFrom(const FieldMask & from)292 void FieldMask::MergeFrom(const FieldMask& from) {
293 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
294   if (GOOGLE_PREDICT_FALSE(&from == this)) {
295     ::google::protobuf::internal::MergeFromFail(__FILE__, __LINE__);
296   }
297   paths_.MergeFrom(from.paths_);
298 }
299 
CopyFrom(const::google::protobuf::Message & from)300 void FieldMask::CopyFrom(const ::google::protobuf::Message& from) {
301 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldMask)
302   if (&from == this) return;
303   Clear();
304   MergeFrom(from);
305 }
306 
CopyFrom(const FieldMask & from)307 void FieldMask::CopyFrom(const FieldMask& from) {
308 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
309   if (&from == this) return;
310   Clear();
311   MergeFrom(from);
312 }
313 
IsInitialized() const314 bool FieldMask::IsInitialized() const {
315 
316   return true;
317 }
318 
Swap(FieldMask * other)319 void FieldMask::Swap(FieldMask* other) {
320   if (other == this) return;
321   InternalSwap(other);
322 }
InternalSwap(FieldMask * other)323 void FieldMask::InternalSwap(FieldMask* other) {
324   paths_.UnsafeArenaSwap(&other->paths_);
325   _internal_metadata_.Swap(&other->_internal_metadata_);
326   std::swap(_cached_size_, other->_cached_size_);
327 }
328 
GetMetadata() const329 ::google::protobuf::Metadata FieldMask::GetMetadata() const {
330   protobuf_AssignDescriptorsOnce();
331   ::google::protobuf::Metadata metadata;
332   metadata.descriptor = FieldMask_descriptor_;
333   metadata.reflection = FieldMask_reflection_;
334   return metadata;
335 }
336 
337 #if PROTOBUF_INLINE_NOT_IN_HEADERS
338 // FieldMask
339 
340 // repeated string paths = 1;
paths_size() const341 int FieldMask::paths_size() const {
342   return paths_.size();
343 }
clear_paths()344 void FieldMask::clear_paths() {
345   paths_.Clear();
346 }
paths(int index) const347  const ::std::string& FieldMask::paths(int index) const {
348   // @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths)
349   return paths_.Get(index);
350 }
mutable_paths(int index)351  ::std::string* FieldMask::mutable_paths(int index) {
352   // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths)
353   return paths_.Mutable(index);
354 }
set_paths(int index,const::std::string & value)355  void FieldMask::set_paths(int index, const ::std::string& value) {
356   // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
357   paths_.Mutable(index)->assign(value);
358 }
set_paths(int index,const char * value)359  void FieldMask::set_paths(int index, const char* value) {
360   paths_.Mutable(index)->assign(value);
361   // @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths)
362 }
set_paths(int index,const char * value,size_t size)363  void FieldMask::set_paths(int index, const char* value, size_t size) {
364   paths_.Mutable(index)->assign(
365     reinterpret_cast<const char*>(value), size);
366   // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths)
367 }
add_paths()368  ::std::string* FieldMask::add_paths() {
369   // @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths)
370   return paths_.Add();
371 }
add_paths(const::std::string & value)372  void FieldMask::add_paths(const ::std::string& value) {
373   paths_.Add()->assign(value);
374   // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
375 }
add_paths(const char * value)376  void FieldMask::add_paths(const char* value) {
377   paths_.Add()->assign(value);
378   // @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths)
379 }
add_paths(const char * value,size_t size)380  void FieldMask::add_paths(const char* value, size_t size) {
381   paths_.Add()->assign(reinterpret_cast<const char*>(value), size);
382   // @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths)
383 }
384  const ::google::protobuf::RepeatedPtrField< ::std::string>&
paths() const385 FieldMask::paths() const {
386   // @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths)
387   return paths_;
388 }
389  ::google::protobuf::RepeatedPtrField< ::std::string>*
mutable_paths()390 FieldMask::mutable_paths() {
391   // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths)
392   return &paths_;
393 }
394 
395 #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
396 
397 // @@protoc_insertion_point(namespace_scope)
398 
399 }  // namespace protobuf
400 }  // namespace google
401 
402 // @@protoc_insertion_point(global_scope)
403