• 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/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 PROTOBUF_NAMESPACE_OPEN
18 class FieldMaskDefaultTypeInternal {
19  public:
20   ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<FieldMask> _instance;
21 } _FieldMask_default_instance_;
22 PROTOBUF_NAMESPACE_CLOSE
InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto()23 static void InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto() {
24   GOOGLE_PROTOBUF_VERIFY_VERSION;
25 
26   {
27     void* ptr = &PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_;
28     new (ptr) PROTOBUF_NAMESPACE_ID::FieldMask();
29     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
30   }
31   PROTOBUF_NAMESPACE_ID::FieldMask::InitAsDefaultInstance();
32 }
33 
34 PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto =
35     {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto}, {}};
36 
37 static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1];
38 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
39 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
40 
41 const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
42   ~0u,  // no _has_bits_
43   PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, _internal_metadata_),
44   ~0u,  // no _extensions_
45   ~0u,  // no _oneof_case_
46   ~0u,  // no _weak_field_map_
47   PROTOBUF_FIELD_OFFSET(PROTOBUF_NAMESPACE_ID::FieldMask, paths_),
48 };
49 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
50   { 0, -1, sizeof(PROTOBUF_NAMESPACE_ID::FieldMask)},
51 };
52 
53 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
54   reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_),
55 };
56 
57 const char descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
58   "\n google/protobuf/field_mask.proto\022\017goog"
59   "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
60   "\214\001\n\023com.google.protobufB\016FieldMaskProtoP"
61   "\001Z9google.golang.org/genproto/protobuf/f"
62   "ield_mask;field_mask\370\001\001\242\002\003GPB\252\002\036Google.P"
63   "rotobuf.WellKnownTypesb\006proto3"
64   ;
65 static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_deps[1] = {
66 };
67 static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_sccs[1] = {
68   &scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base,
69 };
70 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once;
71 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
72   false, false, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto, "google/protobuf/field_mask.proto", 230,
73   &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,
74   schemas, file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
75   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,
76 };
77 
78 // Force running AddDescriptors() at dynamic initialization time.
79 static bool dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto)), true);
80 PROTOBUF_NAMESPACE_OPEN
81 
82 // ===================================================================
83 
InitAsDefaultInstance()84 void FieldMask::InitAsDefaultInstance() {
85 }
86 class FieldMask::_Internal {
87  public:
88 };
89 
FieldMask(::PROTOBUF_NAMESPACE_ID::Arena * arena)90 FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena)
91   : ::PROTOBUF_NAMESPACE_ID::Message(arena),
92   paths_(arena) {
93   SharedCtor();
94   RegisterArenaDtor(arena);
95   // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask)
96 }
FieldMask(const FieldMask & from)97 FieldMask::FieldMask(const FieldMask& from)
98   : ::PROTOBUF_NAMESPACE_ID::Message(),
99       paths_(from.paths_) {
100   _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
101   // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
102 }
103 
SharedCtor()104 void FieldMask::SharedCtor() {
105   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base);
106 }
107 
~FieldMask()108 FieldMask::~FieldMask() {
109   // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
110   SharedDtor();
111   _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
112 }
113 
SharedDtor()114 void FieldMask::SharedDtor() {
115   GOOGLE_DCHECK(GetArena() == nullptr);
116 }
117 
ArenaDtor(void * object)118 void FieldMask::ArenaDtor(void* object) {
119   FieldMask* _this = reinterpret_cast< FieldMask* >(object);
120   (void)_this;
121 }
RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *)122 void FieldMask::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
123 }
SetCachedSize(int size) const124 void FieldMask::SetCachedSize(int size) const {
125   _cached_size_.Set(size);
126 }
default_instance()127 const FieldMask& FieldMask::default_instance() {
128   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FieldMask_google_2fprotobuf_2ffield_5fmask_2eproto.base);
129   return *internal_default_instance();
130 }
131 
132 
Clear()133 void FieldMask::Clear() {
134 // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
135   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
136   // Prevent compiler warnings about cached_has_bits being unused
137   (void) cached_has_bits;
138 
139   paths_.Clear();
140   _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
141 }
142 
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)143 const char* FieldMask::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
144 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
145   ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
146   while (!ctx->Done(&ptr)) {
147     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
148     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
149     CHK_(ptr);
150     switch (tag >> 3) {
151       // repeated string paths = 1;
152       case 1:
153         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
154           ptr -= 1;
155           do {
156             ptr += 1;
157             auto str = _internal_add_paths();
158             ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
159             CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.protobuf.FieldMask.paths"));
160             CHK_(ptr);
161             if (!ctx->DataAvailable(ptr)) break;
162           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
163         } else goto handle_unusual;
164         continue;
165       default: {
166       handle_unusual:
167         if ((tag & 7) == 4 || tag == 0) {
168           ctx->SetLastTag(tag);
169           goto success;
170         }
171         ptr = UnknownFieldParse(tag,
172             _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
173             ptr, ctx);
174         CHK_(ptr != nullptr);
175         continue;
176       }
177     }  // switch
178   }  // while
179 success:
180   return ptr;
181 failure:
182   ptr = nullptr;
183   goto success;
184 #undef CHK_
185 }
186 
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const187 ::PROTOBUF_NAMESPACE_ID::uint8* FieldMask::_InternalSerialize(
188     ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
189   // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
190   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
191   (void) cached_has_bits;
192 
193   // repeated string paths = 1;
194   for (int i = 0, n = this->_internal_paths_size(); i < n; i++) {
195     const auto& s = this->_internal_paths(i);
196     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
197       s.data(), static_cast<int>(s.length()),
198       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
199       "google.protobuf.FieldMask.paths");
200     target = stream->WriteString(1, s, target);
201   }
202 
203   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
204     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
205         _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
206   }
207   // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
208   return target;
209 }
210 
ByteSizeLong() const211 size_t FieldMask::ByteSizeLong() const {
212 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
213   size_t total_size = 0;
214 
215   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
216   // Prevent compiler warnings about cached_has_bits being unused
217   (void) cached_has_bits;
218 
219   // repeated string paths = 1;
220   total_size += 1 *
221       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(paths_.size());
222   for (int i = 0, n = paths_.size(); i < n; i++) {
223     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
224       paths_.Get(i));
225   }
226 
227   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
228     return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
229         _internal_metadata_, total_size, &_cached_size_);
230   }
231   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
232   SetCachedSize(cached_size);
233   return total_size;
234 }
235 
MergeFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)236 void FieldMask::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
237 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldMask)
238   GOOGLE_DCHECK_NE(&from, this);
239   const FieldMask* source =
240       ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<FieldMask>(
241           &from);
242   if (source == nullptr) {
243   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldMask)
244     ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
245   } else {
246   // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldMask)
247     MergeFrom(*source);
248   }
249 }
250 
MergeFrom(const FieldMask & from)251 void FieldMask::MergeFrom(const FieldMask& from) {
252 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
253   GOOGLE_DCHECK_NE(&from, this);
254   _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
255   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
256   (void) cached_has_bits;
257 
258   paths_.MergeFrom(from.paths_);
259 }
260 
CopyFrom(const::PROTOBUF_NAMESPACE_ID::Message & from)261 void FieldMask::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
262 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldMask)
263   if (&from == this) return;
264   Clear();
265   MergeFrom(from);
266 }
267 
CopyFrom(const FieldMask & from)268 void FieldMask::CopyFrom(const FieldMask& from) {
269 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
270   if (&from == this) return;
271   Clear();
272   MergeFrom(from);
273 }
274 
IsInitialized() const275 bool FieldMask::IsInitialized() const {
276   return true;
277 }
278 
InternalSwap(FieldMask * other)279 void FieldMask::InternalSwap(FieldMask* other) {
280   using std::swap;
281   _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
282   paths_.InternalSwap(&other->paths_);
283 }
284 
GetMetadata() const285 ::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
286   return GetMetadataStatic();
287 }
288 
289 
290 // @@protoc_insertion_point(namespace_scope)
291 PROTOBUF_NAMESPACE_CLOSE
292 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)293 template<> PROTOBUF_NOINLINE PROTOBUF_NAMESPACE_ID::FieldMask* Arena::CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) {
294   return Arena::CreateMessageInternal< PROTOBUF_NAMESPACE_ID::FieldMask >(arena);
295 }
296 PROTOBUF_NAMESPACE_CLOSE
297 
298 // @@protoc_insertion_point(global_scope)
299 #include <google/protobuf/port_undef.inc>
300