any.pb.h 15 KB

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