any.pb.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  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_2epb_2eh
  4. #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto_2epb_2eh
  5. #include <limits>
  6. #include <string>
  7. #include <type_traits>
  8. #include "google/protobuf/port_def.inc"
  9. #if PROTOBUF_VERSION < 4022000
  10. #error "This file was generated by a newer version of protoc which is"
  11. #error "incompatible with your Protocol Buffer headers. Please update"
  12. #error "your headers."
  13. #endif // PROTOBUF_VERSION
  14. #if 4022003 < PROTOBUF_MIN_PROTOC_VERSION
  15. #error "This file was generated by an older version of protoc which is"
  16. #error "incompatible with your Protocol Buffer headers. Please"
  17. #error "regenerate this file with a newer version of protoc."
  18. #endif // PROTOBUF_MIN_PROTOC_VERSION
  19. #include "google/protobuf/port_undef.inc"
  20. #include "google/protobuf/io/coded_stream.h"
  21. #include "google/protobuf/arena.h"
  22. #include "google/protobuf/arenastring.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. // Must be included last.
  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 ::uint32_t offsets[];
  42. };
  43. PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable
  44. descriptor_table_google_2fprotobuf_2fany_2eproto;
  45. PROTOBUF_NAMESPACE_OPEN
  46. class Any;
  47. struct AnyDefaultTypeInternal;
  48. PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
  49. template <>
  50. PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Any>(Arena*);
  51. PROTOBUF_NAMESPACE_CLOSE
  52. PROTOBUF_NAMESPACE_OPEN
  53. // ===================================================================
  54. // -------------------------------------------------------------------
  55. class PROTOBUF_EXPORT Any final :
  56. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
  57. public:
  58. inline Any() : Any(nullptr) {}
  59. ~Any() override;
  60. explicit PROTOBUF_CONSTEXPR Any(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
  61. Any(const Any& from);
  62. Any(Any&& from) noexcept
  63. : Any() {
  64. *this = ::std::move(from);
  65. }
  66. inline Any& operator=(const Any& from) {
  67. CopyFrom(from);
  68. return *this;
  69. }
  70. inline Any& operator=(Any&& from) noexcept {
  71. if (this == &from) return *this;
  72. if (GetOwningArena() == from.GetOwningArena()
  73. #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
  74. && GetOwningArena() != nullptr
  75. #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
  76. ) {
  77. InternalSwap(&from);
  78. } else {
  79. CopyFrom(from);
  80. }
  81. return *this;
  82. }
  83. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
  84. return GetDescriptor();
  85. }
  86. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
  87. return default_instance().GetMetadata().descriptor;
  88. }
  89. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
  90. return default_instance().GetMetadata().reflection;
  91. }
  92. static const Any& default_instance() {
  93. return *internal_default_instance();
  94. }
  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. bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
  103. ABSL_DCHECK_NE(&message, this);
  104. return _impl_._any_metadata_.PackFrom(GetArena(), message);
  105. }
  106. bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
  107. ::absl::string_view type_url_prefix) {
  108. ABSL_DCHECK_NE(&message, this);
  109. return _impl_._any_metadata_.PackFrom(GetArena(), message, type_url_prefix);
  110. }
  111. bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const {
  112. return _impl_._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 _impl_._any_metadata_.PackFrom<T>(GetArena(), 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. ::absl::string_view type_url_prefix) {
  125. return _impl_._any_metadata_.PackFrom<T>(GetArena(), 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 _impl_._any_metadata_.UnpackTo<T>(message);
  129. }
  130. template<typename T> bool Is() const {
  131. return _impl_._any_metadata_.Is<T>();
  132. }
  133. static bool ParseAnyTypeUrl(::absl::string_view 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. #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
  141. if (GetOwningArena() != nullptr &&
  142. GetOwningArena() == other->GetOwningArena()) {
  143. #else // PROTOBUF_FORCE_COPY_IN_SWAP
  144. if (GetOwningArena() == other->GetOwningArena()) {
  145. #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
  146. InternalSwap(other);
  147. } else {
  148. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  149. }
  150. }
  151. void UnsafeArenaSwap(Any* other) {
  152. if (other == this) return;
  153. ABSL_DCHECK(GetOwningArena() == other->GetOwningArena());
  154. InternalSwap(other);
  155. }
  156. // implements Message ----------------------------------------------
  157. Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
  158. return CreateMaybeMessage<Any>(arena);
  159. }
  160. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  161. void CopyFrom(const Any& from);
  162. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  163. void MergeFrom( const Any& from) {
  164. Any::MergeImpl(*this, from);
  165. }
  166. private:
  167. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  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. ::uint8_t* _InternalSerialize(
  174. ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  175. int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
  176. private:
  177. void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  178. void SharedDtor();
  179. void SetCachedSize(int size) const final;
  180. void InternalSwap(Any* other);
  181. private:
  182. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  183. static ::absl::string_view FullMessageName() {
  184. return "google.protobuf.Any";
  185. }
  186. protected:
  187. explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  188. public:
  189. static const ClassData _class_data_;
  190. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
  191. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  192. // nested types ----------------------------------------------------
  193. // accessors -------------------------------------------------------
  194. enum : int {
  195. kTypeUrlFieldNumber = 1,
  196. kValueFieldNumber = 2,
  197. };
  198. // string type_url = 1;
  199. void clear_type_url() ;
  200. const std::string& type_url() const;
  201. template <typename Arg_ = const std::string&, typename... Args_>
  202. void set_type_url(Arg_&& arg, Args_... args);
  203. std::string* mutable_type_url();
  204. PROTOBUF_NODISCARD std::string* release_type_url();
  205. void set_allocated_type_url(std::string* ptr);
  206. private:
  207. const std::string& _internal_type_url() const;
  208. inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_url(
  209. const std::string& value);
  210. std::string* _internal_mutable_type_url();
  211. public:
  212. // bytes value = 2;
  213. void clear_value() ;
  214. const std::string& value() const;
  215. template <typename Arg_ = const std::string&, typename... Args_>
  216. void set_value(Arg_&& arg, Args_... args);
  217. std::string* mutable_value();
  218. PROTOBUF_NODISCARD std::string* release_value();
  219. void set_allocated_value(std::string* ptr);
  220. private:
  221. const std::string& _internal_value() const;
  222. inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(
  223. const std::string& value);
  224. std::string* _internal_mutable_value();
  225. public:
  226. // @@protoc_insertion_point(class_scope:google.protobuf.Any)
  227. private:
  228. class _Internal;
  229. template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  230. typedef void InternalArenaConstructable_;
  231. typedef void DestructorSkippable_;
  232. struct Impl_ {
  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. };
  238. union { Impl_ _impl_; };
  239. friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
  240. };
  241. // ===================================================================
  242. // ===================================================================
  243. #ifdef __GNUC__
  244. #pragma GCC diagnostic push
  245. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  246. #endif // __GNUC__
  247. // -------------------------------------------------------------------
  248. // Any
  249. // string type_url = 1;
  250. inline void Any::clear_type_url() {
  251. _impl_.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 Arg_, typename... Args_>
  258. inline PROTOBUF_ALWAYS_INLINE void Any::set_type_url(Arg_&& arg,
  259. Args_... args) {
  260. ;
  261. _impl_.type_url_.Set(static_cast<Arg_&&>(arg), args..., GetArenaForAllocation());
  262. // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
  263. }
  264. inline std::string* Any::mutable_type_url() {
  265. std::string* _s = _internal_mutable_type_url();
  266. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
  267. return _s;
  268. }
  269. inline const std::string& Any::_internal_type_url() const {
  270. return _impl_.type_url_.Get();
  271. }
  272. inline void Any::_internal_set_type_url(const std::string& value) {
  273. ;
  274. _impl_.type_url_.Set(value, GetArenaForAllocation());
  275. }
  276. inline std::string* Any::_internal_mutable_type_url() {
  277. ;
  278. return _impl_.type_url_.Mutable( GetArenaForAllocation());
  279. }
  280. inline std::string* Any::release_type_url() {
  281. // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
  282. return _impl_.type_url_.Release();
  283. }
  284. inline void Any::set_allocated_type_url(std::string* value) {
  285. _impl_.type_url_.SetAllocated(value, GetArenaForAllocation());
  286. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  287. if (_impl_.type_url_.IsDefault()) {
  288. _impl_.type_url_.Set("", GetArenaForAllocation());
  289. }
  290. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  291. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
  292. }
  293. // bytes value = 2;
  294. inline void Any::clear_value() {
  295. _impl_.value_.ClearToEmpty();
  296. }
  297. inline const std::string& Any::value() const {
  298. // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
  299. return _internal_value();
  300. }
  301. template <typename Arg_, typename... Args_>
  302. inline PROTOBUF_ALWAYS_INLINE void Any::set_value(Arg_&& arg,
  303. Args_... args) {
  304. ;
  305. _impl_.value_.SetBytes(static_cast<Arg_&&>(arg), 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 _impl_.value_.Get();
  315. }
  316. inline void Any::_internal_set_value(const std::string& value) {
  317. ;
  318. _impl_.value_.Set(value, GetArenaForAllocation());
  319. }
  320. inline std::string* Any::_internal_mutable_value() {
  321. ;
  322. return _impl_.value_.Mutable( GetArenaForAllocation());
  323. }
  324. inline std::string* Any::release_value() {
  325. // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
  326. return _impl_.value_.Release();
  327. }
  328. inline void Any::set_allocated_value(std::string* value) {
  329. _impl_.value_.SetAllocated(value, GetArenaForAllocation());
  330. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  331. if (_impl_.value_.IsDefault()) {
  332. _impl_.value_.Set("", GetArenaForAllocation());
  333. }
  334. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  335. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
  336. }
  337. #ifdef __GNUC__
  338. #pragma GCC diagnostic pop
  339. #endif // __GNUC__
  340. // @@protoc_insertion_point(namespace_scope)
  341. PROTOBUF_NAMESPACE_CLOSE
  342. // @@protoc_insertion_point(global_scope)
  343. #include "google/protobuf/port_undef.inc"
  344. #endif // GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto_2epb_2eh