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): _impl_{
26 /*decltype(_impl_.paths_)*/{}
27 , /*decltype(_impl_._cached_size_)*/{}} {}
28 struct FieldMaskDefaultTypeInternal {
FieldMaskDefaultTypeInternalFieldMaskDefaultTypeInternal29 PROTOBUF_CONSTEXPR FieldMaskDefaultTypeInternal()
30 : _instance(::_pbi::ConstantInitialized{}) {}
~FieldMaskDefaultTypeInternalFieldMaskDefaultTypeInternal31 ~FieldMaskDefaultTypeInternal() {}
32 union {
33 FieldMask _instance;
34 };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FieldMaskDefaultTypeInternal _FieldMask_default_instance_;
37 PROTOBUF_NAMESPACE_CLOSE
38 static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[1];
39 static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
40 static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto = nullptr;
41
42 const 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 };
51 static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
52 { 0, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::FieldMask)},
53 };
54
55 static const ::_pb::Message* const file_default_instances[] = {
56 &::PROTOBUF_NAMESPACE_ID::_FieldMask_default_instance_._instance,
57 };
58
59 const 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 ;
67 static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once;
68 const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto = {
69 false, false, 223, descriptor_table_protodef_google_2fprotobuf_2ffield_5fmask_2eproto,
70 "google/protobuf/field_mask.proto",
71 &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once, nullptr, 0, 1,
72 schemas, file_default_instances, TableStruct_google_2fprotobuf_2ffield_5fmask_2eproto::offsets,
73 file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto, file_level_enum_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
74 file_level_service_descriptors_google_2fprotobuf_2ffield_5fmask_2eproto,
75 };
descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter()76 PROTOBUF_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.
81 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ffield_5fmask_2eproto(&descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto);
82 PROTOBUF_NAMESPACE_OPEN
83
84 // ===================================================================
85
86 class FieldMask::_Internal {
87 public:
88 };
89
FieldMask(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)90 FieldMask::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 }
FieldMask(const FieldMask & from)96 FieldMask::FieldMask(const FieldMask& from)
97 : ::PROTOBUF_NAMESPACE_ID::Message() {
98 FieldMask* const _this = this; (void)_this;
99 new (&_impl_) Impl_{
100 decltype(_impl_.paths_){from._impl_.paths_}
101 , /*decltype(_impl_._cached_size_)*/{}};
102
103 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
104 // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
105 }
106
SharedCtor(::_pb::Arena * arena,bool is_message_owned)107 inline void FieldMask::SharedCtor(
108 ::_pb::Arena* arena, bool is_message_owned) {
109 (void)arena;
110 (void)is_message_owned;
111 new (&_impl_) Impl_{
112 decltype(_impl_.paths_){arena}
113 , /*decltype(_impl_._cached_size_)*/{}
114 };
115 }
116
~FieldMask()117 FieldMask::~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
SharedDtor()126 inline void FieldMask::SharedDtor() {
127 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
128 _impl_.paths_.~RepeatedPtrField();
129 }
130
SetCachedSize(int size) const131 void FieldMask::SetCachedSize(int size) const {
132 _impl_._cached_size_.Set(size);
133 }
134
Clear()135 void 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
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)145 const 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)) {
148 uint32_t tag;
149 ptr = ::_pbi::ReadTag(ptr, &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(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 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
178 ptr, ctx);
179 CHK_(ptr != nullptr);
180 } // while
181 message_done:
182 return ptr;
183 failure:
184 ptr = nullptr;
185 goto message_done;
186 #undef CHK_
187 }
188
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const189 uint8_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(i);
198 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
199 s.data(), static_cast<int>(s.length()),
200 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
201 "google.protobuf.FieldMask.paths");
202 target = stream->WriteString(1, s, target);
203 }
204
205 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
206 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
207 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::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
ByteSizeLong() const213 size_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(_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 _impl_.paths_.Get(i));
227 }
228
229 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
230 }
231
232 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FieldMask::_class_data_ = {
233 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
234 FieldMask::MergeImpl
235 };
GetClassData() const236 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FieldMask::GetClassData() const { return &_class_data_; }
237
238
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)239 void 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(from._impl_.paths_);
248 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
249 }
250
CopyFrom(const FieldMask & from)251 void 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
IsInitialized() const258 bool FieldMask::IsInitialized() const {
259 return true;
260 }
261
InternalSwap(FieldMask * other)262 void FieldMask::InternalSwap(FieldMask* other) {
263 using std::swap;
264 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
265 _impl_.paths_.InternalSwap(&other->_impl_.paths_);
266 }
267
GetMetadata() const268 ::PROTOBUF_NAMESPACE_ID::Metadata FieldMask::GetMetadata() const {
269 return ::_pbi::AssignDescriptors(
270 &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_getter, &descriptor_table_google_2fprotobuf_2ffield_5fmask_2eproto_once,
271 file_level_metadata_google_2fprotobuf_2ffield_5fmask_2eproto[0]);
272 }
273
274 // @@protoc_insertion_point(namespace_scope)
275 PROTOBUF_NAMESPACE_CLOSE
276 PROTOBUF_NAMESPACE_OPEN
277 template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::FieldMask*
CreateMaybeMessage(Arena * arena)278 Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::FieldMask >(Arena* arena) {
279 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::FieldMask >(arena);
280 }
281 PROTOBUF_NAMESPACE_CLOSE
282
283 // @@protoc_insertion_point(global_scope)
284 #include <google/protobuf/port_undef.inc>
285