any.pb.h 15 KB

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