1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
3 // source: google/protobuf/any.proto
4 // Protobuf C++ Version: 5.29.4
5
6 #include "google/protobuf/any.pb.h"
7
8 #include <algorithm>
9 #include <type_traits>
10 #include "google/protobuf/io/coded_stream.h"
11 #include "google/protobuf/generated_message_tctable_impl.h"
12 #include "google/protobuf/extension_set.h"
13 #include "google/protobuf/generated_message_util.h"
14 #include "google/protobuf/wire_format_lite.h"
15 #include "google/protobuf/descriptor.h"
16 #include "google/protobuf/generated_message_reflection.h"
17 #include "google/protobuf/reflection_ops.h"
18 #include "google/protobuf/wire_format.h"
19 // @@protoc_insertion_point(includes)
20
21 // Must be included last.
22 #include "google/protobuf/port_def.inc"
23 PROTOBUF_PRAGMA_INIT_SEG
24 namespace _pb = ::google::protobuf;
25 namespace _pbi = ::google::protobuf::internal;
26 namespace _fl = ::google::protobuf::internal::field_layout;
27 #if defined(__llvm__)
28 #pragma clang diagnostic push
29 #pragma clang diagnostic ignored "-Wuninitialized"
30 #endif // __llvm__
31 namespace google {
32 namespace protobuf {
33
Impl_(::_pbi::ConstantInitialized)34 inline constexpr Any::Impl_::Impl_(
35 ::_pbi::ConstantInitialized) noexcept
36 : type_url_(
37 &::google::protobuf::internal::fixed_address_empty_string,
38 ::_pbi::ConstantInitialized()),
39 value_(
40 &::google::protobuf::internal::fixed_address_empty_string,
41 ::_pbi::ConstantInitialized()),
42 _cached_size_{0} {}
43
44 template <typename>
Any(::_pbi::ConstantInitialized)45 PROTOBUF_CONSTEXPR Any::Any(::_pbi::ConstantInitialized)
46 #if defined(PROTOBUF_CUSTOM_VTABLE)
47 : ::google::protobuf::Message(_class_data_.base()),
48 #else // PROTOBUF_CUSTOM_VTABLE
49 : ::google::protobuf::Message(),
50 #endif // PROTOBUF_CUSTOM_VTABLE
51 _impl_(::_pbi::ConstantInitialized()) {
52 }
53 struct AnyDefaultTypeInternal {
AnyDefaultTypeInternalgoogle::protobuf::AnyDefaultTypeInternal54 PROTOBUF_CONSTEXPR AnyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~AnyDefaultTypeInternalgoogle::protobuf::AnyDefaultTypeInternal55 ~AnyDefaultTypeInternal() {}
56 union {
57 Any _instance;
58 };
59 };
60
61 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
62 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AnyDefaultTypeInternal _Any_default_instance_;
63 } // namespace protobuf
64 } // namespace google
65 static constexpr const ::_pb::EnumDescriptor**
66 file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto = nullptr;
67 static constexpr const ::_pb::ServiceDescriptor**
68 file_level_service_descriptors_google_2fprotobuf_2fany_2eproto = nullptr;
69 const ::uint32_t
70 TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
71 protodesc_cold) = {
72 ~0u, // no _has_bits_
73 PROTOBUF_FIELD_OFFSET(::google::protobuf::Any, _internal_metadata_),
74 ~0u, // no _extensions_
75 ~0u, // no _oneof_case_
76 ~0u, // no _weak_field_map_
77 ~0u, // no _inlined_string_donated_
78 ~0u, // no _split_
79 ~0u, // no sizeof(Split)
80 PROTOBUF_FIELD_OFFSET(::google::protobuf::Any, _impl_.type_url_),
81 PROTOBUF_FIELD_OFFSET(::google::protobuf::Any, _impl_.value_),
82 };
83
84 static const ::_pbi::MigrationSchema
85 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
86 {0, -1, -1, sizeof(::google::protobuf::Any)},
87 };
88 static const ::_pb::Message* const file_default_instances[] = {
89 &::google::protobuf::_Any_default_instance_._instance,
90 };
91 const char descriptor_table_protodef_google_2fprotobuf_2fany_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
92 protodesc_cold) = {
93 "\n\031google/protobuf/any.proto\022\017google.prot"
94 "obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002"
95 " \001(\014Bv\n\023com.google.protobufB\010AnyProtoP\001Z"
96 ",google.golang.org/protobuf/types/known/"
97 "anypb\242\002\003GPB\252\002\036Google.Protobuf.WellKnownT"
98 "ypesb\006proto3"
99 };
100 static ::absl::once_flag descriptor_table_google_2fprotobuf_2fany_2eproto_once;
101 PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto = {
102 false,
103 false,
104 212,
105 descriptor_table_protodef_google_2fprotobuf_2fany_2eproto,
106 "google/protobuf/any.proto",
107 &descriptor_table_google_2fprotobuf_2fany_2eproto_once,
108 nullptr,
109 0,
110 1,
111 schemas,
112 file_default_instances,
113 TableStruct_google_2fprotobuf_2fany_2eproto::offsets,
114 file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto,
115 file_level_service_descriptors_google_2fprotobuf_2fany_2eproto,
116 };
117 namespace google {
118 namespace protobuf {
119 // ===================================================================
120
GetAnyFieldDescriptors(const::google::protobuf::Message & message,const::google::protobuf::FieldDescriptor ** type_url_field,const::google::protobuf::FieldDescriptor ** value_field)121 bool Any::GetAnyFieldDescriptors(
122 const ::google::protobuf::Message& message,
123 const ::google::protobuf::FieldDescriptor** type_url_field,
124 const ::google::protobuf::FieldDescriptor** value_field) {
125 return ::_pbi::GetAnyFieldDescriptors(message, type_url_field, value_field);
126 }
ParseAnyTypeUrl(::absl::string_view type_url,std::string * full_type_name)127 bool Any::ParseAnyTypeUrl(::absl::string_view type_url,
128 std::string* full_type_name) {
129 return ::_pbi::ParseAnyTypeUrl(type_url, full_type_name);
130 }
131 class Any::_Internal {
132 public:
133 };
134
Any(::google::protobuf::Arena * arena)135 Any::Any(::google::protobuf::Arena* arena)
136 #if defined(PROTOBUF_CUSTOM_VTABLE)
137 : ::google::protobuf::Message(arena, _class_data_.base()) {
138 #else // PROTOBUF_CUSTOM_VTABLE
139 : ::google::protobuf::Message(arena) {
140 #endif // PROTOBUF_CUSTOM_VTABLE
141 SharedCtor(arena);
142 // @@protoc_insertion_point(arena_constructor:google.protobuf.Any)
143 }
144 inline PROTOBUF_NDEBUG_INLINE Any::Impl_::Impl_(
145 ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
146 const Impl_& from, const ::google::protobuf::Any& from_msg)
147 : type_url_(arena, from.type_url_),
148 value_(arena, from.value_),
149 _cached_size_{0} {}
150
151 Any::Any(
152 ::google::protobuf::Arena* arena,
153 const Any& from)
154 #if defined(PROTOBUF_CUSTOM_VTABLE)
155 : ::google::protobuf::Message(arena, _class_data_.base()) {
156 #else // PROTOBUF_CUSTOM_VTABLE
157 : ::google::protobuf::Message(arena) {
158 #endif // PROTOBUF_CUSTOM_VTABLE
159 Any* const _this = this;
160 (void)_this;
161 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
162 from._internal_metadata_);
163 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
164
165 // @@protoc_insertion_point(copy_constructor:google.protobuf.Any)
166 }
167 inline PROTOBUF_NDEBUG_INLINE Any::Impl_::Impl_(
168 ::google::protobuf::internal::InternalVisibility visibility,
169 ::google::protobuf::Arena* arena)
170 : type_url_(arena),
171 value_(arena),
172 _cached_size_{0} {}
173
174 inline void Any::SharedCtor(::_pb::Arena* arena) {
175 new (&_impl_) Impl_(internal_visibility(), arena);
176 }
177 Any::~Any() {
178 // @@protoc_insertion_point(destructor:google.protobuf.Any)
179 SharedDtor(*this);
180 }
181 inline void Any::SharedDtor(MessageLite& self) {
182 Any& this_ = static_cast<Any&>(self);
183 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
184 ABSL_DCHECK(this_.GetArena() == nullptr);
185 this_._impl_.type_url_.Destroy();
186 this_._impl_.value_.Destroy();
187 this_._impl_.~Impl_();
188 }
189
190 inline void* Any::PlacementNew_(const void*, void* mem,
191 ::google::protobuf::Arena* arena) {
192 return ::new (mem) Any(arena);
193 }
194 constexpr auto Any::InternalNewImpl_() {
195 return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Any),
196 alignof(Any));
197 }
198 PROTOBUF_CONSTINIT
199 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
200 const ::google::protobuf::internal::ClassDataFull Any::_class_data_ = {
201 ::google::protobuf::internal::ClassData{
202 &_Any_default_instance_._instance,
203 &_table_.header,
204 nullptr, // OnDemandRegisterArenaDtor
205 nullptr, // IsInitialized
206 &Any::MergeImpl,
207 ::google::protobuf::Message::GetNewImpl<Any>(),
208 #if defined(PROTOBUF_CUSTOM_VTABLE)
209 &Any::SharedDtor,
210 ::google::protobuf::Message::GetClearImpl<Any>(), &Any::ByteSizeLong,
211 &Any::_InternalSerialize,
212 #endif // PROTOBUF_CUSTOM_VTABLE
213 PROTOBUF_FIELD_OFFSET(Any, _impl_._cached_size_),
214 false,
215 },
216 &Any::kDescriptorMethods,
217 &descriptor_table_google_2fprotobuf_2fany_2eproto,
218 nullptr, // tracker
219 };
220 const ::google::protobuf::internal::ClassData* Any::GetClassData() const {
221 ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
222 ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
223 return _class_data_.base();
224 }
225 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
226 const ::_pbi::TcParseTable<1, 2, 0, 36, 2> Any::_table_ = {
227 {
228 0, // no _has_bits_
229 0, // no _extensions_
230 2, 8, // max_field_number, fast_idx_mask
231 offsetof(decltype(_table_), field_lookup_table),
232 4294967292, // skipmap
233 offsetof(decltype(_table_), field_entries),
234 2, // num_field_entries
235 0, // num_aux_entries
236 offsetof(decltype(_table_), field_names), // no aux_entries
237 _class_data_.base(),
238 nullptr, // post_loop_handler
239 ::_pbi::TcParser::GenericFallback, // fallback
240 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
241 ::_pbi::TcParser::GetTable<::google::protobuf::Any>(), // to_prefetch
242 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
243 }, {{
244 // bytes value = 2;
245 {::_pbi::TcParser::FastBS1,
246 {18, 63, 0, PROTOBUF_FIELD_OFFSET(Any, _impl_.value_)}},
247 // string type_url = 1;
248 {::_pbi::TcParser::FastUS1,
249 {10, 63, 0, PROTOBUF_FIELD_OFFSET(Any, _impl_.type_url_)}},
250 }}, {{
251 65535, 65535
252 }}, {{
253 // string type_url = 1;
254 {PROTOBUF_FIELD_OFFSET(Any, _impl_.type_url_), 0, 0,
255 (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
256 // bytes value = 2;
257 {PROTOBUF_FIELD_OFFSET(Any, _impl_.value_), 0, 0,
258 (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
259 }},
260 // no aux_entries
261 {{
262 "\23\10\0\0\0\0\0\0"
263 "google.protobuf.Any"
264 "type_url"
265 }},
266 };
267
268 PROTOBUF_NOINLINE void Any::Clear() {
269 // @@protoc_insertion_point(message_clear_start:google.protobuf.Any)
270 ::google::protobuf::internal::TSanWrite(&_impl_);
271 ::uint32_t cached_has_bits = 0;
272 // Prevent compiler warnings about cached_has_bits being unused
273 (void) cached_has_bits;
274
275 _impl_.type_url_.ClearToEmpty();
276 _impl_.value_.ClearToEmpty();
277 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
278 }
279
280 #if defined(PROTOBUF_CUSTOM_VTABLE)
281 ::uint8_t* Any::_InternalSerialize(
282 const MessageLite& base, ::uint8_t* target,
283 ::google::protobuf::io::EpsCopyOutputStream* stream) {
284 const Any& this_ = static_cast<const Any&>(base);
285 #else // PROTOBUF_CUSTOM_VTABLE
286 ::uint8_t* Any::_InternalSerialize(
287 ::uint8_t* target,
288 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
289 const Any& this_ = *this;
290 #endif // PROTOBUF_CUSTOM_VTABLE
291 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any)
292 ::uint32_t cached_has_bits = 0;
293 (void)cached_has_bits;
294
295 // string type_url = 1;
296 if (!this_._internal_type_url().empty()) {
297 const std::string& _s = this_._internal_type_url();
298 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
299 _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Any.type_url");
300 target = stream->WriteStringMaybeAliased(1, _s, target);
301 }
302
303 // bytes value = 2;
304 if (!this_._internal_value().empty()) {
305 const std::string& _s = this_._internal_value();
306 target = stream->WriteBytesMaybeAliased(2, _s, target);
307 }
308
309 if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
310 target =
311 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
312 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
313 }
314 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Any)
315 return target;
316 }
317
318 #if defined(PROTOBUF_CUSTOM_VTABLE)
319 ::size_t Any::ByteSizeLong(const MessageLite& base) {
320 const Any& this_ = static_cast<const Any&>(base);
321 #else // PROTOBUF_CUSTOM_VTABLE
322 ::size_t Any::ByteSizeLong() const {
323 const Any& this_ = *this;
324 #endif // PROTOBUF_CUSTOM_VTABLE
325 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Any)
326 ::size_t total_size = 0;
327
328 ::uint32_t cached_has_bits = 0;
329 // Prevent compiler warnings about cached_has_bits being unused
330 (void)cached_has_bits;
331
332 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
333 {
334 // string type_url = 1;
335 if (!this_._internal_type_url().empty()) {
336 total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
337 this_._internal_type_url());
338 }
339 // bytes value = 2;
340 if (!this_._internal_value().empty()) {
341 total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
342 this_._internal_value());
343 }
344 }
345 return this_.MaybeComputeUnknownFieldsSize(total_size,
346 &this_._impl_._cached_size_);
347 }
348
349 void Any::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
350 auto* const _this = static_cast<Any*>(&to_msg);
351 auto& from = static_cast<const Any&>(from_msg);
352 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any)
353 ABSL_DCHECK_NE(&from, _this);
354 ::uint32_t cached_has_bits = 0;
355 (void) cached_has_bits;
356
357 if (!from._internal_type_url().empty()) {
358 _this->_internal_set_type_url(from._internal_type_url());
359 }
360 if (!from._internal_value().empty()) {
361 _this->_internal_set_value(from._internal_value());
362 }
363 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
364 }
365
366 void Any::CopyFrom(const Any& from) {
367 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Any)
368 if (&from == this) return;
369 Clear();
370 MergeFrom(from);
371 }
372
373
374 void Any::InternalSwap(Any* PROTOBUF_RESTRICT other) {
375 using std::swap;
376 auto* arena = GetArena();
377 ABSL_DCHECK_EQ(arena, other->GetArena());
378 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
379 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.type_url_, &other->_impl_.type_url_, arena);
380 ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena);
381 }
382
383 ::google::protobuf::Metadata Any::GetMetadata() const {
384 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
385 }
386 // @@protoc_insertion_point(namespace_scope)
387 } // namespace protobuf
388 } // namespace google
389 namespace google {
390 namespace protobuf {
391 } // namespace protobuf
392 } // namespace google
393 // @@protoc_insertion_point(global_scope)
394 #if defined(__llvm__)
395 #pragma clang diagnostic pop
396 #endif // __llvm__
397 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
398 _static_init2_ PROTOBUF_UNUSED =
399 (::_pbi::AddDescriptors(&descriptor_table_google_2fprotobuf_2fany_2eproto),
400 ::std::false_type{});
401 #include "google/protobuf/port_undef.inc"
402