struct.pb.cc 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/struct.proto
  3. #include "google/protobuf/struct.pb.h"
  4. #include <algorithm>
  5. #include "google/protobuf/io/coded_stream.h"
  6. #include "google/protobuf/extension_set.h"
  7. #include "google/protobuf/wire_format_lite.h"
  8. #include "google/protobuf/descriptor.h"
  9. #include "google/protobuf/generated_message_reflection.h"
  10. #include "google/protobuf/reflection_ops.h"
  11. #include "google/protobuf/wire_format.h"
  12. // @@protoc_insertion_point(includes)
  13. // Must be included last.
  14. #include "google/protobuf/port_def.inc"
  15. PROTOBUF_PRAGMA_INIT_SEG
  16. namespace _pb = ::PROTOBUF_NAMESPACE_ID;
  17. namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
  18. PROTOBUF_NAMESPACE_OPEN
  19. PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(
  20. ::_pbi::ConstantInitialized) {}
  21. struct Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
  22. PROTOBUF_CONSTEXPR Struct_FieldsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  23. ~Struct_FieldsEntry_DoNotUseDefaultTypeInternal() {}
  24. union {
  25. Struct_FieldsEntry_DoNotUse _instance;
  26. };
  27. };
  28. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  29. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
  30. PROTOBUF_CONSTEXPR Struct::Struct(
  31. ::_pbi::ConstantInitialized): _impl_{
  32. /*decltype(_impl_.fields_)*/{::_pbi::ConstantInitialized()}
  33. , /*decltype(_impl_._cached_size_)*/{}} {}
  34. struct StructDefaultTypeInternal {
  35. PROTOBUF_CONSTEXPR StructDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  36. ~StructDefaultTypeInternal() {}
  37. union {
  38. Struct _instance;
  39. };
  40. };
  41. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  42. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructDefaultTypeInternal _Struct_default_instance_;
  43. PROTOBUF_CONSTEXPR Value::Value(
  44. ::_pbi::ConstantInitialized): _impl_{
  45. /*decltype(_impl_.kind_)*/{}
  46. , /*decltype(_impl_._cached_size_)*/{}
  47. , /*decltype(_impl_._oneof_case_)*/{}} {}
  48. struct ValueDefaultTypeInternal {
  49. PROTOBUF_CONSTEXPR ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  50. ~ValueDefaultTypeInternal() {}
  51. union {
  52. Value _instance;
  53. };
  54. };
  55. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  56. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_;
  57. PROTOBUF_CONSTEXPR ListValue::ListValue(
  58. ::_pbi::ConstantInitialized): _impl_{
  59. /*decltype(_impl_.values_)*/{}
  60. , /*decltype(_impl_._cached_size_)*/{}} {}
  61. struct ListValueDefaultTypeInternal {
  62. PROTOBUF_CONSTEXPR ListValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  63. ~ListValueDefaultTypeInternal() {}
  64. union {
  65. ListValue _instance;
  66. };
  67. };
  68. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  69. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListValueDefaultTypeInternal _ListValue_default_instance_;
  70. PROTOBUF_NAMESPACE_CLOSE
  71. static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2fstruct_2eproto[4];
  72. static const ::_pb::EnumDescriptor* file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[1];
  73. static constexpr const ::_pb::ServiceDescriptor**
  74. file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto = nullptr;
  75. const ::uint32_t TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  76. protodesc_cold) = {
  77. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _has_bits_),
  78. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
  79. ~0u, // no _extensions_
  80. ~0u, // no _oneof_case_
  81. ~0u, // no _weak_field_map_
  82. ~0u, // no _inlined_string_donated_
  83. ~0u, // no _split_
  84. ~0u, // no sizeof(Split)
  85. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, key_),
  86. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse, value_),
  87. 0,
  88. 1,
  89. ~0u, // no _has_bits_
  90. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct, _internal_metadata_),
  91. ~0u, // no _extensions_
  92. ~0u, // no _oneof_case_
  93. ~0u, // no _weak_field_map_
  94. ~0u, // no _inlined_string_donated_
  95. ~0u, // no _split_
  96. ~0u, // no sizeof(Split)
  97. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Struct, _impl_.fields_),
  98. ~0u, // no _has_bits_
  99. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _internal_metadata_),
  100. ~0u, // no _extensions_
  101. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _impl_._oneof_case_[0]),
  102. ~0u, // no _weak_field_map_
  103. ~0u, // no _inlined_string_donated_
  104. ~0u, // no _split_
  105. ~0u, // no sizeof(Split)
  106. ::_pbi::kInvalidFieldOffsetTag,
  107. ::_pbi::kInvalidFieldOffsetTag,
  108. ::_pbi::kInvalidFieldOffsetTag,
  109. ::_pbi::kInvalidFieldOffsetTag,
  110. ::_pbi::kInvalidFieldOffsetTag,
  111. ::_pbi::kInvalidFieldOffsetTag,
  112. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _impl_.kind_),
  113. ~0u, // no _has_bits_
  114. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ListValue, _internal_metadata_),
  115. ~0u, // no _extensions_
  116. ~0u, // no _oneof_case_
  117. ~0u, // no _weak_field_map_
  118. ~0u, // no _inlined_string_donated_
  119. ~0u, // no _split_
  120. ~0u, // no sizeof(Split)
  121. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::ListValue, _impl_.values_),
  122. };
  123. static const ::_pbi::MigrationSchema
  124. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  125. { 0, 10, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse)},
  126. { 12, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Struct)},
  127. { 21, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::Value)},
  128. { 36, -1, -1, sizeof(::PROTOBUF_NAMESPACE_ID::ListValue)},
  129. };
  130. static const ::_pb::Message* const file_default_instances[] = {
  131. &::PROTOBUF_NAMESPACE_ID::_Struct_FieldsEntry_DoNotUse_default_instance_._instance,
  132. &::PROTOBUF_NAMESPACE_ID::_Struct_default_instance_._instance,
  133. &::PROTOBUF_NAMESPACE_ID::_Value_default_instance_._instance,
  134. &::PROTOBUF_NAMESPACE_ID::_ListValue_default_instance_._instance,
  135. };
  136. const char descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  137. "\n\034google/protobuf/struct.proto\022\017google.p"
  138. "rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo"
  139. "gle.protobuf.Struct.FieldsEntry\032E\n\013Field"
  140. "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo"
  141. "gle.protobuf.Value:\0028\001\"\352\001\n\005Value\0220\n\nnull"
  142. "_value\030\001 \001(\0162\032.google.protobuf.NullValue"
  143. "H\000\022\026\n\014number_value\030\002 \001(\001H\000\022\026\n\014string_val"
  144. "ue\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022/\n\014stru"
  145. "ct_value\030\005 \001(\0132\027.google.protobuf.StructH"
  146. "\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf."
  147. "ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu"
  148. "es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull"
  149. "Value\022\016\n\nNULL_VALUE\020\000B\177\n\023com.google.prot"
  150. "obufB\013StructProtoP\001Z/google.golang.org/p"
  151. "rotobuf/types/known/structpb\370\001\001\242\002\003GPB\252\002\036"
  152. "Google.Protobuf.WellKnownTypesb\006proto3"
  153. };
  154. static ::absl::once_flag descriptor_table_google_2fprotobuf_2fstruct_2eproto_once;
  155. const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2fstruct_2eproto = {
  156. false,
  157. false,
  158. 638,
  159. descriptor_table_protodef_google_2fprotobuf_2fstruct_2eproto,
  160. "google/protobuf/struct.proto",
  161. &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
  162. nullptr,
  163. 0,
  164. 4,
  165. schemas,
  166. file_default_instances,
  167. TableStruct_google_2fprotobuf_2fstruct_2eproto::offsets,
  168. file_level_metadata_google_2fprotobuf_2fstruct_2eproto,
  169. file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto,
  170. file_level_service_descriptors_google_2fprotobuf_2fstruct_2eproto,
  171. };
  172. // This function exists to be marked as weak.
  173. // It can significantly speed up compilation by breaking up LLVM's SCC
  174. // in the .pb.cc translation units. Large translation units see a
  175. // reduction of more than 35% of walltime for optimized builds. Without
  176. // the weak attribute all the messages in the file, including all the
  177. // vtables and everything they use become part of the same SCC through
  178. // a cycle like:
  179. // GetMetadata -> descriptor table -> default instances ->
  180. // vtables -> GetMetadata
  181. // By adding a weak function here we break the connection from the
  182. // individual vtables back into the descriptor table.
  183. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter() {
  184. return &descriptor_table_google_2fprotobuf_2fstruct_2eproto;
  185. }
  186. // Force running AddDescriptors() at dynamic initialization time.
  187. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  188. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2fstruct_2eproto(&descriptor_table_google_2fprotobuf_2fstruct_2eproto);
  189. PROTOBUF_NAMESPACE_OPEN
  190. const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NullValue_descriptor() {
  191. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2fprotobuf_2fstruct_2eproto);
  192. return file_level_enum_descriptors_google_2fprotobuf_2fstruct_2eproto[0];
  193. }
  194. bool NullValue_IsValid(int value) {
  195. switch (value) {
  196. case 0:
  197. return true;
  198. default:
  199. return false;
  200. }
  201. }
  202. // ===================================================================
  203. Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {}
  204. Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  205. : SuperType(arena) {}
  206. void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) {
  207. MergeFromInternal(other);
  208. }
  209. ::PROTOBUF_NAMESPACE_ID::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const {
  210. return ::_pbi::AssignDescriptors(
  211. &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
  212. file_level_metadata_google_2fprotobuf_2fstruct_2eproto[0]);
  213. }
  214. // ===================================================================
  215. class Struct::_Internal {
  216. public:
  217. };
  218. Struct::Struct(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  219. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  220. SharedCtor(arena);
  221. if (arena != nullptr) {
  222. arena->OwnCustomDestructor(this, &Struct::ArenaDtor);
  223. }
  224. // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
  225. }
  226. Struct::Struct(const Struct& from)
  227. : ::PROTOBUF_NAMESPACE_ID::Message() {
  228. Struct* const _this = this; (void)_this;
  229. new (&_impl_) Impl_{
  230. /*decltype(_impl_.fields_)*/{}
  231. , /*decltype(_impl_._cached_size_)*/{}};
  232. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  233. _this->_impl_.fields_.MergeFrom(from._impl_.fields_);
  234. // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
  235. }
  236. inline void Struct::SharedCtor(::_pb::Arena* arena) {
  237. (void)arena;
  238. new (&_impl_) Impl_{
  239. /*decltype(_impl_.fields_)*/{::_pbi::ArenaInitialized(), arena}
  240. , /*decltype(_impl_._cached_size_)*/{}
  241. };
  242. }
  243. Struct::~Struct() {
  244. // @@protoc_insertion_point(destructor:google.protobuf.Struct)
  245. if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  246. (void)arena;
  247. ArenaDtor(this);
  248. return;
  249. }
  250. SharedDtor();
  251. }
  252. inline void Struct::SharedDtor() {
  253. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  254. _impl_.fields_.Destruct();
  255. _impl_.fields_.~MapField();
  256. }
  257. void Struct::ArenaDtor(void* object) {
  258. Struct* _this = reinterpret_cast< Struct* >(object);
  259. _this->_impl_.fields_.Destruct();
  260. }
  261. void Struct::SetCachedSize(int size) const {
  262. _impl_._cached_size_.Set(size);
  263. }
  264. void Struct::Clear() {
  265. // @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
  266. ::uint32_t cached_has_bits = 0;
  267. // Prevent compiler warnings about cached_has_bits being unused
  268. (void) cached_has_bits;
  269. _impl_.fields_.Clear();
  270. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  271. }
  272. const char* Struct::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
  273. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  274. while (!ctx->Done(&ptr)) {
  275. ::uint32_t tag;
  276. ptr = ::_pbi::ReadTag(ptr, &tag);
  277. switch (tag >> 3) {
  278. // map<string, .google.protobuf.Value> fields = 1;
  279. case 1:
  280. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
  281. ptr -= 1;
  282. do {
  283. ptr += 1;
  284. ptr = ctx->ParseMessage(&_impl_.fields_, ptr);
  285. CHK_(ptr);
  286. if (!ctx->DataAvailable(ptr)) break;
  287. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  288. } else {
  289. goto handle_unusual;
  290. }
  291. continue;
  292. default:
  293. goto handle_unusual;
  294. } // switch
  295. handle_unusual:
  296. if ((tag == 0) || ((tag & 7) == 4)) {
  297. CHK_(ptr);
  298. ctx->SetLastTag(tag);
  299. goto message_done;
  300. }
  301. ptr = UnknownFieldParse(
  302. tag,
  303. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  304. ptr, ctx);
  305. CHK_(ptr != nullptr);
  306. } // while
  307. message_done:
  308. return ptr;
  309. failure:
  310. ptr = nullptr;
  311. goto message_done;
  312. #undef CHK_
  313. }
  314. ::uint8_t* Struct::_InternalSerialize(
  315. ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  316. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
  317. ::uint32_t cached_has_bits = 0;
  318. (void) cached_has_bits;
  319. // map<string, .google.protobuf.Value> fields = 1;
  320. if (!this->_internal_fields().empty()) {
  321. using MapType = ::_pb::Map<std::string, ::PROTOBUF_NAMESPACE_ID::Value>;
  322. using WireHelper = Struct_FieldsEntry_DoNotUse::Funcs;
  323. const auto& map_field = this->_internal_fields();
  324. auto check_utf8 = [](const MapType::value_type& entry) {
  325. (void)entry;
  326. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  327. entry.first.data(), static_cast<int>(entry.first.length()),
  328. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields");
  329. };
  330. if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
  331. for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
  332. target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
  333. check_utf8(entry);
  334. }
  335. } else {
  336. for (const auto& entry : map_field) {
  337. target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
  338. check_utf8(entry);
  339. }
  340. }
  341. }
  342. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  343. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  344. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  345. }
  346. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct)
  347. return target;
  348. }
  349. ::size_t Struct::ByteSizeLong() const {
  350. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct)
  351. ::size_t total_size = 0;
  352. ::uint32_t cached_has_bits = 0;
  353. // Prevent compiler warnings about cached_has_bits being unused
  354. (void) cached_has_bits;
  355. // map<string, .google.protobuf.Value> fields = 1;
  356. total_size += 1 *
  357. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_fields_size());
  358. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::PROTOBUF_NAMESPACE_ID::Value >::const_iterator
  359. it = this->_internal_fields().begin();
  360. it != this->_internal_fields().end(); ++it) {
  361. total_size += Struct_FieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  362. }
  363. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  364. }
  365. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Struct::_class_data_ = {
  366. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  367. Struct::MergeImpl
  368. };
  369. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Struct::GetClassData() const { return &_class_data_; }
  370. void Struct::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  371. auto* const _this = static_cast<Struct*>(&to_msg);
  372. auto& from = static_cast<const Struct&>(from_msg);
  373. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
  374. ABSL_DCHECK_NE(&from, _this);
  375. ::uint32_t cached_has_bits = 0;
  376. (void) cached_has_bits;
  377. _this->_impl_.fields_.MergeFrom(from._impl_.fields_);
  378. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  379. }
  380. void Struct::CopyFrom(const Struct& from) {
  381. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struct)
  382. if (&from == this) return;
  383. Clear();
  384. MergeFrom(from);
  385. }
  386. bool Struct::IsInitialized() const {
  387. return true;
  388. }
  389. void Struct::InternalSwap(Struct* other) {
  390. using std::swap;
  391. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  392. _impl_.fields_.InternalSwap(&other->_impl_.fields_);
  393. }
  394. ::PROTOBUF_NAMESPACE_ID::Metadata Struct::GetMetadata() const {
  395. return ::_pbi::AssignDescriptors(
  396. &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
  397. file_level_metadata_google_2fprotobuf_2fstruct_2eproto[1]);
  398. }
  399. // ===================================================================
  400. class Value::_Internal {
  401. public:
  402. static constexpr ::int32_t kOneofCaseOffset =
  403. PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Value, _impl_._oneof_case_);
  404. static const ::PROTOBUF_NAMESPACE_ID::Struct& struct_value(const Value* msg);
  405. static const ::PROTOBUF_NAMESPACE_ID::ListValue& list_value(const Value* msg);
  406. };
  407. const ::PROTOBUF_NAMESPACE_ID::Struct&
  408. Value::_Internal::struct_value(const Value* msg) {
  409. return *msg->_impl_.kind_.struct_value_;
  410. }
  411. const ::PROTOBUF_NAMESPACE_ID::ListValue&
  412. Value::_Internal::list_value(const Value* msg) {
  413. return *msg->_impl_.kind_.list_value_;
  414. }
  415. void Value::set_allocated_struct_value(::PROTOBUF_NAMESPACE_ID::Struct* struct_value) {
  416. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  417. clear_kind();
  418. if (struct_value) {
  419. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  420. ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(struct_value);
  421. if (message_arena != submessage_arena) {
  422. struct_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  423. message_arena, struct_value, submessage_arena);
  424. }
  425. set_has_struct_value();
  426. _impl_.kind_.struct_value_ = struct_value;
  427. }
  428. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
  429. }
  430. void Value::set_allocated_list_value(::PROTOBUF_NAMESPACE_ID::ListValue* list_value) {
  431. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  432. clear_kind();
  433. if (list_value) {
  434. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  435. ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(list_value);
  436. if (message_arena != submessage_arena) {
  437. list_value = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  438. message_arena, list_value, submessage_arena);
  439. }
  440. set_has_list_value();
  441. _impl_.kind_.list_value_ = list_value;
  442. }
  443. // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
  444. }
  445. Value::Value(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  446. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  447. SharedCtor(arena);
  448. // @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
  449. }
  450. Value::Value(const Value& from)
  451. : ::PROTOBUF_NAMESPACE_ID::Message() {
  452. Value* const _this = this; (void)_this;
  453. new (&_impl_) Impl_{
  454. decltype(_impl_.kind_){}
  455. , /*decltype(_impl_._cached_size_)*/{}
  456. , /*decltype(_impl_._oneof_case_)*/{}};
  457. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  458. clear_has_kind();
  459. switch (from.kind_case()) {
  460. case kNullValue: {
  461. _this->_internal_set_null_value(from._internal_null_value());
  462. break;
  463. }
  464. case kNumberValue: {
  465. _this->_internal_set_number_value(from._internal_number_value());
  466. break;
  467. }
  468. case kStringValue: {
  469. _this->_internal_set_string_value(from._internal_string_value());
  470. break;
  471. }
  472. case kBoolValue: {
  473. _this->_internal_set_bool_value(from._internal_bool_value());
  474. break;
  475. }
  476. case kStructValue: {
  477. _this->_internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(
  478. from._internal_struct_value());
  479. break;
  480. }
  481. case kListValue: {
  482. _this->_internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(
  483. from._internal_list_value());
  484. break;
  485. }
  486. case KIND_NOT_SET: {
  487. break;
  488. }
  489. }
  490. // @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
  491. }
  492. inline void Value::SharedCtor(::_pb::Arena* arena) {
  493. (void)arena;
  494. new (&_impl_) Impl_{
  495. decltype(_impl_.kind_){}
  496. , /*decltype(_impl_._cached_size_)*/{}
  497. , /*decltype(_impl_._oneof_case_)*/{}
  498. };
  499. clear_has_kind();
  500. }
  501. Value::~Value() {
  502. // @@protoc_insertion_point(destructor:google.protobuf.Value)
  503. if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  504. (void)arena;
  505. return;
  506. }
  507. SharedDtor();
  508. }
  509. inline void Value::SharedDtor() {
  510. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  511. if (has_kind()) {
  512. clear_kind();
  513. }
  514. }
  515. void Value::SetCachedSize(int size) const {
  516. _impl_._cached_size_.Set(size);
  517. }
  518. void Value::clear_kind() {
  519. // @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
  520. switch (kind_case()) {
  521. case kNullValue: {
  522. // No need to clear
  523. break;
  524. }
  525. case kNumberValue: {
  526. // No need to clear
  527. break;
  528. }
  529. case kStringValue: {
  530. _impl_.kind_.string_value_.Destroy();
  531. break;
  532. }
  533. case kBoolValue: {
  534. // No need to clear
  535. break;
  536. }
  537. case kStructValue: {
  538. if (GetArenaForAllocation() == nullptr) {
  539. delete _impl_.kind_.struct_value_;
  540. }
  541. break;
  542. }
  543. case kListValue: {
  544. if (GetArenaForAllocation() == nullptr) {
  545. delete _impl_.kind_.list_value_;
  546. }
  547. break;
  548. }
  549. case KIND_NOT_SET: {
  550. break;
  551. }
  552. }
  553. _impl_._oneof_case_[0] = KIND_NOT_SET;
  554. }
  555. void Value::Clear() {
  556. // @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
  557. ::uint32_t cached_has_bits = 0;
  558. // Prevent compiler warnings about cached_has_bits being unused
  559. (void) cached_has_bits;
  560. clear_kind();
  561. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  562. }
  563. const char* Value::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
  564. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  565. while (!ctx->Done(&ptr)) {
  566. ::uint32_t tag;
  567. ptr = ::_pbi::ReadTag(ptr, &tag);
  568. switch (tag >> 3) {
  569. // .google.protobuf.NullValue null_value = 1;
  570. case 1:
  571. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
  572. ::uint32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
  573. CHK_(ptr);
  574. _internal_set_null_value(static_cast<::PROTOBUF_NAMESPACE_ID::NullValue>(val));
  575. } else {
  576. goto handle_unusual;
  577. }
  578. continue;
  579. // double number_value = 2;
  580. case 2:
  581. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 17)) {
  582. _internal_set_number_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
  583. ptr += sizeof(double);
  584. } else {
  585. goto handle_unusual;
  586. }
  587. continue;
  588. // string string_value = 3;
  589. case 3:
  590. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
  591. auto str = _internal_mutable_string_value();
  592. ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
  593. CHK_(ptr);
  594. CHK_(::_pbi::VerifyUTF8(str, "google.protobuf.Value.string_value"));
  595. } else {
  596. goto handle_unusual;
  597. }
  598. continue;
  599. // bool bool_value = 4;
  600. case 4:
  601. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
  602. _internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  603. CHK_(ptr);
  604. } else {
  605. goto handle_unusual;
  606. }
  607. continue;
  608. // .google.protobuf.Struct struct_value = 5;
  609. case 5:
  610. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
  611. ptr = ctx->ParseMessage(_internal_mutable_struct_value(), ptr);
  612. CHK_(ptr);
  613. } else {
  614. goto handle_unusual;
  615. }
  616. continue;
  617. // .google.protobuf.ListValue list_value = 6;
  618. case 6:
  619. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
  620. ptr = ctx->ParseMessage(_internal_mutable_list_value(), ptr);
  621. CHK_(ptr);
  622. } else {
  623. goto handle_unusual;
  624. }
  625. continue;
  626. default:
  627. goto handle_unusual;
  628. } // switch
  629. handle_unusual:
  630. if ((tag == 0) || ((tag & 7) == 4)) {
  631. CHK_(ptr);
  632. ctx->SetLastTag(tag);
  633. goto message_done;
  634. }
  635. ptr = UnknownFieldParse(
  636. tag,
  637. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  638. ptr, ctx);
  639. CHK_(ptr != nullptr);
  640. } // while
  641. message_done:
  642. return ptr;
  643. failure:
  644. ptr = nullptr;
  645. goto message_done;
  646. #undef CHK_
  647. }
  648. ::uint8_t* Value::_InternalSerialize(
  649. ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  650. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
  651. ::uint32_t cached_has_bits = 0;
  652. (void) cached_has_bits;
  653. // .google.protobuf.NullValue null_value = 1;
  654. if (kind_case() == kNullValue) {
  655. target = stream->EnsureSpace(target);
  656. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  657. 1, this->_internal_null_value(), target);
  658. }
  659. // double number_value = 2;
  660. if (kind_case() == kNumberValue) {
  661. target = stream->EnsureSpace(target);
  662. target = ::_pbi::WireFormatLite::WriteDoubleToArray(
  663. 2, this->_internal_number_value(), target);
  664. }
  665. // string string_value = 3;
  666. if (kind_case() == kStringValue) {
  667. const std::string& _s = this->_internal_string_value();
  668. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  669. _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value");
  670. target = stream->WriteStringMaybeAliased(3, _s, target);
  671. }
  672. // bool bool_value = 4;
  673. if (kind_case() == kBoolValue) {
  674. target = stream->EnsureSpace(target);
  675. target = ::_pbi::WireFormatLite::WriteBoolToArray(
  676. 4, this->_internal_bool_value(), target);
  677. }
  678. // .google.protobuf.Struct struct_value = 5;
  679. if (kind_case() == kStructValue) {
  680. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  681. InternalWriteMessage(5, _Internal::struct_value(this),
  682. _Internal::struct_value(this).GetCachedSize(), target, stream);
  683. }
  684. // .google.protobuf.ListValue list_value = 6;
  685. if (kind_case() == kListValue) {
  686. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  687. InternalWriteMessage(6, _Internal::list_value(this),
  688. _Internal::list_value(this).GetCachedSize(), target, stream);
  689. }
  690. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  691. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  692. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  693. }
  694. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value)
  695. return target;
  696. }
  697. ::size_t Value::ByteSizeLong() const {
  698. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value)
  699. ::size_t total_size = 0;
  700. ::uint32_t cached_has_bits = 0;
  701. // Prevent compiler warnings about cached_has_bits being unused
  702. (void) cached_has_bits;
  703. switch (kind_case()) {
  704. // .google.protobuf.NullValue null_value = 1;
  705. case kNullValue: {
  706. total_size += 1 +
  707. ::_pbi::WireFormatLite::EnumSize(this->_internal_null_value());
  708. break;
  709. }
  710. // double number_value = 2;
  711. case kNumberValue: {
  712. total_size += 9;
  713. break;
  714. }
  715. // string string_value = 3;
  716. case kStringValue: {
  717. total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  718. this->_internal_string_value());
  719. break;
  720. }
  721. // bool bool_value = 4;
  722. case kBoolValue: {
  723. total_size += 2;
  724. break;
  725. }
  726. // .google.protobuf.Struct struct_value = 5;
  727. case kStructValue: {
  728. total_size += 1 +
  729. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  730. *_impl_.kind_.struct_value_);
  731. break;
  732. }
  733. // .google.protobuf.ListValue list_value = 6;
  734. case kListValue: {
  735. total_size += 1 +
  736. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  737. *_impl_.kind_.list_value_);
  738. break;
  739. }
  740. case KIND_NOT_SET: {
  741. break;
  742. }
  743. }
  744. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  745. }
  746. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Value::_class_data_ = {
  747. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  748. Value::MergeImpl
  749. };
  750. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Value::GetClassData() const { return &_class_data_; }
  751. void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  752. auto* const _this = static_cast<Value*>(&to_msg);
  753. auto& from = static_cast<const Value&>(from_msg);
  754. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
  755. ABSL_DCHECK_NE(&from, _this);
  756. ::uint32_t cached_has_bits = 0;
  757. (void) cached_has_bits;
  758. switch (from.kind_case()) {
  759. case kNullValue: {
  760. _this->_internal_set_null_value(from._internal_null_value());
  761. break;
  762. }
  763. case kNumberValue: {
  764. _this->_internal_set_number_value(from._internal_number_value());
  765. break;
  766. }
  767. case kStringValue: {
  768. _this->_internal_set_string_value(from._internal_string_value());
  769. break;
  770. }
  771. case kBoolValue: {
  772. _this->_internal_set_bool_value(from._internal_bool_value());
  773. break;
  774. }
  775. case kStructValue: {
  776. _this->_internal_mutable_struct_value()->::PROTOBUF_NAMESPACE_ID::Struct::MergeFrom(
  777. from._internal_struct_value());
  778. break;
  779. }
  780. case kListValue: {
  781. _this->_internal_mutable_list_value()->::PROTOBUF_NAMESPACE_ID::ListValue::MergeFrom(
  782. from._internal_list_value());
  783. break;
  784. }
  785. case KIND_NOT_SET: {
  786. break;
  787. }
  788. }
  789. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  790. }
  791. void Value::CopyFrom(const Value& from) {
  792. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value)
  793. if (&from == this) return;
  794. Clear();
  795. MergeFrom(from);
  796. }
  797. bool Value::IsInitialized() const {
  798. return true;
  799. }
  800. void Value::InternalSwap(Value* other) {
  801. using std::swap;
  802. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  803. swap(_impl_.kind_, other->_impl_.kind_);
  804. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  805. }
  806. ::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const {
  807. return ::_pbi::AssignDescriptors(
  808. &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
  809. file_level_metadata_google_2fprotobuf_2fstruct_2eproto[2]);
  810. }
  811. // ===================================================================
  812. class ListValue::_Internal {
  813. public:
  814. };
  815. ListValue::ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  816. : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  817. SharedCtor(arena);
  818. // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
  819. }
  820. ListValue::ListValue(const ListValue& from)
  821. : ::PROTOBUF_NAMESPACE_ID::Message() {
  822. ListValue* const _this = this; (void)_this;
  823. new (&_impl_) Impl_{
  824. decltype(_impl_.values_){from._impl_.values_}
  825. , /*decltype(_impl_._cached_size_)*/{}};
  826. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  827. // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
  828. }
  829. inline void ListValue::SharedCtor(::_pb::Arena* arena) {
  830. (void)arena;
  831. new (&_impl_) Impl_{
  832. decltype(_impl_.values_){arena}
  833. , /*decltype(_impl_._cached_size_)*/{}
  834. };
  835. }
  836. ListValue::~ListValue() {
  837. // @@protoc_insertion_point(destructor:google.protobuf.ListValue)
  838. if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  839. (void)arena;
  840. return;
  841. }
  842. SharedDtor();
  843. }
  844. inline void ListValue::SharedDtor() {
  845. ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  846. _impl_.values_.~RepeatedPtrField();
  847. }
  848. void ListValue::SetCachedSize(int size) const {
  849. _impl_._cached_size_.Set(size);
  850. }
  851. void ListValue::Clear() {
  852. // @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
  853. ::uint32_t cached_has_bits = 0;
  854. // Prevent compiler warnings about cached_has_bits being unused
  855. (void) cached_has_bits;
  856. _impl_.values_.Clear();
  857. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  858. }
  859. const char* ListValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
  860. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  861. while (!ctx->Done(&ptr)) {
  862. ::uint32_t tag;
  863. ptr = ::_pbi::ReadTag(ptr, &tag);
  864. switch (tag >> 3) {
  865. // repeated .google.protobuf.Value values = 1;
  866. case 1:
  867. if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
  868. ptr -= 1;
  869. do {
  870. ptr += 1;
  871. ptr = ctx->ParseMessage(_internal_add_values(), ptr);
  872. CHK_(ptr);
  873. if (!ctx->DataAvailable(ptr)) break;
  874. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  875. } else {
  876. goto handle_unusual;
  877. }
  878. continue;
  879. default:
  880. goto handle_unusual;
  881. } // switch
  882. handle_unusual:
  883. if ((tag == 0) || ((tag & 7) == 4)) {
  884. CHK_(ptr);
  885. ctx->SetLastTag(tag);
  886. goto message_done;
  887. }
  888. ptr = UnknownFieldParse(
  889. tag,
  890. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  891. ptr, ctx);
  892. CHK_(ptr != nullptr);
  893. } // while
  894. message_done:
  895. return ptr;
  896. failure:
  897. ptr = nullptr;
  898. goto message_done;
  899. #undef CHK_
  900. }
  901. ::uint8_t* ListValue::_InternalSerialize(
  902. ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  903. // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
  904. ::uint32_t cached_has_bits = 0;
  905. (void) cached_has_bits;
  906. // repeated .google.protobuf.Value values = 1;
  907. for (unsigned i = 0,
  908. n = static_cast<unsigned>(this->_internal_values_size()); i < n; i++) {
  909. const auto& repfield = this->_internal_values(i);
  910. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  911. InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  912. }
  913. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  914. target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  915. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  916. }
  917. // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue)
  918. return target;
  919. }
  920. ::size_t ListValue::ByteSizeLong() const {
  921. // @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue)
  922. ::size_t total_size = 0;
  923. ::uint32_t cached_has_bits = 0;
  924. // Prevent compiler warnings about cached_has_bits being unused
  925. (void) cached_has_bits;
  926. // repeated .google.protobuf.Value values = 1;
  927. total_size += 1UL * this->_internal_values_size();
  928. for (const auto& msg : this->_impl_.values_) {
  929. total_size +=
  930. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  931. }
  932. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  933. }
  934. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ListValue::_class_data_ = {
  935. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
  936. ListValue::MergeImpl
  937. };
  938. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ListValue::GetClassData() const { return &_class_data_; }
  939. void ListValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  940. auto* const _this = static_cast<ListValue*>(&to_msg);
  941. auto& from = static_cast<const ListValue&>(from_msg);
  942. // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
  943. ABSL_DCHECK_NE(&from, _this);
  944. ::uint32_t cached_has_bits = 0;
  945. (void) cached_has_bits;
  946. _this->_impl_.values_.MergeFrom(from._impl_.values_);
  947. _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  948. }
  949. void ListValue::CopyFrom(const ListValue& from) {
  950. // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListValue)
  951. if (&from == this) return;
  952. Clear();
  953. MergeFrom(from);
  954. }
  955. bool ListValue::IsInitialized() const {
  956. return true;
  957. }
  958. void ListValue::InternalSwap(ListValue* other) {
  959. using std::swap;
  960. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  961. _impl_.values_.InternalSwap(&other->_impl_.values_);
  962. }
  963. ::PROTOBUF_NAMESPACE_ID::Metadata ListValue::GetMetadata() const {
  964. return ::_pbi::AssignDescriptors(
  965. &descriptor_table_google_2fprotobuf_2fstruct_2eproto_getter, &descriptor_table_google_2fprotobuf_2fstruct_2eproto_once,
  966. file_level_metadata_google_2fprotobuf_2fstruct_2eproto[3]);
  967. }
  968. // @@protoc_insertion_point(namespace_scope)
  969. PROTOBUF_NAMESPACE_CLOSE
  970. PROTOBUF_NAMESPACE_OPEN
  971. template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse*
  972. Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(Arena* arena) {
  973. return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Struct_FieldsEntry_DoNotUse >(arena);
  974. }
  975. template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Struct*
  976. Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Struct >(Arena* arena) {
  977. return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Struct >(arena);
  978. }
  979. template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Value*
  980. Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Value >(Arena* arena) {
  981. return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Value >(arena);
  982. }
  983. template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::ListValue*
  984. Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::ListValue >(Arena* arena) {
  985. return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::ListValue >(arena);
  986. }
  987. PROTOBUF_NAMESPACE_CLOSE
  988. // @@protoc_insertion_point(global_scope)
  989. #include "google/protobuf/port_undef.inc"