target.pb.cc 42 KB

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