target.pb.cc 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121
  1. /*
  2. * Copyright 2018 Google
  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/stubs/common.h>
  21. #include <google/protobuf/stubs/port.h>
  22. #include <google/protobuf/stubs/once.h>
  23. #include <google/protobuf/io/coded_stream.h>
  24. #include <google/protobuf/wire_format_lite_inl.h>
  25. #include <google/protobuf/descriptor.h>
  26. #include <google/protobuf/generated_message_reflection.h>
  27. #include <google/protobuf/reflection_ops.h>
  28. #include <google/protobuf/wire_format.h>
  29. // This is a temporary google only hack
  30. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  31. #include "third_party/protobuf/version.h"
  32. #endif
  33. // @@protoc_insertion_point(includes)
  34. namespace firestore {
  35. namespace client {
  36. class TargetDefaultTypeInternal {
  37. public:
  38. ::google::protobuf::internal::ExplicitlyConstructed<Target>
  39. _instance;
  40. const ::google::firestore::v1beta1::Target_QueryTarget* query_;
  41. const ::google::firestore::v1beta1::Target_DocumentsTarget* documents_;
  42. } _Target_default_instance_;
  43. class TargetGlobalDefaultTypeInternal {
  44. public:
  45. ::google::protobuf::internal::ExplicitlyConstructed<TargetGlobal>
  46. _instance;
  47. } _TargetGlobal_default_instance_;
  48. } // namespace client
  49. } // namespace firestore
  50. namespace protobuf_firestore_2flocal_2ftarget_2eproto {
  51. void InitDefaultsTargetImpl() {
  52. GOOGLE_PROTOBUF_VERIFY_VERSION;
  53. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  54. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  55. #else
  56. ::google::protobuf::internal::InitProtobufDefaults();
  57. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  58. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  59. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget();
  60. protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget();
  61. {
  62. void* ptr = &::firestore::client::_Target_default_instance_;
  63. new (ptr) ::firestore::client::Target();
  64. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  65. }
  66. ::firestore::client::Target::InitAsDefaultInstance();
  67. }
  68. void InitDefaultsTarget() {
  69. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  70. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetImpl);
  71. }
  72. void InitDefaultsTargetGlobalImpl() {
  73. GOOGLE_PROTOBUF_VERIFY_VERSION;
  74. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  75. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  76. #else
  77. ::google::protobuf::internal::InitProtobufDefaults();
  78. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  79. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  80. {
  81. void* ptr = &::firestore::client::_TargetGlobal_default_instance_;
  82. new (ptr) ::firestore::client::TargetGlobal();
  83. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  84. }
  85. ::firestore::client::TargetGlobal::InitAsDefaultInstance();
  86. }
  87. void InitDefaultsTargetGlobal() {
  88. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  89. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTargetGlobalImpl);
  90. }
  91. ::google::protobuf::Metadata file_level_metadata[2];
  92. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  93. ~0u, // no _has_bits_
  94. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, _internal_metadata_),
  95. ~0u, // no _extensions_
  96. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, _oneof_case_[0]),
  97. ~0u, // no _weak_field_map_
  98. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, target_id_),
  99. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, snapshot_version_),
  100. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, resume_token_),
  101. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, last_listen_sequence_number_),
  102. offsetof(::firestore::client::TargetDefaultTypeInternal, query_),
  103. offsetof(::firestore::client::TargetDefaultTypeInternal, documents_),
  104. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::Target, target_type_),
  105. ~0u, // no _has_bits_
  106. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, _internal_metadata_),
  107. ~0u, // no _extensions_
  108. ~0u, // no _oneof_case_
  109. ~0u, // no _weak_field_map_
  110. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, highest_target_id_),
  111. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, highest_listen_sequence_number_),
  112. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, last_remote_snapshot_version_),
  113. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::firestore::client::TargetGlobal, target_count_),
  114. };
  115. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  116. { 0, -1, sizeof(::firestore::client::Target)},
  117. { 12, -1, sizeof(::firestore::client::TargetGlobal)},
  118. };
  119. static ::google::protobuf::Message const * const file_default_instances[] = {
  120. reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_Target_default_instance_),
  121. reinterpret_cast<const ::google::protobuf::Message*>(&::firestore::client::_TargetGlobal_default_instance_),
  122. };
  123. void protobuf_AssignDescriptors() {
  124. AddDescriptors();
  125. ::google::protobuf::MessageFactory* factory = NULL;
  126. AssignDescriptors(
  127. "firestore/local/target.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  128. file_level_metadata, NULL, NULL);
  129. }
  130. void protobuf_AssignDescriptorsOnce() {
  131. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  132. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  133. }
  134. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  135. void protobuf_RegisterTypes(const ::std::string&) {
  136. protobuf_AssignDescriptorsOnce();
  137. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
  138. }
  139. void AddDescriptorsImpl() {
  140. InitDefaults();
  141. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  142. "\n\034firestore/local/target.proto\022\020firestor"
  143. "e.client\032(google/firestore/v1beta1/fires"
  144. "tore.proto\032\037google/protobuf/timestamp.pr"
  145. "oto\"\241\002\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020sna"
  146. "pshot_version\030\002 \001(\0132\032.google.protobuf.Ti"
  147. "mestamp\022\024\n\014resume_token\030\003 \001(\014\022#\n\033last_li"
  148. "sten_sequence_number\030\004 \001(\003\022=\n\005query\030\005 \001("
  149. "\0132,.google.firestore.v1beta1.Target.Quer"
  150. "yTargetH\000\022E\n\tdocuments\030\006 \001(\01320.google.fi"
  151. "restore.v1beta1.Target.DocumentsTargetH\000"
  152. "B\r\n\013target_type\"\251\001\n\014TargetGlobal\022\031\n\021high"
  153. "est_target_id\030\001 \001(\005\022&\n\036highest_listen_se"
  154. "quence_number\030\002 \001(\003\022@\n\034last_remote_snaps"
  155. "hot_version\030\003 \001(\0132\032.google.protobuf.Time"
  156. "stamp\022\024\n\014target_count\030\004 \001(\005B/\n#com.googl"
  157. "e.firebase.firestore.protoP\001\242\002\005FSTPBb\006pr"
  158. "oto3"
  159. };
  160. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  161. descriptor, 644);
  162. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  163. "firestore/local/target.proto", &protobuf_RegisterTypes);
  164. ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::AddDescriptors();
  165. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  166. }
  167. void AddDescriptors() {
  168. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  169. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  170. }
  171. // Force AddDescriptors() to be called at dynamic initialization time.
  172. struct StaticDescriptorInitializer {
  173. StaticDescriptorInitializer() {
  174. AddDescriptors();
  175. }
  176. } static_descriptor_initializer;
  177. } // namespace protobuf_firestore_2flocal_2ftarget_2eproto
  178. namespace firestore {
  179. namespace client {
  180. // ===================================================================
  181. void Target::InitAsDefaultInstance() {
  182. ::firestore::client::_Target_default_instance_._instance.get_mutable()->snapshot_version_ = const_cast< ::google::protobuf::Timestamp*>(
  183. ::google::protobuf::Timestamp::internal_default_instance());
  184. ::firestore::client::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1beta1::Target_QueryTarget*>(
  185. ::google::firestore::v1beta1::Target_QueryTarget::internal_default_instance());
  186. ::firestore::client::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>(
  187. ::google::firestore::v1beta1::Target_DocumentsTarget::internal_default_instance());
  188. }
  189. void Target::clear_snapshot_version() {
  190. if (GetArenaNoVirtual() == NULL && snapshot_version_ != NULL) {
  191. delete snapshot_version_;
  192. }
  193. snapshot_version_ = NULL;
  194. }
  195. void Target::set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* query) {
  196. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  197. clear_target_type();
  198. if (query) {
  199. ::google::protobuf::Arena* submessage_arena = NULL;
  200. if (message_arena != submessage_arena) {
  201. query = ::google::protobuf::internal::GetOwnedMessage(
  202. message_arena, query, submessage_arena);
  203. }
  204. set_has_query();
  205. target_type_.query_ = query;
  206. }
  207. // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.query)
  208. }
  209. void Target::clear_query() {
  210. if (has_query()) {
  211. delete target_type_.query_;
  212. clear_has_target_type();
  213. }
  214. }
  215. void Target::set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* documents) {
  216. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  217. clear_target_type();
  218. if (documents) {
  219. ::google::protobuf::Arena* submessage_arena = NULL;
  220. if (message_arena != submessage_arena) {
  221. documents = ::google::protobuf::internal::GetOwnedMessage(
  222. message_arena, documents, submessage_arena);
  223. }
  224. set_has_documents();
  225. target_type_.documents_ = documents;
  226. }
  227. // @@protoc_insertion_point(field_set_allocated:firestore.client.Target.documents)
  228. }
  229. void Target::clear_documents() {
  230. if (has_documents()) {
  231. delete target_type_.documents_;
  232. clear_has_target_type();
  233. }
  234. }
  235. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  236. const int Target::kTargetIdFieldNumber;
  237. const int Target::kSnapshotVersionFieldNumber;
  238. const int Target::kResumeTokenFieldNumber;
  239. const int Target::kLastListenSequenceNumberFieldNumber;
  240. const int Target::kQueryFieldNumber;
  241. const int Target::kDocumentsFieldNumber;
  242. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  243. Target::Target()
  244. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  245. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  246. ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTarget();
  247. }
  248. SharedCtor();
  249. // @@protoc_insertion_point(constructor:firestore.client.Target)
  250. }
  251. Target::Target(const Target& from)
  252. : ::google::protobuf::Message(),
  253. _internal_metadata_(NULL),
  254. _cached_size_(0) {
  255. _internal_metadata_.MergeFrom(from._internal_metadata_);
  256. resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  257. if (from.resume_token().size() > 0) {
  258. resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  259. }
  260. if (from.has_snapshot_version()) {
  261. snapshot_version_ = new ::google::protobuf::Timestamp(*from.snapshot_version_);
  262. } else {
  263. snapshot_version_ = NULL;
  264. }
  265. ::memcpy(&last_listen_sequence_number_, &from.last_listen_sequence_number_,
  266. static_cast<size_t>(reinterpret_cast<char*>(&target_id_) -
  267. reinterpret_cast<char*>(&last_listen_sequence_number_)) + sizeof(target_id_));
  268. clear_has_target_type();
  269. switch (from.target_type_case()) {
  270. case kQuery: {
  271. mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
  272. break;
  273. }
  274. case kDocuments: {
  275. mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
  276. break;
  277. }
  278. case TARGET_TYPE_NOT_SET: {
  279. break;
  280. }
  281. }
  282. // @@protoc_insertion_point(copy_constructor:firestore.client.Target)
  283. }
  284. void Target::SharedCtor() {
  285. resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  286. ::memset(&snapshot_version_, 0, static_cast<size_t>(
  287. reinterpret_cast<char*>(&target_id_) -
  288. reinterpret_cast<char*>(&snapshot_version_)) + sizeof(target_id_));
  289. clear_has_target_type();
  290. _cached_size_ = 0;
  291. }
  292. Target::~Target() {
  293. // @@protoc_insertion_point(destructor:firestore.client.Target)
  294. SharedDtor();
  295. }
  296. void Target::SharedDtor() {
  297. resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  298. if (this != internal_default_instance()) delete snapshot_version_;
  299. if (has_target_type()) {
  300. clear_target_type();
  301. }
  302. }
  303. void Target::SetCachedSize(int size) const {
  304. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  305. _cached_size_ = size;
  306. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  307. }
  308. const ::google::protobuf::Descriptor* Target::descriptor() {
  309. ::protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
  310. return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  311. }
  312. const Target& Target::default_instance() {
  313. ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTarget();
  314. return *internal_default_instance();
  315. }
  316. Target* Target::New(::google::protobuf::Arena* arena) const {
  317. Target* n = new Target;
  318. if (arena != NULL) {
  319. arena->Own(n);
  320. }
  321. return n;
  322. }
  323. void Target::clear_target_type() {
  324. // @@protoc_insertion_point(one_of_clear_start:firestore.client.Target)
  325. switch (target_type_case()) {
  326. case kQuery: {
  327. delete target_type_.query_;
  328. break;
  329. }
  330. case kDocuments: {
  331. delete target_type_.documents_;
  332. break;
  333. }
  334. case TARGET_TYPE_NOT_SET: {
  335. break;
  336. }
  337. }
  338. _oneof_case_[0] = TARGET_TYPE_NOT_SET;
  339. }
  340. void Target::Clear() {
  341. // @@protoc_insertion_point(message_clear_start:firestore.client.Target)
  342. ::google::protobuf::uint32 cached_has_bits = 0;
  343. // Prevent compiler warnings about cached_has_bits being unused
  344. (void) cached_has_bits;
  345. resume_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  346. if (GetArenaNoVirtual() == NULL && snapshot_version_ != NULL) {
  347. delete snapshot_version_;
  348. }
  349. snapshot_version_ = NULL;
  350. ::memset(&last_listen_sequence_number_, 0, static_cast<size_t>(
  351. reinterpret_cast<char*>(&target_id_) -
  352. reinterpret_cast<char*>(&last_listen_sequence_number_)) + sizeof(target_id_));
  353. clear_target_type();
  354. _internal_metadata_.Clear();
  355. }
  356. bool Target::MergePartialFromCodedStream(
  357. ::google::protobuf::io::CodedInputStream* input) {
  358. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  359. ::google::protobuf::uint32 tag;
  360. // @@protoc_insertion_point(parse_start:firestore.client.Target)
  361. for (;;) {
  362. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  363. tag = p.first;
  364. if (!p.second) goto handle_unusual;
  365. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  366. // int32 target_id = 1;
  367. case 1: {
  368. if (static_cast< ::google::protobuf::uint8>(tag) ==
  369. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  370. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  371. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  372. input, &target_id_)));
  373. } else {
  374. goto handle_unusual;
  375. }
  376. break;
  377. }
  378. // .google.protobuf.Timestamp snapshot_version = 2;
  379. case 2: {
  380. if (static_cast< ::google::protobuf::uint8>(tag) ==
  381. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  382. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  383. input, mutable_snapshot_version()));
  384. } else {
  385. goto handle_unusual;
  386. }
  387. break;
  388. }
  389. // bytes resume_token = 3;
  390. case 3: {
  391. if (static_cast< ::google::protobuf::uint8>(tag) ==
  392. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  393. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  394. input, this->mutable_resume_token()));
  395. } else {
  396. goto handle_unusual;
  397. }
  398. break;
  399. }
  400. // int64 last_listen_sequence_number = 4;
  401. case 4: {
  402. if (static_cast< ::google::protobuf::uint8>(tag) ==
  403. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  404. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  405. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  406. input, &last_listen_sequence_number_)));
  407. } else {
  408. goto handle_unusual;
  409. }
  410. break;
  411. }
  412. // .google.firestore.v1beta1.Target.QueryTarget query = 5;
  413. case 5: {
  414. if (static_cast< ::google::protobuf::uint8>(tag) ==
  415. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  416. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  417. input, mutable_query()));
  418. } else {
  419. goto handle_unusual;
  420. }
  421. break;
  422. }
  423. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
  424. case 6: {
  425. if (static_cast< ::google::protobuf::uint8>(tag) ==
  426. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  427. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  428. input, mutable_documents()));
  429. } else {
  430. goto handle_unusual;
  431. }
  432. break;
  433. }
  434. default: {
  435. handle_unusual:
  436. if (tag == 0) {
  437. goto success;
  438. }
  439. DO_(::google::protobuf::internal::WireFormat::SkipField(
  440. input, tag, _internal_metadata_.mutable_unknown_fields()));
  441. break;
  442. }
  443. }
  444. }
  445. success:
  446. // @@protoc_insertion_point(parse_success:firestore.client.Target)
  447. return true;
  448. failure:
  449. // @@protoc_insertion_point(parse_failure:firestore.client.Target)
  450. return false;
  451. #undef DO_
  452. }
  453. void Target::SerializeWithCachedSizes(
  454. ::google::protobuf::io::CodedOutputStream* output) const {
  455. // @@protoc_insertion_point(serialize_start:firestore.client.Target)
  456. ::google::protobuf::uint32 cached_has_bits = 0;
  457. (void) cached_has_bits;
  458. // int32 target_id = 1;
  459. if (this->target_id() != 0) {
  460. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->target_id(), output);
  461. }
  462. // .google.protobuf.Timestamp snapshot_version = 2;
  463. if (this->has_snapshot_version()) {
  464. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  465. 2, *this->snapshot_version_, output);
  466. }
  467. // bytes resume_token = 3;
  468. if (this->resume_token().size() > 0) {
  469. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  470. 3, this->resume_token(), output);
  471. }
  472. // int64 last_listen_sequence_number = 4;
  473. if (this->last_listen_sequence_number() != 0) {
  474. ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->last_listen_sequence_number(), output);
  475. }
  476. // .google.firestore.v1beta1.Target.QueryTarget query = 5;
  477. if (has_query()) {
  478. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  479. 5, *target_type_.query_, output);
  480. }
  481. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
  482. if (has_documents()) {
  483. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  484. 6, *target_type_.documents_, output);
  485. }
  486. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  487. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  488. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  489. }
  490. // @@protoc_insertion_point(serialize_end:firestore.client.Target)
  491. }
  492. ::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray(
  493. bool deterministic, ::google::protobuf::uint8* target) const {
  494. (void)deterministic; // Unused
  495. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.Target)
  496. ::google::protobuf::uint32 cached_has_bits = 0;
  497. (void) cached_has_bits;
  498. // int32 target_id = 1;
  499. if (this->target_id() != 0) {
  500. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->target_id(), target);
  501. }
  502. // .google.protobuf.Timestamp snapshot_version = 2;
  503. if (this->has_snapshot_version()) {
  504. target = ::google::protobuf::internal::WireFormatLite::
  505. InternalWriteMessageToArray(
  506. 2, *this->snapshot_version_, deterministic, target);
  507. }
  508. // bytes resume_token = 3;
  509. if (this->resume_token().size() > 0) {
  510. target =
  511. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  512. 3, this->resume_token(), target);
  513. }
  514. // int64 last_listen_sequence_number = 4;
  515. if (this->last_listen_sequence_number() != 0) {
  516. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->last_listen_sequence_number(), target);
  517. }
  518. // .google.firestore.v1beta1.Target.QueryTarget query = 5;
  519. if (has_query()) {
  520. target = ::google::protobuf::internal::WireFormatLite::
  521. InternalWriteMessageToArray(
  522. 5, *target_type_.query_, deterministic, target);
  523. }
  524. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
  525. if (has_documents()) {
  526. target = ::google::protobuf::internal::WireFormatLite::
  527. InternalWriteMessageToArray(
  528. 6, *target_type_.documents_, deterministic, target);
  529. }
  530. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  531. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  532. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  533. }
  534. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.Target)
  535. return target;
  536. }
  537. size_t Target::ByteSizeLong() const {
  538. // @@protoc_insertion_point(message_byte_size_start:firestore.client.Target)
  539. size_t total_size = 0;
  540. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  541. total_size +=
  542. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  543. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  544. }
  545. // bytes resume_token = 3;
  546. if (this->resume_token().size() > 0) {
  547. total_size += 1 +
  548. ::google::protobuf::internal::WireFormatLite::BytesSize(
  549. this->resume_token());
  550. }
  551. // .google.protobuf.Timestamp snapshot_version = 2;
  552. if (this->has_snapshot_version()) {
  553. total_size += 1 +
  554. ::google::protobuf::internal::WireFormatLite::MessageSize(
  555. *this->snapshot_version_);
  556. }
  557. // int64 last_listen_sequence_number = 4;
  558. if (this->last_listen_sequence_number() != 0) {
  559. total_size += 1 +
  560. ::google::protobuf::internal::WireFormatLite::Int64Size(
  561. this->last_listen_sequence_number());
  562. }
  563. // int32 target_id = 1;
  564. if (this->target_id() != 0) {
  565. total_size += 1 +
  566. ::google::protobuf::internal::WireFormatLite::Int32Size(
  567. this->target_id());
  568. }
  569. switch (target_type_case()) {
  570. // .google.firestore.v1beta1.Target.QueryTarget query = 5;
  571. case kQuery: {
  572. total_size += 1 +
  573. ::google::protobuf::internal::WireFormatLite::MessageSize(
  574. *target_type_.query_);
  575. break;
  576. }
  577. // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
  578. case kDocuments: {
  579. total_size += 1 +
  580. ::google::protobuf::internal::WireFormatLite::MessageSize(
  581. *target_type_.documents_);
  582. break;
  583. }
  584. case TARGET_TYPE_NOT_SET: {
  585. break;
  586. }
  587. }
  588. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  589. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  590. _cached_size_ = cached_size;
  591. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  592. return total_size;
  593. }
  594. void Target::MergeFrom(const ::google::protobuf::Message& from) {
  595. // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.Target)
  596. GOOGLE_DCHECK_NE(&from, this);
  597. const Target* source =
  598. ::google::protobuf::internal::DynamicCastToGenerated<const Target>(
  599. &from);
  600. if (source == NULL) {
  601. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.Target)
  602. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  603. } else {
  604. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.Target)
  605. MergeFrom(*source);
  606. }
  607. }
  608. void Target::MergeFrom(const Target& from) {
  609. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.Target)
  610. GOOGLE_DCHECK_NE(&from, this);
  611. _internal_metadata_.MergeFrom(from._internal_metadata_);
  612. ::google::protobuf::uint32 cached_has_bits = 0;
  613. (void) cached_has_bits;
  614. if (from.resume_token().size() > 0) {
  615. resume_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.resume_token_);
  616. }
  617. if (from.has_snapshot_version()) {
  618. mutable_snapshot_version()->::google::protobuf::Timestamp::MergeFrom(from.snapshot_version());
  619. }
  620. if (from.last_listen_sequence_number() != 0) {
  621. set_last_listen_sequence_number(from.last_listen_sequence_number());
  622. }
  623. if (from.target_id() != 0) {
  624. set_target_id(from.target_id());
  625. }
  626. switch (from.target_type_case()) {
  627. case kQuery: {
  628. mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query());
  629. break;
  630. }
  631. case kDocuments: {
  632. mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents());
  633. break;
  634. }
  635. case TARGET_TYPE_NOT_SET: {
  636. break;
  637. }
  638. }
  639. }
  640. void Target::CopyFrom(const ::google::protobuf::Message& from) {
  641. // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.Target)
  642. if (&from == this) return;
  643. Clear();
  644. MergeFrom(from);
  645. }
  646. void Target::CopyFrom(const Target& from) {
  647. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.Target)
  648. if (&from == this) return;
  649. Clear();
  650. MergeFrom(from);
  651. }
  652. bool Target::IsInitialized() const {
  653. return true;
  654. }
  655. void Target::Swap(Target* other) {
  656. if (other == this) return;
  657. InternalSwap(other);
  658. }
  659. void Target::InternalSwap(Target* other) {
  660. using std::swap;
  661. resume_token_.Swap(&other->resume_token_);
  662. swap(snapshot_version_, other->snapshot_version_);
  663. swap(last_listen_sequence_number_, other->last_listen_sequence_number_);
  664. swap(target_id_, other->target_id_);
  665. swap(target_type_, other->target_type_);
  666. swap(_oneof_case_[0], other->_oneof_case_[0]);
  667. _internal_metadata_.Swap(&other->_internal_metadata_);
  668. swap(_cached_size_, other->_cached_size_);
  669. }
  670. ::google::protobuf::Metadata Target::GetMetadata() const {
  671. protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
  672. return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages];
  673. }
  674. // ===================================================================
  675. void TargetGlobal::InitAsDefaultInstance() {
  676. ::firestore::client::_TargetGlobal_default_instance_._instance.get_mutable()->last_remote_snapshot_version_ = const_cast< ::google::protobuf::Timestamp*>(
  677. ::google::protobuf::Timestamp::internal_default_instance());
  678. }
  679. void TargetGlobal::clear_last_remote_snapshot_version() {
  680. if (GetArenaNoVirtual() == NULL && last_remote_snapshot_version_ != NULL) {
  681. delete last_remote_snapshot_version_;
  682. }
  683. last_remote_snapshot_version_ = NULL;
  684. }
  685. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  686. const int TargetGlobal::kHighestTargetIdFieldNumber;
  687. const int TargetGlobal::kHighestListenSequenceNumberFieldNumber;
  688. const int TargetGlobal::kLastRemoteSnapshotVersionFieldNumber;
  689. const int TargetGlobal::kTargetCountFieldNumber;
  690. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  691. TargetGlobal::TargetGlobal()
  692. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  693. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  694. ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTargetGlobal();
  695. }
  696. SharedCtor();
  697. // @@protoc_insertion_point(constructor:firestore.client.TargetGlobal)
  698. }
  699. TargetGlobal::TargetGlobal(const TargetGlobal& from)
  700. : ::google::protobuf::Message(),
  701. _internal_metadata_(NULL),
  702. _cached_size_(0) {
  703. _internal_metadata_.MergeFrom(from._internal_metadata_);
  704. if (from.has_last_remote_snapshot_version()) {
  705. last_remote_snapshot_version_ = new ::google::protobuf::Timestamp(*from.last_remote_snapshot_version_);
  706. } else {
  707. last_remote_snapshot_version_ = NULL;
  708. }
  709. ::memcpy(&highest_listen_sequence_number_, &from.highest_listen_sequence_number_,
  710. static_cast<size_t>(reinterpret_cast<char*>(&target_count_) -
  711. reinterpret_cast<char*>(&highest_listen_sequence_number_)) + sizeof(target_count_));
  712. // @@protoc_insertion_point(copy_constructor:firestore.client.TargetGlobal)
  713. }
  714. void TargetGlobal::SharedCtor() {
  715. ::memset(&last_remote_snapshot_version_, 0, static_cast<size_t>(
  716. reinterpret_cast<char*>(&target_count_) -
  717. reinterpret_cast<char*>(&last_remote_snapshot_version_)) + sizeof(target_count_));
  718. _cached_size_ = 0;
  719. }
  720. TargetGlobal::~TargetGlobal() {
  721. // @@protoc_insertion_point(destructor:firestore.client.TargetGlobal)
  722. SharedDtor();
  723. }
  724. void TargetGlobal::SharedDtor() {
  725. if (this != internal_default_instance()) delete last_remote_snapshot_version_;
  726. }
  727. void TargetGlobal::SetCachedSize(int size) const {
  728. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  729. _cached_size_ = size;
  730. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  731. }
  732. const ::google::protobuf::Descriptor* TargetGlobal::descriptor() {
  733. ::protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
  734. return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  735. }
  736. const TargetGlobal& TargetGlobal::default_instance() {
  737. ::protobuf_firestore_2flocal_2ftarget_2eproto::InitDefaultsTargetGlobal();
  738. return *internal_default_instance();
  739. }
  740. TargetGlobal* TargetGlobal::New(::google::protobuf::Arena* arena) const {
  741. TargetGlobal* n = new TargetGlobal;
  742. if (arena != NULL) {
  743. arena->Own(n);
  744. }
  745. return n;
  746. }
  747. void TargetGlobal::Clear() {
  748. // @@protoc_insertion_point(message_clear_start:firestore.client.TargetGlobal)
  749. ::google::protobuf::uint32 cached_has_bits = 0;
  750. // Prevent compiler warnings about cached_has_bits being unused
  751. (void) cached_has_bits;
  752. if (GetArenaNoVirtual() == NULL && last_remote_snapshot_version_ != NULL) {
  753. delete last_remote_snapshot_version_;
  754. }
  755. last_remote_snapshot_version_ = NULL;
  756. ::memset(&highest_listen_sequence_number_, 0, static_cast<size_t>(
  757. reinterpret_cast<char*>(&target_count_) -
  758. reinterpret_cast<char*>(&highest_listen_sequence_number_)) + sizeof(target_count_));
  759. _internal_metadata_.Clear();
  760. }
  761. bool TargetGlobal::MergePartialFromCodedStream(
  762. ::google::protobuf::io::CodedInputStream* input) {
  763. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  764. ::google::protobuf::uint32 tag;
  765. // @@protoc_insertion_point(parse_start:firestore.client.TargetGlobal)
  766. for (;;) {
  767. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  768. tag = p.first;
  769. if (!p.second) goto handle_unusual;
  770. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  771. // int32 highest_target_id = 1;
  772. case 1: {
  773. if (static_cast< ::google::protobuf::uint8>(tag) ==
  774. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  775. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  776. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  777. input, &highest_target_id_)));
  778. } else {
  779. goto handle_unusual;
  780. }
  781. break;
  782. }
  783. // int64 highest_listen_sequence_number = 2;
  784. case 2: {
  785. if (static_cast< ::google::protobuf::uint8>(tag) ==
  786. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  787. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  788. ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
  789. input, &highest_listen_sequence_number_)));
  790. } else {
  791. goto handle_unusual;
  792. }
  793. break;
  794. }
  795. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  796. case 3: {
  797. if (static_cast< ::google::protobuf::uint8>(tag) ==
  798. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  799. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  800. input, mutable_last_remote_snapshot_version()));
  801. } else {
  802. goto handle_unusual;
  803. }
  804. break;
  805. }
  806. // int32 target_count = 4;
  807. case 4: {
  808. if (static_cast< ::google::protobuf::uint8>(tag) ==
  809. static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  810. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  811. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  812. input, &target_count_)));
  813. } else {
  814. goto handle_unusual;
  815. }
  816. break;
  817. }
  818. default: {
  819. handle_unusual:
  820. if (tag == 0) {
  821. goto success;
  822. }
  823. DO_(::google::protobuf::internal::WireFormat::SkipField(
  824. input, tag, _internal_metadata_.mutable_unknown_fields()));
  825. break;
  826. }
  827. }
  828. }
  829. success:
  830. // @@protoc_insertion_point(parse_success:firestore.client.TargetGlobal)
  831. return true;
  832. failure:
  833. // @@protoc_insertion_point(parse_failure:firestore.client.TargetGlobal)
  834. return false;
  835. #undef DO_
  836. }
  837. void TargetGlobal::SerializeWithCachedSizes(
  838. ::google::protobuf::io::CodedOutputStream* output) const {
  839. // @@protoc_insertion_point(serialize_start:firestore.client.TargetGlobal)
  840. ::google::protobuf::uint32 cached_has_bits = 0;
  841. (void) cached_has_bits;
  842. // int32 highest_target_id = 1;
  843. if (this->highest_target_id() != 0) {
  844. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->highest_target_id(), output);
  845. }
  846. // int64 highest_listen_sequence_number = 2;
  847. if (this->highest_listen_sequence_number() != 0) {
  848. ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->highest_listen_sequence_number(), output);
  849. }
  850. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  851. if (this->has_last_remote_snapshot_version()) {
  852. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  853. 3, *this->last_remote_snapshot_version_, output);
  854. }
  855. // int32 target_count = 4;
  856. if (this->target_count() != 0) {
  857. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->target_count(), output);
  858. }
  859. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  860. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  861. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  862. }
  863. // @@protoc_insertion_point(serialize_end:firestore.client.TargetGlobal)
  864. }
  865. ::google::protobuf::uint8* TargetGlobal::InternalSerializeWithCachedSizesToArray(
  866. bool deterministic, ::google::protobuf::uint8* target) const {
  867. (void)deterministic; // Unused
  868. // @@protoc_insertion_point(serialize_to_array_start:firestore.client.TargetGlobal)
  869. ::google::protobuf::uint32 cached_has_bits = 0;
  870. (void) cached_has_bits;
  871. // int32 highest_target_id = 1;
  872. if (this->highest_target_id() != 0) {
  873. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->highest_target_id(), target);
  874. }
  875. // int64 highest_listen_sequence_number = 2;
  876. if (this->highest_listen_sequence_number() != 0) {
  877. target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->highest_listen_sequence_number(), target);
  878. }
  879. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  880. if (this->has_last_remote_snapshot_version()) {
  881. target = ::google::protobuf::internal::WireFormatLite::
  882. InternalWriteMessageToArray(
  883. 3, *this->last_remote_snapshot_version_, deterministic, target);
  884. }
  885. // int32 target_count = 4;
  886. if (this->target_count() != 0) {
  887. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->target_count(), target);
  888. }
  889. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  890. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  891. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  892. }
  893. // @@protoc_insertion_point(serialize_to_array_end:firestore.client.TargetGlobal)
  894. return target;
  895. }
  896. size_t TargetGlobal::ByteSizeLong() const {
  897. // @@protoc_insertion_point(message_byte_size_start:firestore.client.TargetGlobal)
  898. size_t total_size = 0;
  899. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  900. total_size +=
  901. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  902. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  903. }
  904. // .google.protobuf.Timestamp last_remote_snapshot_version = 3;
  905. if (this->has_last_remote_snapshot_version()) {
  906. total_size += 1 +
  907. ::google::protobuf::internal::WireFormatLite::MessageSize(
  908. *this->last_remote_snapshot_version_);
  909. }
  910. // int64 highest_listen_sequence_number = 2;
  911. if (this->highest_listen_sequence_number() != 0) {
  912. total_size += 1 +
  913. ::google::protobuf::internal::WireFormatLite::Int64Size(
  914. this->highest_listen_sequence_number());
  915. }
  916. // int32 highest_target_id = 1;
  917. if (this->highest_target_id() != 0) {
  918. total_size += 1 +
  919. ::google::protobuf::internal::WireFormatLite::Int32Size(
  920. this->highest_target_id());
  921. }
  922. // int32 target_count = 4;
  923. if (this->target_count() != 0) {
  924. total_size += 1 +
  925. ::google::protobuf::internal::WireFormatLite::Int32Size(
  926. this->target_count());
  927. }
  928. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  929. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  930. _cached_size_ = cached_size;
  931. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  932. return total_size;
  933. }
  934. void TargetGlobal::MergeFrom(const ::google::protobuf::Message& from) {
  935. // @@protoc_insertion_point(generalized_merge_from_start:firestore.client.TargetGlobal)
  936. GOOGLE_DCHECK_NE(&from, this);
  937. const TargetGlobal* source =
  938. ::google::protobuf::internal::DynamicCastToGenerated<const TargetGlobal>(
  939. &from);
  940. if (source == NULL) {
  941. // @@protoc_insertion_point(generalized_merge_from_cast_fail:firestore.client.TargetGlobal)
  942. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  943. } else {
  944. // @@protoc_insertion_point(generalized_merge_from_cast_success:firestore.client.TargetGlobal)
  945. MergeFrom(*source);
  946. }
  947. }
  948. void TargetGlobal::MergeFrom(const TargetGlobal& from) {
  949. // @@protoc_insertion_point(class_specific_merge_from_start:firestore.client.TargetGlobal)
  950. GOOGLE_DCHECK_NE(&from, this);
  951. _internal_metadata_.MergeFrom(from._internal_metadata_);
  952. ::google::protobuf::uint32 cached_has_bits = 0;
  953. (void) cached_has_bits;
  954. if (from.has_last_remote_snapshot_version()) {
  955. mutable_last_remote_snapshot_version()->::google::protobuf::Timestamp::MergeFrom(from.last_remote_snapshot_version());
  956. }
  957. if (from.highest_listen_sequence_number() != 0) {
  958. set_highest_listen_sequence_number(from.highest_listen_sequence_number());
  959. }
  960. if (from.highest_target_id() != 0) {
  961. set_highest_target_id(from.highest_target_id());
  962. }
  963. if (from.target_count() != 0) {
  964. set_target_count(from.target_count());
  965. }
  966. }
  967. void TargetGlobal::CopyFrom(const ::google::protobuf::Message& from) {
  968. // @@protoc_insertion_point(generalized_copy_from_start:firestore.client.TargetGlobal)
  969. if (&from == this) return;
  970. Clear();
  971. MergeFrom(from);
  972. }
  973. void TargetGlobal::CopyFrom(const TargetGlobal& from) {
  974. // @@protoc_insertion_point(class_specific_copy_from_start:firestore.client.TargetGlobal)
  975. if (&from == this) return;
  976. Clear();
  977. MergeFrom(from);
  978. }
  979. bool TargetGlobal::IsInitialized() const {
  980. return true;
  981. }
  982. void TargetGlobal::Swap(TargetGlobal* other) {
  983. if (other == this) return;
  984. InternalSwap(other);
  985. }
  986. void TargetGlobal::InternalSwap(TargetGlobal* other) {
  987. using std::swap;
  988. swap(last_remote_snapshot_version_, other->last_remote_snapshot_version_);
  989. swap(highest_listen_sequence_number_, other->highest_listen_sequence_number_);
  990. swap(highest_target_id_, other->highest_target_id_);
  991. swap(target_count_, other->target_count_);
  992. _internal_metadata_.Swap(&other->_internal_metadata_);
  993. swap(_cached_size_, other->_cached_size_);
  994. }
  995. ::google::protobuf::Metadata TargetGlobal::GetMetadata() const {
  996. protobuf_firestore_2flocal_2ftarget_2eproto::protobuf_AssignDescriptorsOnce();
  997. return ::protobuf_firestore_2flocal_2ftarget_2eproto::file_level_metadata[kIndexInFileMessages];
  998. }
  999. // @@protoc_insertion_point(namespace_scope)
  1000. } // namespace client
  1001. } // namespace firestore
  1002. // @@protoc_insertion_point(global_scope)