struct.pb.h 36 KB

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