any.pb.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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 < 3017000
  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 3017003 < 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. InternalSwap(&from);
  80. } else {
  81. CopyFrom(from);
  82. }
  83. return *this;
  84. }
  85. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
  86. return GetDescriptor();
  87. }
  88. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
  89. return default_instance().GetMetadata().descriptor;
  90. }
  91. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
  92. return default_instance().GetMetadata().reflection;
  93. }
  94. static const Any& default_instance() {
  95. return *internal_default_instance();
  96. }
  97. static inline const Any* internal_default_instance() {
  98. return reinterpret_cast<const Any*>(
  99. &_Any_default_instance_);
  100. }
  101. static constexpr int kIndexInFileMessages =
  102. 0;
  103. // implements Any -----------------------------------------------
  104. bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
  105. return _any_metadata_.PackFrom(message);
  106. }
  107. bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
  108. ::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) {
  109. return _any_metadata_.PackFrom(message, type_url_prefix);
  110. }
  111. bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const {
  112. return _any_metadata_.UnpackTo(message);
  113. }
  114. static bool GetAnyFieldDescriptors(
  115. const ::PROTOBUF_NAMESPACE_ID::Message& message,
  116. const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field,
  117. const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
  118. template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  119. bool PackFrom(const T& message) {
  120. return _any_metadata_.PackFrom<T>(message);
  121. }
  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. ::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) {
  125. return _any_metadata_.PackFrom<T>(message, type_url_prefix);}
  126. template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  127. bool UnpackTo(T* message) const {
  128. return _any_metadata_.UnpackTo<T>(message);
  129. }
  130. template<typename T> bool Is() const {
  131. return _any_metadata_.Is<T>();
  132. }
  133. static bool ParseAnyTypeUrl(::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url,
  134. std::string* full_type_name);
  135. friend void swap(Any& a, Any& b) {
  136. a.Swap(&b);
  137. }
  138. inline void Swap(Any* other) {
  139. if (other == this) return;
  140. if (GetOwningArena() == other->GetOwningArena()) {
  141. InternalSwap(other);
  142. } else {
  143. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  144. }
  145. }
  146. void UnsafeArenaSwap(Any* other) {
  147. if (other == this) return;
  148. GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
  149. InternalSwap(other);
  150. }
  151. // implements Message ----------------------------------------------
  152. inline Any* New() const final {
  153. return new Any();
  154. }
  155. Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
  156. return CreateMaybeMessage<Any>(arena);
  157. }
  158. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  159. void CopyFrom(const Any& from);
  160. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  161. void MergeFrom(const Any& from);
  162. private:
  163. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, const ::PROTOBUF_NAMESPACE_ID::Message&from);
  164. public:
  165. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  166. bool IsInitialized() const final;
  167. size_t ByteSizeLong() const final;
  168. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  169. ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
  170. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  171. int GetCachedSize() const final { return _cached_size_.Get(); }
  172. private:
  173. void SharedCtor();
  174. void SharedDtor();
  175. void SetCachedSize(int size) const final;
  176. void InternalSwap(Any* other);
  177. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  178. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
  179. return "google.protobuf.Any";
  180. }
  181. protected:
  182. explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  183. bool is_message_owned = false);
  184. private:
  185. static void ArenaDtor(void* object);
  186. inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  187. public:
  188. static const ClassData _class_data_;
  189. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
  190. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  191. // nested types ----------------------------------------------------
  192. // accessors -------------------------------------------------------
  193. enum : int {
  194. kTypeUrlFieldNumber = 1,
  195. kValueFieldNumber = 2,
  196. };
  197. // string type_url = 1;
  198. void clear_type_url();
  199. const std::string& type_url() const;
  200. template <typename ArgT0 = const std::string&, typename... ArgT>
  201. void set_type_url(ArgT0&& arg0, ArgT... args);
  202. std::string* mutable_type_url();
  203. PROTOBUF_MUST_USE_RESULT 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. inline PROTOBUF_ALWAYS_INLINE 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. template <typename ArgT0 = const std::string&, typename... ArgT>
  214. void set_value(ArgT0&& arg0, ArgT... args);
  215. std::string* mutable_value();
  216. PROTOBUF_MUST_USE_RESULT std::string* release_value();
  217. void set_allocated_value(std::string* value);
  218. private:
  219. const std::string& _internal_value() const;
  220. inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value);
  221. std::string* _internal_mutable_value();
  222. public:
  223. // @@protoc_insertion_point(class_scope:google.protobuf.Any)
  224. private:
  225. class _Internal;
  226. template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  227. typedef void InternalArenaConstructable_;
  228. typedef void DestructorSkippable_;
  229. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
  230. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
  231. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  232. ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
  233. friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
  234. };
  235. // ===================================================================
  236. // ===================================================================
  237. #ifdef __GNUC__
  238. #pragma GCC diagnostic push
  239. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  240. #endif // __GNUC__
  241. // Any
  242. // string type_url = 1;
  243. inline void Any::clear_type_url() {
  244. type_url_.ClearToEmpty();
  245. }
  246. inline const std::string& Any::type_url() const {
  247. // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
  248. return _internal_type_url();
  249. }
  250. template <typename ArgT0, typename... ArgT>
  251. inline PROTOBUF_ALWAYS_INLINE
  252. void Any::set_type_url(ArgT0&& arg0, ArgT... args) {
  253. type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
  254. // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
  255. }
  256. inline std::string* Any::mutable_type_url() {
  257. std::string* _s = _internal_mutable_type_url();
  258. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
  259. return _s;
  260. }
  261. inline const std::string& Any::_internal_type_url() const {
  262. return type_url_.Get();
  263. }
  264. inline void Any::_internal_set_type_url(const std::string& value) {
  265. type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
  266. }
  267. inline std::string* Any::_internal_mutable_type_url() {
  268. return type_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
  269. }
  270. inline std::string* Any::release_type_url() {
  271. // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
  272. return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
  273. }
  274. inline void Any::set_allocated_type_url(std::string* type_url) {
  275. if (type_url != nullptr) {
  276. } else {
  277. }
  278. type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
  279. GetArenaForAllocation());
  280. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
  281. }
  282. // bytes value = 2;
  283. inline void Any::clear_value() {
  284. value_.ClearToEmpty();
  285. }
  286. inline const std::string& Any::value() const {
  287. // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
  288. return _internal_value();
  289. }
  290. template <typename ArgT0, typename... ArgT>
  291. inline PROTOBUF_ALWAYS_INLINE
  292. void Any::set_value(ArgT0&& arg0, ArgT... args) {
  293. value_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
  294. // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
  295. }
  296. inline std::string* Any::mutable_value() {
  297. std::string* _s = _internal_mutable_value();
  298. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
  299. return _s;
  300. }
  301. inline const std::string& Any::_internal_value() const {
  302. return value_.Get();
  303. }
  304. inline void Any::_internal_set_value(const std::string& value) {
  305. value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
  306. }
  307. inline std::string* Any::_internal_mutable_value() {
  308. return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
  309. }
  310. inline std::string* Any::release_value() {
  311. // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
  312. return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
  313. }
  314. inline void Any::set_allocated_value(std::string* value) {
  315. if (value != nullptr) {
  316. } else {
  317. }
  318. value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
  319. GetArenaForAllocation());
  320. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
  321. }
  322. #ifdef __GNUC__
  323. #pragma GCC diagnostic pop
  324. #endif // __GNUC__
  325. // @@protoc_insertion_point(namespace_scope)
  326. PROTOBUF_NAMESPACE_CLOSE
  327. // @@protoc_insertion_point(global_scope)
  328. #include <google/protobuf/port_undef.inc>
  329. #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto