any.pb.h 12 KB

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