any.pb.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/any.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
  5. #include <string>
  6. #include <google/protobuf/stubs/common.h>
  7. #if GOOGLE_PROTOBUF_VERSION < 3006001
  8. #error This file was generated by a newer version of protoc which is
  9. #error incompatible with your Protocol Buffer headers. Please update
  10. #error your headers.
  11. #endif
  12. #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
  13. #error This file was generated by an older version of protoc which is
  14. #error incompatible with your Protocol Buffer headers. Please
  15. #error regenerate this file with a newer version of protoc.
  16. #endif
  17. #include <google/protobuf/io/coded_stream.h>
  18. #include <google/protobuf/arena.h>
  19. #include <google/protobuf/arenastring.h>
  20. #include <google/protobuf/generated_message_table_driven.h>
  21. #include <google/protobuf/generated_message_util.h>
  22. #include <google/protobuf/inlined_string_field.h>
  23. #include <google/protobuf/metadata.h>
  24. #include <google/protobuf/message.h>
  25. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  26. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  27. #include <google/protobuf/unknown_field_set.h>
  28. #include <google/protobuf/any.h>
  29. // @@protoc_insertion_point(includes)
  30. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fany_2eproto LIBPROTOBUF_EXPORT
  31. namespace protobuf_google_2fprotobuf_2fany_2eproto {
  32. // Internal implementation detail -- do not use these members.
  33. struct LIBPROTOBUF_EXPORT TableStruct {
  34. static const ::google::protobuf::internal::ParseTableField entries[];
  35. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  36. static const ::google::protobuf::internal::ParseTable schema[1];
  37. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  38. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  39. static const ::google::protobuf::uint32 offsets[];
  40. };
  41. void LIBPROTOBUF_EXPORT AddDescriptors();
  42. } // namespace protobuf_google_2fprotobuf_2fany_2eproto
  43. namespace google {
  44. namespace protobuf {
  45. class Any;
  46. class AnyDefaultTypeInternal;
  47. LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
  48. } // namespace protobuf
  49. } // namespace google
  50. namespace google {
  51. namespace protobuf {
  52. template<> LIBPROTOBUF_EXPORT ::google::protobuf::Any* Arena::CreateMaybeMessage<::google::protobuf::Any>(Arena*);
  53. } // namespace protobuf
  54. } // namespace google
  55. namespace google {
  56. namespace protobuf {
  57. // ===================================================================
  58. class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
  59. public:
  60. Any();
  61. virtual ~Any();
  62. Any(const Any& from);
  63. inline Any& operator=(const Any& from) {
  64. CopyFrom(from);
  65. return *this;
  66. }
  67. #if LANG_CXX11
  68. Any(Any&& from) noexcept
  69. : Any() {
  70. *this = ::std::move(from);
  71. }
  72. inline Any& operator=(Any&& from) noexcept {
  73. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  74. if (this != &from) InternalSwap(&from);
  75. } else {
  76. CopyFrom(from);
  77. }
  78. return *this;
  79. }
  80. #endif
  81. static const ::google::protobuf::Descriptor* descriptor();
  82. static const Any& default_instance();
  83. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  84. static inline const Any* internal_default_instance() {
  85. return reinterpret_cast<const Any*>(
  86. &_Any_default_instance_);
  87. }
  88. static constexpr int kIndexInFileMessages =
  89. 0;
  90. // implements Any -----------------------------------------------
  91. void PackFrom(const ::google::protobuf::Message& message);
  92. void PackFrom(const ::google::protobuf::Message& message,
  93. const ::std::string& type_url_prefix);
  94. bool UnpackTo(::google::protobuf::Message* message) const;
  95. template<typename T> bool Is() const {
  96. return _any_metadata_.Is<T>();
  97. }
  98. static bool ParseAnyTypeUrl(const string& type_url,
  99. string* full_type_name);
  100. void Swap(Any* other);
  101. friend void swap(Any& a, Any& b) {
  102. a.Swap(&b);
  103. }
  104. // implements Message ----------------------------------------------
  105. inline Any* New() const final {
  106. return CreateMaybeMessage<Any>(NULL);
  107. }
  108. Any* New(::google::protobuf::Arena* arena) const final {
  109. return CreateMaybeMessage<Any>(arena);
  110. }
  111. void CopyFrom(const ::google::protobuf::Message& from) final;
  112. void MergeFrom(const ::google::protobuf::Message& from) final;
  113. void CopyFrom(const Any& from);
  114. void MergeFrom(const Any& from);
  115. void Clear() final;
  116. bool IsInitialized() const final;
  117. size_t ByteSizeLong() const final;
  118. bool MergePartialFromCodedStream(
  119. ::google::protobuf::io::CodedInputStream* input) final;
  120. void SerializeWithCachedSizes(
  121. ::google::protobuf::io::CodedOutputStream* output) const final;
  122. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  123. bool deterministic, ::google::protobuf::uint8* target) const final;
  124. int GetCachedSize() const final { return _cached_size_.Get(); }
  125. private:
  126. void SharedCtor();
  127. void SharedDtor();
  128. void SetCachedSize(int size) const final;
  129. void InternalSwap(Any* other);
  130. private:
  131. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  132. return NULL;
  133. }
  134. inline void* MaybeArenaPtr() const {
  135. return NULL;
  136. }
  137. public:
  138. ::google::protobuf::Metadata GetMetadata() const final;
  139. // nested types ----------------------------------------------------
  140. // accessors -------------------------------------------------------
  141. // string type_url = 1;
  142. void clear_type_url();
  143. static const int kTypeUrlFieldNumber = 1;
  144. const ::std::string& type_url() const;
  145. void set_type_url(const ::std::string& value);
  146. #if LANG_CXX11
  147. void set_type_url(::std::string&& value);
  148. #endif
  149. void set_type_url(const char* value);
  150. void set_type_url(const char* value, size_t size);
  151. ::std::string* mutable_type_url();
  152. ::std::string* release_type_url();
  153. void set_allocated_type_url(::std::string* type_url);
  154. // bytes value = 2;
  155. void clear_value();
  156. static const int kValueFieldNumber = 2;
  157. const ::std::string& value() const;
  158. void set_value(const ::std::string& value);
  159. #if LANG_CXX11
  160. void set_value(::std::string&& value);
  161. #endif
  162. void set_value(const char* value);
  163. void set_value(const void* value, size_t size);
  164. ::std::string* mutable_value();
  165. ::std::string* release_value();
  166. void set_allocated_value(::std::string* value);
  167. // @@protoc_insertion_point(class_scope:google.protobuf.Any)
  168. private:
  169. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  170. ::google::protobuf::internal::ArenaStringPtr type_url_;
  171. ::google::protobuf::internal::ArenaStringPtr value_;
  172. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  173. ::google::protobuf::internal::AnyMetadata _any_metadata_;
  174. friend struct ::protobuf_google_2fprotobuf_2fany_2eproto::TableStruct;
  175. };
  176. // ===================================================================
  177. // ===================================================================
  178. #ifdef __GNUC__
  179. #pragma GCC diagnostic push
  180. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  181. #endif // __GNUC__
  182. // Any
  183. // string type_url = 1;
  184. inline void Any::clear_type_url() {
  185. type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  186. }
  187. inline const ::std::string& Any::type_url() const {
  188. // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
  189. return type_url_.GetNoArena();
  190. }
  191. inline void Any::set_type_url(const ::std::string& value) {
  192. type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  193. // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
  194. }
  195. #if LANG_CXX11
  196. inline void Any::set_type_url(::std::string&& value) {
  197. type_url_.SetNoArena(
  198. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  199. // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
  200. }
  201. #endif
  202. inline void Any::set_type_url(const char* value) {
  203. GOOGLE_DCHECK(value != NULL);
  204. type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  205. // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
  206. }
  207. inline void Any::set_type_url(const char* value, size_t size) {
  208. type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  209. ::std::string(reinterpret_cast<const char*>(value), size));
  210. // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
  211. }
  212. inline ::std::string* Any::mutable_type_url() {
  213. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
  214. return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  215. }
  216. inline ::std::string* Any::release_type_url() {
  217. // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
  218. return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  219. }
  220. inline void Any::set_allocated_type_url(::std::string* type_url) {
  221. if (type_url != NULL) {
  222. } else {
  223. }
  224. type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
  225. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
  226. }
  227. // bytes value = 2;
  228. inline void Any::clear_value() {
  229. value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  230. }
  231. inline const ::std::string& Any::value() const {
  232. // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
  233. return value_.GetNoArena();
  234. }
  235. inline void Any::set_value(const ::std::string& value) {
  236. value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  237. // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
  238. }
  239. #if LANG_CXX11
  240. inline void Any::set_value(::std::string&& value) {
  241. value_.SetNoArena(
  242. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  243. // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
  244. }
  245. #endif
  246. inline void Any::set_value(const char* value) {
  247. GOOGLE_DCHECK(value != NULL);
  248. value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  249. // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
  250. }
  251. inline void Any::set_value(const void* value, size_t size) {
  252. value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  253. ::std::string(reinterpret_cast<const char*>(value), size));
  254. // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
  255. }
  256. inline ::std::string* Any::mutable_value() {
  257. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
  258. return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  259. }
  260. inline ::std::string* Any::release_value() {
  261. // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
  262. return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  263. }
  264. inline void Any::set_allocated_value(::std::string* value) {
  265. if (value != NULL) {
  266. } else {
  267. }
  268. value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  269. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
  270. }
  271. #ifdef __GNUC__
  272. #pragma GCC diagnostic pop
  273. #endif // __GNUC__
  274. // @@protoc_insertion_point(namespace_scope)
  275. } // namespace protobuf
  276. } // namespace google
  277. // @@protoc_insertion_point(global_scope)
  278. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto