You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

struct.pb.h 45 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/struct.proto
  3. #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto
  4. #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto
  5. #include <limits>
  6. #include <string>
  7. #include <google/protobuf/port_def.inc>
  8. #if PROTOBUF_VERSION < 3021000
  9. #error This file was generated by a newer version of protoc which is
  10. #error incompatible with your Protocol Buffer headers. Please update
  11. #error your headers.
  12. #endif
  13. #if 3021006 < PROTOBUF_MIN_PROTOC_VERSION
  14. #error This file was generated by an older version of protoc which is
  15. #error incompatible with your Protocol Buffer headers. Please
  16. #error regenerate this file with a newer version of protoc.
  17. #endif
  18. #include <google/protobuf/port_undef.inc>
  19. #include <google/protobuf/io/coded_stream.h>
  20. #include <google/protobuf/arena.h>
  21. #include <google/protobuf/arenastring.h>
  22. #include <google/protobuf/generated_message_util.h>
  23. #include <google/protobuf/metadata_lite.h>
  24. #include <google/protobuf/generated_message_reflection.h>
  25. #include <google/protobuf/message.h>
  26. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  27. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  28. #include <google/protobuf/map.h> // IWYU pragma: export
  29. #include <google/protobuf/map_entry.h>
  30. #include <google/protobuf/map_field_inl.h>
  31. #include <google/protobuf/generated_enum_reflection.h>
  32. #include <google/protobuf/unknown_field_set.h>
  33. // @@protoc_insertion_point(includes)
  34. #include <google/protobuf/port_def.inc>
  35. #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fstruct_2eproto PROTOBUF_EXPORT
  36. PROTOBUF_NAMESPACE_OPEN
  37. namespace internal
  38. {
  39. class AnyMetadata;
  40. } // namespace internal
  41. PROTOBUF_NAMESPACE_CLOSE
  42. // Internal implementation detail -- do not use these members.
  43. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fstruct_2eproto
  44. {
  45. static const uint32_t offsets[];
  46. };
  47. PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto;
  48. PROTOBUF_NAMESPACE_OPEN
  49. class ListValue;
  50. struct ListValueDefaultTypeInternal;
  51. PROTOBUF_EXPORT extern ListValueDefaultTypeInternal _ListValue_default_instance_;
  52. class Struct;
  53. struct StructDefaultTypeInternal;
  54. PROTOBUF_EXPORT extern StructDefaultTypeInternal _Struct_default_instance_;
  55. class Struct_FieldsEntry_DoNotUse;
  56. struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal;
  57. PROTOBUF_EXPORT extern Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
  58. class Value;
  59. struct ValueDefaultTypeInternal;
  60. PROTOBUF_EXPORT extern ValueDefaultTypeInternal _Value_default_instance_;
  61. PROTOBUF_NAMESPACE_CLOSE
  62. PROTOBUF_NAMESPACE_OPEN
  63. template<>
  64. PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::ListValue* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::ListValue>(Arena*);
  65. template<>
  66. PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Struct* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Struct>(Arena*);
  67. template<>
  68. PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse>(Arena*);
  69. template<>
  70. PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Value* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Value>(Arena*);
  71. PROTOBUF_NAMESPACE_CLOSE
  72. PROTOBUF_NAMESPACE_OPEN
  73. enum NullValue : int
  74. {
  75. NULL_VALUE = 0,
  76. NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
  77. NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
  78. };
  79. PROTOBUF_EXPORT bool NullValue_IsValid(int value);
  80. constexpr NullValue NullValue_MIN = NULL_VALUE;
  81. constexpr NullValue NullValue_MAX = NULL_VALUE;
  82. constexpr int NullValue_ARRAYSIZE = NullValue_MAX + 1;
  83. PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor();
  84. template<typename T>
  85. inline const std::string& NullValue_Name(T enum_t_value)
  86. {
  87. static_assert(::std::is_same<T, NullValue>::value || ::std::is_integral<T>::value, "Incorrect type passed to function NullValue_Name.");
  88. return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
  89. NullValue_descriptor(), enum_t_value
  90. );
  91. }
  92. inline bool NullValue_Parse(
  93. ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, NullValue* value
  94. )
  95. {
  96. return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<NullValue>(
  97. NullValue_descriptor(), name, value
  98. );
  99. }
  100. // ===================================================================
  101. class Struct_FieldsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Struct_FieldsEntry_DoNotUse, std::string, ::PROTOBUF_NAMESPACE_ID::Value, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE>
  102. {
  103. public:
  104. typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<Struct_FieldsEntry_DoNotUse, std::string, ::PROTOBUF_NAMESPACE_ID::Value, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> SuperType;
  105. Struct_FieldsEntry_DoNotUse();
  106. explicit PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUse(
  107. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized
  108. );
  109. explicit Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  110. void MergeFrom(const Struct_FieldsEntry_DoNotUse& other);
  111. static const Struct_FieldsEntry_DoNotUse* internal_default_instance()
  112. {
  113. return reinterpret_cast<const Struct_FieldsEntry_DoNotUse*>(&_Struct_FieldsEntry_DoNotUse_default_instance_);
  114. }
  115. static bool ValidateKey(std::string* s)
  116. {
  117. return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast<int>(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "google.protobuf.Struct.FieldsEntry.key");
  118. }
  119. static bool ValidateValue(void*)
  120. {
  121. return true;
  122. }
  123. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  124. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  125. friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
  126. };
  127. // -------------------------------------------------------------------
  128. class PROTOBUF_EXPORT Struct final :
  129. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */
  130. {
  131. public:
  132. inline Struct() :
  133. Struct(nullptr)
  134. {
  135. }
  136. ~Struct() override;
  137. explicit PROTOBUF_CONSTEXPR Struct(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
  138. Struct(const Struct& from);
  139. Struct(Struct&& from) noexcept
  140. :
  141. Struct()
  142. {
  143. *this = ::std::move(from);
  144. }
  145. inline Struct& operator=(const Struct& from)
  146. {
  147. CopyFrom(from);
  148. return *this;
  149. }
  150. inline Struct& operator=(Struct&& from) noexcept
  151. {
  152. if (this == &from)
  153. return *this;
  154. if (GetOwningArena() == from.GetOwningArena()
  155. #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
  156. && GetOwningArena() != nullptr
  157. #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
  158. )
  159. {
  160. InternalSwap(&from);
  161. }
  162. else
  163. {
  164. CopyFrom(from);
  165. }
  166. return *this;
  167. }
  168. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor()
  169. {
  170. return GetDescriptor();
  171. }
  172. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor()
  173. {
  174. return default_instance().GetMetadata().descriptor;
  175. }
  176. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection()
  177. {
  178. return default_instance().GetMetadata().reflection;
  179. }
  180. static const Struct& default_instance()
  181. {
  182. return *internal_default_instance();
  183. }
  184. static inline const Struct* internal_default_instance()
  185. {
  186. return reinterpret_cast<const Struct*>(
  187. &_Struct_default_instance_
  188. );
  189. }
  190. static constexpr int kIndexInFileMessages =
  191. 1;
  192. friend void swap(Struct& a, Struct& b)
  193. {
  194. a.Swap(&b);
  195. }
  196. inline void Swap(Struct* other)
  197. {
  198. if (other == this)
  199. return;
  200. #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
  201. if (GetOwningArena() != nullptr &&
  202. GetOwningArena() == other->GetOwningArena())
  203. {
  204. #else // PROTOBUF_FORCE_COPY_IN_SWAP
  205. if (GetOwningArena() == other->GetOwningArena())
  206. {
  207. #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
  208. InternalSwap(other);
  209. }
  210. else
  211. {
  212. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  213. }
  214. }
  215. void UnsafeArenaSwap(Struct* other)
  216. {
  217. if (other == this)
  218. return;
  219. GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
  220. InternalSwap(other);
  221. }
  222. // implements Message ----------------------------------------------
  223. Struct* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final
  224. {
  225. return CreateMaybeMessage<Struct>(arena);
  226. }
  227. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  228. void CopyFrom(const Struct& from);
  229. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  230. void MergeFrom(const Struct& from)
  231. {
  232. Struct::MergeImpl(*this, from);
  233. }
  234. private:
  235. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  236. public:
  237. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  238. bool IsInitialized() const final;
  239. size_t ByteSizeLong() const final;
  240. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  241. uint8_t* _InternalSerialize(
  242. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  243. ) const final;
  244. int GetCachedSize() const final
  245. {
  246. return _impl_._cached_size_.Get();
  247. }
  248. private:
  249. void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
  250. void SharedDtor();
  251. void SetCachedSize(int size) const final;
  252. void InternalSwap(Struct* other);
  253. private:
  254. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  255. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName()
  256. {
  257. return "google.protobuf.Struct";
  258. }
  259. protected:
  260. explicit Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false);
  261. private:
  262. static void ArenaDtor(void* object);
  263. public:
  264. static const ClassData _class_data_;
  265. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* GetClassData() const final;
  266. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  267. // nested types ----------------------------------------------------
  268. // accessors -------------------------------------------------------
  269. enum : int
  270. {
  271. kFieldsFieldNumber = 1,
  272. };
  273. // map<string, .google.protobuf.Value> fields = 1;
  274. int fields_size() const;
  275. private:
  276. int _internal_fields_size() const;
  277. public:
  278. void clear_fields();
  279. private:
  280. const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>&
  281. _internal_fields() const;
  282. ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>*
  283. _internal_mutable_fields();
  284. public:
  285. const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>&
  286. fields() const;
  287. ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>*
  288. mutable_fields();
  289. // @@protoc_insertion_point(class_scope:google.protobuf.Struct)
  290. private:
  291. class _Internal;
  292. template<typename T>
  293. friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  294. typedef void InternalArenaConstructable_;
  295. typedef void DestructorSkippable_;
  296. struct Impl_
  297. {
  298. ::PROTOBUF_NAMESPACE_ID::internal::MapField<
  299. Struct_FieldsEntry_DoNotUse,
  300. std::string,
  301. ::PROTOBUF_NAMESPACE_ID::Value,
  302. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
  303. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE>
  304. fields_;
  305. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  306. };
  307. union
  308. {
  309. Impl_ _impl_;
  310. };
  311. friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
  312. };
  313. // -------------------------------------------------------------------
  314. class PROTOBUF_EXPORT Value final :
  315. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */
  316. {
  317. public:
  318. inline Value() :
  319. Value(nullptr)
  320. {
  321. }
  322. ~Value() override;
  323. explicit PROTOBUF_CONSTEXPR Value(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
  324. Value(const Value& from);
  325. Value(Value&& from) noexcept
  326. :
  327. Value()
  328. {
  329. *this = ::std::move(from);
  330. }
  331. inline Value& operator=(const Value& from)
  332. {
  333. CopyFrom(from);
  334. return *this;
  335. }
  336. inline Value& operator=(Value&& from) noexcept
  337. {
  338. if (this == &from)
  339. return *this;
  340. if (GetOwningArena() == from.GetOwningArena()
  341. #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
  342. && GetOwningArena() != nullptr
  343. #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
  344. )
  345. {
  346. InternalSwap(&from);
  347. }
  348. else
  349. {
  350. CopyFrom(from);
  351. }
  352. return *this;
  353. }
  354. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor()
  355. {
  356. return GetDescriptor();
  357. }
  358. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor()
  359. {
  360. return default_instance().GetMetadata().descriptor;
  361. }
  362. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection()
  363. {
  364. return default_instance().GetMetadata().reflection;
  365. }
  366. static const Value& default_instance()
  367. {
  368. return *internal_default_instance();
  369. }
  370. enum KindCase
  371. {
  372. kNullValue = 1,
  373. kNumberValue = 2,
  374. kStringValue = 3,
  375. kBoolValue = 4,
  376. kStructValue = 5,
  377. kListValue = 6,
  378. KIND_NOT_SET = 0,
  379. };
  380. static inline const Value* internal_default_instance()
  381. {
  382. return reinterpret_cast<const Value*>(
  383. &_Value_default_instance_
  384. );
  385. }
  386. static constexpr int kIndexInFileMessages =
  387. 2;
  388. friend void swap(Value& a, Value& b)
  389. {
  390. a.Swap(&b);
  391. }
  392. inline void Swap(Value* other)
  393. {
  394. if (other == this)
  395. return;
  396. #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
  397. if (GetOwningArena() != nullptr &&
  398. GetOwningArena() == other->GetOwningArena())
  399. {
  400. #else // PROTOBUF_FORCE_COPY_IN_SWAP
  401. if (GetOwningArena() == other->GetOwningArena())
  402. {
  403. #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
  404. InternalSwap(other);
  405. }
  406. else
  407. {
  408. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  409. }
  410. }
  411. void UnsafeArenaSwap(Value* other)
  412. {
  413. if (other == this)
  414. return;
  415. GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
  416. InternalSwap(other);
  417. }
  418. // implements Message ----------------------------------------------
  419. Value* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final
  420. {
  421. return CreateMaybeMessage<Value>(arena);
  422. }
  423. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  424. void CopyFrom(const Value& from);
  425. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  426. void MergeFrom(const Value& from)
  427. {
  428. Value::MergeImpl(*this, from);
  429. }
  430. private:
  431. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  432. public:
  433. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  434. bool IsInitialized() const final;
  435. size_t ByteSizeLong() const final;
  436. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  437. uint8_t* _InternalSerialize(
  438. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  439. ) const final;
  440. int GetCachedSize() const final
  441. {
  442. return _impl_._cached_size_.Get();
  443. }
  444. private:
  445. void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
  446. void SharedDtor();
  447. void SetCachedSize(int size) const final;
  448. void InternalSwap(Value* other);
  449. private:
  450. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  451. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName()
  452. {
  453. return "google.protobuf.Value";
  454. }
  455. protected:
  456. explicit Value(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false);
  457. public:
  458. static const ClassData _class_data_;
  459. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* GetClassData() const final;
  460. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  461. // nested types ----------------------------------------------------
  462. // accessors -------------------------------------------------------
  463. enum : int
  464. {
  465. kNullValueFieldNumber = 1,
  466. kNumberValueFieldNumber = 2,
  467. kStringValueFieldNumber = 3,
  468. kBoolValueFieldNumber = 4,
  469. kStructValueFieldNumber = 5,
  470. kListValueFieldNumber = 6,
  471. };
  472. // .google.protobuf.NullValue null_value = 1;
  473. bool has_null_value() const;
  474. private:
  475. bool _internal_has_null_value() const;
  476. public:
  477. void clear_null_value();
  478. ::PROTOBUF_NAMESPACE_ID::NullValue null_value() const;
  479. void set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value);
  480. private:
  481. ::PROTOBUF_NAMESPACE_ID::NullValue _internal_null_value() const;
  482. void _internal_set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value);
  483. public:
  484. // double number_value = 2;
  485. bool has_number_value() const;
  486. private:
  487. bool _internal_has_number_value() const;
  488. public:
  489. void clear_number_value();
  490. double number_value() const;
  491. void set_number_value(double value);
  492. private:
  493. double _internal_number_value() const;
  494. void _internal_set_number_value(double value);
  495. public:
  496. // string string_value = 3;
  497. bool has_string_value() const;
  498. private:
  499. bool _internal_has_string_value() const;
  500. public:
  501. void clear_string_value();
  502. const std::string& string_value() const;
  503. template<typename ArgT0 = const std::string&, typename... ArgT>
  504. void set_string_value(ArgT0&& arg0, ArgT... args);
  505. std::string* mutable_string_value();
  506. PROTOBUF_NODISCARD std::string* release_string_value();
  507. void set_allocated_string_value(std::string* string_value);
  508. private:
  509. const std::string& _internal_string_value() const;
  510. inline PROTOBUF_ALWAYS_INLINE void _internal_set_string_value(const std::string& value);
  511. std::string* _internal_mutable_string_value();
  512. public:
  513. // bool bool_value = 4;
  514. bool has_bool_value() const;
  515. private:
  516. bool _internal_has_bool_value() const;
  517. public:
  518. void clear_bool_value();
  519. bool bool_value() const;
  520. void set_bool_value(bool value);
  521. private:
  522. bool _internal_bool_value() const;
  523. void _internal_set_bool_value(bool value);
  524. public:
  525. // .google.protobuf.Struct struct_value = 5;
  526. bool has_struct_value() const;
  527. private:
  528. bool _internal_has_struct_value() const;
  529. public:
  530. void clear_struct_value();
  531. const ::PROTOBUF_NAMESPACE_ID::Struct& struct_value() const;
  532. PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::Struct* release_struct_value();
  533. ::PROTOBUF_NAMESPACE_ID::Struct* mutable_struct_value();
  534. void set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_value);
  535. private:
  536. const ::PROTOBUF_NAMESPACE_ID::Struct& _internal_struct_value() const;
  537. ::PROTOBUF_NAMESPACE_ID::Struct* _internal_mutable_struct_value();
  538. public:
  539. void unsafe_arena_set_allocated_struct_value(
  540. ::PROTOBUF_NAMESPACE_ID::Struct* struct_value
  541. );
  542. ::PROTOBUF_NAMESPACE_ID::Struct* unsafe_arena_release_struct_value();
  543. // .google.protobuf.ListValue list_value = 6;
  544. bool has_list_value() const;
  545. private:
  546. bool _internal_has_list_value() const;
  547. public:
  548. void clear_list_value();
  549. const ::PROTOBUF_NAMESPACE_ID::ListValue& list_value() const;
  550. PROTOBUF_NODISCARD ::PROTOBUF_NAMESPACE_ID::ListValue* release_list_value();
  551. ::PROTOBUF_NAMESPACE_ID::ListValue* mutable_list_value();
  552. void set_allocated_list_value(::PROTOBUF_NAMESPACE_ID::ListValue* list_value);
  553. private:
  554. const ::PROTOBUF_NAMESPACE_ID::ListValue& _internal_list_value() const;
  555. ::PROTOBUF_NAMESPACE_ID::ListValue* _internal_mutable_list_value();
  556. public:
  557. void unsafe_arena_set_allocated_list_value(
  558. ::PROTOBUF_NAMESPACE_ID::ListValue* list_value
  559. );
  560. ::PROTOBUF_NAMESPACE_ID::ListValue* unsafe_arena_release_list_value();
  561. void clear_kind();
  562. KindCase kind_case() const;
  563. // @@protoc_insertion_point(class_scope:google.protobuf.Value)
  564. private:
  565. class _Internal;
  566. void set_has_null_value();
  567. void set_has_number_value();
  568. void set_has_string_value();
  569. void set_has_bool_value();
  570. void set_has_struct_value();
  571. void set_has_list_value();
  572. inline bool has_kind() const;
  573. inline void clear_has_kind();
  574. template<typename T>
  575. friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  576. typedef void InternalArenaConstructable_;
  577. typedef void DestructorSkippable_;
  578. struct Impl_
  579. {
  580. union KindUnion
  581. {
  582. constexpr KindUnion() :
  583. _constinit_{}
  584. {
  585. }
  586. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
  587. int null_value_;
  588. double number_value_;
  589. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr string_value_;
  590. bool bool_value_;
  591. ::PROTOBUF_NAMESPACE_ID::Struct* struct_value_;
  592. ::PROTOBUF_NAMESPACE_ID::ListValue* list_value_;
  593. } kind_;
  594. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  595. uint32_t _oneof_case_[1];
  596. };
  597. union
  598. {
  599. Impl_ _impl_;
  600. };
  601. friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
  602. };
  603. // -------------------------------------------------------------------
  604. class PROTOBUF_EXPORT ListValue final :
  605. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */
  606. {
  607. public:
  608. inline ListValue() :
  609. ListValue(nullptr)
  610. {
  611. }
  612. ~ListValue() override;
  613. explicit PROTOBUF_CONSTEXPR ListValue(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
  614. ListValue(const ListValue& from);
  615. ListValue(ListValue&& from) noexcept
  616. :
  617. ListValue()
  618. {
  619. *this = ::std::move(from);
  620. }
  621. inline ListValue& operator=(const ListValue& from)
  622. {
  623. CopyFrom(from);
  624. return *this;
  625. }
  626. inline ListValue& operator=(ListValue&& from) noexcept
  627. {
  628. if (this == &from)
  629. return *this;
  630. if (GetOwningArena() == from.GetOwningArena()
  631. #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
  632. && GetOwningArena() != nullptr
  633. #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
  634. )
  635. {
  636. InternalSwap(&from);
  637. }
  638. else
  639. {
  640. CopyFrom(from);
  641. }
  642. return *this;
  643. }
  644. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor()
  645. {
  646. return GetDescriptor();
  647. }
  648. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor()
  649. {
  650. return default_instance().GetMetadata().descriptor;
  651. }
  652. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection()
  653. {
  654. return default_instance().GetMetadata().reflection;
  655. }
  656. static const ListValue& default_instance()
  657. {
  658. return *internal_default_instance();
  659. }
  660. static inline const ListValue* internal_default_instance()
  661. {
  662. return reinterpret_cast<const ListValue*>(
  663. &_ListValue_default_instance_
  664. );
  665. }
  666. static constexpr int kIndexInFileMessages =
  667. 3;
  668. friend void swap(ListValue& a, ListValue& b)
  669. {
  670. a.Swap(&b);
  671. }
  672. inline void Swap(ListValue* other)
  673. {
  674. if (other == this)
  675. return;
  676. #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
  677. if (GetOwningArena() != nullptr &&
  678. GetOwningArena() == other->GetOwningArena())
  679. {
  680. #else // PROTOBUF_FORCE_COPY_IN_SWAP
  681. if (GetOwningArena() == other->GetOwningArena())
  682. {
  683. #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
  684. InternalSwap(other);
  685. }
  686. else
  687. {
  688. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  689. }
  690. }
  691. void UnsafeArenaSwap(ListValue* other)
  692. {
  693. if (other == this)
  694. return;
  695. GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
  696. InternalSwap(other);
  697. }
  698. // implements Message ----------------------------------------------
  699. ListValue* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final
  700. {
  701. return CreateMaybeMessage<ListValue>(arena);
  702. }
  703. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  704. void CopyFrom(const ListValue& from);
  705. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  706. void MergeFrom(const ListValue& from)
  707. {
  708. ListValue::MergeImpl(*this, from);
  709. }
  710. private:
  711. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  712. public:
  713. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  714. bool IsInitialized() const final;
  715. size_t ByteSizeLong() const final;
  716. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  717. uint8_t* _InternalSerialize(
  718. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream
  719. ) const final;
  720. int GetCachedSize() const final
  721. {
  722. return _impl_._cached_size_.Get();
  723. }
  724. private:
  725. void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
  726. void SharedDtor();
  727. void SetCachedSize(int size) const final;
  728. void InternalSwap(ListValue* other);
  729. private:
  730. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  731. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName()
  732. {
  733. return "google.protobuf.ListValue";
  734. }
  735. protected:
  736. explicit ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false);
  737. public:
  738. static const ClassData _class_data_;
  739. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData* GetClassData() const final;
  740. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  741. // nested types ----------------------------------------------------
  742. // accessors -------------------------------------------------------
  743. enum : int
  744. {
  745. kValuesFieldNumber = 1,
  746. };
  747. // repeated .google.protobuf.Value values = 1;
  748. int values_size() const;
  749. private:
  750. int _internal_values_size() const;
  751. public:
  752. void clear_values();
  753. ::PROTOBUF_NAMESPACE_ID::Value* mutable_values(int index);
  754. ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::PROTOBUF_NAMESPACE_ID::Value>*
  755. mutable_values();
  756. private:
  757. const ::PROTOBUF_NAMESPACE_ID::Value& _internal_values(int index) const;
  758. ::PROTOBUF_NAMESPACE_ID::Value* _internal_add_values();
  759. public:
  760. const ::PROTOBUF_NAMESPACE_ID::Value& values(int index) const;
  761. ::PROTOBUF_NAMESPACE_ID::Value* add_values();
  762. const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::PROTOBUF_NAMESPACE_ID::Value>&
  763. values() const;
  764. // @@protoc_insertion_point(class_scope:google.protobuf.ListValue)
  765. private:
  766. class _Internal;
  767. template<typename T>
  768. friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  769. typedef void InternalArenaConstructable_;
  770. typedef void DestructorSkippable_;
  771. struct Impl_
  772. {
  773. ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::PROTOBUF_NAMESPACE_ID::Value> values_;
  774. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  775. };
  776. union
  777. {
  778. Impl_ _impl_;
  779. };
  780. friend struct ::TableStruct_google_2fprotobuf_2fstruct_2eproto;
  781. };
  782. // ===================================================================
  783. // ===================================================================
  784. #ifdef __GNUC__
  785. #pragma GCC diagnostic push
  786. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  787. #endif // __GNUC__
  788. // -------------------------------------------------------------------
  789. // Struct
  790. // map<string, .google.protobuf.Value> fields = 1;
  791. inline int Struct::_internal_fields_size() const
  792. {
  793. return _impl_.fields_.size();
  794. }
  795. inline int Struct::fields_size() const
  796. {
  797. return _internal_fields_size();
  798. }
  799. inline void Struct::clear_fields()
  800. {
  801. _impl_.fields_.Clear();
  802. }
  803. inline const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>&
  804. Struct::_internal_fields() const
  805. {
  806. return _impl_.fields_.GetMap();
  807. }
  808. inline const ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>&
  809. Struct::fields() const
  810. {
  811. // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
  812. return _internal_fields();
  813. }
  814. inline ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>*
  815. Struct::_internal_mutable_fields()
  816. {
  817. return _impl_.fields_.MutableMap();
  818. }
  819. inline ::PROTOBUF_NAMESPACE_ID::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>*
  820. Struct::mutable_fields()
  821. {
  822. // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
  823. return _internal_mutable_fields();
  824. }
  825. // -------------------------------------------------------------------
  826. // Value
  827. // .google.protobuf.NullValue null_value = 1;
  828. inline bool Value::_internal_has_null_value() const
  829. {
  830. return kind_case() == kNullValue;
  831. }
  832. inline bool Value::has_null_value() const
  833. {
  834. return _internal_has_null_value();
  835. }
  836. inline void Value::set_has_null_value()
  837. {
  838. _impl_._oneof_case_[0] = kNullValue;
  839. }
  840. inline void Value::clear_null_value()
  841. {
  842. if (_internal_has_null_value())
  843. {
  844. _impl_.kind_.null_value_ = 0;
  845. clear_has_kind();
  846. }
  847. }
  848. inline ::PROTOBUF_NAMESPACE_ID::NullValue Value::_internal_null_value() const
  849. {
  850. if (_internal_has_null_value())
  851. {
  852. return static_cast<::PROTOBUF_NAMESPACE_ID::NullValue>(_impl_.kind_.null_value_);
  853. }
  854. return static_cast<::PROTOBUF_NAMESPACE_ID::NullValue>(0);
  855. }
  856. inline ::PROTOBUF_NAMESPACE_ID::NullValue Value::null_value() const
  857. {
  858. // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value)
  859. return _internal_null_value();
  860. }
  861. inline void Value::_internal_set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value)
  862. {
  863. if (!_internal_has_null_value())
  864. {
  865. clear_kind();
  866. set_has_null_value();
  867. }
  868. _impl_.kind_.null_value_ = value;
  869. }
  870. inline void Value::set_null_value(::PROTOBUF_NAMESPACE_ID::NullValue value)
  871. {
  872. _internal_set_null_value(value);
  873. // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
  874. }
  875. // double number_value = 2;
  876. inline bool Value::_internal_has_number_value() const
  877. {
  878. return kind_case() == kNumberValue;
  879. }
  880. inline bool Value::has_number_value() const
  881. {
  882. return _internal_has_number_value();
  883. }
  884. inline void Value::set_has_number_value()
  885. {
  886. _impl_._oneof_case_[0] = kNumberValue;
  887. }
  888. inline void Value::clear_number_value()
  889. {
  890. if (_internal_has_number_value())
  891. {
  892. _impl_.kind_.number_value_ = 0;
  893. clear_has_kind();
  894. }
  895. }
  896. inline double Value::_internal_number_value() const
  897. {
  898. if (_internal_has_number_value())
  899. {
  900. return _impl_.kind_.number_value_;
  901. }
  902. return 0;
  903. }
  904. inline void Value::_internal_set_number_value(double value)
  905. {
  906. if (!_internal_has_number_value())
  907. {
  908. clear_kind();
  909. set_has_number_value();
  910. }
  911. _impl_.kind_.number_value_ = value;
  912. }
  913. inline double Value::number_value() const
  914. {
  915. // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value)
  916. return _internal_number_value();
  917. }
  918. inline void Value::set_number_value(double value)
  919. {
  920. _internal_set_number_value(value);
  921. // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value)
  922. }
  923. // string string_value = 3;
  924. inline bool Value::_internal_has_string_value() const
  925. {
  926. return kind_case() == kStringValue;
  927. }
  928. inline bool Value::has_string_value() const
  929. {
  930. return _internal_has_string_value();
  931. }
  932. inline void Value::set_has_string_value()
  933. {
  934. _impl_._oneof_case_[0] = kStringValue;
  935. }
  936. inline void Value::clear_string_value()
  937. {
  938. if (_internal_has_string_value())
  939. {
  940. _impl_.kind_.string_value_.Destroy();
  941. clear_has_kind();
  942. }
  943. }
  944. inline const std::string& Value::string_value() const
  945. {
  946. // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value)
  947. return _internal_string_value();
  948. }
  949. template<typename ArgT0, typename... ArgT>
  950. inline void Value::set_string_value(ArgT0&& arg0, ArgT... args)
  951. {
  952. if (!_internal_has_string_value())
  953. {
  954. clear_kind();
  955. set_has_string_value();
  956. _impl_.kind_.string_value_.InitDefault();
  957. }
  958. _impl_.kind_.string_value_.Set(static_cast<ArgT0&&>(arg0), args..., GetArenaForAllocation());
  959. // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
  960. }
  961. inline std::string* Value::mutable_string_value()
  962. {
  963. std::string* _s = _internal_mutable_string_value();
  964. // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value)
  965. return _s;
  966. }
  967. inline const std::string& Value::_internal_string_value() const
  968. {
  969. if (_internal_has_string_value())
  970. {
  971. return _impl_.kind_.string_value_.Get();
  972. }
  973. return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited();
  974. }
  975. inline void Value::_internal_set_string_value(const std::string& value)
  976. {
  977. if (!_internal_has_string_value())
  978. {
  979. clear_kind();
  980. set_has_string_value();
  981. _impl_.kind_.string_value_.InitDefault();
  982. }
  983. _impl_.kind_.string_value_.Set(value, GetArenaForAllocation());
  984. }
  985. inline std::string* Value::_internal_mutable_string_value()
  986. {
  987. if (!_internal_has_string_value())
  988. {
  989. clear_kind();
  990. set_has_string_value();
  991. _impl_.kind_.string_value_.InitDefault();
  992. }
  993. return _impl_.kind_.string_value_.Mutable(GetArenaForAllocation());
  994. }
  995. inline std::string* Value::release_string_value()
  996. {
  997. // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value)
  998. if (_internal_has_string_value())
  999. {
  1000. clear_has_kind();
  1001. return _impl_.kind_.string_value_.Release();
  1002. }
  1003. else
  1004. {
  1005. return nullptr;
  1006. }
  1007. }
  1008. inline void Value::set_allocated_string_value(std::string* string_value)
  1009. {
  1010. if (has_kind())
  1011. {
  1012. clear_kind();
  1013. }
  1014. if (string_value != nullptr)
  1015. {
  1016. set_has_string_value();
  1017. _impl_.kind_.string_value_.InitAllocated(string_value, GetArenaForAllocation());
  1018. }
  1019. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
  1020. }
  1021. // bool bool_value = 4;
  1022. inline bool Value::_internal_has_bool_value() const
  1023. {
  1024. return kind_case() == kBoolValue;
  1025. }
  1026. inline bool Value::has_bool_value() const
  1027. {
  1028. return _internal_has_bool_value();
  1029. }
  1030. inline void Value::set_has_bool_value()
  1031. {
  1032. _impl_._oneof_case_[0] = kBoolValue;
  1033. }
  1034. inline void Value::clear_bool_value()
  1035. {
  1036. if (_internal_has_bool_value())
  1037. {
  1038. _impl_.kind_.bool_value_ = false;
  1039. clear_has_kind();
  1040. }
  1041. }
  1042. inline bool Value::_internal_bool_value() const
  1043. {
  1044. if (_internal_has_bool_value())
  1045. {
  1046. return _impl_.kind_.bool_value_;
  1047. }
  1048. return false;
  1049. }
  1050. inline void Value::_internal_set_bool_value(bool value)
  1051. {
  1052. if (!_internal_has_bool_value())
  1053. {
  1054. clear_kind();
  1055. set_has_bool_value();
  1056. }
  1057. _impl_.kind_.bool_value_ = value;
  1058. }
  1059. inline bool Value::bool_value() const
  1060. {
  1061. // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value)
  1062. return _internal_bool_value();
  1063. }
  1064. inline void Value::set_bool_value(bool value)
  1065. {
  1066. _internal_set_bool_value(value);
  1067. // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value)
  1068. }
  1069. // .google.protobuf.Struct struct_value = 5;
  1070. inline bool Value::_internal_has_struct_value() const
  1071. {
  1072. return kind_case() == kStructValue;
  1073. }
  1074. inline bool Value::has_struct_value() const
  1075. {
  1076. return _internal_has_struct_value();
  1077. }
  1078. inline void Value::set_has_struct_value()
  1079. {
  1080. _impl_._oneof_case_[0] = kStructValue;
  1081. }
  1082. inline void Value::clear_struct_value()
  1083. {
  1084. if (_internal_has_struct_value())
  1085. {
  1086. if (GetArenaForAllocation() == nullptr)
  1087. {
  1088. delete _impl_.kind_.struct_value_;
  1089. }
  1090. clear_has_kind();
  1091. }
  1092. }
  1093. inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::release_struct_value()
  1094. {
  1095. // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value)
  1096. if (_internal_has_struct_value())
  1097. {
  1098. clear_has_kind();
  1099. ::PROTOBUF_NAMESPACE_ID::Struct* temp = _impl_.kind_.struct_value_;
  1100. if (GetArenaForAllocation() != nullptr)
  1101. {
  1102. temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
  1103. }
  1104. _impl_.kind_.struct_value_ = nullptr;
  1105. return temp;
  1106. }
  1107. else
  1108. {
  1109. return nullptr;
  1110. }
  1111. }
  1112. inline const ::PROTOBUF_NAMESPACE_ID::Struct& Value::_internal_struct_value() const
  1113. {
  1114. return _internal_has_struct_value() ? *_impl_.kind_.struct_value_ : reinterpret_cast<::PROTOBUF_NAMESPACE_ID::Struct&>(::PROTOBUF_NAMESPACE_ID::_Struct_default_instance_);
  1115. }
  1116. inline const ::PROTOBUF_NAMESPACE_ID::Struct& Value::struct_value() const
  1117. {
  1118. // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
  1119. return _internal_struct_value();
  1120. }
  1121. inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::unsafe_arena_release_struct_value()
  1122. {
  1123. // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
  1124. if (_internal_has_struct_value())
  1125. {
  1126. clear_has_kind();
  1127. ::PROTOBUF_NAMESPACE_ID::Struct* temp = _impl_.kind_.struct_value_;
  1128. _impl_.kind_.struct_value_ = nullptr;
  1129. return temp;
  1130. }
  1131. else
  1132. {
  1133. return nullptr;
  1134. }
  1135. }
  1136. inline void Value::unsafe_arena_set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_value)
  1137. {
  1138. clear_kind();
  1139. if (struct_value)
  1140. {
  1141. set_has_struct_value();
  1142. _impl_.kind_.struct_value_ = struct_value;
  1143. }
  1144. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
  1145. }
  1146. inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::_internal_mutable_struct_value()
  1147. {
  1148. if (!_internal_has_struct_value())
  1149. {
  1150. clear_kind();
  1151. set_has_struct_value();
  1152. _impl_.kind_.struct_value_ = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Struct>(GetArenaForAllocation());
  1153. }
  1154. return _impl_.kind_.struct_value_;
  1155. }
  1156. inline ::PROTOBUF_NAMESPACE_ID::Struct* Value::mutable_struct_value()
  1157. {
  1158. ::PROTOBUF_NAMESPACE_ID::Struct* _msg = _internal_mutable_struct_value();
  1159. // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
  1160. return _msg;
  1161. }
  1162. // .google.protobuf.ListValue list_value = 6;
  1163. inline bool Value::_internal_has_list_value() const
  1164. {
  1165. return kind_case() == kListValue;
  1166. }
  1167. inline bool Value::has_list_value() const
  1168. {
  1169. return _internal_has_list_value();
  1170. }
  1171. inline void Value::set_has_list_value()
  1172. {
  1173. _impl_._oneof_case_[0] = kListValue;
  1174. }
  1175. inline void Value::clear_list_value()
  1176. {
  1177. if (_internal_has_list_value())
  1178. {
  1179. if (GetArenaForAllocation() == nullptr)
  1180. {
  1181. delete _impl_.kind_.list_value_;
  1182. }
  1183. clear_has_kind();
  1184. }
  1185. }
  1186. inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::release_list_value()
  1187. {
  1188. // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value)
  1189. if (_internal_has_list_value())
  1190. {
  1191. clear_has_kind();
  1192. ::PROTOBUF_NAMESPACE_ID::ListValue* temp = _impl_.kind_.list_value_;
  1193. if (GetArenaForAllocation() != nullptr)
  1194. {
  1195. temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
  1196. }
  1197. _impl_.kind_.list_value_ = nullptr;
  1198. return temp;
  1199. }
  1200. else
  1201. {
  1202. return nullptr;
  1203. }
  1204. }
  1205. inline const ::PROTOBUF_NAMESPACE_ID::ListValue& Value::_internal_list_value() const
  1206. {
  1207. return _internal_has_list_value() ? *_impl_.kind_.list_value_ : reinterpret_cast<::PROTOBUF_NAMESPACE_ID::ListValue&>(::PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_);
  1208. }
  1209. inline const ::PROTOBUF_NAMESPACE_ID::ListValue& Value::list_value() const
  1210. {
  1211. // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
  1212. return _internal_list_value();
  1213. }
  1214. inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::unsafe_arena_release_list_value()
  1215. {
  1216. // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
  1217. if (_internal_has_list_value())
  1218. {
  1219. clear_has_kind();
  1220. ::PROTOBUF_NAMESPACE_ID::ListValue* temp = _impl_.kind_.list_value_;
  1221. _impl_.kind_.list_value_ = nullptr;
  1222. return temp;
  1223. }
  1224. else
  1225. {
  1226. return nullptr;
  1227. }
  1228. }
  1229. inline void Value::unsafe_arena_set_allocated_list_value(::PROTOBUF_NAMESPACE_ID::ListValue* list_value)
  1230. {
  1231. clear_kind();
  1232. if (list_value)
  1233. {
  1234. set_has_list_value();
  1235. _impl_.kind_.list_value_ = list_value;
  1236. }
  1237. // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
  1238. }
  1239. inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::_internal_mutable_list_value()
  1240. {
  1241. if (!_internal_has_list_value())
  1242. {
  1243. clear_kind();
  1244. set_has_list_value();
  1245. _impl_.kind_.list_value_ = CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::ListValue>(GetArenaForAllocation());
  1246. }
  1247. return _impl_.kind_.list_value_;
  1248. }
  1249. inline ::PROTOBUF_NAMESPACE_ID::ListValue* Value::mutable_list_value()
  1250. {
  1251. ::PROTOBUF_NAMESPACE_ID::ListValue* _msg = _internal_mutable_list_value();
  1252. // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
  1253. return _msg;
  1254. }
  1255. inline bool Value::has_kind() const
  1256. {
  1257. return kind_case() != KIND_NOT_SET;
  1258. }
  1259. inline void Value::clear_has_kind()
  1260. {
  1261. _impl_._oneof_case_[0] = KIND_NOT_SET;
  1262. }
  1263. inline Value::KindCase Value::kind_case() const
  1264. {
  1265. return Value::KindCase(_impl_._oneof_case_[0]);
  1266. }
  1267. // -------------------------------------------------------------------
  1268. // ListValue
  1269. // repeated .google.protobuf.Value values = 1;
  1270. inline int ListValue::_internal_values_size() const
  1271. {
  1272. return _impl_.values_.size();
  1273. }
  1274. inline int ListValue::values_size() const
  1275. {
  1276. return _internal_values_size();
  1277. }
  1278. inline void ListValue::clear_values()
  1279. {
  1280. _impl_.values_.Clear();
  1281. }
  1282. inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::mutable_values(int index)
  1283. {
  1284. // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
  1285. return _impl_.values_.Mutable(index);
  1286. }
  1287. inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::PROTOBUF_NAMESPACE_ID::Value>*
  1288. ListValue::mutable_values()
  1289. {
  1290. // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
  1291. return &_impl_.values_;
  1292. }
  1293. inline const ::PROTOBUF_NAMESPACE_ID::Value& ListValue::_internal_values(int index) const
  1294. {
  1295. return _impl_.values_.Get(index);
  1296. }
  1297. inline const ::PROTOBUF_NAMESPACE_ID::Value& ListValue::values(int index) const
  1298. {
  1299. // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
  1300. return _internal_values(index);
  1301. }
  1302. inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::_internal_add_values()
  1303. {
  1304. return _impl_.values_.Add();
  1305. }
  1306. inline ::PROTOBUF_NAMESPACE_ID::Value* ListValue::add_values()
  1307. {
  1308. ::PROTOBUF_NAMESPACE_ID::Value* _add = _internal_add_values();
  1309. // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
  1310. return _add;
  1311. }
  1312. inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<::PROTOBUF_NAMESPACE_ID::Value>&
  1313. ListValue::values() const
  1314. {
  1315. // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
  1316. return _impl_.values_;
  1317. }
  1318. #ifdef __GNUC__
  1319. #pragma GCC diagnostic pop
  1320. #endif // __GNUC__
  1321. // -------------------------------------------------------------------
  1322. // -------------------------------------------------------------------
  1323. // -------------------------------------------------------------------
  1324. // @@protoc_insertion_point(namespace_scope)
  1325. PROTOBUF_NAMESPACE_CLOSE
  1326. PROTOBUF_NAMESPACE_OPEN
  1327. template<>
  1328. struct is_proto_enum<::PROTOBUF_NAMESPACE_ID::NullValue> : ::std::true_type
  1329. {
  1330. };
  1331. template<>
  1332. inline const EnumDescriptor* GetEnumDescriptor<::PROTOBUF_NAMESPACE_ID::NullValue>()
  1333. {
  1334. return ::PROTOBUF_NAMESPACE_ID::NullValue_descriptor();
  1335. }
  1336. PROTOBUF_NAMESPACE_CLOSE
  1337. // @@protoc_insertion_point(global_scope)
  1338. #include <google/protobuf/port_undef.inc>
  1339. #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fstruct_2eproto