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
18 PROTOBUF_PRAGMA_INIT_SEG
19
20 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
21 namespace _pbi = _pb::internal;
22
23 PROTOBUF_NAMESPACE_OPEN
FieldMask(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR FieldMask::FieldMask(
25 ::_pbi::ConstantInitialized)
26 : paths_(){}
27 struct FieldMaskDefaultTypeInternal {
FieldMaskDefaultTypeInternalFieldMaskDefaultTypeInternal28 PROTOBUF_CONSTEXPR FieldMaskDefaultTypeInternal()
29 : _instance(::_pbi::ConstantInitialized{}) {}
~FieldMaskDefaultTypeInternalFieldMaskDefaultTypeInternal30 ~FieldMaskDefaultTypeInternal() {}
31 union {
32 FieldMask _instance;
33 };
34 };
35 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
36 PROTOBUF_NAMESPACE_CLOSE
37 static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1];
38 static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
39 static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
40
41 const uint32_t 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 ~0u, // no _inlined_string_donated_
48 PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::FieldMask, paths_),
49 };
50 static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
51 { 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FieldMask)},
52 };
53
54 static const ::_pb::Message* const file_default_instances[] = {
55 &::PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_._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 "\205\001\n\023com.google.protobufB\016FieldMaskProtoP"
62 "\001Z2google.golang.org/protobuf/types/know"
63 "n/fieldmaskpb\370\001\001\242\002\003GPB\252\002\036Google.Protobuf"
64 ".WellKnownTypesb\006proto3"
65 ;
66 static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once;
67 const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
68 false, false, 223, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto,
69 "google/protobuf/field_mask.proto",
70 &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once, nullptr, 0, 1,
71 schemas, file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
72 file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
73 file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
74 };
descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter()75 PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter() {
76 return &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto;
77 }
78
79 // Force running AddDescriptors() at dynamic initialization time.
80 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto);
81 PROTOBUF_NAMESPACE_OPEN
82
83 // ===================================================================
84
85 class FieldMask::_Internal {
86 public:
87 };
88
FieldMask(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)89 FieldMask::FieldMask(::PROTOBUF_NAMESPACE_ID::Arena* arena,
90 bool is_message_owned)
91 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
92 paths_(arena) {
93 SharedCtor();
94 // @@protoc_insertion_point(arena_constructor:google.protobuf.FieldMask)
95 }
FieldMask(const FieldMask & from)96 FieldMask::FieldMask(const FieldMask& from)
97 : ::PROTOBUF_NAMESPACE_ID::Message(),
98 paths_(from.paths_) {
99 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
100 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
101 }
102
SharedCtor()103 inline void FieldMask::SharedCtor() {
104 }
105
~FieldMask()106 FieldMask::~FieldMask() {
107 // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
108 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
109 (void)arena;
110 return;
111 }
112 SharedDtor();
113 }
114
SharedDtor()115 inline void FieldMask::SharedDtor() {
116 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
117 }
118
SetCachedSize(int size) const119 void FieldMask::SetCachedSize(int size) const {
120 _cached_size_.Set(size);
121 }
122
Clear()123 void FieldMask::Clear() {
124 // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
125 uint32_t cached_has_bits = 0;
126 // Prevent compiler warnings about cached_has_bits being unused
127 (void) cached_has_bits;
128
129 paths_.Clear();
130 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
131 }
132
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)133 const char* FieldMask::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
134 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
135 while (!ctx->Done(&ptr)) {
136 uint32_t tag;
137 ptr = ::_pbi::ReadTag(ptr, &tag);
138 switch (tag >> 3) {
139 // repeated string paths = 1;
140 case 1:
141 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
142 ptr -= 1;
143 do {
144 ptr += 1;
145 auto str = _internal_add_paths();
146 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
147 CHK_(ptr);
148 CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.FieldMask.paths"));
149 if (!ctx->DataAvailable(ptr)) break;
150 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
151 } else
152 goto handle_unusual;
153 continue;
154 default:
155 goto handle_unusual;
156 } // switch
157 handle_unusual:
158 if ((tag == 0) || ((tag & 7) == 4)) {
159 CHK_(ptr);
160 ctx->SetLastTag(tag);
161 goto message_done;
162 }
163 ptr = UnknownFieldParse(
164 tag,
165 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
166 ptr, ctx);
167 CHK_(ptr != nullptr);
168 } // while
169 message_done:
170 return ptr;
171 failure:
172 ptr = nullptr;
173 goto message_done;
174 #undef CHK_
175 }
176
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const177 uint8_t* FieldMask::_InternalSerialize(
178 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
179 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
180 uint32_t cached_has_bits = 0;
181 (void) cached_has_bits;
182
183 // repeated string paths = 1;
184 for (int i = 0, n = this->_internal_paths_size(); i < n; i++) {
185 const auto& s = this->_internal_paths(i);
186 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
187 s.data(), static_cast<int>(s.length()),
188 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
189 "google.protobuf.FieldMask.paths");
190 target = stream->WriteString(1, s, target);
191 }
192
193 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
194 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
195 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
196 }
197 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
198 return target;
199 }
200
ByteSizeLong() const201 size_t FieldMask::ByteSizeLong() const {
202 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
203 size_t total_size = 0;
204
205 uint32_t cached_has_bits = 0;
206 // Prevent compiler warnings about cached_has_bits being unused
207 (void) cached_has_bits;
208
209 // repeated string paths = 1;
210 total_size += 1 *
211 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(paths_.size());
212 for (int i = 0, n = paths_.size(); i < n; i++) {
213 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
214 paths_.Get(i));
215 }
216
217 return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
218 }
219
220 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FieldMask::_class_data_ = {
221 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
222 FieldMask::MergeImpl
223 };
GetClassData() const224 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FieldMask::GetClassData() const { return &_class_data_; }
225
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message * to,const::PROTOBUF_NAMESPACE_ID::Message & from)226 void FieldMask::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
227 const ::PROTOBUF_NAMESPACE_ID::Message& from) {
228 static_cast<FieldMask *>(to)->MergeFrom(
229 static_cast<const FieldMask &>(from));
230 }
231
232
MergeFrom(const FieldMask & from)233 void FieldMask::MergeFrom(const FieldMask& from) {
234 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
235 GOOGLE_DCHECK_NE(&from, this);
236 uint32_t cached_has_bits = 0;
237 (void) cached_has_bits;
238
239 paths_.MergeFrom(from.paths_);
240 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
241 }
242
CopyFrom(const FieldMask & from)243 void FieldMask::CopyFrom(const FieldMask& from) {
244 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
245 if (&from == this) return;
246 Clear();
247 MergeFrom(from);
248 }
249
IsInitialized() const250 bool FieldMask::IsInitialized() const {
251 return true;
252 }
253
InternalSwap(FieldMask * other)254 void FieldMask::InternalSwap(FieldMask* other) {
255 using std::swap;
256 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
257 paths_.InternalSwap(&other->paths_);
258 }
259
GetMetadata() const260 ::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
261 return ::_pbi::AssignDescriptors(
262 &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter, &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once,
263 file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[0]);
264 }
265
266 // @@protoc_insertion_point(namespace_scope)
267 PROTOBUF_NAMESPACE_CLOSE
268 PROTOBUF_NAMESPACE_OPEN
269 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::FieldMask*
CreateMaybeMessage(Arena * arena)270 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) {
271 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::FieldMask >(arena);
272 }
273 PROTOBUF_NAMESPACE_CLOSE
274
275 // @@protoc_insertion_point(global_scope)
276 #include <google/protobuf/port_undef.inc>
277