You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

any.pb.h 14 kB

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