target.pb.cc 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092
  1. /*
  2. * Copyright 2025 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. #include "google/protobuf/generated_message_tctable_impl.h"
  28. // @@protoc_insertion_point(includes)
  29. // Must be included last.
  30. #include "google/protobuf/port_def.inc"
  31. PROTOBUF_PRAGMA_INIT_SEG
  32. namespace _pb = ::google::protobuf;
  33. namespace _pbi = ::google::protobuf::internal;
  34. namespace _fl = ::google::protobuf::internal::field_layout;
  35. namespace firestore {
  36. namespace client {
  37. inline constexpr TargetGlobal::Impl_::Impl_(
  38. ::_pbi::ConstantInitialized) noexcept
  39. : _cached_size_{0},
  40. last_remote_snapshot_version_{nullptr},
  41. highest_listen_sequence_number_{::int64_t{0}},
  42. highest_target_id_{0},
  43. target_count_{0} {}
  44. template <typename>
  45. PROTOBUF_CONSTEXPR TargetGlobal::TargetGlobal(::_pbi::ConstantInitialized)
  46. : _impl_(::_pbi::ConstantInitialized()) {}
  47. struct TargetGlobalDefaultTypeInternal {
  48. PROTOBUF_CONSTEXPR TargetGlobalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  49. ~TargetGlobalDefaultTypeInternal() {}
  50. union {
  51. TargetGlobal _instance;
  52. };
  53. };
  54. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  55. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TargetGlobalDefaultTypeInternal _TargetGlobal_default_instance_;
  56. inline constexpr Target::Impl_::Impl_(
  57. ::_pbi::ConstantInitialized) noexcept
  58. : _cached_size_{0},
  59. resume_token_(
  60. &::google::protobuf::internal::fixed_address_empty_string,
  61. ::_pbi::ConstantInitialized()),
  62. snapshot_version_{nullptr},
  63. last_limbo_free_snapshot_version_{nullptr},
  64. last_listen_sequence_number_{::int64_t{0}},
  65. target_id_{0},
  66. target_type_{},
  67. _oneof_case_{} {}
  68. template <typename>
  69. PROTOBUF_CONSTEXPR Target::Target(::_pbi::ConstantInitialized)
  70. : _impl_(::_pbi::ConstantInitialized()) {}
  71. struct TargetDefaultTypeInternal {
  72. PROTOBUF_CONSTEXPR TargetDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  73. ~TargetDefaultTypeInternal() {}
  74. union {
  75. Target _instance;
  76. };
  77. };
  78. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  79. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TargetDefaultTypeInternal _Target_default_instance_;
  80. } // namespace client
  81. } // namespace firestore
  82. static ::_pb::Metadata file_level_metadata_firestore_2flocal_2ftarget_2eproto[2];
  83. static constexpr const ::_pb::EnumDescriptor**
  84. file_level_enum_descriptors_firestore_2flocal_2ftarget_2eproto = nullptr;
  85. static constexpr const ::_pb::ServiceDescriptor**
  86. file_level_service_descriptors_firestore_2flocal_2ftarget_2eproto = nullptr;
  87. const ::uint32_t TableStruct_firestore_2flocal_2ftarget_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  88. protodesc_cold) = {
  89. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_._has_bits_),
  90. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _internal_metadata_),
  91. ~0u, // no _extensions_
  92. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_._oneof_case_[0]),
  93. ~0u, // no _weak_field_map_
  94. ~0u, // no _inlined_string_donated_
  95. ~0u, // no _split_
  96. ~0u, // no sizeof(Split)
  97. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.target_id_),
  98. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.snapshot_version_),
  99. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.resume_token_),
  100. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.last_listen_sequence_number_),
  101. ::_pbi::kInvalidFieldOffsetTag,
  102. ::_pbi::kInvalidFieldOffsetTag,
  103. ::_pbi::kInvalidFieldOffsetTag,
  104. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.last_limbo_free_snapshot_version_),
  105. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_.target_type_),
  106. ~0u,
  107. 0,
  108. ~0u,
  109. ~0u,
  110. ~0u,
  111. ~0u,
  112. ~0u,
  113. 1,
  114. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _impl_._has_bits_),
  115. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _internal_metadata_),
  116. ~0u, // no _extensions_
  117. ~0u, // no _oneof_case_
  118. ~0u, // no _weak_field_map_
  119. ~0u, // no _inlined_string_donated_
  120. ~0u, // no _split_
  121. ~0u, // no sizeof(Split)
  122. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _impl_.highest_target_id_),
  123. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _impl_.highest_listen_sequence_number_),
  124. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _impl_.last_remote_snapshot_version_),
  125. PROTOBUF_FIELD_OFFSET(::firestore::client::TargetGlobal, _impl_.target_count_),
  126. ~0u,
  127. ~0u,
  128. 0,
  129. ~0u,
  130. };
  131. static const ::_pbi::MigrationSchema
  132. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  133. {0, 17, -1, sizeof(::firestore::client::Target)},
  134. {25, 37, -1, sizeof(::firestore::client::TargetGlobal)},
  135. };
  136. static const ::_pb::Message* const file_default_instances[] = {
  137. &::firestore::client::_Target_default_instance_._instance,
  138. &::firestore::client::_TargetGlobal_default_instance_._instance,
  139. };
  140. const char descriptor_table_protodef_firestore_2flocal_2ftarget_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  141. "\n\034firestore/local/target.proto\022\020firestor"
  142. "e.client\032#google/firestore/v1/firestore."
  143. "proto\032\037google/protobuf/timestamp.proto\"\250"
  144. "\003\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020snapshot"
  145. "_version\030\002 \001(\0132\032.google.protobuf.Timesta"
  146. "mp\022\024\n\014resume_token\030\003 \001(\014\022#\n\033last_listen_"
  147. "sequence_number\030\004 \001(\003\0228\n\005query\030\005 \001(\0132\'.g"
  148. "oogle.firestore.v1.Target.QueryTargetH\000\022"
  149. "@\n\tdocuments\030\006 \001(\0132+.google.firestore.v1"
  150. ".Target.DocumentsTargetH\000\022I\n\016pipeline_qu"
  151. "ery\030\r \001(\0132/.google.firestore.v1.Target.P"
  152. "ipelineQueryTargetH\000\022D\n last_limbo_free_"
  153. "snapshot_version\030\007 \001(\0132\032.google.protobuf"
  154. ".TimestampB\r\n\013target_type\"\251\001\n\014TargetGlob"
  155. "al\022\031\n\021highest_target_id\030\001 \001(\005\022&\n\036highest"
  156. "_listen_sequence_number\030\002 \001(\003\022@\n\034last_re"
  157. "mote_snapshot_version\030\003 \001(\0132\032.google.pro"
  158. "tobuf.Timestamp\022\024\n\014target_count\030\004 \001(\005B/\n"
  159. "#com.google.firebase.firestore.protoP\001\242\002"
  160. "\005FSTPBb\006proto3"
  161. };
  162. static const ::_pbi::DescriptorTable* const descriptor_table_firestore_2flocal_2ftarget_2eproto_deps[2] =
  163. {
  164. &::descriptor_table_google_2ffirestore_2fv1_2ffirestore_2eproto,
  165. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  166. };
  167. static ::absl::once_flag descriptor_table_firestore_2flocal_2ftarget_2eproto_once;
  168. const ::_pbi::DescriptorTable descriptor_table_firestore_2flocal_2ftarget_2eproto = {
  169. false,
  170. false,
  171. 774,
  172. descriptor_table_protodef_firestore_2flocal_2ftarget_2eproto,
  173. "firestore/local/target.proto",
  174. &descriptor_table_firestore_2flocal_2ftarget_2eproto_once,
  175. descriptor_table_firestore_2flocal_2ftarget_2eproto_deps,
  176. 2,
  177. 2,
  178. schemas,
  179. file_default_instances,
  180. TableStruct_firestore_2flocal_2ftarget_2eproto::offsets,
  181. file_level_metadata_firestore_2flocal_2ftarget_2eproto,
  182. file_level_enum_descriptors_firestore_2flocal_2ftarget_2eproto,
  183. file_level_service_descriptors_firestore_2flocal_2ftarget_2eproto,
  184. };
  185. // This function exists to be marked as weak.
  186. // It can significantly speed up compilation by breaking up LLVM's SCC
  187. // in the .pb.cc translation units. Large translation units see a
  188. // reduction of more than 35% of walltime for optimized builds. Without
  189. // the weak attribute all the messages in the file, including all the
  190. // vtables and everything they use become part of the same SCC through
  191. // a cycle like:
  192. // GetMetadata -> descriptor table -> default instances ->
  193. // vtables -> GetMetadata
  194. // By adding a weak function here we break the connection from the
  195. // individual vtables back into the descriptor table.
  196. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_firestore_2flocal_2ftarget_2eproto_getter() {
  197. return &descriptor_table_firestore_2flocal_2ftarget_2eproto;
  198. }
  199. // Force running AddDescriptors() at dynamic initialization time.
  200. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  201. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_firestore_2flocal_2ftarget_2eproto(&descriptor_table_firestore_2flocal_2ftarget_2eproto);
  202. namespace firestore {
  203. namespace client {
  204. // ===================================================================
  205. class Target::_Internal {
  206. public:
  207. using HasBits = decltype(std::declval<Target>()._impl_._has_bits_);
  208. static constexpr ::int32_t kHasBitsOffset =
  209. 8 * PROTOBUF_FIELD_OFFSET(Target, _impl_._has_bits_);
  210. static constexpr ::int32_t kOneofCaseOffset =
  211. PROTOBUF_FIELD_OFFSET(::firestore::client::Target, _impl_._oneof_case_);
  212. static const ::google::protobuf::Timestamp& snapshot_version(const Target* msg);
  213. static void set_has_snapshot_version(HasBits* has_bits) {
  214. (*has_bits)[0] |= 1u;
  215. }
  216. static const ::google::firestore::v1::Target_QueryTarget& query(const Target* msg);
  217. static const ::google::firestore::v1::Target_DocumentsTarget& documents(const Target* msg);
  218. static const ::google::firestore::v1::Target_PipelineQueryTarget& pipeline_query(const Target* msg);
  219. static const ::google::protobuf::Timestamp& last_limbo_free_snapshot_version(const Target* msg);
  220. static void set_has_last_limbo_free_snapshot_version(HasBits* has_bits) {
  221. (*has_bits)[0] |= 2u;
  222. }
  223. };
  224. const ::google::protobuf::Timestamp& Target::_Internal::snapshot_version(const Target* msg) {
  225. return *msg->_impl_.snapshot_version_;
  226. }
  227. const ::google::firestore::v1::Target_QueryTarget& Target::_Internal::query(const Target* msg) {
  228. return *msg->_impl_.target_type_.query_;
  229. }
  230. const ::google::firestore::v1::Target_DocumentsTarget& Target::_Internal::documents(const Target* msg) {
  231. return *msg->_impl_.target_type_.documents_;
  232. }
  233. const ::google::firestore::v1::Target_PipelineQueryTarget& Target::_Internal::pipeline_query(const Target* msg) {
  234. return *msg->_impl_.target_type_.pipeline_query_;
  235. }
  236. const ::google::protobuf::Timestamp& Target::_Internal::last_limbo_free_snapshot_version(const Target* msg) {
  237. return *msg->_impl_.last_limbo_free_snapshot_version_;
  238. }
  239. void Target::clear_snapshot_version() {
  240. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  241. if (_impl_.snapshot_version_ != nullptr) _impl_.snapshot_version_->Clear();
  242. _impl_._has_bits_[0] &= ~0x00000001u;
  243. }
  244. void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* query) {
  245. ::google::protobuf::Arena* message_arena = GetArena();
  246. clear_target_type();
  247. if (query) {
  248. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(query)->GetArena();
  249. if (message_arena != submessage_arena) {
  250. query = ::google::protobuf::internal::GetOwnedMessage(message_arena, query, submessage_arena);
  251. }
  252. set_has_query();
  253. _impl_.target_type_.query_ = query;
  254. }
  255. // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.query)
  256. }
  257. void Target::clear_query() {
  258. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  259. if (target_type_case() == kQuery) {
  260. if (GetArena() == nullptr) {
  261. delete _impl_.target_type_.query_;
  262. }
  263. clear_has_target_type();
  264. }
  265. }
  266. void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents) {
  267. ::google::protobuf::Arena* message_arena = GetArena();
  268. clear_target_type();
  269. if (documents) {
  270. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(documents)->GetArena();
  271. if (message_arena != submessage_arena) {
  272. documents = ::google::protobuf::internal::GetOwnedMessage(message_arena, documents, submessage_arena);
  273. }
  274. set_has_documents();
  275. _impl_.target_type_.documents_ = documents;
  276. }
  277. // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.documents)
  278. }
  279. void Target::clear_documents() {
  280. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  281. if (target_type_case() == kDocuments) {
  282. if (GetArena() == nullptr) {
  283. delete _impl_.target_type_.documents_;
  284. }
  285. clear_has_target_type();
  286. }
  287. }
  288. void Target::set_allocated_pipeline_query(::google::firestore::v1::Target_PipelineQueryTarget* pipeline_query) {
  289. ::google::protobuf::Arena* message_arena = GetArena();
  290. clear_target_type();
  291. if (pipeline_query) {
  292. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(pipeline_query)->GetArena();
  293. if (message_arena != submessage_arena) {
  294. pipeline_query = ::google::protobuf::internal::GetOwnedMessage(message_arena, pipeline_query, submessage_arena);
  295. }
  296. set_has_pipeline_query();
  297. _impl_.target_type_.pipeline_query_ = pipeline_query;
  298. }
  299. // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.pipeline_query)
  300. }
  301. void Target::clear_pipeline_query() {
  302. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  303. if (target_type_case() == kPipelineQuery) {
  304. if (GetArena() == nullptr) {
  305. delete _impl_.target_type_.pipeline_query_;
  306. }
  307. clear_has_target_type();
  308. }
  309. }
  310. void Target::clear_last_limbo_free_snapshot_version() {
  311. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  312. if (_impl_.last_limbo_free_snapshot_version_ != nullptr) _impl_.last_limbo_free_snapshot_version_->Clear();
  313. _impl_._has_bits_[0] &= ~0x00000002u;
  314. }
  315. Target::Target(::google::protobuf::Arena* arena)
  316. : ::google::protobuf::Message(arena) {
  317. SharedCtor(arena);
  318. // @@protoc_insertion_point(arena_constructor:firestore.client.Target)
  319. }
  320. inline PROTOBUF_NDEBUG_INLINE Target::Impl_::Impl_(
  321. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  322. const Impl_& from)
  323. : _has_bits_{from._has_bits_},
  324. _cached_size_{0},
  325. resume_token_(arena, from.resume_token_),
  326. target_type_{},
  327. _oneof_case_{from._oneof_case_[0]} {}
  328. Target::Target(
  329. ::google::protobuf::Arena* arena,
  330. const Target& from)
  331. : ::google::protobuf::Message(arena) {
  332. Target* const _this = this;
  333. (void)_this;
  334. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  335. from._internal_metadata_);
  336. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  337. ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  338. _impl_.snapshot_version_ = (cached_has_bits & 0x00000001u)
  339. ? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.snapshot_version_)
  340. : nullptr;
  341. _impl_.last_limbo_free_snapshot_version_ = (cached_has_bits & 0x00000002u)
  342. ? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.last_limbo_free_snapshot_version_)
  343. : nullptr;
  344. ::memcpy(reinterpret_cast<char *>(&_impl_) +
  345. offsetof(Impl_, last_listen_sequence_number_),
  346. reinterpret_cast<const char *>(&from._impl_) +
  347. offsetof(Impl_, last_listen_sequence_number_),
  348. offsetof(Impl_, target_id_) -
  349. offsetof(Impl_, last_listen_sequence_number_) +
  350. sizeof(Impl_::target_id_));
  351. switch (target_type_case()) {
  352. case TARGET_TYPE_NOT_SET:
  353. break;
  354. case kQuery:
  355. _impl_.target_type_.query_ = CreateMaybeMessage<::google::firestore::v1::Target_QueryTarget>(arena, *from._impl_.target_type_.query_);
  356. break;
  357. case kDocuments:
  358. _impl_.target_type_.documents_ = CreateMaybeMessage<::google::firestore::v1::Target_DocumentsTarget>(arena, *from._impl_.target_type_.documents_);
  359. break;
  360. case kPipelineQuery:
  361. _impl_.target_type_.pipeline_query_ = CreateMaybeMessage<::google::firestore::v1::Target_PipelineQueryTarget>(arena, *from._impl_.target_type_.pipeline_query_);
  362. break;
  363. }
  364. // @@protoc_insertion_point(copy_constructor:firestore.client.Target)
  365. }
  366. inline PROTOBUF_NDEBUG_INLINE Target::Impl_::Impl_(
  367. ::google::protobuf::internal::InternalVisibility visibility,
  368. ::google::protobuf::Arena* arena)
  369. : _cached_size_{0},
  370. resume_token_(arena),
  371. target_type_{},
  372. _oneof_case_{} {}
  373. inline void Target::SharedCtor(::_pb::Arena* arena) {
  374. new (&_impl_) Impl_(internal_visibility(), arena);
  375. ::memset(reinterpret_cast<char *>(&_impl_) +
  376. offsetof(Impl_, snapshot_version_),
  377. 0,
  378. offsetof(Impl_, target_id_) -
  379. offsetof(Impl_, snapshot_version_) +
  380. sizeof(Impl_::target_id_));
  381. }
  382. Target::~Target() {
  383. // @@protoc_insertion_point(destructor:firestore.client.Target)
  384. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  385. SharedDtor();
  386. }
  387. inline void Target::SharedDtor() {
  388. ABSL_DCHECK(GetArena() == nullptr);
  389. _impl_.resume_token_.Destroy();
  390. delete _impl_.snapshot_version_;
  391. delete _impl_.last_limbo_free_snapshot_version_;
  392. if (has_target_type()) {
  393. clear_target_type();
  394. }
  395. _impl_.~Impl_();
  396. }
  397. void Target::clear_target_type() {
  398. // @@protoc_insertion_point(one_of_clear_start:firestore.client.Target)
  399. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  400. switch (target_type_case()) {
  401. case kQuery: {
  402. if (GetArena() == nullptr) {
  403. delete _impl_.target_type_.query_;
  404. }
  405. break;
  406. }
  407. case kDocuments: {
  408. if (GetArena() == nullptr) {
  409. delete _impl_.target_type_.documents_;
  410. }
  411. break;
  412. }
  413. case kPipelineQuery: {
  414. if (GetArena() == nullptr) {
  415. delete _impl_.target_type_.pipeline_query_;
  416. }
  417. break;
  418. }
  419. case TARGET_TYPE_NOT_SET: {
  420. break;
  421. }
  422. }
  423. _impl_._oneof_case_[0] = TARGET_TYPE_NOT_SET;
  424. }
  425. PROTOBUF_NOINLINE void Target::Clear() {
  426. // @@protoc_insertion_point(message_clear_start:firestore.client.Target)
  427. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  428. ::uint32_t cached_has_bits = 0;
  429. // Prevent compiler warnings about cached_has_bits being unused
  430. (void) cached_has_bits;
  431. _impl_.resume_token_.ClearToEmpty();
  432. cached_has_bits = _impl_._has_bits_[0];
  433. if (cached_has_bits & 0x00000003u) {
  434. if (cached_has_bits & 0x00000001u) {
  435. ABSL_DCHECK(_impl_.snapshot_version_ != nullptr);
  436. _impl_.snapshot_version_->Clear();
  437. }
  438. if (cached_has_bits & 0x00000002u) {
  439. ABSL_DCHECK(_impl_.last_limbo_free_snapshot_version_ != nullptr);
  440. _impl_.last_limbo_free_snapshot_version_->Clear();
  441. }
  442. }
  443. ::memset(&_impl_.last_listen_sequence_number_, 0, static_cast<::size_t>(
  444. reinterpret_cast<char*>(&_impl_.target_id_) -
  445. reinterpret_cast<char*>(&_impl_.last_listen_sequence_number_)) + sizeof(_impl_.target_id_));
  446. clear_target_type();
  447. _impl_._has_bits_.Clear();
  448. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  449. }
  450. const char* Target::_InternalParse(
  451. const char* ptr, ::_pbi::ParseContext* ctx) {
  452. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  453. return ptr;
  454. }
  455. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  456. const ::_pbi::TcParseTable<3, 8, 5, 0, 2> Target::_table_ = {
  457. {
  458. PROTOBUF_FIELD_OFFSET(Target, _impl_._has_bits_),
  459. 0, // no _extensions_
  460. 13, 56, // max_field_number, fast_idx_mask
  461. offsetof(decltype(_table_), field_lookup_table),
  462. 4294963072, // skipmap
  463. offsetof(decltype(_table_), field_entries),
  464. 8, // num_field_entries
  465. 5, // num_aux_entries
  466. offsetof(decltype(_table_), aux_entries),
  467. &_Target_default_instance_._instance,
  468. ::_pbi::TcParser::GenericFallback, // fallback
  469. }, {{
  470. {::_pbi::TcParser::MiniParse, {}},
  471. // int32 target_id = 1;
  472. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Target, _impl_.target_id_), 63>(),
  473. {8, 63, 0, PROTOBUF_FIELD_OFFSET(Target, _impl_.target_id_)}},
  474. // .google.protobuf.Timestamp snapshot_version = 2;
  475. {::_pbi::TcParser::FastMtS1,
  476. {18, 0, 0, PROTOBUF_FIELD_OFFSET(Target, _impl_.snapshot_version_)}},
  477. // bytes resume_token = 3;
  478. {::_pbi::TcParser::FastBS1,
  479. {26, 63, 0, PROTOBUF_FIELD_OFFSET(Target, _impl_.resume_token_)}},
  480. // int64 last_listen_sequence_number = 4;
  481. {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Target, _impl_.last_listen_sequence_number_), 63>(),
  482. {32, 63, 0, PROTOBUF_FIELD_OFFSET(Target, _impl_.last_listen_sequence_number_)}},
  483. {::_pbi::TcParser::MiniParse, {}},
  484. {::_pbi::TcParser::MiniParse, {}},
  485. // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
  486. {::_pbi::TcParser::FastMtS1,
  487. {58, 1, 3, PROTOBUF_FIELD_OFFSET(Target, _impl_.last_limbo_free_snapshot_version_)}},
  488. }}, {{
  489. 65535, 65535
  490. }}, {{
  491. // int32 target_id = 1;
  492. {PROTOBUF_FIELD_OFFSET(Target, _impl_.target_id_), -1, 0,
  493. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  494. // .google.protobuf.Timestamp snapshot_version = 2;
  495. {PROTOBUF_FIELD_OFFSET(Target, _impl_.snapshot_version_), _Internal::kHasBitsOffset + 0, 0,
  496. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  497. // bytes resume_token = 3;
  498. {PROTOBUF_FIELD_OFFSET(Target, _impl_.resume_token_), -1, 0,
  499. (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
  500. // int64 last_listen_sequence_number = 4;
  501. {PROTOBUF_FIELD_OFFSET(Target, _impl_.last_listen_sequence_number_), -1, 0,
  502. (0 | ::_fl::kFcSingular | ::_fl::kInt64)},
  503. // .google.firestore.v1.Target.QueryTarget query = 5;
  504. {PROTOBUF_FIELD_OFFSET(Target, _impl_.target_type_.query_), _Internal::kOneofCaseOffset + 0, 1,
  505. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  506. // .google.firestore.v1.Target.DocumentsTarget documents = 6;
  507. {PROTOBUF_FIELD_OFFSET(Target, _impl_.target_type_.documents_), _Internal::kOneofCaseOffset + 0, 2,
  508. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  509. // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
  510. {PROTOBUF_FIELD_OFFSET(Target, _impl_.last_limbo_free_snapshot_version_), _Internal::kHasBitsOffset + 1, 3,
  511. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  512. // .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
  513. {PROTOBUF_FIELD_OFFSET(Target, _impl_.target_type_.pipeline_query_), _Internal::kOneofCaseOffset + 0, 4,
  514. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  515. }}, {{
  516. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  517. {::_pbi::TcParser::GetTable<::google::firestore::v1::Target_QueryTarget>()},
  518. {::_pbi::TcParser::GetTable<::google::firestore::v1::Target_DocumentsTarget>()},
  519. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  520. {::_pbi::TcParser::GetTable<::google::firestore::v1::Target_PipelineQueryTarget>()},
  521. }}, {{
  522. }},
  523. };
  524. ::uint8_t* Target::_InternalSerialize(
  525. ::uint8_t* target,
  526. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  527. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.Target)
  528. ::uint32_t cached_has_bits = 0;
  529. (void)cached_has_bits;
  530. // int32 target_id = 1;
  531. if (this->_internal_target_id() != 0) {
  532. target = ::google::protobuf::internal::WireFormatLite::
  533. WriteInt32ToArrayWithField<1>(
  534. stream, this->_internal_target_id(), target);
  535. }
  536. cached_has_bits = _impl_._has_bits_[0];
  537. // .google.protobuf.Timestamp snapshot_version = 2;
  538. if (cached_has_bits & 0x00000001u) {
  539. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  540. 2, _Internal::snapshot_version(this),
  541. _Internal::snapshot_version(this).GetCachedSize(), target, stream);
  542. }
  543. // bytes resume_token = 3;
  544. if (!this->_internal_resume_token().empty()) {
  545. const std::string& _s = this->_internal_resume_token();
  546. target = stream->WriteBytesMaybeAliased(3, _s, target);
  547. }
  548. // int64 last_listen_sequence_number = 4;
  549. if (this->_internal_last_listen_sequence_number() != 0) {
  550. target = ::google::protobuf::internal::WireFormatLite::
  551. WriteInt64ToArrayWithField<4>(
  552. stream, this->_internal_last_listen_sequence_number(), target);
  553. }
  554. switch (target_type_case()) {
  555. case kQuery: {
  556. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  557. 5, _Internal::query(this),
  558. _Internal::query(this).GetCachedSize(), target, stream);
  559. break;
  560. }
  561. case kDocuments: {
  562. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  563. 6, _Internal::documents(this),
  564. _Internal::documents(this).GetCachedSize(), target, stream);
  565. break;
  566. }
  567. default:
  568. break;
  569. }
  570. // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
  571. if (cached_has_bits & 0x00000002u) {
  572. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  573. 7, _Internal::last_limbo_free_snapshot_version(this),
  574. _Internal::last_limbo_free_snapshot_version(this).GetCachedSize(), target, stream);
  575. }
  576. // .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
  577. if (target_type_case() == kPipelineQuery) {
  578. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  579. 13, _Internal::pipeline_query(this),
  580. _Internal::pipeline_query(this).GetCachedSize(), target, stream);
  581. }
  582. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  583. target =
  584. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  585. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  586. }
  587. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.Target)
  588. return target;
  589. }
  590. ::size_t Target::ByteSizeLong() const {
  591. // @@protoc_insertion_point(message_byte_size_start:firestore.client.Target)
  592. ::size_t total_size = 0;
  593. ::uint32_t cached_has_bits = 0;
  594. // Prevent compiler warnings about cached_has_bits being unused
  595. (void) cached_has_bits;
  596. // bytes resume_token = 3;
  597. if (!this->_internal_resume_token().empty()) {
  598. total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
  599. this->_internal_resume_token());
  600. }
  601. cached_has_bits = _impl_._has_bits_[0];
  602. if (cached_has_bits & 0x00000003u) {
  603. // .google.protobuf.Timestamp snapshot_version = 2;
  604. if (cached_has_bits & 0x00000001u) {
  605. total_size +=
  606. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.snapshot_version_);
  607. }
  608. // .google.protobuf.Timestamp last_limbo_free_snapshot_version = 7;
  609. if (cached_has_bits & 0x00000002u) {
  610. total_size +=
  611. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.last_limbo_free_snapshot_version_);
  612. }
  613. }
  614. // int64 last_listen_sequence_number = 4;
  615. if (this->_internal_last_listen_sequence_number() != 0) {
  616. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
  617. this->_internal_last_listen_sequence_number());
  618. }
  619. // int32 target_id = 1;
  620. if (this->_internal_target_id() != 0) {
  621. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  622. this->_internal_target_id());
  623. }
  624. switch (target_type_case()) {
  625. // .google.firestore.v1.Target.QueryTarget query = 5;
  626. case kQuery: {
  627. total_size +=
  628. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.target_type_.query_);
  629. break;
  630. }
  631. // .google.firestore.v1.Target.DocumentsTarget documents = 6;
  632. case kDocuments: {
  633. total_size +=
  634. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.target_type_.documents_);
  635. break;
  636. }
  637. // .google.firestore.v1.Target.PipelineQueryTarget pipeline_query = 13;
  638. case kPipelineQuery: {
  639. total_size +=
  640. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.target_type_.pipeline_query_);
  641. break;
  642. }
  643. case TARGET_TYPE_NOT_SET: {
  644. break;
  645. }
  646. }
  647. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  648. }
  649. const ::google::protobuf::Message::ClassData Target::_class_data_ = {
  650. Target::MergeImpl,
  651. nullptr, // OnDemandRegisterArenaDtor
  652. };
  653. const ::google::protobuf::Message::ClassData* Target::GetClassData() const {
  654. return &_class_data_;
  655. }
  656. void Target::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  657. auto* const _this = static_cast<Target*>(&to_msg);
  658. auto& from = static_cast<const Target&>(from_msg);
  659. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.Target)
  660. ABSL_DCHECK_NE(&from, _this);
  661. ::uint32_t cached_has_bits = 0;
  662. (void) cached_has_bits;
  663. if (!from._internal_resume_token().empty()) {
  664. _this->_internal_set_resume_token(from._internal_resume_token());
  665. }
  666. cached_has_bits = from._impl_._has_bits_[0];
  667. if (cached_has_bits & 0x00000003u) {
  668. if (cached_has_bits & 0x00000001u) {
  669. _this->_internal_mutable_snapshot_version()->::google::protobuf::Timestamp::MergeFrom(
  670. from._internal_snapshot_version());
  671. }
  672. if (cached_has_bits & 0x00000002u) {
  673. _this->_internal_mutable_last_limbo_free_snapshot_version()->::google::protobuf::Timestamp::MergeFrom(
  674. from._internal_last_limbo_free_snapshot_version());
  675. }
  676. }
  677. if (from._internal_last_listen_sequence_number() != 0) {
  678. _this->_internal_set_last_listen_sequence_number(from._internal_last_listen_sequence_number());
  679. }
  680. if (from._internal_target_id() != 0) {
  681. _this->_internal_set_target_id(from._internal_target_id());
  682. }
  683. switch (from.target_type_case()) {
  684. case kQuery: {
  685. _this->_internal_mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(
  686. from._internal_query());
  687. break;
  688. }
  689. case kDocuments: {
  690. _this->_internal_mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(
  691. from._internal_documents());
  692. break;
  693. }
  694. case kPipelineQuery: {
  695. _this->_internal_mutable_pipeline_query()->::google::firestore::v1::Target_PipelineQueryTarget::MergeFrom(
  696. from._internal_pipeline_query());
  697. break;
  698. }
  699. case TARGET_TYPE_NOT_SET: {
  700. break;
  701. }
  702. }
  703. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  704. }
  705. void Target::CopyFrom(const Target& from) {
  706. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.Target)
  707. if (&from == this) return;
  708. Clear();
  709. MergeFrom(from);
  710. }
  711. PROTOBUF_NOINLINE bool Target::IsInitialized() const {
  712. return true;
  713. }
  714. ::_pbi::CachedSize* Target::AccessCachedSize() const {
  715. return &_impl_._cached_size_;
  716. }
  717. void Target::InternalSwap(Target* PROTOBUF_RESTRICT other) {
  718. using std::swap;
  719. auto* arena = GetArena();
  720. ABSL_DCHECK_EQ(arena, other->GetArena());
  721. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  722. swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  723. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.resume_token_, &other->_impl_.resume_token_, arena);
  724. ::google::protobuf::internal::memswap<
  725. PROTOBUF_FIELD_OFFSET(Target, _impl_.target_id_)
  726. + sizeof(Target::_impl_.target_id_)
  727. - PROTOBUF_FIELD_OFFSET(Target, _impl_.snapshot_version_)>(
  728. reinterpret_cast<char*>(&_impl_.snapshot_version_),
  729. reinterpret_cast<char*>(&other->_impl_.snapshot_version_));
  730. swap(_impl_.target_type_, other->_impl_.target_type_);
  731. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  732. }
  733. ::google::protobuf::Metadata Target::GetMetadata() const {
  734. return ::_pbi::AssignDescriptors(
  735. &descriptor_table_firestore_2flocal_2ftarget_2eproto_getter, &descriptor_table_firestore_2flocal_2ftarget_2eproto_once,
  736. file_level_metadata_firestore_2flocal_2ftarget_2eproto[0]);
  737. }
  738. // ===================================================================
  739. class TargetGlobal::_Internal {
  740. public:
  741. using HasBits = decltype(std::declval<TargetGlobal>()._impl_._has_bits_);
  742. static constexpr ::int32_t kHasBitsOffset =
  743. 8 * PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_._has_bits_);
  744. static const ::google::protobuf::Timestamp& last_remote_snapshot_version(const TargetGlobal* msg);
  745. static void set_has_last_remote_snapshot_version(HasBits* has_bits) {
  746. (*has_bits)[0] |= 1u;
  747. }
  748. };
  749. const ::google::protobuf::Timestamp& TargetGlobal::_Internal::last_remote_snapshot_version(const TargetGlobal* msg) {
  750. return *msg->_impl_.last_remote_snapshot_version_;
  751. }
  752. void TargetGlobal::clear_last_remote_snapshot_version() {
  753. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  754. if (_impl_.last_remote_snapshot_version_ != nullptr) _impl_.last_remote_snapshot_version_->Clear();
  755. _impl_._has_bits_[0] &= ~0x00000001u;
  756. }
  757. TargetGlobal::TargetGlobal(::google::protobuf::Arena* arena)
  758. : ::google::protobuf::Message(arena) {
  759. SharedCtor(arena);
  760. // @@protoc_insertion_point(arena_constructor:firestore.client.TargetGlobal)
  761. }
  762. inline PROTOBUF_NDEBUG_INLINE TargetGlobal::Impl_::Impl_(
  763. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  764. const Impl_& from)
  765. : _has_bits_{from._has_bits_},
  766. _cached_size_{0} {}
  767. TargetGlobal::TargetGlobal(
  768. ::google::protobuf::Arena* arena,
  769. const TargetGlobal& from)
  770. : ::google::protobuf::Message(arena) {
  771. TargetGlobal* const _this = this;
  772. (void)_this;
  773. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  774. from._internal_metadata_);
  775. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  776. ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  777. _impl_.last_remote_snapshot_version_ = (cached_has_bits & 0x00000001u)
  778. ? CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.last_remote_snapshot_version_)
  779. : nullptr;
  780. ::memcpy(reinterpret_cast<char *>(&_impl_) +
  781. offsetof(Impl_, highest_listen_sequence_number_),
  782. reinterpret_cast<const char *>(&from._impl_) +
  783. offsetof(Impl_, highest_listen_sequence_number_),
  784. offsetof(Impl_, target_count_) -
  785. offsetof(Impl_, highest_listen_sequence_number_) +
  786. sizeof(Impl_::target_count_));
  787. // @@protoc_insertion_point(copy_constructor:firestore.client.TargetGlobal)
  788. }
  789. inline PROTOBUF_NDEBUG_INLINE TargetGlobal::Impl_::Impl_(
  790. ::google::protobuf::internal::InternalVisibility visibility,
  791. ::google::protobuf::Arena* arena)
  792. : _cached_size_{0} {}
  793. inline void TargetGlobal::SharedCtor(::_pb::Arena* arena) {
  794. new (&_impl_) Impl_(internal_visibility(), arena);
  795. ::memset(reinterpret_cast<char *>(&_impl_) +
  796. offsetof(Impl_, last_remote_snapshot_version_),
  797. 0,
  798. offsetof(Impl_, target_count_) -
  799. offsetof(Impl_, last_remote_snapshot_version_) +
  800. sizeof(Impl_::target_count_));
  801. }
  802. TargetGlobal::~TargetGlobal() {
  803. // @@protoc_insertion_point(destructor:firestore.client.TargetGlobal)
  804. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  805. SharedDtor();
  806. }
  807. inline void TargetGlobal::SharedDtor() {
  808. ABSL_DCHECK(GetArena() == nullptr);
  809. delete _impl_.last_remote_snapshot_version_;
  810. _impl_.~Impl_();
  811. }
  812. PROTOBUF_NOINLINE void TargetGlobal::Clear() {
  813. // @@protoc_insertion_point(message_clear_start:firestore.client.TargetGlobal)
  814. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  815. ::uint32_t cached_has_bits = 0;
  816. // Prevent compiler warnings about cached_has_bits being unused
  817. (void) cached_has_bits;
  818. cached_has_bits = _impl_._has_bits_[0];
  819. if (cached_has_bits & 0x00000001u) {
  820. ABSL_DCHECK(_impl_.last_remote_snapshot_version_ != nullptr);
  821. _impl_.last_remote_snapshot_version_->Clear();
  822. }
  823. ::memset(&_impl_.highest_listen_sequence_number_, 0, static_cast<::size_t>(
  824. reinterpret_cast<char*>(&_impl_.target_count_) -
  825. reinterpret_cast<char*>(&_impl_.highest_listen_sequence_number_)) + sizeof(_impl_.target_count_));
  826. _impl_._has_bits_.Clear();
  827. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  828. }
  829. const char* TargetGlobal::_InternalParse(
  830. const char* ptr, ::_pbi::ParseContext* ctx) {
  831. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  832. return ptr;
  833. }
  834. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  835. const ::_pbi::TcParseTable<2, 4, 1, 0, 2> TargetGlobal::_table_ = {
  836. {
  837. PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_._has_bits_),
  838. 0, // no _extensions_
  839. 4, 24, // max_field_number, fast_idx_mask
  840. offsetof(decltype(_table_), field_lookup_table),
  841. 4294967280, // skipmap
  842. offsetof(decltype(_table_), field_entries),
  843. 4, // num_field_entries
  844. 1, // num_aux_entries
  845. offsetof(decltype(_table_), aux_entries),
  846. &_TargetGlobal_default_instance_._instance,
  847. ::_pbi::TcParser::GenericFallback, // fallback
  848. }, {{
  849. // int32 target_count = 4;
  850. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TargetGlobal, _impl_.target_count_), 63>(),
  851. {32, 63, 0, PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.target_count_)}},
  852. // int32 highest_target_id = 1;
  853. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(TargetGlobal, _impl_.highest_target_id_), 63>(),
  854. {8, 63, 0, PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.highest_target_id_)}},
  855. // int64 highest_listen_sequence_number = 2;
  856. {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(TargetGlobal, _impl_.highest_listen_sequence_number_), 63>(),
  857. {16, 63, 0, PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.highest_listen_sequence_number_)}},
  858. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  859. {::_pbi::TcParser::FastMtS1,
  860. {26, 0, 0, PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.last_remote_snapshot_version_)}},
  861. }}, {{
  862. 65535, 65535
  863. }}, {{
  864. // int32 highest_target_id = 1;
  865. {PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.highest_target_id_), -1, 0,
  866. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  867. // int64 highest_listen_sequence_number = 2;
  868. {PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.highest_listen_sequence_number_), -1, 0,
  869. (0 | ::_fl::kFcSingular | ::_fl::kInt64)},
  870. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  871. {PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.last_remote_snapshot_version_), _Internal::kHasBitsOffset + 0, 0,
  872. (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
  873. // int32 target_count = 4;
  874. {PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.target_count_), -1, 0,
  875. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  876. }}, {{
  877. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  878. }}, {{
  879. }},
  880. };
  881. ::uint8_t* TargetGlobal::_InternalSerialize(
  882. ::uint8_t* target,
  883. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  884. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.TargetGlobal)
  885. ::uint32_t cached_has_bits = 0;
  886. (void)cached_has_bits;
  887. // int32 highest_target_id = 1;
  888. if (this->_internal_highest_target_id() != 0) {
  889. target = ::google::protobuf::internal::WireFormatLite::
  890. WriteInt32ToArrayWithField<1>(
  891. stream, this->_internal_highest_target_id(), target);
  892. }
  893. // int64 highest_listen_sequence_number = 2;
  894. if (this->_internal_highest_listen_sequence_number() != 0) {
  895. target = ::google::protobuf::internal::WireFormatLite::
  896. WriteInt64ToArrayWithField<2>(
  897. stream, this->_internal_highest_listen_sequence_number(), target);
  898. }
  899. cached_has_bits = _impl_._has_bits_[0];
  900. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  901. if (cached_has_bits & 0x00000001u) {
  902. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  903. 3, _Internal::last_remote_snapshot_version(this),
  904. _Internal::last_remote_snapshot_version(this).GetCachedSize(), target, stream);
  905. }
  906. // int32 target_count = 4;
  907. if (this->_internal_target_count() != 0) {
  908. target = ::google::protobuf::internal::WireFormatLite::
  909. WriteInt32ToArrayWithField<4>(
  910. stream, this->_internal_target_count(), target);
  911. }
  912. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  913. target =
  914. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  915. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  916. }
  917. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.TargetGlobal)
  918. return target;
  919. }
  920. ::size_t TargetGlobal::ByteSizeLong() const {
  921. // @@protoc_insertion_point(message_byte_size_start:firestore.client.TargetGlobal)
  922. ::size_t total_size = 0;
  923. ::uint32_t cached_has_bits = 0;
  924. // Prevent compiler warnings about cached_has_bits being unused
  925. (void) cached_has_bits;
  926. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  927. cached_has_bits = _impl_._has_bits_[0];
  928. if (cached_has_bits & 0x00000001u) {
  929. total_size +=
  930. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.last_remote_snapshot_version_);
  931. }
  932. // int64 highest_listen_sequence_number = 2;
  933. if (this->_internal_highest_listen_sequence_number() != 0) {
  934. total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
  935. this->_internal_highest_listen_sequence_number());
  936. }
  937. // int32 highest_target_id = 1;
  938. if (this->_internal_highest_target_id() != 0) {
  939. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  940. this->_internal_highest_target_id());
  941. }
  942. // int32 target_count = 4;
  943. if (this->_internal_target_count() != 0) {
  944. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  945. this->_internal_target_count());
  946. }
  947. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  948. }
  949. const ::google::protobuf::Message::ClassData TargetGlobal::_class_data_ = {
  950. TargetGlobal::MergeImpl,
  951. nullptr, // OnDemandRegisterArenaDtor
  952. };
  953. const ::google::protobuf::Message::ClassData* TargetGlobal::GetClassData() const {
  954. return &_class_data_;
  955. }
  956. void TargetGlobal::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  957. auto* const _this = static_cast<TargetGlobal*>(&to_msg);
  958. auto& from = static_cast<const TargetGlobal&>(from_msg);
  959. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.TargetGlobal)
  960. ABSL_DCHECK_NE(&from, _this);
  961. ::uint32_t cached_has_bits = 0;
  962. (void) cached_has_bits;
  963. if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
  964. _this->_internal_mutable_last_remote_snapshot_version()->::google::protobuf::Timestamp::MergeFrom(
  965. from._internal_last_remote_snapshot_version());
  966. }
  967. if (from._internal_highest_listen_sequence_number() != 0) {
  968. _this->_internal_set_highest_listen_sequence_number(from._internal_highest_listen_sequence_number());
  969. }
  970. if (from._internal_highest_target_id() != 0) {
  971. _this->_internal_set_highest_target_id(from._internal_highest_target_id());
  972. }
  973. if (from._internal_target_count() != 0) {
  974. _this->_internal_set_target_count(from._internal_target_count());
  975. }
  976. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  977. }
  978. void TargetGlobal::CopyFrom(const TargetGlobal& from) {
  979. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.TargetGlobal)
  980. if (&from == this) return;
  981. Clear();
  982. MergeFrom(from);
  983. }
  984. PROTOBUF_NOINLINE bool TargetGlobal::IsInitialized() const {
  985. return true;
  986. }
  987. ::_pbi::CachedSize* TargetGlobal::AccessCachedSize() const {
  988. return &_impl_._cached_size_;
  989. }
  990. void TargetGlobal::InternalSwap(TargetGlobal* PROTOBUF_RESTRICT other) {
  991. using std::swap;
  992. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  993. swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  994. ::google::protobuf::internal::memswap<
  995. PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.target_count_)
  996. + sizeof(TargetGlobal::_impl_.target_count_)
  997. - PROTOBUF_FIELD_OFFSET(TargetGlobal, _impl_.last_remote_snapshot_version_)>(
  998. reinterpret_cast<char*>(&_impl_.last_remote_snapshot_version_),
  999. reinterpret_cast<char*>(&other->_impl_.last_remote_snapshot_version_));
  1000. }
  1001. ::google::protobuf::Metadata TargetGlobal::GetMetadata() const {
  1002. return ::_pbi::AssignDescriptors(
  1003. &descriptor_table_firestore_2flocal_2ftarget_2eproto_getter, &descriptor_table_firestore_2flocal_2ftarget_2eproto_once,
  1004. file_level_metadata_firestore_2flocal_2ftarget_2eproto[1]);
  1005. }
  1006. // @@protoc_insertion_point(namespace_scope)
  1007. } // namespace client
  1008. } // namespace firestore
  1009. namespace google {
  1010. namespace protobuf {
  1011. } // namespace protobuf
  1012. } // namespace google
  1013. // @@protoc_insertion_point(global_scope)
  1014. #include "google/protobuf/port_undef.inc"