any.pb.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: google/protobuf/any.proto
  4. #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
  5. #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
  6. #include <limits>
  7. #include <string>
  8. #include <google/protobuf/port_def.inc>
  9. #if PROTOBUF_VERSION < 3013000
  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
  14. #if 3013000 < 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
  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_table_driven.h>
  24. #include <google/protobuf/generated_message_util.h>
  25. #include <google/protobuf/inlined_string_field.h>
  26. #include <google/protobuf/metadata_lite.h>
  27. #include <google/protobuf/generated_message_reflection.h>
  28. #include <google/protobuf/message.h>
  29. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  30. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  31. #include <google/protobuf/unknown_field_set.h>
  32. // @@protoc_insertion_point(includes)
  33. #include <google/protobuf/port_def.inc>
  34. #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT
  35. PROTOBUF_NAMESPACE_OPEN
  36. namespace internal {
  37. class AnyMetadata;
  38. } // namespace internal
  39. PROTOBUF_NAMESPACE_CLOSE
  40. // Internal implementation detail -- do not use these members.
  41. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
  42. static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
  43. PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  44. static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
  45. PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  46. static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
  47. PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  48. static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
  49. static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
  50. static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
  51. };
  52. extern PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto;
  53. PROTOBUF_NAMESPACE_OPEN
  54. class Any;
  55. class AnyDefaultTypeInternal;
  56. PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
  57. PROTOBUF_NAMESPACE_CLOSE
  58. PROTOBUF_NAMESPACE_OPEN
  59. template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(Arena*);
  60. PROTOBUF_NAMESPACE_CLOSE
  61. PROTOBUF_NAMESPACE_OPEN
  62. // ===================================================================
  63. class PROTOBUF_EXPORT Any PROTOBUF_FINAL :
  64. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
  65. public:
  66. inline Any() : Any(nullptr) {}
  67. virtual ~Any();
  68. Any(const Any& from);
  69. Any(Any&& from) noexcept
  70. : Any() {
  71. *this = ::std::move(from);
  72. }
  73. inline Any& operator=(const Any& from) {
  74. CopyFrom(from);
  75. return *this;
  76. }
  77. inline Any& operator=(Any&& from) noexcept {
  78. if (GetArena() == from.GetArena()) {
  79. if (this != &from) 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 GetMetadataStatic().descriptor;
  90. }
  91. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
  92. return GetMetadataStatic().reflection;
  93. }
  94. static const Any& default_instance();
  95. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  96. static inline const Any* internal_default_instance() {
  97. return reinterpret_cast<const Any*>(
  98. &_Any_default_instance_);
  99. }
  100. static constexpr int kIndexInFileMessages =
  101. 0;
  102. // implements Any -----------------------------------------------
  103. void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
  104. _any_metadata_.PackFrom(message);
  105. }
  106. void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
  107. const std::string& type_url_prefix) {
  108. _any_metadata_.PackFrom(message, type_url_prefix);
  109. }
  110. bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const {
  111. return _any_metadata_.UnpackTo(message);
  112. }
  113. static bool GetAnyFieldDescriptors(
  114. const ::PROTOBUF_NAMESPACE_ID::Message& message,
  115. const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field,
  116. const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
  117. template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  118. void PackFrom(const T& message) {
  119. _any_metadata_.PackFrom<T>(message);
  120. }
  121. template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  122. void PackFrom(const T& message,
  123. const std::string& type_url_prefix) {
  124. _any_metadata_.PackFrom<T>(message, type_url_prefix);}
  125. template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  126. bool UnpackTo(T* message) const {
  127. return _any_metadata_.UnpackTo<T>(message);
  128. }
  129. template<typename T> bool Is() const {
  130. return _any_metadata_.Is<T>();
  131. }
  132. static bool ParseAnyTypeUrl(const string& type_url,
  133. std::string* full_type_name);
  134. friend void swap(Any& a, Any& b) {
  135. a.Swap(&b);
  136. }
  137. inline void Swap(Any* other) {
  138. if (other == this) return;
  139. if (GetArena() == other->GetArena()) {
  140. InternalSwap(other);
  141. } else {
  142. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  143. }
  144. }
  145. void UnsafeArenaSwap(Any* other) {
  146. if (other == this) return;
  147. GOOGLE_DCHECK(GetArena() == other->GetArena());
  148. InternalSwap(other);
  149. }
  150. // implements Message ----------------------------------------------
  151. inline Any* New() const final {
  152. return CreateMaybeMessage<Any>(nullptr);
  153. }
  154. Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
  155. return CreateMaybeMessage<Any>(arena);
  156. }
  157. void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  158. void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  159. void CopyFrom(const Any& from);
  160. void MergeFrom(const Any& from);
  161. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  162. bool IsInitialized() const final;
  163. size_t ByteSizeLong() const final;
  164. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  165. ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
  166. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  167. int GetCachedSize() const final { return _cached_size_.Get(); }
  168. private:
  169. inline void SharedCtor();
  170. inline void SharedDtor();
  171. void SetCachedSize(int size) const final;
  172. void InternalSwap(Any* other);
  173. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  174. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
  175. return "google.protobuf.Any";
  176. }
  177. protected:
  178. explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  179. private:
  180. static void ArenaDtor(void* object);
  181. inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  182. public:
  183. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  184. private:
  185. static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
  186. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fany_2eproto);
  187. return ::descriptor_table_google_2fprotobuf_2fany_2eproto.file_level_metadata[kIndexInFileMessages];
  188. }
  189. public:
  190. // nested types ----------------------------------------------------
  191. // accessors -------------------------------------------------------
  192. enum : int {
  193. kTypeUrlFieldNumber = 1,
  194. kValueFieldNumber = 2,
  195. };
  196. // string type_url = 1;
  197. void clear_type_url();
  198. const std::string& type_url() const;
  199. void set_type_url(const std::string& value);
  200. void set_type_url(std::string&& value);
  201. void set_type_url(const char* value);
  202. void set_type_url(const char* value, size_t size);
  203. std::string* mutable_type_url();
  204. std::string* release_type_url();
  205. void set_allocated_type_url(std::string* type_url);
  206. private:
  207. const std::string& _internal_type_url() const;
  208. void _internal_set_type_url(const std::string& value);
  209. std::string* _internal_mutable_type_url();
  210. public:
  211. // bytes value = 2;
  212. void clear_value();
  213. const std::string& value() const;
  214. void set_value(const std::string& value);
  215. void set_value(std::string&& value);
  216. void set_value(const char* value);
  217. void set_value(const void* value, size_t size);
  218. std::string* mutable_value();
  219. std::string* release_value();
  220. void set_allocated_value(std::string* value);
  221. private:
  222. const std::string& _internal_value() const;
  223. void _internal_set_value(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. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
  233. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
  234. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  235. ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
  236. friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
  237. };
  238. // ===================================================================
  239. // ===================================================================
  240. #ifdef __GNUC__
  241. #pragma GCC diagnostic push
  242. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  243. #endif // __GNUC__
  244. // Any
  245. // string type_url = 1;
  246. inline void Any::clear_type_url() {
  247. type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  248. }
  249. inline const std::string& Any::type_url() const {
  250. // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
  251. return _internal_type_url();
  252. }
  253. inline void Any::set_type_url(const std::string& value) {
  254. _internal_set_type_url(value);
  255. // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
  256. }
  257. inline std::string* Any::mutable_type_url() {
  258. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
  259. return _internal_mutable_type_url();
  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::GetEmptyStringAlreadyInited(), value, GetArena());
  266. }
  267. inline void Any::set_type_url(std::string&& value) {
  268. type_url_.Set(
  269. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
  270. // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
  271. }
  272. inline void Any::set_type_url(const char* value) {
  273. GOOGLE_DCHECK(value != nullptr);
  274. type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
  275. GetArena());
  276. // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
  277. }
  278. inline void Any::set_type_url(const char* value,
  279. size_t size) {
  280. type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
  281. reinterpret_cast<const char*>(value), size), GetArena());
  282. // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
  283. }
  284. inline std::string* Any::_internal_mutable_type_url() {
  285. return type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  286. }
  287. inline std::string* Any::release_type_url() {
  288. // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
  289. return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  290. }
  291. inline void Any::set_allocated_type_url(std::string* type_url) {
  292. if (type_url != nullptr) {
  293. } else {
  294. }
  295. type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
  296. GetArena());
  297. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
  298. }
  299. // bytes value = 2;
  300. inline void Any::clear_value() {
  301. value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  302. }
  303. inline const std::string& Any::value() const {
  304. // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
  305. return _internal_value();
  306. }
  307. inline void Any::set_value(const std::string& value) {
  308. _internal_set_value(value);
  309. // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
  310. }
  311. inline std::string* Any::mutable_value() {
  312. // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
  313. return _internal_mutable_value();
  314. }
  315. inline const std::string& Any::_internal_value() const {
  316. return value_.Get();
  317. }
  318. inline void Any::_internal_set_value(const std::string& value) {
  319. value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
  320. }
  321. inline void Any::set_value(std::string&& value) {
  322. value_.Set(
  323. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
  324. // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
  325. }
  326. inline void Any::set_value(const char* value) {
  327. GOOGLE_DCHECK(value != nullptr);
  328. value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
  329. GetArena());
  330. // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
  331. }
  332. inline void Any::set_value(const void* value,
  333. size_t size) {
  334. value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
  335. reinterpret_cast<const char*>(value), size), GetArena());
  336. // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
  337. }
  338. inline std::string* Any::_internal_mutable_value() {
  339. return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  340. }
  341. inline std::string* Any::release_value() {
  342. // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
  343. return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  344. }
  345. inline void Any::set_allocated_value(std::string* value) {
  346. if (value != nullptr) {
  347. } else {
  348. }
  349. value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
  350. GetArena());
  351. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
  352. }
  353. #ifdef __GNUC__
  354. #pragma GCC diagnostic pop
  355. #endif // __GNUC__
  356. // @@protoc_insertion_point(namespace_scope)
  357. PROTOBUF_NAMESPACE_CLOSE
  358. // @@protoc_insertion_point(global_scope)
  359. #include <google/protobuf/port_undef.inc>
  360. #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
  361. #else
  362. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  363. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)