struct.pb.h 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/struct.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_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/map.h> // IWYU pragma: export
  28. #include <google/protobuf/map_entry.h>
  29. #include <google/protobuf/map_field_inl.h>
  30. #include <google/protobuf/generated_enum_reflection.h>
  31. #include <google/protobuf/unknown_field_set.h>
  32. // @@protoc_insertion_point(includes)
  33. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fstruct_2eproto LIBPROTOBUF_EXPORT
  34. namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
  35. // Internal implementation detail -- do not use these members.
  36. struct LIBPROTOBUF_EXPORT TableStruct {
  37. static const ::google::protobuf::internal::ParseTableField entries[];
  38. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  39. static const ::google::protobuf::internal::ParseTable schema[4];
  40. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  41. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  42. static const ::google::protobuf::uint32 offsets[];
  43. };
  44. void LIBPROTOBUF_EXPORT AddDescriptors();
  45. } // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
  46. namespace google {
  47. namespace protobuf {
  48. class ListValue;
  49. class ListValueDefaultTypeInternal;
  50. LIBPROTOBUF_EXPORT extern ListValueDefaultTypeInternal _ListValue_default_instance_;
  51. class Struct;
  52. class StructDefaultTypeInternal;
  53. LIBPROTOBUF_EXPORT extern StructDefaultTypeInternal _Struct_default_instance_;
  54. class Struct_FieldsEntry_DoNotUse;
  55. class Struct_FieldsEntry_DoNotUseDefaultTypeInternal;
  56. LIBPROTOBUF_EXPORT extern Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
  57. class Value;
  58. class ValueDefaultTypeInternal;
  59. LIBPROTOBUF_EXPORT extern ValueDefaultTypeInternal _Value_default_instance_;
  60. } // namespace protobuf
  61. } // namespace google
  62. namespace google {
  63. namespace protobuf {
  64. template<> LIBPROTOBUF_EXPORT ::google::protobuf::ListValue* Arena::CreateMaybeMessage<::google::protobuf::ListValue>(Arena*);
  65. template<> LIBPROTOBUF_EXPORT ::google::protobuf::Struct* Arena::CreateMaybeMessage<::google::protobuf::Struct>(Arena*);
  66. template<> LIBPROTOBUF_EXPORT ::google::protobuf::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage<::google::protobuf::Struct_FieldsEntry_DoNotUse>(Arena*);
  67. template<> LIBPROTOBUF_EXPORT ::google::protobuf::Value* Arena::CreateMaybeMessage<::google::protobuf::Value>(Arena*);
  68. } // namespace protobuf
  69. } // namespace google
  70. namespace google {
  71. namespace protobuf {
  72. enum NullValue {
  73. NULL_VALUE = 0,
  74. NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
  75. NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
  76. };
  77. LIBPROTOBUF_EXPORT bool NullValue_IsValid(int value);
  78. const NullValue NullValue_MIN = NULL_VALUE;
  79. const NullValue NullValue_MAX = NULL_VALUE;
  80. const int NullValue_ARRAYSIZE = NullValue_MAX + 1;
  81. LIBPROTOBUF_EXPORT const ::google::protobuf::EnumDescriptor* NullValue_descriptor();
  82. inline const ::std::string& NullValue_Name(NullValue value) {
  83. return ::google::protobuf::internal::NameOfEnum(
  84. NullValue_descriptor(), value);
  85. }
  86. inline bool NullValue_Parse(
  87. const ::std::string& name, NullValue* value) {
  88. return ::google::protobuf::internal::ParseNamedEnum<NullValue>(
  89. NullValue_descriptor(), name, value);
  90. }
  91. // ===================================================================
  92. class Struct_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
  93. ::std::string, ::google::protobuf::Value,
  94. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  95. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  96. 0 > {
  97. public:
  98. typedef ::google::protobuf::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
  99. ::std::string, ::google::protobuf::Value,
  100. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  101. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  102. 0 > SuperType;
  103. Struct_FieldsEntry_DoNotUse();
  104. Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena);
  105. void MergeFrom(const Struct_FieldsEntry_DoNotUse& other);
  106. static const Struct_FieldsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const Struct_FieldsEntry_DoNotUse*>(&_Struct_FieldsEntry_DoNotUse_default_instance_); }
  107. void MergeFrom(const ::google::protobuf::Message& other) final;
  108. ::google::protobuf::Metadata GetMetadata() const;
  109. };
  110. // -------------------------------------------------------------------
  111. class LIBPROTOBUF_EXPORT Struct : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ {
  112. public:
  113. Struct();
  114. virtual ~Struct();
  115. Struct(const Struct& from);
  116. inline Struct& operator=(const Struct& from) {
  117. CopyFrom(from);
  118. return *this;
  119. }
  120. #if LANG_CXX11
  121. Struct(Struct&& from) noexcept
  122. : Struct() {
  123. *this = ::std::move(from);
  124. }
  125. inline Struct& operator=(Struct&& from) noexcept {
  126. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  127. if (this != &from) InternalSwap(&from);
  128. } else {
  129. CopyFrom(from);
  130. }
  131. return *this;
  132. }
  133. #endif
  134. inline ::google::protobuf::Arena* GetArena() const final {
  135. return GetArenaNoVirtual();
  136. }
  137. inline void* GetMaybeArenaPointer() const final {
  138. return MaybeArenaPtr();
  139. }
  140. static const ::google::protobuf::Descriptor* descriptor();
  141. static const Struct& default_instance();
  142. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  143. static inline const Struct* internal_default_instance() {
  144. return reinterpret_cast<const Struct*>(
  145. &_Struct_default_instance_);
  146. }
  147. static constexpr int kIndexInFileMessages =
  148. 1;
  149. void UnsafeArenaSwap(Struct* other);
  150. void Swap(Struct* other);
  151. friend void swap(Struct& a, Struct& b) {
  152. a.Swap(&b);
  153. }
  154. // implements Message ----------------------------------------------
  155. inline Struct* New() const final {
  156. return CreateMaybeMessage<Struct>(NULL);
  157. }
  158. Struct* New(::google::protobuf::Arena* arena) const final {
  159. return CreateMaybeMessage<Struct>(arena);
  160. }
  161. void CopyFrom(const ::google::protobuf::Message& from) final;
  162. void MergeFrom(const ::google::protobuf::Message& from) final;
  163. void CopyFrom(const Struct& from);
  164. void MergeFrom(const Struct& from);
  165. void Clear() final;
  166. bool IsInitialized() const final;
  167. size_t ByteSizeLong() const final;
  168. bool MergePartialFromCodedStream(
  169. ::google::protobuf::io::CodedInputStream* input) final;
  170. void SerializeWithCachedSizes(
  171. ::google::protobuf::io::CodedOutputStream* output) const final;
  172. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  173. bool deterministic, ::google::protobuf::uint8* target) const final;
  174. int GetCachedSize() const final { return _cached_size_.Get(); }
  175. private:
  176. void SharedCtor();
  177. void SharedDtor();
  178. void SetCachedSize(int size) const final;
  179. void InternalSwap(Struct* other);
  180. protected:
  181. explicit Struct(::google::protobuf::Arena* arena);
  182. private:
  183. static void ArenaDtor(void* object);
  184. inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  185. private:
  186. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  187. return _internal_metadata_.arena();
  188. }
  189. inline void* MaybeArenaPtr() const {
  190. return _internal_metadata_.raw_arena_ptr();
  191. }
  192. public:
  193. ::google::protobuf::Metadata GetMetadata() const final;
  194. // nested types ----------------------------------------------------
  195. // accessors -------------------------------------------------------
  196. // map<string, .google.protobuf.Value> fields = 1;
  197. int fields_size() const;
  198. void clear_fields();
  199. static const int kFieldsFieldNumber = 1;
  200. const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
  201. fields() const;
  202. ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
  203. mutable_fields();
  204. // @@protoc_insertion_point(class_scope:google.protobuf.Struct)
  205. private:
  206. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  207. template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  208. typedef void InternalArenaConstructable_;
  209. typedef void DestructorSkippable_;
  210. ::google::protobuf::internal::MapField<
  211. Struct_FieldsEntry_DoNotUse,
  212. ::std::string, ::google::protobuf::Value,
  213. ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
  214. ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
  215. 0 > fields_;
  216. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  217. friend struct ::protobuf_google_2fprotobuf_2fstruct_2eproto::TableStruct;
  218. };
  219. // -------------------------------------------------------------------
  220. class LIBPROTOBUF_EXPORT Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ {
  221. public:
  222. Value();
  223. virtual ~Value();
  224. Value(const Value& from);
  225. inline Value& operator=(const Value& from) {
  226. CopyFrom(from);
  227. return *this;
  228. }
  229. #if LANG_CXX11
  230. Value(Value&& from) noexcept
  231. : Value() {
  232. *this = ::std::move(from);
  233. }
  234. inline Value& operator=(Value&& from) noexcept {
  235. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  236. if (this != &from) InternalSwap(&from);
  237. } else {
  238. CopyFrom(from);
  239. }
  240. return *this;
  241. }
  242. #endif
  243. inline ::google::protobuf::Arena* GetArena() const final {
  244. return GetArenaNoVirtual();
  245. }
  246. inline void* GetMaybeArenaPointer() const final {
  247. return MaybeArenaPtr();
  248. }
  249. static const ::google::protobuf::Descriptor* descriptor();
  250. static const Value& default_instance();
  251. enum KindCase {
  252. kNullValue = 1,
  253. kNumberValue = 2,
  254. kStringValue = 3,
  255. kBoolValue = 4,
  256. kStructValue = 5,
  257. kListValue = 6,
  258. KIND_NOT_SET = 0,
  259. };
  260. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  261. static inline const Value* internal_default_instance() {
  262. return reinterpret_cast<const Value*>(
  263. &_Value_default_instance_);
  264. }
  265. static constexpr int kIndexInFileMessages =
  266. 2;
  267. void UnsafeArenaSwap(Value* other);
  268. void Swap(Value* other);
  269. friend void swap(Value& a, Value& b) {
  270. a.Swap(&b);
  271. }
  272. // implements Message ----------------------------------------------
  273. inline Value* New() const final {
  274. return CreateMaybeMessage<Value>(NULL);
  275. }
  276. Value* New(::google::protobuf::Arena* arena) const final {
  277. return CreateMaybeMessage<Value>(arena);
  278. }
  279. void CopyFrom(const ::google::protobuf::Message& from) final;
  280. void MergeFrom(const ::google::protobuf::Message& from) final;
  281. void CopyFrom(const Value& from);
  282. void MergeFrom(const Value& from);
  283. void Clear() final;
  284. bool IsInitialized() const final;
  285. size_t ByteSizeLong() const final;
  286. bool MergePartialFromCodedStream(
  287. ::google::protobuf::io::CodedInputStream* input) final;
  288. void SerializeWithCachedSizes(
  289. ::google::protobuf::io::CodedOutputStream* output) const final;
  290. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  291. bool deterministic, ::google::protobuf::uint8* target) const final;
  292. int GetCachedSize() const final { return _cached_size_.Get(); }
  293. private:
  294. void SharedCtor();
  295. void SharedDtor();
  296. void SetCachedSize(int size) const final;
  297. void InternalSwap(Value* other);
  298. protected:
  299. explicit Value(::google::protobuf::Arena* arena);
  300. private:
  301. static void ArenaDtor(void* object);
  302. inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  303. private:
  304. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  305. return _internal_metadata_.arena();
  306. }
  307. inline void* MaybeArenaPtr() const {
  308. return _internal_metadata_.raw_arena_ptr();
  309. }
  310. public:
  311. ::google::protobuf::Metadata GetMetadata() const final;
  312. // nested types ----------------------------------------------------
  313. // accessors -------------------------------------------------------
  314. // .google.protobuf.NullValue null_value = 1;
  315. private:
  316. bool has_null_value() const;
  317. public:
  318. void clear_null_value();
  319. static const int kNullValueFieldNumber = 1;
  320. ::google::protobuf::NullValue null_value() const;
  321. void set_null_value(::google::protobuf::NullValue value);
  322. // double number_value = 2;
  323. private:
  324. bool has_number_value() const;
  325. public:
  326. void clear_number_value();
  327. static const int kNumberValueFieldNumber = 2;
  328. double number_value() const;
  329. void set_number_value(double value);
  330. // string string_value = 3;
  331. private:
  332. bool has_string_value() const;
  333. public:
  334. void clear_string_value();
  335. static const int kStringValueFieldNumber = 3;
  336. const ::std::string& string_value() const;
  337. void set_string_value(const ::std::string& value);
  338. #if LANG_CXX11
  339. void set_string_value(::std::string&& value);
  340. #endif
  341. void set_string_value(const char* value);
  342. void set_string_value(const char* value, size_t size);
  343. ::std::string* mutable_string_value();
  344. ::std::string* release_string_value();
  345. void set_allocated_string_value(::std::string* string_value);
  346. PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  347. " string fields are deprecated and will be removed in a"
  348. " future release.")
  349. ::std::string* unsafe_arena_release_string_value();
  350. PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  351. " string fields are deprecated and will be removed in a"
  352. " future release.")
  353. void unsafe_arena_set_allocated_string_value(
  354. ::std::string* string_value);
  355. // bool bool_value = 4;
  356. private:
  357. bool has_bool_value() const;
  358. public:
  359. void clear_bool_value();
  360. static const int kBoolValueFieldNumber = 4;
  361. bool bool_value() const;
  362. void set_bool_value(bool value);
  363. // .google.protobuf.Struct struct_value = 5;
  364. bool has_struct_value() const;
  365. void clear_struct_value();
  366. static const int kStructValueFieldNumber = 5;
  367. private:
  368. const ::google::protobuf::Struct& _internal_struct_value() const;
  369. public:
  370. const ::google::protobuf::Struct& struct_value() const;
  371. ::google::protobuf::Struct* release_struct_value();
  372. ::google::protobuf::Struct* mutable_struct_value();
  373. void set_allocated_struct_value(::google::protobuf::Struct* struct_value);
  374. void unsafe_arena_set_allocated_struct_value(
  375. ::google::protobuf::Struct* struct_value);
  376. ::google::protobuf::Struct* unsafe_arena_release_struct_value();
  377. // .google.protobuf.ListValue list_value = 6;
  378. bool has_list_value() const;
  379. void clear_list_value();
  380. static const int kListValueFieldNumber = 6;
  381. private:
  382. const ::google::protobuf::ListValue& _internal_list_value() const;
  383. public:
  384. const ::google::protobuf::ListValue& list_value() const;
  385. ::google::protobuf::ListValue* release_list_value();
  386. ::google::protobuf::ListValue* mutable_list_value();
  387. void set_allocated_list_value(::google::protobuf::ListValue* list_value);
  388. void unsafe_arena_set_allocated_list_value(
  389. ::google::protobuf::ListValue* list_value);
  390. ::google::protobuf::ListValue* unsafe_arena_release_list_value();
  391. void clear_kind();
  392. KindCase kind_case() const;
  393. // @@protoc_insertion_point(class_scope:google.protobuf.Value)
  394. private:
  395. void set_has_null_value();
  396. void set_has_number_value();
  397. void set_has_string_value();
  398. void set_has_bool_value();
  399. void set_has_struct_value();
  400. void set_has_list_value();
  401. inline bool has_kind() const;
  402. inline void clear_has_kind();
  403. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  404. template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  405. typedef void InternalArenaConstructable_;
  406. typedef void DestructorSkippable_;
  407. union KindUnion {
  408. KindUnion() {}
  409. int null_value_;
  410. double number_value_;
  411. ::google::protobuf::internal::ArenaStringPtr string_value_;
  412. bool bool_value_;
  413. ::google::protobuf::Struct* struct_value_;
  414. ::google::protobuf::ListValue* list_value_;
  415. } kind_;
  416. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  417. ::google::protobuf::uint32 _oneof_case_[1];
  418. friend struct ::protobuf_google_2fprotobuf_2fstruct_2eproto::TableStruct;
  419. };
  420. // -------------------------------------------------------------------
  421. class LIBPROTOBUF_EXPORT ListValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ {
  422. public:
  423. ListValue();
  424. virtual ~ListValue();
  425. ListValue(const ListValue& from);
  426. inline ListValue& operator=(const ListValue& from) {
  427. CopyFrom(from);
  428. return *this;
  429. }
  430. #if LANG_CXX11
  431. ListValue(ListValue&& from) noexcept
  432. : ListValue() {
  433. *this = ::std::move(from);
  434. }
  435. inline ListValue& operator=(ListValue&& from) noexcept {
  436. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  437. if (this != &from) InternalSwap(&from);
  438. } else {
  439. CopyFrom(from);
  440. }
  441. return *this;
  442. }
  443. #endif
  444. inline ::google::protobuf::Arena* GetArena() const final {
  445. return GetArenaNoVirtual();
  446. }
  447. inline void* GetMaybeArenaPointer() const final {
  448. return MaybeArenaPtr();
  449. }
  450. static const ::google::protobuf::Descriptor* descriptor();
  451. static const ListValue& default_instance();
  452. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  453. static inline const ListValue* internal_default_instance() {
  454. return reinterpret_cast<const ListValue*>(
  455. &_ListValue_default_instance_);
  456. }
  457. static constexpr int kIndexInFileMessages =
  458. 3;
  459. void UnsafeArenaSwap(ListValue* other);
  460. void Swap(ListValue* other);
  461. friend void swap(ListValue& a, ListValue& b) {
  462. a.Swap(&b);
  463. }
  464. // implements Message ----------------------------------------------
  465. inline ListValue* New() const final {
  466. return CreateMaybeMessage<ListValue>(NULL);
  467. }
  468. ListValue* New(::google::protobuf::Arena* arena) const final {
  469. return CreateMaybeMessage<ListValue>(arena);
  470. }
  471. void CopyFrom(const ::google::protobuf::Message& from) final;
  472. void MergeFrom(const ::google::protobuf::Message& from) final;
  473. void CopyFrom(const ListValue& from);
  474. void MergeFrom(const ListValue& from);
  475. void Clear() final;
  476. bool IsInitialized() const final;
  477. size_t ByteSizeLong() const final;
  478. bool MergePartialFromCodedStream(
  479. ::google::protobuf::io::CodedInputStream* input) final;
  480. void SerializeWithCachedSizes(
  481. ::google::protobuf::io::CodedOutputStream* output) const final;
  482. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  483. bool deterministic, ::google::protobuf::uint8* target) const final;
  484. int GetCachedSize() const final { return _cached_size_.Get(); }
  485. private:
  486. void SharedCtor();
  487. void SharedDtor();
  488. void SetCachedSize(int size) const final;
  489. void InternalSwap(ListValue* other);
  490. protected:
  491. explicit ListValue(::google::protobuf::Arena* arena);
  492. private:
  493. static void ArenaDtor(void* object);
  494. inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  495. private:
  496. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  497. return _internal_metadata_.arena();
  498. }
  499. inline void* MaybeArenaPtr() const {
  500. return _internal_metadata_.raw_arena_ptr();
  501. }
  502. public:
  503. ::google::protobuf::Metadata GetMetadata() const final;
  504. // nested types ----------------------------------------------------
  505. // accessors -------------------------------------------------------
  506. // repeated .google.protobuf.Value values = 1;
  507. int values_size() const;
  508. void clear_values();
  509. static const int kValuesFieldNumber = 1;
  510. ::google::protobuf::Value* mutable_values(int index);
  511. ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
  512. mutable_values();
  513. const ::google::protobuf::Value& values(int index) const;
  514. ::google::protobuf::Value* add_values();
  515. const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
  516. values() const;
  517. // @@protoc_insertion_point(class_scope:google.protobuf.ListValue)
  518. private:
  519. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  520. template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  521. typedef void InternalArenaConstructable_;
  522. typedef void DestructorSkippable_;
  523. ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_;
  524. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  525. friend struct ::protobuf_google_2fprotobuf_2fstruct_2eproto::TableStruct;
  526. };
  527. // ===================================================================
  528. // ===================================================================
  529. #ifdef __GNUC__
  530. #pragma GCC diagnostic push
  531. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  532. #endif // __GNUC__
  533. // -------------------------------------------------------------------
  534. // Struct
  535. // map<string, .google.protobuf.Value> fields = 1;
  536. inline int Struct::fields_size() const {
  537. return fields_.size();
  538. }
  539. inline void Struct::clear_fields() {
  540. fields_.Clear();
  541. }
  542. inline const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
  543. Struct::fields() const {
  544. // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
  545. return fields_.GetMap();
  546. }
  547. inline ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
  548. Struct::mutable_fields() {
  549. // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
  550. return fields_.MutableMap();
  551. }
  552. // -------------------------------------------------------------------
  553. // Value
  554. // .google.protobuf.NullValue null_value = 1;
  555. inline bool Value::has_null_value() const {
  556. return kind_case() == kNullValue;
  557. }
  558. inline void Value::set_has_null_value() {
  559. _oneof_case_[0] = kNullValue;
  560. }
  561. inline void Value::clear_null_value() {
  562. if (has_null_value()) {
  563. kind_.null_value_ = 0;
  564. clear_has_kind();
  565. }
  566. }
  567. inline ::google::protobuf::NullValue Value::null_value() const {
  568. // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value)
  569. if (has_null_value()) {
  570. return static_cast< ::google::protobuf::NullValue >(kind_.null_value_);
  571. }
  572. return static_cast< ::google::protobuf::NullValue >(0);
  573. }
  574. inline void Value::set_null_value(::google::protobuf::NullValue value) {
  575. if (!has_null_value()) {
  576. clear_kind();
  577. set_has_null_value();
  578. }
  579. kind_.null_value_ = value;
  580. // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
  581. }
  582. // double number_value = 2;
  583. inline bool Value::has_number_value() const {
  584. return kind_case() == kNumberValue;
  585. }
  586. inline void Value::set_has_number_value() {
  587. _oneof_case_[0] = kNumberValue;
  588. }
  589. inline void Value::clear_number_value() {
  590. if (has_number_value()) {
  591. kind_.number_value_ = 0;
  592. clear_has_kind();
  593. }
  594. }
  595. inline double Value::number_value() const {
  596. // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value)
  597. if (has_number_value()) {
  598. return kind_.number_value_;
  599. }
  600. return 0;
  601. }
  602. inline void Value::set_number_value(double value) {
  603. if (!has_number_value()) {
  604. clear_kind();
  605. set_has_number_value();
  606. }
  607. kind_.number_value_ = value;
  608. // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value)
  609. }
  610. // string string_value = 3;
  611. inline bool Value::has_string_value() const {
  612. return kind_case() == kStringValue;
  613. }
  614. inline void Value::set_has_string_value() {
  615. _oneof_case_[0] = kStringValue;
  616. }
  617. inline void Value::clear_string_value() {
  618. if (has_string_value()) {
  619. kind_.string_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  620. GetArenaNoVirtual());
  621. clear_has_kind();
  622. }
  623. }
  624. inline const ::std::string& Value::string_value() const {
  625. // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value)
  626. if (has_string_value()) {
  627. return kind_.string_value_.Get();
  628. }
  629. return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
  630. }
  631. inline void Value::set_string_value(const ::std::string& value) {
  632. if (!has_string_value()) {
  633. clear_kind();
  634. set_has_string_value();
  635. kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  636. }
  637. kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
  638. GetArenaNoVirtual());
  639. // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
  640. }
  641. #if LANG_CXX11
  642. inline void Value::set_string_value(::std::string&& value) {
  643. // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
  644. if (!has_string_value()) {
  645. clear_kind();
  646. set_has_string_value();
  647. kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  648. }
  649. kind_.string_value_.Set(
  650. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual());
  651. // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Value.string_value)
  652. }
  653. #endif
  654. inline void Value::set_string_value(const char* value) {
  655. GOOGLE_DCHECK(value != NULL);
  656. if (!has_string_value()) {
  657. clear_kind();
  658. set_has_string_value();
  659. kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  660. }
  661. kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  662. ::std::string(value), GetArenaNoVirtual());
  663. // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value)
  664. }
  665. inline void Value::set_string_value(const char* value,
  666. size_t size) {
  667. if (!has_string_value()) {
  668. clear_kind();
  669. set_has_string_value();
  670. kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  671. }
  672. kind_.string_value_.Set(
  673. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
  674. reinterpret_cast<const char*>(value), size),
  675. GetArenaNoVirtual());
  676. // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.string_value)
  677. }
  678. inline ::std::string* Value::mutable_string_value() {
  679. if (!has_string_value()) {
  680. clear_kind();
  681. set_has_string_value();
  682. kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  683. }
  684. return kind_.string_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  685. GetArenaNoVirtual());
  686. // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value)
  687. }
  688. inline ::std::string* Value::release_string_value() {
  689. // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value)
  690. if (has_string_value()) {
  691. clear_has_kind();
  692. return kind_.string_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  693. GetArenaNoVirtual());
  694. } else {
  695. return NULL;
  696. }
  697. }
  698. inline void Value::set_allocated_string_value(::std::string* string_value) {
  699. if (!has_string_value()) {
  700. kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  701. }
  702. clear_kind();
  703. if (string_value != NULL) {
  704. set_has_string_value();
  705. kind_.string_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value,
  706. GetArenaNoVirtual());
  707. }
  708. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
  709. }
  710. inline ::std::string* Value::unsafe_arena_release_string_value() {
  711. // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.string_value)
  712. GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
  713. if (has_string_value()) {
  714. clear_has_kind();
  715. return kind_.string_value_.UnsafeArenaRelease(
  716. &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
  717. } else {
  718. return NULL;
  719. }
  720. }
  721. inline void Value::unsafe_arena_set_allocated_string_value(::std::string* string_value) {
  722. GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
  723. if (!has_string_value()) {
  724. kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  725. }
  726. clear_kind();
  727. if (string_value) {
  728. set_has_string_value();
  729. kind_.string_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual());
  730. }
  731. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.string_value)
  732. }
  733. // bool bool_value = 4;
  734. inline bool Value::has_bool_value() const {
  735. return kind_case() == kBoolValue;
  736. }
  737. inline void Value::set_has_bool_value() {
  738. _oneof_case_[0] = kBoolValue;
  739. }
  740. inline void Value::clear_bool_value() {
  741. if (has_bool_value()) {
  742. kind_.bool_value_ = false;
  743. clear_has_kind();
  744. }
  745. }
  746. inline bool Value::bool_value() const {
  747. // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value)
  748. if (has_bool_value()) {
  749. return kind_.bool_value_;
  750. }
  751. return false;
  752. }
  753. inline void Value::set_bool_value(bool value) {
  754. if (!has_bool_value()) {
  755. clear_kind();
  756. set_has_bool_value();
  757. }
  758. kind_.bool_value_ = value;
  759. // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value)
  760. }
  761. // .google.protobuf.Struct struct_value = 5;
  762. inline bool Value::has_struct_value() const {
  763. return kind_case() == kStructValue;
  764. }
  765. inline void Value::set_has_struct_value() {
  766. _oneof_case_[0] = kStructValue;
  767. }
  768. inline void Value::clear_struct_value() {
  769. if (has_struct_value()) {
  770. if (GetArenaNoVirtual() == NULL) {
  771. delete kind_.struct_value_;
  772. }
  773. clear_has_kind();
  774. }
  775. }
  776. inline const ::google::protobuf::Struct& Value::_internal_struct_value() const {
  777. return *kind_.struct_value_;
  778. }
  779. inline ::google::protobuf::Struct* Value::release_struct_value() {
  780. // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value)
  781. if (has_struct_value()) {
  782. clear_has_kind();
  783. ::google::protobuf::Struct* temp = kind_.struct_value_;
  784. if (GetArenaNoVirtual() != NULL) {
  785. temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
  786. }
  787. kind_.struct_value_ = NULL;
  788. return temp;
  789. } else {
  790. return NULL;
  791. }
  792. }
  793. inline const ::google::protobuf::Struct& Value::struct_value() const {
  794. // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
  795. return has_struct_value()
  796. ? *kind_.struct_value_
  797. : *reinterpret_cast< ::google::protobuf::Struct*>(&::google::protobuf::_Struct_default_instance_);
  798. }
  799. inline ::google::protobuf::Struct* Value::unsafe_arena_release_struct_value() {
  800. // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
  801. if (has_struct_value()) {
  802. clear_has_kind();
  803. ::google::protobuf::Struct* temp = kind_.struct_value_;
  804. kind_.struct_value_ = NULL;
  805. return temp;
  806. } else {
  807. return NULL;
  808. }
  809. }
  810. inline void Value::unsafe_arena_set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
  811. clear_kind();
  812. if (struct_value) {
  813. set_has_struct_value();
  814. kind_.struct_value_ = struct_value;
  815. }
  816. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
  817. }
  818. inline ::google::protobuf::Struct* Value::mutable_struct_value() {
  819. if (!has_struct_value()) {
  820. clear_kind();
  821. set_has_struct_value();
  822. kind_.struct_value_ = CreateMaybeMessage< ::google::protobuf::Struct >(
  823. GetArenaNoVirtual());
  824. }
  825. // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
  826. return kind_.struct_value_;
  827. }
  828. // .google.protobuf.ListValue list_value = 6;
  829. inline bool Value::has_list_value() const {
  830. return kind_case() == kListValue;
  831. }
  832. inline void Value::set_has_list_value() {
  833. _oneof_case_[0] = kListValue;
  834. }
  835. inline void Value::clear_list_value() {
  836. if (has_list_value()) {
  837. if (GetArenaNoVirtual() == NULL) {
  838. delete kind_.list_value_;
  839. }
  840. clear_has_kind();
  841. }
  842. }
  843. inline const ::google::protobuf::ListValue& Value::_internal_list_value() const {
  844. return *kind_.list_value_;
  845. }
  846. inline ::google::protobuf::ListValue* Value::release_list_value() {
  847. // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value)
  848. if (has_list_value()) {
  849. clear_has_kind();
  850. ::google::protobuf::ListValue* temp = kind_.list_value_;
  851. if (GetArenaNoVirtual() != NULL) {
  852. temp = ::google::protobuf::internal::DuplicateIfNonNull(temp);
  853. }
  854. kind_.list_value_ = NULL;
  855. return temp;
  856. } else {
  857. return NULL;
  858. }
  859. }
  860. inline const ::google::protobuf::ListValue& Value::list_value() const {
  861. // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
  862. return has_list_value()
  863. ? *kind_.list_value_
  864. : *reinterpret_cast< ::google::protobuf::ListValue*>(&::google::protobuf::_ListValue_default_instance_);
  865. }
  866. inline ::google::protobuf::ListValue* Value::unsafe_arena_release_list_value() {
  867. // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
  868. if (has_list_value()) {
  869. clear_has_kind();
  870. ::google::protobuf::ListValue* temp = kind_.list_value_;
  871. kind_.list_value_ = NULL;
  872. return temp;
  873. } else {
  874. return NULL;
  875. }
  876. }
  877. inline void Value::unsafe_arena_set_allocated_list_value(::google::protobuf::ListValue* list_value) {
  878. clear_kind();
  879. if (list_value) {
  880. set_has_list_value();
  881. kind_.list_value_ = list_value;
  882. }
  883. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
  884. }
  885. inline ::google::protobuf::ListValue* Value::mutable_list_value() {
  886. if (!has_list_value()) {
  887. clear_kind();
  888. set_has_list_value();
  889. kind_.list_value_ = CreateMaybeMessage< ::google::protobuf::ListValue >(
  890. GetArenaNoVirtual());
  891. }
  892. // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
  893. return kind_.list_value_;
  894. }
  895. inline bool Value::has_kind() const {
  896. return kind_case() != KIND_NOT_SET;
  897. }
  898. inline void Value::clear_has_kind() {
  899. _oneof_case_[0] = KIND_NOT_SET;
  900. }
  901. inline Value::KindCase Value::kind_case() const {
  902. return Value::KindCase(_oneof_case_[0]);
  903. }
  904. // -------------------------------------------------------------------
  905. // ListValue
  906. // repeated .google.protobuf.Value values = 1;
  907. inline int ListValue::values_size() const {
  908. return values_.size();
  909. }
  910. inline void ListValue::clear_values() {
  911. values_.Clear();
  912. }
  913. inline ::google::protobuf::Value* ListValue::mutable_values(int index) {
  914. // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
  915. return values_.Mutable(index);
  916. }
  917. inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
  918. ListValue::mutable_values() {
  919. // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
  920. return &values_;
  921. }
  922. inline const ::google::protobuf::Value& ListValue::values(int index) const {
  923. // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
  924. return values_.Get(index);
  925. }
  926. inline ::google::protobuf::Value* ListValue::add_values() {
  927. // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
  928. return values_.Add();
  929. }
  930. inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
  931. ListValue::values() const {
  932. // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
  933. return values_;
  934. }
  935. #ifdef __GNUC__
  936. #pragma GCC diagnostic pop
  937. #endif // __GNUC__
  938. // -------------------------------------------------------------------
  939. // -------------------------------------------------------------------
  940. // -------------------------------------------------------------------
  941. // @@protoc_insertion_point(namespace_scope)
  942. } // namespace protobuf
  943. } // namespace google
  944. namespace google {
  945. namespace protobuf {
  946. template <> struct is_proto_enum< ::google::protobuf::NullValue> : ::std::true_type {};
  947. template <>
  948. inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::NullValue>() {
  949. return ::google::protobuf::NullValue_descriptor();
  950. }
  951. } // namespace protobuf
  952. } // namespace google
  953. // @@protoc_insertion_point(global_scope)
  954. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto