any.pb.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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 < 3018000
  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 3018001 < 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 ::PROTOBUF_NAMESPACE_ID::uint32 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. if (GetOwningArena() == other->GetOwningArena()) {
  145. InternalSwap(other);
  146. } else {
  147. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  148. }
  149. }
  150. void UnsafeArenaSwap(Any* other) {
  151. if (other == this) return;
  152. GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
  153. InternalSwap(other);
  154. }
  155. // implements Message ----------------------------------------------
  156. inline Any* New() const final {
  157. return new Any();
  158. }
  159. Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
  160. return CreateMaybeMessage<Any>(arena);
  161. }
  162. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  163. void CopyFrom(const Any& from);
  164. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  165. void MergeFrom(const Any& from);
  166. private:
  167. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
  168. public:
  169. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  170. bool IsInitialized() const final;
  171. size_t ByteSizeLong() const final;
  172. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  173. ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
  174. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  175. int GetCachedSize() const final { return _cached_size_.Get(); }
  176. private:
  177. void SharedCtor();
  178. void SharedDtor();
  179. void SetCachedSize(int size) const final;
  180. void InternalSwap(Any* other);
  181. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  182. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
  183. return "google.protobuf.Any";
  184. }
  185. protected:
  186. explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  187. bool is_message_owned = false);
  188. private:
  189. static void ArenaDtor(void* object);
  190. inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  191. public:
  192. static const ClassData _class_data_;
  193. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
  194. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  195. // nested types ----------------------------------------------------
  196. // accessors -------------------------------------------------------
  197. enum : int {
  198. kTypeUrlFieldNumber = 1,
  199. kValueFieldNumber = 2,
  200. };
  201. // string type_url = 1;
  202. void clear_type_url();
  203. const std::string& type_url() const;
  204. template <typename ArgT0 = const std::string&, typename... ArgT>
  205. void set_type_url(ArgT0&& arg0, ArgT... args);
  206. std::string* mutable_type_url();
  207. PROTOBUF_MUST_USE_RESULT std::string* release_type_url();
  208. void set_allocated_type_url(std::string* type_url);
  209. private:
  210. const std::string& _internal_type_url() const;
  211. inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_url(const std::string& value);
  212. std::string* _internal_mutable_type_url();
  213. public:
  214. // bytes value = 2;
  215. void clear_value();
  216. const std::string& value() const;
  217. template <typename ArgT0 = const std::string&, typename... ArgT>
  218. void set_value(ArgT0&& arg0, ArgT... args);
  219. std::string* mutable_value();
  220. PROTOBUF_MUST_USE_RESULT std::string* release_value();
  221. void set_allocated_value(std::string* value);
  222. private:
  223. const std::string& _internal_value() const;
  224. inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value);
  225. std::string* _internal_mutable_value();
  226. public:
  227. // @@protoc_insertion_point(class_scope:google.protobuf.Any)
  228. private:
  229. class _Internal;
  230. template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  231. typedef void InternalArenaConstructable_;
  232. typedef void DestructorSkippable_;
  233. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
  234. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
  235. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  236. ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
  237. friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
  238. };
  239. // ===================================================================
  240. // ===================================================================
  241. #ifdef __GNUC__
  242. #pragma GCC diagnostic push
  243. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  244. #endif // __GNUC__
  245. // Any
  246. // string type_url = 1;
  247. inline void Any::clear_type_url() {
  248. type_url_.ClearToEmpty();
  249. }
  250. inline const std::string& Any::type_url() const {
  251. // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
  252. return _internal_type_url();
  253. }
  254. template <typename ArgT0, typename... ArgT>
  255. inline PROTOBUF_ALWAYS_INLINE
  256. void Any::set_type_url(ArgT0&& arg0, ArgT... args) {
  257. type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
  258. // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
  259. }
  260. inline std::string* Any::mutable_type_url() {
  261. std::string* _s = _internal_mutable_type_url();
  262. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
  263. return _s;
  264. }
  265. inline const std::string& Any::_internal_type_url() const {
  266. return type_url_.Get();
  267. }
  268. inline void Any::_internal_set_type_url(const std::string& value) {
  269. type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
  270. }
  271. inline std::string* Any::_internal_mutable_type_url() {
  272. return type_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
  273. }
  274. inline std::string* Any::release_type_url() {
  275. // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
  276. return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
  277. }
  278. inline void Any::set_allocated_type_url(std::string* type_url) {
  279. if (type_url != nullptr) {
  280. } else {
  281. }
  282. type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
  283. GetArenaForAllocation());
  284. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
  285. }
  286. // bytes value = 2;
  287. inline void Any::clear_value() {
  288. value_.ClearToEmpty();
  289. }
  290. inline const std::string& Any::value() const {
  291. // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
  292. return _internal_value();
  293. }
  294. template <typename ArgT0, typename... ArgT>
  295. inline PROTOBUF_ALWAYS_INLINE
  296. void Any::set_value(ArgT0&& arg0, ArgT... args) {
  297. value_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
  298. // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
  299. }
  300. inline std::string* Any::mutable_value() {
  301. std::string* _s = _internal_mutable_value();
  302. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
  303. return _s;
  304. }
  305. inline const std::string& Any::_internal_value() const {
  306. return value_.Get();
  307. }
  308. inline void Any::_internal_set_value(const std::string& value) {
  309. value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
  310. }
  311. inline std::string* Any::_internal_mutable_value() {
  312. return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
  313. }
  314. inline std::string* Any::release_value() {
  315. // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
  316. return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
  317. }
  318. inline void Any::set_allocated_value(std::string* value) {
  319. if (value != nullptr) {
  320. } else {
  321. }
  322. value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
  323. GetArenaForAllocation());
  324. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
  325. }
  326. #ifdef __GNUC__
  327. #pragma GCC diagnostic pop
  328. #endif // __GNUC__
  329. // @@protoc_insertion_point(namespace_scope)
  330. PROTOBUF_NAMESPACE_CLOSE
  331. // @@protoc_insertion_point(global_scope)
  332. #include <google/protobuf/port_undef.inc>
  333. #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto