1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/any.proto
3
4 #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
6
7 #include <limits>
8 #include <string>
9
10 #include <google/protobuf/port_def.inc>
11 #if PROTOBUF_VERSION < 3013000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
14 #error your headers.
15 #endif
16 #if 3013000 < PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
20 #endif
21
22 #include <google/protobuf/port_undef.inc>
23 #include <google/protobuf/io/coded_stream.h>
24 #include <google/protobuf/arena.h>
25 #include <google/protobuf/arenastring.h>
26 #include <google/protobuf/generated_message_table_driven.h>
27 #include <google/protobuf/generated_message_util.h>
28 #include <google/protobuf/inlined_string_field.h>
29 #include <google/protobuf/metadata_lite.h>
30 #include <google/protobuf/generated_message_reflection.h>
31 #include <google/protobuf/message.h>
32 #include <google/protobuf/repeated_field.h> // IWYU pragma: export
33 #include <google/protobuf/extension_set.h> // IWYU pragma: export
34 #include <google/protobuf/unknown_field_set.h>
35 // @@protoc_insertion_point(includes)
36 #include <google/protobuf/port_def.inc>
37 #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT
38 PROTOBUF_NAMESPACE_OPEN
39 namespace internal {
40 class AnyMetadata;
41 } // namespace internal
42 PROTOBUF_NAMESPACE_CLOSE
43
44 // Internal implementation detail -- do not use these members.
45 struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
46 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
47 PROTOBUF_SECTION_VARIABLE(protodesc_cold);
48 static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
49 PROTOBUF_SECTION_VARIABLE(protodesc_cold);
50 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
51 PROTOBUF_SECTION_VARIABLE(protodesc_cold);
52 static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
53 static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
54 static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
55 };
56 extern PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto;
57 PROTOBUF_NAMESPACE_OPEN
58 class Any;
59 class AnyDefaultTypeInternal;
60 PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
61 PROTOBUF_NAMESPACE_CLOSE
62 PROTOBUF_NAMESPACE_OPEN
63 template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(Arena*);
64 PROTOBUF_NAMESPACE_CLOSE
65 PROTOBUF_NAMESPACE_OPEN
66
67 // ===================================================================
68
69 class PROTOBUF_EXPORT Any PROTOBUF_FINAL :
70 public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
71 public:
Any()72 inline Any() : Any(nullptr) {}
73 virtual ~Any();
74
75 Any(const Any& from);
Any(Any && from)76 Any(Any&& from) noexcept
77 : Any() {
78 *this = ::std::move(from);
79 }
80
81 inline Any& operator=(const Any& from) {
82 CopyFrom(from);
83 return *this;
84 }
85 inline Any& operator=(Any&& from) noexcept {
86 if (GetArena() == from.GetArena()) {
87 if (this != &from) InternalSwap(&from);
88 } else {
89 CopyFrom(from);
90 }
91 return *this;
92 }
93
descriptor()94 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
95 return GetDescriptor();
96 }
GetDescriptor()97 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
98 return GetMetadataStatic().descriptor;
99 }
GetReflection()100 static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
101 return GetMetadataStatic().reflection;
102 }
103 static const Any& default_instance();
104
105 static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
internal_default_instance()106 static inline const Any* internal_default_instance() {
107 return reinterpret_cast<const Any*>(
108 &_Any_default_instance_);
109 }
110 static constexpr int kIndexInFileMessages =
111 0;
112
113 // implements Any -----------------------------------------------
114
PackFrom(const::PROTOBUF_NAMESPACE_ID::Message & message)115 void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
116 _any_metadata_.PackFrom(message);
117 }
PackFrom(const::PROTOBUF_NAMESPACE_ID::Message & message,const std::string & type_url_prefix)118 void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
119 const std::string& type_url_prefix) {
120 _any_metadata_.PackFrom(message, type_url_prefix);
121 }
UnpackTo(::PROTOBUF_NAMESPACE_ID::Message * message)122 bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const {
123 return _any_metadata_.UnpackTo(message);
124 }
125 static bool GetAnyFieldDescriptors(
126 const ::PROTOBUF_NAMESPACE_ID::Message& message,
127 const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field,
128 const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
129 template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
PackFrom(const T & message)130 void PackFrom(const T& message) {
131 _any_metadata_.PackFrom<T>(message);
132 }
133 template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
PackFrom(const T & message,const std::string & type_url_prefix)134 void PackFrom(const T& message,
135 const std::string& type_url_prefix) {
136 _any_metadata_.PackFrom<T>(message, type_url_prefix);}
137 template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
UnpackTo(T * message)138 bool UnpackTo(T* message) const {
139 return _any_metadata_.UnpackTo<T>(message);
140 }
Is()141 template<typename T> bool Is() const {
142 return _any_metadata_.Is<T>();
143 }
144 static bool ParseAnyTypeUrl(const string& type_url,
145 std::string* full_type_name);
swap(Any & a,Any & b)146 friend void swap(Any& a, Any& b) {
147 a.Swap(&b);
148 }
Swap(Any * other)149 inline void Swap(Any* other) {
150 if (other == this) return;
151 if (GetArena() == other->GetArena()) {
152 InternalSwap(other);
153 } else {
154 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
155 }
156 }
UnsafeArenaSwap(Any * other)157 void UnsafeArenaSwap(Any* other) {
158 if (other == this) return;
159 GOOGLE_DCHECK(GetArena() == other->GetArena());
160 InternalSwap(other);
161 }
162
163 // implements Message ----------------------------------------------
164
New()165 inline Any* New() const final {
166 return CreateMaybeMessage<Any>(nullptr);
167 }
168
New(::PROTOBUF_NAMESPACE_ID::Arena * arena)169 Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
170 return CreateMaybeMessage<Any>(arena);
171 }
172 void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
173 void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
174 void CopyFrom(const Any& from);
175 void MergeFrom(const Any& from);
176 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
177 bool IsInitialized() const final;
178
179 size_t ByteSizeLong() const final;
180 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
181 ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
182 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
GetCachedSize()183 int GetCachedSize() const final { return _cached_size_.Get(); }
184
185 private:
186 inline void SharedCtor();
187 inline void SharedDtor();
188 void SetCachedSize(int size) const final;
189 void InternalSwap(Any* other);
190 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
FullMessageName()191 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
192 return "google.protobuf.Any";
193 }
194 protected:
195 explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena);
196 private:
197 static void ArenaDtor(void* object);
198 inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
199 public:
200
201 ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
202 private:
GetMetadataStatic()203 static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
204 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fany_2eproto);
205 return ::descriptor_table_google_2fprotobuf_2fany_2eproto.file_level_metadata[kIndexInFileMessages];
206 }
207
208 public:
209
210 // nested types ----------------------------------------------------
211
212 // accessors -------------------------------------------------------
213
214 enum : int {
215 kTypeUrlFieldNumber = 1,
216 kValueFieldNumber = 2,
217 };
218 // string type_url = 1;
219 void clear_type_url();
220 const std::string& type_url() const;
221 void set_type_url(const std::string& value);
222 void set_type_url(std::string&& value);
223 void set_type_url(const char* value);
224 void set_type_url(const char* value, size_t size);
225 std::string* mutable_type_url();
226 std::string* release_type_url();
227 void set_allocated_type_url(std::string* type_url);
228 private:
229 const std::string& _internal_type_url() const;
230 void _internal_set_type_url(const std::string& value);
231 std::string* _internal_mutable_type_url();
232 public:
233
234 // bytes value = 2;
235 void clear_value();
236 const std::string& value() const;
237 void set_value(const std::string& value);
238 void set_value(std::string&& value);
239 void set_value(const char* value);
240 void set_value(const void* value, size_t size);
241 std::string* mutable_value();
242 std::string* release_value();
243 void set_allocated_value(std::string* value);
244 private:
245 const std::string& _internal_value() const;
246 void _internal_set_value(const std::string& value);
247 std::string* _internal_mutable_value();
248 public:
249
250 // @@protoc_insertion_point(class_scope:google.protobuf.Any)
251 private:
252 class _Internal;
253
254 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
255 typedef void InternalArenaConstructable_;
256 typedef void DestructorSkippable_;
257 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
258 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
259 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
260 ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
261 friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
262 };
263 // ===================================================================
264
265
266 // ===================================================================
267
268 #ifdef __GNUC__
269 #pragma GCC diagnostic push
270 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
271 #endif // __GNUC__
272 // Any
273
274 // string type_url = 1;
clear_type_url()275 inline void Any::clear_type_url() {
276 type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
277 }
type_url()278 inline const std::string& Any::type_url() const {
279 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
280 return _internal_type_url();
281 }
set_type_url(const std::string & value)282 inline void Any::set_type_url(const std::string& value) {
283 _internal_set_type_url(value);
284 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
285 }
mutable_type_url()286 inline std::string* Any::mutable_type_url() {
287 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
288 return _internal_mutable_type_url();
289 }
_internal_type_url()290 inline const std::string& Any::_internal_type_url() const {
291 return type_url_.Get();
292 }
_internal_set_type_url(const std::string & value)293 inline void Any::_internal_set_type_url(const std::string& value) {
294
295 type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
296 }
set_type_url(std::string && value)297 inline void Any::set_type_url(std::string&& value) {
298
299 type_url_.Set(
300 &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
301 // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
302 }
set_type_url(const char * value)303 inline void Any::set_type_url(const char* value) {
304 GOOGLE_DCHECK(value != nullptr);
305
306 type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
307 GetArena());
308 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
309 }
set_type_url(const char * value,size_t size)310 inline void Any::set_type_url(const char* value,
311 size_t size) {
312
313 type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
314 reinterpret_cast<const char*>(value), size), GetArena());
315 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
316 }
_internal_mutable_type_url()317 inline std::string* Any::_internal_mutable_type_url() {
318
319 return type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
320 }
release_type_url()321 inline std::string* Any::release_type_url() {
322 // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
323 return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
324 }
set_allocated_type_url(std::string * type_url)325 inline void Any::set_allocated_type_url(std::string* type_url) {
326 if (type_url != nullptr) {
327
328 } else {
329
330 }
331 type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
332 GetArena());
333 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
334 }
335
336 // bytes value = 2;
clear_value()337 inline void Any::clear_value() {
338 value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
339 }
value()340 inline const std::string& Any::value() const {
341 // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
342 return _internal_value();
343 }
set_value(const std::string & value)344 inline void Any::set_value(const std::string& value) {
345 _internal_set_value(value);
346 // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
347 }
mutable_value()348 inline std::string* Any::mutable_value() {
349 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
350 return _internal_mutable_value();
351 }
_internal_value()352 inline const std::string& Any::_internal_value() const {
353 return value_.Get();
354 }
_internal_set_value(const std::string & value)355 inline void Any::_internal_set_value(const std::string& value) {
356
357 value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
358 }
set_value(std::string && value)359 inline void Any::set_value(std::string&& value) {
360
361 value_.Set(
362 &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
363 // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
364 }
set_value(const char * value)365 inline void Any::set_value(const char* value) {
366 GOOGLE_DCHECK(value != nullptr);
367
368 value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
369 GetArena());
370 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
371 }
set_value(const void * value,size_t size)372 inline void Any::set_value(const void* value,
373 size_t size) {
374
375 value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
376 reinterpret_cast<const char*>(value), size), GetArena());
377 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
378 }
_internal_mutable_value()379 inline std::string* Any::_internal_mutable_value() {
380
381 return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
382 }
release_value()383 inline std::string* Any::release_value() {
384 // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
385 return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
386 }
set_allocated_value(std::string * value)387 inline void Any::set_allocated_value(std::string* value) {
388 if (value != nullptr) {
389
390 } else {
391
392 }
393 value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
394 GetArena());
395 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
396 }
397
398 #ifdef __GNUC__
399 #pragma GCC diagnostic pop
400 #endif // __GNUC__
401
402 // @@protoc_insertion_point(namespace_scope)
403
404 PROTOBUF_NAMESPACE_CLOSE
405
406 // @@protoc_insertion_point(global_scope)
407
408 #include <google/protobuf/port_undef.inc>
409 #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
410