struct.pb.h 42 KB

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