target.pb.cc 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970
  1. /*
  2. * Copyright 2023 Google LLC
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: firestore/local/target.proto
  18. #include "firestore/local/target.pb.h"
  19. #include <algorithm>
  20. #include <google/protobuf/io/coded_stream.h>
  21. #include <google/protobuf/extension_set.h>
  22. #include <google/protobuf/wire_format_lite.h>
  23. #include <google/protobuf/descriptor.h>
  24. #include <google/protobuf/generated_message_reflection.h>
  25. #include <google/protobuf/reflection_ops.h>
  26. #include <google/protobuf/wire_format.h>
  27. // @@protoc_insertion_point(includes)
  28. #include <google/protobuf/port_def.inc>
  29. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto;
  30. extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2ffirestore_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto;
  31. extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto;
  32. namespace firestore {
  33. namespace client {
  34. class TargetDefaultTypeInternal {
  35. public:
  36. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Target> _instance;
  37. const ::google::firestore::v1::Target_QueryTarget* query_;
  38. const ::google::firestore::v1::Target_DocumentsTarget* documents_;
  39. } _Target_default_instance_;
  40. class TargetGlobalDefaultTypeInternal {
  41. public:
  42. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TargetGlobal> _instance;
  43. } _TargetGlobal_default_instance_;
  44. } // namespace client
  45. } // namespace firestore
  46. static void InitDefaultsscc_info_Target_firestore_2flocal_2ftarget_2eproto() {
  47. GOOGLE_PROTOBUF_VERIFY_VERSION;
  48. {
  49. void* ptr = &::firestore::client::_Target_default_instance_;
  50. new (ptr) ::firestore::client::Target();
  51. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  52. }
  53. ::firestore::client::Target::InitAsDefaultInstance();
  54. }
  55. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_Target_firestore_2flocal_2ftarget_2eproto =
  56. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_Target_firestore_2flocal_2ftarget_2eproto}, {
  57. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,
  58. &scc_info_Target_QueryTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,
  59. &scc_info_Target_DocumentsTarget_google_2ffirestore_2fv1_2ffirestore_2eproto.base,}};
  60. static void InitDefaultsscc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto() {
  61. GOOGLE_PROTOBUF_VERIFY_VERSION;
  62. {
  63. void* ptr = &::firestore::client::_TargetGlobal_default_instance_;
  64. new (ptr) ::firestore::client::TargetGlobal();
  65. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  66. }
  67. ::firestore::client::TargetGlobal::InitAsDefaultInstance();
  68. }
  69. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto =
  70. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto}, {
  71. &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};
  72. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_firestore_2flocal_2ftarget_2eproto[2];
  73. static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_firestore_2flocal_2ftarget_2eproto = nullptr;
  74. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_firestore_2flocal_2ftarget_2eproto = nullptr;
  75. const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_firestore_2flocal_2ftarget_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  76. ~0u, // no _has_bits_
  77. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _internal_metadata_),
  78. ~0u, // no _extensions_
  79. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _oneof_case_[0]),
  80. ~0u, // no _weak_field_map_
  81. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, target_id_),
  82. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, snapshot_version_),
  83. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, resume_token_),
  84. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, last_listen_sequence_number_),
  85. offsetof(::firestore::client::TargetDefaultTypeInternal, query_),
  86. offsetof(::firestore::client::TargetDefaultTypeInternal, documents_),
  87. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, last_limbo_free_snapshot_version_),
  88. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, target_type_),
  89. ~0u, // no _has_bits_
  90. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _internal_metadata_),
  91. ~0u, // no _extensions_
  92. ~0u, // no _oneof_case_
  93. ~0u, // no _weak_field_map_
  94. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, highest_target_id_),
  95. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, highest_listen_sequence_number_),
  96. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, last_remote_snapshot_version_),
  97. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, target_count_),
  98. };
  99. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  100. { 0, -1, sizeof(::firestore::client::Target)},
  101. { 13, -1, sizeof(::firestore::client::TargetGlobal)},
  102. };
  103. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  104. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_Target_default_instance_),
  105. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::firestore::client::_TargetGlobal_default_instance_),
  106. };
  107. const char descriptor_table_protodef_firestore_2flocal_2ftarget_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  108. "\n\034firestore/local/target.proto\022\020firestor"
  109. "e.client\032#google/firestore/v1/firestore."
  110. "proto\032\037google/protobuf/timestamp.proto\"\335"
  111. "\002\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020snapshot"
  112. "_version\030\002 \001(\0132\032.google.protobuf.Timesta"
  113. "mp\022\024\n\014resume_token\030\003 \001(\014\022#\n\033last_listen_"
  114. "sequence_number\030\004 \001(\003\0228\n\005query\030\005 \001(\0132\'.g"
  115. "oogle.firestore.v1.Target.QueryTargetH\000\022"
  116. "@\n\tdocuments\030\006 \001(\0132+.google.firestore.v1"
  117. ".Target.DocumentsTargetH\000\022D\n last_limbo_"
  118. "free_snapshot_version\030\007 \001(\0132\032.google.pro"
  119. "tobuf.TimestampB\r\n\013target_type\"\251\001\n\014Targe"
  120. "tGlobal\022\031\n\021highest_target_id\030\001 \001(\005\022&\n\036hi"
  121. "ghest_listen_sequence_number\030\002 \001(\003\022@\n\034la"
  122. "st_remote_snapshot_version\030\003 \001(\0132\032.googl"
  123. "e.protobuf.Timestamp\022\024\n\014target_count\030\004 \001"
  124. "(\005B/\n#com.google.firebase.firestore.prot"
  125. "oP\001\242\002\005FSTPBb\006proto3"
  126. ;
  127. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_firestore_2flocal_2ftarget_2eproto_deps[2] = {
  128. &::descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto,
  129. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  130. };
  131. static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_firestore_2flocal_2ftarget_2eproto_sccs[2] = {
  132. &scc_info_Target_firestore_2flocal_2ftarget_2eproto.base,
  133. &scc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto.base,
  134. };
  135. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_firestore_2flocal_2ftarget_2eproto_once;
  136. static bool descriptor_table_firestore_2flocal_2ftarget_2eproto_initialized = false;
  137. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_firestore_2flocal_2ftarget_2eproto = {
  138. &descriptor_table_firestore_2flocal_2ftarget_2eproto_initialized, descriptor_table_protodef_firestore_2flocal_2ftarget_2eproto, "firestore/local/target.proto", 699,
  139. &descriptor_table_firestore_2flocal_2ftarget_2eproto_once, descriptor_table_firestore_2flocal_2ftarget_2eproto_sccs, descriptor_table_firestore_2flocal_2ftarget_2eproto_deps, 2, 2,
  140. schemas, file_default_instances, TableStruct_firestore_2flocal_2ftarget_2eproto::offsets,
  141. file_level_metadata_firestore_2flocal_2ftarget_2eproto, 2, file_level_enum_descriptors_firestore_2flocal_2ftarget_2eproto, file_level_service_descriptors_firestore_2flocal_2ftarget_2eproto,
  142. };
  143. // Force running AddDescriptors() at dynamic initialization time.
  144. static bool dynamic_init_dummy_firestore_2flocal_2ftarget_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_firestore_2flocal_2ftarget_2eproto), true);
  145. namespace firestore {
  146. namespace client {
  147. // ===================================================================
  148. void Target::InitAsDefaultInstance() {
  149. ::firestore::client::_Target_default_instance_._instance.get_mutable()->snapshot_version_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  150. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  151. ::firestore::client::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1::Target_QueryTarget*>(
  152. ::google::firestore::v1::Target_QueryTarget::internal_default_instance());
  153. ::firestore::client::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1::Target_DocumentsTarget*>(
  154. ::google::firestore::v1::Target_DocumentsTarget::internal_default_instance());
  155. ::firestore::client::_Target_default_instance_._instance.get_mutable()->last_limbo_free_snapshot_version_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  156. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  157. }
  158. class Target::_Internal {
  159. public:
  160. static const PROTOBUF_NAMESPACE_ID::Timestamp& snapshot_version(const Target* msg);
  161. static const ::google::firestore::v1::Target_QueryTarget& query(const Target* msg);
  162. static const ::google::firestore::v1::Target_DocumentsTarget& documents(const Target* msg);
  163. static const PROTOBUF_NAMESPACE_ID::Timestamp& last_limbo_free_snapshot_version(const Target* msg);
  164. };
  165. const PROTOBUF_NAMESPACE_ID::Timestamp&
  166. Target::_Internal::snapshot_version(const Target* msg) {
  167. return *msg->snapshot_version_;
  168. }
  169. const ::google::firestore::v1::Target_QueryTarget&
  170. Target::_Internal::query(const Target* msg) {
  171. return *msg->target_type_.query_;
  172. }
  173. const ::google::firestore::v1::Target_DocumentsTarget&
  174. Target::_Internal::documents(const Target* msg) {
  175. return *msg->target_type_.documents_;
  176. }
  177. const PROTOBUF_NAMESPACE_ID::Timestamp&
  178. Target::_Internal::last_limbo_free_snapshot_version(const Target* msg) {
  179. return *msg->last_limbo_free_snapshot_version_;
  180. }
  181. void Target::clear_snapshot_version() {
  182. if (GetArenaNoVirtual() == nullptr && snapshot_version_ != nullptr) {
  183. delete snapshot_version_;
  184. }
  185. snapshot_version_ = nullptr;
  186. }
  187. void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* query) {
  188. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  189. clear_target_type();
  190. if (query) {
  191. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  192. if (message_arena != submessage_arena) {
  193. query = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  194. message_arena, query, submessage_arena);
  195. }
  196. set_has_query();
  197. target_type_.query_ = query;
  198. }
  199. // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.query)
  200. }
  201. void Target::clear_query() {
  202. if (_internal_has_query()) {
  203. delete target_type_.query_;
  204. clear_has_target_type();
  205. }
  206. }
  207. void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents) {
  208. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  209. clear_target_type();
  210. if (documents) {
  211. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
  212. if (message_arena != submessage_arena) {
  213. documents = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  214. message_arena, documents, submessage_arena);
  215. }
  216. set_has_documents();
  217. target_type_.documents_ = documents;
  218. }
  219. // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.documents)
  220. }
  221. void Target::clear_documents() {
  222. if (_internal_has_documents()) {
  223. delete target_type_.documents_;
  224. clear_has_target_type();
  225. }
  226. }
  227. void Target::clear_last_limbo_free_snapshot_version() {
  228. if (GetArenaNoVirtual() == nullptr && last_limbo_free_snapshot_version_ != nullptr) {
  229. delete last_limbo_free_snapshot_version_;
  230. }
  231. last_limbo_free_snapshot_version_ = nullptr;
  232. }
  233. Target::Target()
  234. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  235. SharedCtor();
  236. // @@protoc_insertion_point(constructor:firestore.client.Target)
  237. }
  238. Target::Target(const Target& from)
  239. : ::PROTOBUF_NAMESPACE_ID::Message(),
  240. _internal_metadata_(nullptr) {
  241. _internal_metadata_.MergeFrom(from._internal_metadata_);
  242. resume_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  243. if (!from._internal_resume_token().empty()) {
  244. resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  245. }
  246. if (from._internal_has_snapshot_version()) {
  247. snapshot_version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.snapshot_version_);
  248. } else {
  249. snapshot_version_ = nullptr;
  250. }
  251. if (from._internal_has_last_limbo_free_snapshot_version()) {
  252. last_limbo_free_snapshot_version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.last_limbo_free_snapshot_version_);
  253. } else {
  254. last_limbo_free_snapshot_version_ = nullptr;
  255. }
  256. ::memcpy(&last_listen_sequence_number_, &from.last_listen_sequence_number_,
  257. static_cast<size_t>(reinterpret_cast<char*>(&target_id_) -
  258. reinterpret_cast<char*>(&last_listen_sequence_number_)) + sizeof(target_id_));
  259. clear_has_target_type();
  260. switch (from.target_type_case()) {
  261. case kQuery: {
  262. _internal_mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from._internal_query());
  263. break;
  264. }
  265. case kDocuments: {
  266. _internal_mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from._internal_documents());
  267. break;
  268. }
  269. case TARGET_TYPE_NOT_SET: {
  270. break;
  271. }
  272. }
  273. // @@protoc_insertion_point(copy_constructor:firestore.client.Target)
  274. }
  275. void Target::SharedCtor() {
  276. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Target_firestore_2flocal_2ftarget_2eproto.base);
  277. resume_token_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  278. ::memset(&snapshot_version_, 0, static_cast<size_t>(
  279. reinterpret_cast<char*>(&target_id_) -
  280. reinterpret_cast<char*>(&snapshot_version_)) + sizeof(target_id_));
  281. clear_has_target_type();
  282. }
  283. Target::~Target() {
  284. // @@protoc_insertion_point(destructor:firestore.client.Target)
  285. SharedDtor();
  286. }
  287. void Target::SharedDtor() {
  288. resume_token_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  289. if (this != internal_default_instance()) delete snapshot_version_;
  290. if (this != internal_default_instance()) delete last_limbo_free_snapshot_version_;
  291. if (has_target_type()) {
  292. clear_target_type();
  293. }
  294. }
  295. void Target::SetCachedSize(int size) const {
  296. _cached_size_.Set(size);
  297. }
  298. const Target& Target::default_instance() {
  299. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Target_firestore_2flocal_2ftarget_2eproto.base);
  300. return *internal_default_instance();
  301. }
  302. void Target::clear_target_type() {
  303. // @@protoc_insertion_point(one_of_clear_start:firestore.client.Target)
  304. switch (target_type_case()) {
  305. case kQuery: {
  306. delete target_type_.query_;
  307. break;
  308. }
  309. case kDocuments: {
  310. delete target_type_.documents_;
  311. break;
  312. }
  313. case TARGET_TYPE_NOT_SET: {
  314. break;
  315. }
  316. }
  317. _oneof_case_[0] = TARGET_TYPE_NOT_SET;
  318. }
  319. void Target::Clear() {
  320. // @@protoc_insertion_point(message_clear_start:firestore.client.Target)
  321. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  322. // Prevent compiler warnings about cached_has_bits being unused
  323. (void) cached_has_bits;
  324. resume_token_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  325. if (GetArenaNoVirtual() == nullptr && snapshot_version_ != nullptr) {
  326. delete snapshot_version_;
  327. }
  328. snapshot_version_ = nullptr;
  329. if (GetArenaNoVirtual() == nullptr && last_limbo_free_snapshot_version_ != nullptr) {
  330. delete last_limbo_free_snapshot_version_;
  331. }
  332. last_limbo_free_snapshot_version_ = nullptr;
  333. ::memset(&last_listen_sequence_number_, 0, static_cast<size_t>(
  334. reinterpret_cast<char*>(&target_id_) -
  335. reinterpret_cast<char*>(&last_listen_sequence_number_)) + sizeof(target_id_));
  336. clear_target_type();
  337. _internal_metadata_.Clear();
  338. }
  339. const char* Target::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  340. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  341. while (!ctx->Done(&ptr)) {
  342. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  343. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  344. CHK_(ptr);
  345. switch (tag >> 3) {
  346. // int32 target_id = 1;
  347. case 1:
  348. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  349. target_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  350. CHK_(ptr);
  351. } else goto handle_unusual;
  352. continue;
  353. // .google.protobuf.Timestamp snapshot_version = 2;
  354. case 2:
  355. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  356. ptr = ctx->ParseMessage(_internal_mutable_snapshot_version(), ptr);
  357. CHK_(ptr);
  358. } else goto handle_unusual;
  359. continue;
  360. // bytes resume_token = 3;
  361. case 3:
  362. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  363. auto str = _internal_mutable_resume_token();
  364. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  365. CHK_(ptr);
  366. } else goto handle_unusual;
  367. continue;
  368. // int64 last_listen_sequence_number = 4;
  369. case 4:
  370. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  371. last_listen_sequence_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  372. CHK_(ptr);
  373. } else goto handle_unusual;
  374. continue;
  375. // .google.firestore.v1.Target.QueryTarget query = 5;
  376. case 5:
  377. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
  378. ptr = ctx->ParseMessage(_internal_mutable_query(), ptr);
  379. CHK_(ptr);
  380. } else goto handle_unusual;
  381. continue;
  382. // .google.firestore.v1.Target.DocumentsTarget documents = 6;
  383. case 6:
  384. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
  385. ptr = ctx->ParseMessage(_internal_mutable_documents(), ptr);
  386. CHK_(ptr);
  387. } else goto handle_unusual;
  388. continue;
  389. // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
  390. case 7:
  391. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
  392. ptr = ctx->ParseMessage(_internal_mutable_last_limbo_free_snapshot_version(), ptr);
  393. CHK_(ptr);
  394. } else goto handle_unusual;
  395. continue;
  396. default: {
  397. handle_unusual:
  398. if ((tag & 7) == 4 || tag == 0) {
  399. ctx->SetLastTag(tag);
  400. goto success;
  401. }
  402. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  403. CHK_(ptr != nullptr);
  404. continue;
  405. }
  406. } // switch
  407. } // while
  408. success:
  409. return ptr;
  410. failure:
  411. ptr = nullptr;
  412. goto success;
  413. #undef CHK_
  414. }
  415. ::PROTOBUF_NAMESPACE_ID::uint8* Target::_InternalSerialize(
  416. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  417. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.Target)
  418. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  419. (void) cached_has_bits;
  420. // int32 target_id = 1;
  421. if (this->target_id() != 0) {
  422. target = stream->EnsureSpace(target);
  423. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_target_id(), target);
  424. }
  425. // .google.protobuf.Timestamp snapshot_version = 2;
  426. if (this->has_snapshot_version()) {
  427. target = stream->EnsureSpace(target);
  428. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  429. InternalWriteMessage(
  430. 2, _Internal::snapshot_version(this), target, stream);
  431. }
  432. // bytes resume_token = 3;
  433. if (this->resume_token().size() > 0) {
  434. target = stream->WriteBytesMaybeAliased(
  435. 3, this->_internal_resume_token(), target);
  436. }
  437. // int64 last_listen_sequence_number = 4;
  438. if (this->last_listen_sequence_number() != 0) {
  439. target = stream->EnsureSpace(target);
  440. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_last_listen_sequence_number(), target);
  441. }
  442. // .google.firestore.v1.Target.QueryTarget query = 5;
  443. if (_internal_has_query()) {
  444. target = stream->EnsureSpace(target);
  445. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  446. InternalWriteMessage(
  447. 5, _Internal::query(this), target, stream);
  448. }
  449. // .google.firestore.v1.Target.DocumentsTarget documents = 6;
  450. if (_internal_has_documents()) {
  451. target = stream->EnsureSpace(target);
  452. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  453. InternalWriteMessage(
  454. 6, _Internal::documents(this), target, stream);
  455. }
  456. // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
  457. if (this->has_last_limbo_free_snapshot_version()) {
  458. target = stream->EnsureSpace(target);
  459. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  460. InternalWriteMessage(
  461. 7, _Internal::last_limbo_free_snapshot_version(this), target, stream);
  462. }
  463. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  464. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  465. _internal_metadata_.unknown_fields(), target, stream);
  466. }
  467. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.Target)
  468. return target;
  469. }
  470. size_t Target::ByteSizeLong() const {
  471. // @@protoc_insertion_point(message_byte_size_start:firestore.client.Target)
  472. size_t total_size = 0;
  473. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  474. // Prevent compiler warnings about cached_has_bits being unused
  475. (void) cached_has_bits;
  476. // bytes resume_token = 3;
  477. if (this->resume_token().size() > 0) {
  478. total_size += 1 +
  479. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  480. this->_internal_resume_token());
  481. }
  482. // .google.protobuf.Timestamp snapshot_version = 2;
  483. if (this->has_snapshot_version()) {
  484. total_size += 1 +
  485. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  486. *snapshot_version_);
  487. }
  488. // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
  489. if (this->has_last_limbo_free_snapshot_version()) {
  490. total_size += 1 +
  491. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  492. *last_limbo_free_snapshot_version_);
  493. }
  494. // int64 last_listen_sequence_number = 4;
  495. if (this->last_listen_sequence_number() != 0) {
  496. total_size += 1 +
  497. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
  498. this->_internal_last_listen_sequence_number());
  499. }
  500. // int32 target_id = 1;
  501. if (this->target_id() != 0) {
  502. total_size += 1 +
  503. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  504. this->_internal_target_id());
  505. }
  506. switch (target_type_case()) {
  507. // .google.firestore.v1.Target.QueryTarget query = 5;
  508. case kQuery: {
  509. total_size += 1 +
  510. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  511. *target_type_.query_);
  512. break;
  513. }
  514. // .google.firestore.v1.Target.DocumentsTarget documents = 6;
  515. case kDocuments: {
  516. total_size += 1 +
  517. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  518. *target_type_.documents_);
  519. break;
  520. }
  521. case TARGET_TYPE_NOT_SET: {
  522. break;
  523. }
  524. }
  525. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  526. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  527. _internal_metadata_, total_size, &_cached_size_);
  528. }
  529. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  530. SetCachedSize(cached_size);
  531. return total_size;
  532. }
  533. void Target::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  534. // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.Target)
  535. GOOGLE_DCHECK_NE(&from, this);
  536. const Target* source =
  537. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Target>(
  538. &from);
  539. if (source == nullptr) {
  540. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.Target)
  541. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  542. } else {
  543. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.Target)
  544. MergeFrom(*source);
  545. }
  546. }
  547. void Target::MergeFrom(const Target& from) {
  548. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.Target)
  549. GOOGLE_DCHECK_NE(&from, this);
  550. _internal_metadata_.MergeFrom(from._internal_metadata_);
  551. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  552. (void) cached_has_bits;
  553. if (from.resume_token().size() > 0) {
  554. resume_token_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  555. }
  556. if (from.has_snapshot_version()) {
  557. _internal_mutable_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_snapshot_version());
  558. }
  559. if (from.has_last_limbo_free_snapshot_version()) {
  560. _internal_mutable_last_limbo_free_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_last_limbo_free_snapshot_version());
  561. }
  562. if (from.last_listen_sequence_number() != 0) {
  563. _internal_set_last_listen_sequence_number(from._internal_last_listen_sequence_number());
  564. }
  565. if (from.target_id() != 0) {
  566. _internal_set_target_id(from._internal_target_id());
  567. }
  568. switch (from.target_type_case()) {
  569. case kQuery: {
  570. _internal_mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from._internal_query());
  571. break;
  572. }
  573. case kDocuments: {
  574. _internal_mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from._internal_documents());
  575. break;
  576. }
  577. case TARGET_TYPE_NOT_SET: {
  578. break;
  579. }
  580. }
  581. }
  582. void Target::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  583. // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.Target)
  584. if (&from == this) return;
  585. Clear();
  586. MergeFrom(from);
  587. }
  588. void Target::CopyFrom(const Target& from) {
  589. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.Target)
  590. if (&from == this) return;
  591. Clear();
  592. MergeFrom(from);
  593. }
  594. bool Target::IsInitialized() const {
  595. return true;
  596. }
  597. void Target::InternalSwap(Target* other) {
  598. using std::swap;
  599. _internal_metadata_.Swap(&other->_internal_metadata_);
  600. resume_token_.Swap(&other->resume_token_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  601. GetArenaNoVirtual());
  602. swap(snapshot_version_, other->snapshot_version_);
  603. swap(last_limbo_free_snapshot_version_, other->last_limbo_free_snapshot_version_);
  604. swap(last_listen_sequence_number_, other->last_listen_sequence_number_);
  605. swap(target_id_, other->target_id_);
  606. swap(target_type_, other->target_type_);
  607. swap(_oneof_case_[0], other->_oneof_case_[0]);
  608. }
  609. ::PROTOBUF_NAMESPACE_ID::Metadata Target::GetMetadata() const {
  610. return GetMetadataStatic();
  611. }
  612. // ===================================================================
  613. void TargetGlobal::InitAsDefaultInstance() {
  614. ::firestore::client::_TargetGlobal_default_instance_._instance.get_mutable()->last_remote_snapshot_version_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
  615. PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
  616. }
  617. class TargetGlobal::_Internal {
  618. public:
  619. static const PROTOBUF_NAMESPACE_ID::Timestamp& last_remote_snapshot_version(const TargetGlobal* msg);
  620. };
  621. const PROTOBUF_NAMESPACE_ID::Timestamp&
  622. TargetGlobal::_Internal::last_remote_snapshot_version(const TargetGlobal* msg) {
  623. return *msg->last_remote_snapshot_version_;
  624. }
  625. void TargetGlobal::clear_last_remote_snapshot_version() {
  626. if (GetArenaNoVirtual() == nullptr && last_remote_snapshot_version_ != nullptr) {
  627. delete last_remote_snapshot_version_;
  628. }
  629. last_remote_snapshot_version_ = nullptr;
  630. }
  631. TargetGlobal::TargetGlobal()
  632. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  633. SharedCtor();
  634. // @@protoc_insertion_point(constructor:firestore.client.TargetGlobal)
  635. }
  636. TargetGlobal::TargetGlobal(const TargetGlobal& from)
  637. : ::PROTOBUF_NAMESPACE_ID::Message(),
  638. _internal_metadata_(nullptr) {
  639. _internal_metadata_.MergeFrom(from._internal_metadata_);
  640. if (from._internal_has_last_remote_snapshot_version()) {
  641. last_remote_snapshot_version_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.last_remote_snapshot_version_);
  642. } else {
  643. last_remote_snapshot_version_ = nullptr;
  644. }
  645. ::memcpy(&highest_listen_sequence_number_, &from.highest_listen_sequence_number_,
  646. static_cast<size_t>(reinterpret_cast<char*>(&target_count_) -
  647. reinterpret_cast<char*>(&highest_listen_sequence_number_)) + sizeof(target_count_));
  648. // @@protoc_insertion_point(copy_constructor:firestore.client.TargetGlobal)
  649. }
  650. void TargetGlobal::SharedCtor() {
  651. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto.base);
  652. ::memset(&last_remote_snapshot_version_, 0, static_cast<size_t>(
  653. reinterpret_cast<char*>(&target_count_) -
  654. reinterpret_cast<char*>(&last_remote_snapshot_version_)) + sizeof(target_count_));
  655. }
  656. TargetGlobal::~TargetGlobal() {
  657. // @@protoc_insertion_point(destructor:firestore.client.TargetGlobal)
  658. SharedDtor();
  659. }
  660. void TargetGlobal::SharedDtor() {
  661. if (this != internal_default_instance()) delete last_remote_snapshot_version_;
  662. }
  663. void TargetGlobal::SetCachedSize(int size) const {
  664. _cached_size_.Set(size);
  665. }
  666. const TargetGlobal& TargetGlobal::default_instance() {
  667. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TargetGlobal_firestore_2flocal_2ftarget_2eproto.base);
  668. return *internal_default_instance();
  669. }
  670. void TargetGlobal::Clear() {
  671. // @@protoc_insertion_point(message_clear_start:firestore.client.TargetGlobal)
  672. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  673. // Prevent compiler warnings about cached_has_bits being unused
  674. (void) cached_has_bits;
  675. if (GetArenaNoVirtual() == nullptr && last_remote_snapshot_version_ != nullptr) {
  676. delete last_remote_snapshot_version_;
  677. }
  678. last_remote_snapshot_version_ = nullptr;
  679. ::memset(&highest_listen_sequence_number_, 0, static_cast<size_t>(
  680. reinterpret_cast<char*>(&target_count_) -
  681. reinterpret_cast<char*>(&highest_listen_sequence_number_)) + sizeof(target_count_));
  682. _internal_metadata_.Clear();
  683. }
  684. const char* TargetGlobal::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  685. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  686. while (!ctx->Done(&ptr)) {
  687. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  688. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  689. CHK_(ptr);
  690. switch (tag >> 3) {
  691. // int32 highest_target_id = 1;
  692. case 1:
  693. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  694. highest_target_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  695. CHK_(ptr);
  696. } else goto handle_unusual;
  697. continue;
  698. // int64 highest_listen_sequence_number = 2;
  699. case 2:
  700. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
  701. highest_listen_sequence_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  702. CHK_(ptr);
  703. } else goto handle_unusual;
  704. continue;
  705. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  706. case 3:
  707. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  708. ptr = ctx->ParseMessage(_internal_mutable_last_remote_snapshot_version(), ptr);
  709. CHK_(ptr);
  710. } else goto handle_unusual;
  711. continue;
  712. // int32 target_count = 4;
  713. case 4:
  714. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
  715. target_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  716. CHK_(ptr);
  717. } else goto handle_unusual;
  718. continue;
  719. default: {
  720. handle_unusual:
  721. if ((tag & 7) == 4 || tag == 0) {
  722. ctx->SetLastTag(tag);
  723. goto success;
  724. }
  725. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  726. CHK_(ptr != nullptr);
  727. continue;
  728. }
  729. } // switch
  730. } // while
  731. success:
  732. return ptr;
  733. failure:
  734. ptr = nullptr;
  735. goto success;
  736. #undef CHK_
  737. }
  738. ::PROTOBUF_NAMESPACE_ID::uint8* TargetGlobal::_InternalSerialize(
  739. ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  740. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.TargetGlobal)
  741. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  742. (void) cached_has_bits;
  743. // int32 highest_target_id = 1;
  744. if (this->highest_target_id() != 0) {
  745. target = stream->EnsureSpace(target);
  746. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_highest_target_id(), target);
  747. }
  748. // int64 highest_listen_sequence_number = 2;
  749. if (this->highest_listen_sequence_number() != 0) {
  750. target = stream->EnsureSpace(target);
  751. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_highest_listen_sequence_number(), target);
  752. }
  753. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  754. if (this->has_last_remote_snapshot_version()) {
  755. target = stream->EnsureSpace(target);
  756. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  757. InternalWriteMessage(
  758. 3, _Internal::last_remote_snapshot_version(this), target, stream);
  759. }
  760. // int32 target_count = 4;
  761. if (this->target_count() != 0) {
  762. target = stream->EnsureSpace(target);
  763. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_target_count(), target);
  764. }
  765. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  766. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  767. _internal_metadata_.unknown_fields(), target, stream);
  768. }
  769. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.TargetGlobal)
  770. return target;
  771. }
  772. size_t TargetGlobal::ByteSizeLong() const {
  773. // @@protoc_insertion_point(message_byte_size_start:firestore.client.TargetGlobal)
  774. size_t total_size = 0;
  775. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  776. // Prevent compiler warnings about cached_has_bits being unused
  777. (void) cached_has_bits;
  778. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  779. if (this->has_last_remote_snapshot_version()) {
  780. total_size += 1 +
  781. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  782. *last_remote_snapshot_version_);
  783. }
  784. // int64 highest_listen_sequence_number = 2;
  785. if (this->highest_listen_sequence_number() != 0) {
  786. total_size += 1 +
  787. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
  788. this->_internal_highest_listen_sequence_number());
  789. }
  790. // int32 highest_target_id = 1;
  791. if (this->highest_target_id() != 0) {
  792. total_size += 1 +
  793. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  794. this->_internal_highest_target_id());
  795. }
  796. // int32 target_count = 4;
  797. if (this->target_count() != 0) {
  798. total_size += 1 +
  799. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  800. this->_internal_target_count());
  801. }
  802. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  803. return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
  804. _internal_metadata_, total_size, &_cached_size_);
  805. }
  806. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  807. SetCachedSize(cached_size);
  808. return total_size;
  809. }
  810. void TargetGlobal::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  811. // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.TargetGlobal)
  812. GOOGLE_DCHECK_NE(&from, this);
  813. const TargetGlobal* source =
  814. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TargetGlobal>(
  815. &from);
  816. if (source == nullptr) {
  817. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.TargetGlobal)
  818. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  819. } else {
  820. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.TargetGlobal)
  821. MergeFrom(*source);
  822. }
  823. }
  824. void TargetGlobal::MergeFrom(const TargetGlobal& from) {
  825. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.TargetGlobal)
  826. GOOGLE_DCHECK_NE(&from, this);
  827. _internal_metadata_.MergeFrom(from._internal_metadata_);
  828. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  829. (void) cached_has_bits;
  830. if (from.has_last_remote_snapshot_version()) {
  831. _internal_mutable_last_remote_snapshot_version()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_last_remote_snapshot_version());
  832. }
  833. if (from.highest_listen_sequence_number() != 0) {
  834. _internal_set_highest_listen_sequence_number(from._internal_highest_listen_sequence_number());
  835. }
  836. if (from.highest_target_id() != 0) {
  837. _internal_set_highest_target_id(from._internal_highest_target_id());
  838. }
  839. if (from.target_count() != 0) {
  840. _internal_set_target_count(from._internal_target_count());
  841. }
  842. }
  843. void TargetGlobal::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  844. // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.TargetGlobal)
  845. if (&from == this) return;
  846. Clear();
  847. MergeFrom(from);
  848. }
  849. void TargetGlobal::CopyFrom(const TargetGlobal& from) {
  850. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.TargetGlobal)
  851. if (&from == this) return;
  852. Clear();
  853. MergeFrom(from);
  854. }
  855. bool TargetGlobal::IsInitialized() const {
  856. return true;
  857. }
  858. void TargetGlobal::InternalSwap(TargetGlobal* other) {
  859. using std::swap;
  860. _internal_metadata_.Swap(&other->_internal_metadata_);
  861. swap(last_remote_snapshot_version_, other->last_remote_snapshot_version_);
  862. swap(highest_listen_sequence_number_, other->highest_listen_sequence_number_);
  863. swap(highest_target_id_, other->highest_target_id_);
  864. swap(target_count_, other->target_count_);
  865. }
  866. ::PROTOBUF_NAMESPACE_ID::Metadata TargetGlobal::GetMetadata() const {
  867. return GetMetadataStatic();
  868. }
  869. // @@protoc_insertion_point(namespace_scope)
  870. } // namespace client
  871. } // namespace firestore
  872. PROTOBUF_NAMESPACE_OPEN
  873. template<> PROTOBUF_NOINLINE ::firestore::client::Target* Arena::CreateMaybeMessage< ::firestore::client::Target >(Arena* arena) {
  874. return Arena::CreateInternal< ::firestore::client::Target >(arena);
  875. }
  876. template<> PROTOBUF_NOINLINE ::firestore::client::TargetGlobal* Arena::CreateMaybeMessage< ::firestore::client::TargetGlobal >(Arena* arena) {
  877. return Arena::CreateInternal< ::firestore::client::TargetGlobal >(arena);
  878. }
  879. PROTOBUF_NAMESPACE_CLOSE
  880. // @@protoc_insertion_point(global_scope)
  881. #include <google/protobuf/port_undef.inc>