诸暨麻将添加redis
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

1121 rader
42 KiB

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