write.pb.cc 144 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706
  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: google/firestore/v1/write.proto
  18. #include "google/firestore/v1/write.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 google {
  35. namespace firestore {
  36. namespace v1 {
  37. class WriteDefaultTypeInternal {
  38. public:
  39. ::google::protobuf::internal::ExplicitlyConstructed<Write>
  40. _instance;
  41. const ::google::firestore::v1::Document* update_;
  42. ::google::protobuf::internal::ArenaStringPtr delete__;
  43. const ::google::firestore::v1::DocumentTransform* transform_;
  44. } _Write_default_instance_;
  45. class DocumentTransform_FieldTransformDefaultTypeInternal {
  46. public:
  47. ::google::protobuf::internal::ExplicitlyConstructed<DocumentTransform_FieldTransform>
  48. _instance;
  49. int set_to_server_value_;
  50. const ::google::firestore::v1::Value* increment_;
  51. const ::google::firestore::v1::Value* maximum_;
  52. const ::google::firestore::v1::Value* minimum_;
  53. const ::google::firestore::v1::ArrayValue* append_missing_elements_;
  54. const ::google::firestore::v1::ArrayValue* remove_all_from_array_;
  55. } _DocumentTransform_FieldTransform_default_instance_;
  56. class DocumentTransformDefaultTypeInternal {
  57. public:
  58. ::google::protobuf::internal::ExplicitlyConstructed<DocumentTransform>
  59. _instance;
  60. } _DocumentTransform_default_instance_;
  61. class WriteResultDefaultTypeInternal {
  62. public:
  63. ::google::protobuf::internal::ExplicitlyConstructed<WriteResult>
  64. _instance;
  65. } _WriteResult_default_instance_;
  66. class DocumentChangeDefaultTypeInternal {
  67. public:
  68. ::google::protobuf::internal::ExplicitlyConstructed<DocumentChange>
  69. _instance;
  70. } _DocumentChange_default_instance_;
  71. class DocumentDeleteDefaultTypeInternal {
  72. public:
  73. ::google::protobuf::internal::ExplicitlyConstructed<DocumentDelete>
  74. _instance;
  75. } _DocumentDelete_default_instance_;
  76. class DocumentRemoveDefaultTypeInternal {
  77. public:
  78. ::google::protobuf::internal::ExplicitlyConstructed<DocumentRemove>
  79. _instance;
  80. } _DocumentRemove_default_instance_;
  81. class ExistenceFilterDefaultTypeInternal {
  82. public:
  83. ::google::protobuf::internal::ExplicitlyConstructed<ExistenceFilter>
  84. _instance;
  85. } _ExistenceFilter_default_instance_;
  86. } // namespace v1
  87. } // namespace firestore
  88. } // namespace google
  89. namespace protobuf_google_2ffirestore_2fv1_2fwrite_2eproto {
  90. void InitDefaultsWriteImpl() {
  91. GOOGLE_PROTOBUF_VERIFY_VERSION;
  92. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  93. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  94. #else
  95. ::google::protobuf::internal::InitProtobufDefaults();
  96. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  97. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  98. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform();
  99. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  100. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition();
  101. {
  102. void* ptr = &::google::firestore::v1::_Write_default_instance_;
  103. new (ptr) ::google::firestore::v1::Write();
  104. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  105. }
  106. ::google::firestore::v1::Write::InitAsDefaultInstance();
  107. }
  108. void InitDefaultsWrite() {
  109. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  110. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteImpl);
  111. }
  112. void InitDefaultsDocumentTransform_FieldTransformImpl() {
  113. GOOGLE_PROTOBUF_VERIFY_VERSION;
  114. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  115. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  116. #else
  117. ::google::protobuf::internal::InitProtobufDefaults();
  118. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  119. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  120. {
  121. void* ptr = &::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_;
  122. new (ptr) ::google::firestore::v1::DocumentTransform_FieldTransform();
  123. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  124. }
  125. ::google::firestore::v1::DocumentTransform_FieldTransform::InitAsDefaultInstance();
  126. }
  127. void InitDefaultsDocumentTransform_FieldTransform() {
  128. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  129. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentTransform_FieldTransformImpl);
  130. }
  131. void InitDefaultsDocumentTransformImpl() {
  132. GOOGLE_PROTOBUF_VERIFY_VERSION;
  133. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  134. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  135. #else
  136. ::google::protobuf::internal::InitProtobufDefaults();
  137. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  138. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform();
  139. {
  140. void* ptr = &::google::firestore::v1::_DocumentTransform_default_instance_;
  141. new (ptr) ::google::firestore::v1::DocumentTransform();
  142. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  143. }
  144. ::google::firestore::v1::DocumentTransform::InitAsDefaultInstance();
  145. }
  146. void InitDefaultsDocumentTransform() {
  147. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  148. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentTransformImpl);
  149. }
  150. void InitDefaultsWriteResultImpl() {
  151. GOOGLE_PROTOBUF_VERIFY_VERSION;
  152. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  153. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  154. #else
  155. ::google::protobuf::internal::InitProtobufDefaults();
  156. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  157. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  158. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue();
  159. {
  160. void* ptr = &::google::firestore::v1::_WriteResult_default_instance_;
  161. new (ptr) ::google::firestore::v1::WriteResult();
  162. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  163. }
  164. ::google::firestore::v1::WriteResult::InitAsDefaultInstance();
  165. }
  166. void InitDefaultsWriteResult() {
  167. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  168. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsWriteResultImpl);
  169. }
  170. void InitDefaultsDocumentChangeImpl() {
  171. GOOGLE_PROTOBUF_VERIFY_VERSION;
  172. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  173. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  174. #else
  175. ::google::protobuf::internal::InitProtobufDefaults();
  176. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  177. protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument();
  178. {
  179. void* ptr = &::google::firestore::v1::_DocumentChange_default_instance_;
  180. new (ptr) ::google::firestore::v1::DocumentChange();
  181. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  182. }
  183. ::google::firestore::v1::DocumentChange::InitAsDefaultInstance();
  184. }
  185. void InitDefaultsDocumentChange() {
  186. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  187. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentChangeImpl);
  188. }
  189. void InitDefaultsDocumentDeleteImpl() {
  190. GOOGLE_PROTOBUF_VERIFY_VERSION;
  191. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  192. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  193. #else
  194. ::google::protobuf::internal::InitProtobufDefaults();
  195. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  196. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  197. {
  198. void* ptr = &::google::firestore::v1::_DocumentDelete_default_instance_;
  199. new (ptr) ::google::firestore::v1::DocumentDelete();
  200. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  201. }
  202. ::google::firestore::v1::DocumentDelete::InitAsDefaultInstance();
  203. }
  204. void InitDefaultsDocumentDelete() {
  205. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  206. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentDeleteImpl);
  207. }
  208. void InitDefaultsDocumentRemoveImpl() {
  209. GOOGLE_PROTOBUF_VERIFY_VERSION;
  210. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  211. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  212. #else
  213. ::google::protobuf::internal::InitProtobufDefaults();
  214. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  215. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  216. {
  217. void* ptr = &::google::firestore::v1::_DocumentRemove_default_instance_;
  218. new (ptr) ::google::firestore::v1::DocumentRemove();
  219. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  220. }
  221. ::google::firestore::v1::DocumentRemove::InitAsDefaultInstance();
  222. }
  223. void InitDefaultsDocumentRemove() {
  224. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  225. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentRemoveImpl);
  226. }
  227. void InitDefaultsExistenceFilterImpl() {
  228. GOOGLE_PROTOBUF_VERIFY_VERSION;
  229. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  230. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  231. #else
  232. ::google::protobuf::internal::InitProtobufDefaults();
  233. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  234. {
  235. void* ptr = &::google::firestore::v1::_ExistenceFilter_default_instance_;
  236. new (ptr) ::google::firestore::v1::ExistenceFilter();
  237. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  238. }
  239. ::google::firestore::v1::ExistenceFilter::InitAsDefaultInstance();
  240. }
  241. void InitDefaultsExistenceFilter() {
  242. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  243. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsExistenceFilterImpl);
  244. }
  245. ::google::protobuf::Metadata file_level_metadata[8];
  246. const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
  247. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  248. ~0u, // no _has_bits_
  249. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, _internal_metadata_),
  250. ~0u, // no _extensions_
  251. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, _oneof_case_[0]),
  252. ~0u, // no _weak_field_map_
  253. offsetof(::google::firestore::v1::WriteDefaultTypeInternal, update_),
  254. offsetof(::google::firestore::v1::WriteDefaultTypeInternal, delete__),
  255. offsetof(::google::firestore::v1::WriteDefaultTypeInternal, transform_),
  256. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, update_mask_),
  257. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, current_document_),
  258. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, operation_),
  259. ~0u, // no _has_bits_
  260. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, _internal_metadata_),
  261. ~0u, // no _extensions_
  262. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, _oneof_case_[0]),
  263. ~0u, // no _weak_field_map_
  264. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, field_path_),
  265. offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, set_to_server_value_),
  266. offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, increment_),
  267. offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, maximum_),
  268. offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, minimum_),
  269. offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, append_missing_elements_),
  270. offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, remove_all_from_array_),
  271. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, transform_type_),
  272. ~0u, // no _has_bits_
  273. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, _internal_metadata_),
  274. ~0u, // no _extensions_
  275. ~0u, // no _oneof_case_
  276. ~0u, // no _weak_field_map_
  277. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, document_),
  278. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, field_transforms_),
  279. ~0u, // no _has_bits_
  280. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResult, _internal_metadata_),
  281. ~0u, // no _extensions_
  282. ~0u, // no _oneof_case_
  283. ~0u, // no _weak_field_map_
  284. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResult, update_time_),
  285. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResult, transform_results_),
  286. ~0u, // no _has_bits_
  287. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, _internal_metadata_),
  288. ~0u, // no _extensions_
  289. ~0u, // no _oneof_case_
  290. ~0u, // no _weak_field_map_
  291. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, document_),
  292. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, target_ids_),
  293. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, removed_target_ids_),
  294. ~0u, // no _has_bits_
  295. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, _internal_metadata_),
  296. ~0u, // no _extensions_
  297. ~0u, // no _oneof_case_
  298. ~0u, // no _weak_field_map_
  299. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, document_),
  300. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, removed_target_ids_),
  301. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, read_time_),
  302. ~0u, // no _has_bits_
  303. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, _internal_metadata_),
  304. ~0u, // no _extensions_
  305. ~0u, // no _oneof_case_
  306. ~0u, // no _weak_field_map_
  307. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, document_),
  308. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, removed_target_ids_),
  309. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, read_time_),
  310. ~0u, // no _has_bits_
  311. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, _internal_metadata_),
  312. ~0u, // no _extensions_
  313. ~0u, // no _oneof_case_
  314. ~0u, // no _weak_field_map_
  315. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, target_id_),
  316. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, count_),
  317. };
  318. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  319. { 0, -1, sizeof(::google::firestore::v1::Write)},
  320. { 11, -1, sizeof(::google::firestore::v1::DocumentTransform_FieldTransform)},
  321. { 24, -1, sizeof(::google::firestore::v1::DocumentTransform)},
  322. { 31, -1, sizeof(::google::firestore::v1::WriteResult)},
  323. { 38, -1, sizeof(::google::firestore::v1::DocumentChange)},
  324. { 46, -1, sizeof(::google::firestore::v1::DocumentDelete)},
  325. { 54, -1, sizeof(::google::firestore::v1::DocumentRemove)},
  326. { 62, -1, sizeof(::google::firestore::v1::ExistenceFilter)},
  327. };
  328. static ::google::protobuf::Message const * const file_default_instances[] = {
  329. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Write_default_instance_),
  330. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_),
  331. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_DocumentTransform_default_instance_),
  332. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_WriteResult_default_instance_),
  333. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_DocumentChange_default_instance_),
  334. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_DocumentDelete_default_instance_),
  335. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_DocumentRemove_default_instance_),
  336. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_ExistenceFilter_default_instance_),
  337. };
  338. void protobuf_AssignDescriptors() {
  339. AddDescriptors();
  340. ::google::protobuf::MessageFactory* factory = NULL;
  341. AssignDescriptors(
  342. "google/firestore/v1/write.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  343. file_level_metadata, file_level_enum_descriptors, NULL);
  344. }
  345. void protobuf_AssignDescriptorsOnce() {
  346. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  347. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  348. }
  349. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  350. void protobuf_RegisterTypes(const ::std::string&) {
  351. protobuf_AssignDescriptorsOnce();
  352. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 8);
  353. }
  354. void AddDescriptorsImpl() {
  355. InitDefaults();
  356. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  357. "\n\037google/firestore/v1/write.proto\022\023googl"
  358. "e.firestore.v1\032\034google/api/annotations.p"
  359. "roto\032 google/firestore/v1/common.proto\032\""
  360. "google/firestore/v1/document.proto\032\037goog"
  361. "le/protobuf/timestamp.proto\"\211\002\n\005Write\022/\n"
  362. "\006update\030\001 \001(\0132\035.google.firestore.v1.Docu"
  363. "mentH\000\022\020\n\006delete\030\002 \001(\tH\000\022;\n\ttransform\030\006 "
  364. "\001(\0132&.google.firestore.v1.DocumentTransf"
  365. "ormH\000\0226\n\013update_mask\030\003 \001(\0132!.google.fire"
  366. "store.v1.DocumentMask\022;\n\020current_documen"
  367. "t\030\004 \001(\0132!.google.firestore.v1.Preconditi"
  368. "onB\013\n\toperation\"\345\004\n\021DocumentTransform\022\020\n"
  369. "\010document\030\001 \001(\t\022O\n\020field_transforms\030\002 \003("
  370. "\01325.google.firestore.v1.DocumentTransfor"
  371. "m.FieldTransform\032\354\003\n\016FieldTransform\022\022\n\nf"
  372. "ield_path\030\001 \001(\t\022`\n\023set_to_server_value\030\002"
  373. " \001(\0162A.google.firestore.v1.DocumentTrans"
  374. "form.FieldTransform.ServerValueH\000\022/\n\tinc"
  375. "rement\030\003 \001(\0132\032.google.firestore.v1.Value"
  376. "H\000\022-\n\007maximum\030\004 \001(\0132\032.google.firestore.v"
  377. "1.ValueH\000\022-\n\007minimum\030\005 \001(\0132\032.google.fire"
  378. "store.v1.ValueH\000\022B\n\027append_missing_eleme"
  379. "nts\030\006 \001(\0132\037.google.firestore.v1.ArrayVal"
  380. "ueH\000\022@\n\025remove_all_from_array\030\007 \001(\0132\037.go"
  381. "ogle.firestore.v1.ArrayValueH\000\"=\n\013Server"
  382. "Value\022\034\n\030SERVER_VALUE_UNSPECIFIED\020\000\022\020\n\014R"
  383. "EQUEST_TIME\020\001B\020\n\016transform_type\"u\n\013Write"
  384. "Result\022/\n\013update_time\030\001 \001(\0132\032.google.pro"
  385. "tobuf.Timestamp\0225\n\021transform_results\030\002 \003"
  386. "(\0132\032.google.firestore.v1.Value\"q\n\016Docume"
  387. "ntChange\022/\n\010document\030\001 \001(\0132\035.google.fire"
  388. "store.v1.Document\022\022\n\ntarget_ids\030\005 \003(\005\022\032\n"
  389. "\022removed_target_ids\030\006 \003(\005\"m\n\016DocumentDel"
  390. "ete\022\020\n\010document\030\001 \001(\t\022\032\n\022removed_target_"
  391. "ids\030\006 \003(\005\022-\n\tread_time\030\004 \001(\0132\032.google.pr"
  392. "otobuf.Timestamp\"m\n\016DocumentRemove\022\020\n\010do"
  393. "cument\030\001 \001(\t\022\032\n\022removed_target_ids\030\002 \003(\005"
  394. "\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf.Ti"
  395. "mestamp\"3\n\017ExistenceFilter\022\021\n\ttarget_id\030"
  396. "\001 \001(\005\022\r\n\005count\030\002 \001(\005B\256\001\n\027com.google.fire"
  397. "store.v1B\nWriteProtoP\001Z<google.golang.or"
  398. "g/genproto/googleapis/firestore/v1;fires"
  399. "tore\242\002\004GCFS\252\002\036Google.Cloud.Firestore.V1B"
  400. "eta1\312\002\036Google\\Cloud\\Firestore\\V1beta1b\006p"
  401. "roto3"
  402. };
  403. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  404. descriptor, 1765);
  405. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  406. "google/firestore/v1/write.proto", &protobuf_RegisterTypes);
  407. ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  408. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::AddDescriptors();
  409. ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::AddDescriptors();
  410. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  411. }
  412. void AddDescriptors() {
  413. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  414. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  415. }
  416. // Force AddDescriptors() to be called at dynamic initialization time.
  417. struct StaticDescriptorInitializer {
  418. StaticDescriptorInitializer() {
  419. AddDescriptors();
  420. }
  421. } static_descriptor_initializer;
  422. } // namespace protobuf_google_2ffirestore_2fv1_2fwrite_2eproto
  423. namespace google {
  424. namespace firestore {
  425. namespace v1 {
  426. const ::google::protobuf::EnumDescriptor* DocumentTransform_FieldTransform_ServerValue_descriptor() {
  427. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  428. return protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_enum_descriptors[0];
  429. }
  430. bool DocumentTransform_FieldTransform_ServerValue_IsValid(int value) {
  431. switch (value) {
  432. case 0:
  433. case 1:
  434. return true;
  435. default:
  436. return false;
  437. }
  438. }
  439. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  440. const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::SERVER_VALUE_UNSPECIFIED;
  441. const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::REQUEST_TIME;
  442. const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::ServerValue_MIN;
  443. const DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::ServerValue_MAX;
  444. const int DocumentTransform_FieldTransform::ServerValue_ARRAYSIZE;
  445. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  446. // ===================================================================
  447. void Write::InitAsDefaultInstance() {
  448. ::google::firestore::v1::_Write_default_instance_.update_ = const_cast< ::google::firestore::v1::Document*>(
  449. ::google::firestore::v1::Document::internal_default_instance());
  450. ::google::firestore::v1::_Write_default_instance_.delete__.UnsafeSetDefault(
  451. &::google::protobuf::internal::GetEmptyStringAlreadyInited());
  452. ::google::firestore::v1::_Write_default_instance_.transform_ = const_cast< ::google::firestore::v1::DocumentTransform*>(
  453. ::google::firestore::v1::DocumentTransform::internal_default_instance());
  454. ::google::firestore::v1::_Write_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
  455. ::google::firestore::v1::DocumentMask::internal_default_instance());
  456. ::google::firestore::v1::_Write_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
  457. ::google::firestore::v1::Precondition::internal_default_instance());
  458. }
  459. void Write::set_allocated_update(::google::firestore::v1::Document* update) {
  460. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  461. clear_operation();
  462. if (update) {
  463. ::google::protobuf::Arena* submessage_arena = NULL;
  464. if (message_arena != submessage_arena) {
  465. update = ::google::protobuf::internal::GetOwnedMessage(
  466. message_arena, update, submessage_arena);
  467. }
  468. set_has_update();
  469. operation_.update_ = update;
  470. }
  471. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.update)
  472. }
  473. void Write::clear_update() {
  474. if (has_update()) {
  475. delete operation_.update_;
  476. clear_has_operation();
  477. }
  478. }
  479. void Write::set_allocated_transform(::google::firestore::v1::DocumentTransform* transform) {
  480. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  481. clear_operation();
  482. if (transform) {
  483. ::google::protobuf::Arena* submessage_arena = NULL;
  484. if (message_arena != submessage_arena) {
  485. transform = ::google::protobuf::internal::GetOwnedMessage(
  486. message_arena, transform, submessage_arena);
  487. }
  488. set_has_transform();
  489. operation_.transform_ = transform;
  490. }
  491. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.transform)
  492. }
  493. void Write::clear_update_mask() {
  494. if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
  495. delete update_mask_;
  496. }
  497. update_mask_ = NULL;
  498. }
  499. void Write::clear_current_document() {
  500. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  501. delete current_document_;
  502. }
  503. current_document_ = NULL;
  504. }
  505. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  506. const int Write::kUpdateFieldNumber;
  507. const int Write::kDeleteFieldNumber;
  508. const int Write::kTransformFieldNumber;
  509. const int Write::kUpdateMaskFieldNumber;
  510. const int Write::kCurrentDocumentFieldNumber;
  511. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  512. Write::Write()
  513. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  514. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  515. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWrite();
  516. }
  517. SharedCtor();
  518. // @@protoc_insertion_point(constructor:google.firestore.v1.Write)
  519. }
  520. Write::Write(const Write& from)
  521. : ::google::protobuf::Message(),
  522. _internal_metadata_(NULL),
  523. _cached_size_(0) {
  524. _internal_metadata_.MergeFrom(from._internal_metadata_);
  525. if (from.has_update_mask()) {
  526. update_mask_ = new ::google::firestore::v1::DocumentMask(*from.update_mask_);
  527. } else {
  528. update_mask_ = NULL;
  529. }
  530. if (from.has_current_document()) {
  531. current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  532. } else {
  533. current_document_ = NULL;
  534. }
  535. clear_has_operation();
  536. switch (from.operation_case()) {
  537. case kUpdate: {
  538. mutable_update()->::google::firestore::v1::Document::MergeFrom(from.update());
  539. break;
  540. }
  541. case kDelete: {
  542. set_delete_(from.delete_());
  543. break;
  544. }
  545. case kTransform: {
  546. mutable_transform()->::google::firestore::v1::DocumentTransform::MergeFrom(from.transform());
  547. break;
  548. }
  549. case OPERATION_NOT_SET: {
  550. break;
  551. }
  552. }
  553. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Write)
  554. }
  555. void Write::SharedCtor() {
  556. ::memset(&update_mask_, 0, static_cast<size_t>(
  557. reinterpret_cast<char*>(&current_document_) -
  558. reinterpret_cast<char*>(&update_mask_)) + sizeof(current_document_));
  559. clear_has_operation();
  560. _cached_size_ = 0;
  561. }
  562. Write::~Write() {
  563. // @@protoc_insertion_point(destructor:google.firestore.v1.Write)
  564. SharedDtor();
  565. }
  566. void Write::SharedDtor() {
  567. if (this != internal_default_instance()) delete update_mask_;
  568. if (this != internal_default_instance()) delete current_document_;
  569. if (has_operation()) {
  570. clear_operation();
  571. }
  572. }
  573. void Write::SetCachedSize(int size) const {
  574. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  575. _cached_size_ = size;
  576. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  577. }
  578. const ::google::protobuf::Descriptor* Write::descriptor() {
  579. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  580. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  581. }
  582. const Write& Write::default_instance() {
  583. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWrite();
  584. return *internal_default_instance();
  585. }
  586. Write* Write::New(::google::protobuf::Arena* arena) const {
  587. Write* n = new Write;
  588. if (arena != NULL) {
  589. arena->Own(n);
  590. }
  591. return n;
  592. }
  593. void Write::clear_operation() {
  594. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Write)
  595. switch (operation_case()) {
  596. case kUpdate: {
  597. delete operation_.update_;
  598. break;
  599. }
  600. case kDelete: {
  601. operation_.delete__.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  602. break;
  603. }
  604. case kTransform: {
  605. delete operation_.transform_;
  606. break;
  607. }
  608. case OPERATION_NOT_SET: {
  609. break;
  610. }
  611. }
  612. _oneof_case_[0] = OPERATION_NOT_SET;
  613. }
  614. void Write::Clear() {
  615. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Write)
  616. ::google::protobuf::uint32 cached_has_bits = 0;
  617. // Prevent compiler warnings about cached_has_bits being unused
  618. (void) cached_has_bits;
  619. if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) {
  620. delete update_mask_;
  621. }
  622. update_mask_ = NULL;
  623. if (GetArenaNoVirtual() == NULL && current_document_ != NULL) {
  624. delete current_document_;
  625. }
  626. current_document_ = NULL;
  627. clear_operation();
  628. _internal_metadata_.Clear();
  629. }
  630. bool Write::MergePartialFromCodedStream(
  631. ::google::protobuf::io::CodedInputStream* input) {
  632. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  633. ::google::protobuf::uint32 tag;
  634. // @@protoc_insertion_point(parse_start:google.firestore.v1.Write)
  635. for (;;) {
  636. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  637. tag = p.first;
  638. if (!p.second) goto handle_unusual;
  639. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  640. // .google.firestore.v1.Document update = 1;
  641. case 1: {
  642. if (static_cast< ::google::protobuf::uint8>(tag) ==
  643. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  644. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  645. input, mutable_update()));
  646. } else {
  647. goto handle_unusual;
  648. }
  649. break;
  650. }
  651. // string delete = 2;
  652. case 2: {
  653. if (static_cast< ::google::protobuf::uint8>(tag) ==
  654. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  655. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  656. input, this->mutable_delete_()));
  657. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  658. this->delete_().data(), static_cast<int>(this->delete_().length()),
  659. ::google::protobuf::internal::WireFormatLite::PARSE,
  660. "google.firestore.v1.Write.delete"));
  661. } else {
  662. goto handle_unusual;
  663. }
  664. break;
  665. }
  666. // .google.firestore.v1.DocumentMask update_mask = 3;
  667. case 3: {
  668. if (static_cast< ::google::protobuf::uint8>(tag) ==
  669. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  670. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  671. input, mutable_update_mask()));
  672. } else {
  673. goto handle_unusual;
  674. }
  675. break;
  676. }
  677. // .google.firestore.v1.Precondition current_document = 4;
  678. case 4: {
  679. if (static_cast< ::google::protobuf::uint8>(tag) ==
  680. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  681. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  682. input, mutable_current_document()));
  683. } else {
  684. goto handle_unusual;
  685. }
  686. break;
  687. }
  688. // .google.firestore.v1.DocumentTransform transform = 6;
  689. case 6: {
  690. if (static_cast< ::google::protobuf::uint8>(tag) ==
  691. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  692. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  693. input, mutable_transform()));
  694. } else {
  695. goto handle_unusual;
  696. }
  697. break;
  698. }
  699. default: {
  700. handle_unusual:
  701. if (tag == 0) {
  702. goto success;
  703. }
  704. DO_(::google::protobuf::internal::WireFormat::SkipField(
  705. input, tag, _internal_metadata_.mutable_unknown_fields()));
  706. break;
  707. }
  708. }
  709. }
  710. success:
  711. // @@protoc_insertion_point(parse_success:google.firestore.v1.Write)
  712. return true;
  713. failure:
  714. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Write)
  715. return false;
  716. #undef DO_
  717. }
  718. void Write::SerializeWithCachedSizes(
  719. ::google::protobuf::io::CodedOutputStream* output) const {
  720. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Write)
  721. ::google::protobuf::uint32 cached_has_bits = 0;
  722. (void) cached_has_bits;
  723. // .google.firestore.v1.Document update = 1;
  724. if (has_update()) {
  725. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  726. 1, *operation_.update_, output);
  727. }
  728. // string delete = 2;
  729. if (has_delete_()) {
  730. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  731. this->delete_().data(), static_cast<int>(this->delete_().length()),
  732. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  733. "google.firestore.v1.Write.delete");
  734. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  735. 2, this->delete_(), output);
  736. }
  737. // .google.firestore.v1.DocumentMask update_mask = 3;
  738. if (this->has_update_mask()) {
  739. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  740. 3, *this->update_mask_, output);
  741. }
  742. // .google.firestore.v1.Precondition current_document = 4;
  743. if (this->has_current_document()) {
  744. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  745. 4, *this->current_document_, output);
  746. }
  747. // .google.firestore.v1.DocumentTransform transform = 6;
  748. if (has_transform()) {
  749. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  750. 6, *operation_.transform_, output);
  751. }
  752. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  753. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  754. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  755. }
  756. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Write)
  757. }
  758. ::google::protobuf::uint8* Write::InternalSerializeWithCachedSizesToArray(
  759. bool deterministic, ::google::protobuf::uint8* target) const {
  760. (void)deterministic; // Unused
  761. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Write)
  762. ::google::protobuf::uint32 cached_has_bits = 0;
  763. (void) cached_has_bits;
  764. // .google.firestore.v1.Document update = 1;
  765. if (has_update()) {
  766. target = ::google::protobuf::internal::WireFormatLite::
  767. InternalWriteMessageToArray(
  768. 1, *operation_.update_, deterministic, target);
  769. }
  770. // string delete = 2;
  771. if (has_delete_()) {
  772. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  773. this->delete_().data(), static_cast<int>(this->delete_().length()),
  774. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  775. "google.firestore.v1.Write.delete");
  776. target =
  777. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  778. 2, this->delete_(), target);
  779. }
  780. // .google.firestore.v1.DocumentMask update_mask = 3;
  781. if (this->has_update_mask()) {
  782. target = ::google::protobuf::internal::WireFormatLite::
  783. InternalWriteMessageToArray(
  784. 3, *this->update_mask_, deterministic, target);
  785. }
  786. // .google.firestore.v1.Precondition current_document = 4;
  787. if (this->has_current_document()) {
  788. target = ::google::protobuf::internal::WireFormatLite::
  789. InternalWriteMessageToArray(
  790. 4, *this->current_document_, deterministic, target);
  791. }
  792. // .google.firestore.v1.DocumentTransform transform = 6;
  793. if (has_transform()) {
  794. target = ::google::protobuf::internal::WireFormatLite::
  795. InternalWriteMessageToArray(
  796. 6, *operation_.transform_, deterministic, target);
  797. }
  798. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  799. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  800. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  801. }
  802. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Write)
  803. return target;
  804. }
  805. size_t Write::ByteSizeLong() const {
  806. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Write)
  807. size_t total_size = 0;
  808. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  809. total_size +=
  810. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  811. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  812. }
  813. // .google.firestore.v1.DocumentMask update_mask = 3;
  814. if (this->has_update_mask()) {
  815. total_size += 1 +
  816. ::google::protobuf::internal::WireFormatLite::MessageSize(
  817. *this->update_mask_);
  818. }
  819. // .google.firestore.v1.Precondition current_document = 4;
  820. if (this->has_current_document()) {
  821. total_size += 1 +
  822. ::google::protobuf::internal::WireFormatLite::MessageSize(
  823. *this->current_document_);
  824. }
  825. switch (operation_case()) {
  826. // .google.firestore.v1.Document update = 1;
  827. case kUpdate: {
  828. total_size += 1 +
  829. ::google::protobuf::internal::WireFormatLite::MessageSize(
  830. *operation_.update_);
  831. break;
  832. }
  833. // string delete = 2;
  834. case kDelete: {
  835. total_size += 1 +
  836. ::google::protobuf::internal::WireFormatLite::StringSize(
  837. this->delete_());
  838. break;
  839. }
  840. // .google.firestore.v1.DocumentTransform transform = 6;
  841. case kTransform: {
  842. total_size += 1 +
  843. ::google::protobuf::internal::WireFormatLite::MessageSize(
  844. *operation_.transform_);
  845. break;
  846. }
  847. case OPERATION_NOT_SET: {
  848. break;
  849. }
  850. }
  851. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  852. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  853. _cached_size_ = cached_size;
  854. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  855. return total_size;
  856. }
  857. void Write::MergeFrom(const ::google::protobuf::Message& from) {
  858. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Write)
  859. GOOGLE_DCHECK_NE(&from, this);
  860. const Write* source =
  861. ::google::protobuf::internal::DynamicCastToGenerated<const Write>(
  862. &from);
  863. if (source == NULL) {
  864. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Write)
  865. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  866. } else {
  867. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Write)
  868. MergeFrom(*source);
  869. }
  870. }
  871. void Write::MergeFrom(const Write& from) {
  872. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Write)
  873. GOOGLE_DCHECK_NE(&from, this);
  874. _internal_metadata_.MergeFrom(from._internal_metadata_);
  875. ::google::protobuf::uint32 cached_has_bits = 0;
  876. (void) cached_has_bits;
  877. if (from.has_update_mask()) {
  878. mutable_update_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.update_mask());
  879. }
  880. if (from.has_current_document()) {
  881. mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document());
  882. }
  883. switch (from.operation_case()) {
  884. case kUpdate: {
  885. mutable_update()->::google::firestore::v1::Document::MergeFrom(from.update());
  886. break;
  887. }
  888. case kDelete: {
  889. set_delete_(from.delete_());
  890. break;
  891. }
  892. case kTransform: {
  893. mutable_transform()->::google::firestore::v1::DocumentTransform::MergeFrom(from.transform());
  894. break;
  895. }
  896. case OPERATION_NOT_SET: {
  897. break;
  898. }
  899. }
  900. }
  901. void Write::CopyFrom(const ::google::protobuf::Message& from) {
  902. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Write)
  903. if (&from == this) return;
  904. Clear();
  905. MergeFrom(from);
  906. }
  907. void Write::CopyFrom(const Write& from) {
  908. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Write)
  909. if (&from == this) return;
  910. Clear();
  911. MergeFrom(from);
  912. }
  913. bool Write::IsInitialized() const {
  914. return true;
  915. }
  916. void Write::Swap(Write* other) {
  917. if (other == this) return;
  918. InternalSwap(other);
  919. }
  920. void Write::InternalSwap(Write* other) {
  921. using std::swap;
  922. swap(update_mask_, other->update_mask_);
  923. swap(current_document_, other->current_document_);
  924. swap(operation_, other->operation_);
  925. swap(_oneof_case_[0], other->_oneof_case_[0]);
  926. _internal_metadata_.Swap(&other->_internal_metadata_);
  927. swap(_cached_size_, other->_cached_size_);
  928. }
  929. ::google::protobuf::Metadata Write::GetMetadata() const {
  930. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  931. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  932. }
  933. // ===================================================================
  934. void DocumentTransform_FieldTransform::InitAsDefaultInstance() {
  935. ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.set_to_server_value_ = 0;
  936. ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.increment_ = const_cast< ::google::firestore::v1::Value*>(
  937. ::google::firestore::v1::Value::internal_default_instance());
  938. ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.maximum_ = const_cast< ::google::firestore::v1::Value*>(
  939. ::google::firestore::v1::Value::internal_default_instance());
  940. ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.minimum_ = const_cast< ::google::firestore::v1::Value*>(
  941. ::google::firestore::v1::Value::internal_default_instance());
  942. ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.append_missing_elements_ = const_cast< ::google::firestore::v1::ArrayValue*>(
  943. ::google::firestore::v1::ArrayValue::internal_default_instance());
  944. ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.remove_all_from_array_ = const_cast< ::google::firestore::v1::ArrayValue*>(
  945. ::google::firestore::v1::ArrayValue::internal_default_instance());
  946. }
  947. void DocumentTransform_FieldTransform::set_allocated_increment(::google::firestore::v1::Value* increment) {
  948. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  949. clear_transform_type();
  950. if (increment) {
  951. ::google::protobuf::Arena* submessage_arena = NULL;
  952. if (message_arena != submessage_arena) {
  953. increment = ::google::protobuf::internal::GetOwnedMessage(
  954. message_arena, increment, submessage_arena);
  955. }
  956. set_has_increment();
  957. transform_type_.increment_ = increment;
  958. }
  959. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.increment)
  960. }
  961. void DocumentTransform_FieldTransform::clear_increment() {
  962. if (has_increment()) {
  963. delete transform_type_.increment_;
  964. clear_has_transform_type();
  965. }
  966. }
  967. void DocumentTransform_FieldTransform::set_allocated_maximum(::google::firestore::v1::Value* maximum) {
  968. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  969. clear_transform_type();
  970. if (maximum) {
  971. ::google::protobuf::Arena* submessage_arena = NULL;
  972. if (message_arena != submessage_arena) {
  973. maximum = ::google::protobuf::internal::GetOwnedMessage(
  974. message_arena, maximum, submessage_arena);
  975. }
  976. set_has_maximum();
  977. transform_type_.maximum_ = maximum;
  978. }
  979. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.maximum)
  980. }
  981. void DocumentTransform_FieldTransform::clear_maximum() {
  982. if (has_maximum()) {
  983. delete transform_type_.maximum_;
  984. clear_has_transform_type();
  985. }
  986. }
  987. void DocumentTransform_FieldTransform::set_allocated_minimum(::google::firestore::v1::Value* minimum) {
  988. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  989. clear_transform_type();
  990. if (minimum) {
  991. ::google::protobuf::Arena* submessage_arena = NULL;
  992. if (message_arena != submessage_arena) {
  993. minimum = ::google::protobuf::internal::GetOwnedMessage(
  994. message_arena, minimum, submessage_arena);
  995. }
  996. set_has_minimum();
  997. transform_type_.minimum_ = minimum;
  998. }
  999. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.minimum)
  1000. }
  1001. void DocumentTransform_FieldTransform::clear_minimum() {
  1002. if (has_minimum()) {
  1003. delete transform_type_.minimum_;
  1004. clear_has_transform_type();
  1005. }
  1006. }
  1007. void DocumentTransform_FieldTransform::set_allocated_append_missing_elements(::google::firestore::v1::ArrayValue* append_missing_elements) {
  1008. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1009. clear_transform_type();
  1010. if (append_missing_elements) {
  1011. ::google::protobuf::Arena* submessage_arena = NULL;
  1012. if (message_arena != submessage_arena) {
  1013. append_missing_elements = ::google::protobuf::internal::GetOwnedMessage(
  1014. message_arena, append_missing_elements, submessage_arena);
  1015. }
  1016. set_has_append_missing_elements();
  1017. transform_type_.append_missing_elements_ = append_missing_elements;
  1018. }
  1019. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements)
  1020. }
  1021. void DocumentTransform_FieldTransform::clear_append_missing_elements() {
  1022. if (has_append_missing_elements()) {
  1023. delete transform_type_.append_missing_elements_;
  1024. clear_has_transform_type();
  1025. }
  1026. }
  1027. void DocumentTransform_FieldTransform::set_allocated_remove_all_from_array(::google::firestore::v1::ArrayValue* remove_all_from_array) {
  1028. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1029. clear_transform_type();
  1030. if (remove_all_from_array) {
  1031. ::google::protobuf::Arena* submessage_arena = NULL;
  1032. if (message_arena != submessage_arena) {
  1033. remove_all_from_array = ::google::protobuf::internal::GetOwnedMessage(
  1034. message_arena, remove_all_from_array, submessage_arena);
  1035. }
  1036. set_has_remove_all_from_array();
  1037. transform_type_.remove_all_from_array_ = remove_all_from_array;
  1038. }
  1039. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array)
  1040. }
  1041. void DocumentTransform_FieldTransform::clear_remove_all_from_array() {
  1042. if (has_remove_all_from_array()) {
  1043. delete transform_type_.remove_all_from_array_;
  1044. clear_has_transform_type();
  1045. }
  1046. }
  1047. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1048. const int DocumentTransform_FieldTransform::kFieldPathFieldNumber;
  1049. const int DocumentTransform_FieldTransform::kSetToServerValueFieldNumber;
  1050. const int DocumentTransform_FieldTransform::kIncrementFieldNumber;
  1051. const int DocumentTransform_FieldTransform::kMaximumFieldNumber;
  1052. const int DocumentTransform_FieldTransform::kMinimumFieldNumber;
  1053. const int DocumentTransform_FieldTransform::kAppendMissingElementsFieldNumber;
  1054. const int DocumentTransform_FieldTransform::kRemoveAllFromArrayFieldNumber;
  1055. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1056. DocumentTransform_FieldTransform::DocumentTransform_FieldTransform()
  1057. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1058. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1059. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform();
  1060. }
  1061. SharedCtor();
  1062. // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentTransform.FieldTransform)
  1063. }
  1064. DocumentTransform_FieldTransform::DocumentTransform_FieldTransform(const DocumentTransform_FieldTransform& from)
  1065. : ::google::protobuf::Message(),
  1066. _internal_metadata_(NULL),
  1067. _cached_size_(0) {
  1068. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1069. field_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1070. if (from.field_path().size() > 0) {
  1071. field_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  1072. }
  1073. clear_has_transform_type();
  1074. switch (from.transform_type_case()) {
  1075. case kSetToServerValue: {
  1076. set_set_to_server_value(from.set_to_server_value());
  1077. break;
  1078. }
  1079. case kIncrement: {
  1080. mutable_increment()->::google::firestore::v1::Value::MergeFrom(from.increment());
  1081. break;
  1082. }
  1083. case kMaximum: {
  1084. mutable_maximum()->::google::firestore::v1::Value::MergeFrom(from.maximum());
  1085. break;
  1086. }
  1087. case kMinimum: {
  1088. mutable_minimum()->::google::firestore::v1::Value::MergeFrom(from.minimum());
  1089. break;
  1090. }
  1091. case kAppendMissingElements: {
  1092. mutable_append_missing_elements()->::google::firestore::v1::ArrayValue::MergeFrom(from.append_missing_elements());
  1093. break;
  1094. }
  1095. case kRemoveAllFromArray: {
  1096. mutable_remove_all_from_array()->::google::firestore::v1::ArrayValue::MergeFrom(from.remove_all_from_array());
  1097. break;
  1098. }
  1099. case TRANSFORM_TYPE_NOT_SET: {
  1100. break;
  1101. }
  1102. }
  1103. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentTransform.FieldTransform)
  1104. }
  1105. void DocumentTransform_FieldTransform::SharedCtor() {
  1106. field_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1107. clear_has_transform_type();
  1108. _cached_size_ = 0;
  1109. }
  1110. DocumentTransform_FieldTransform::~DocumentTransform_FieldTransform() {
  1111. // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentTransform.FieldTransform)
  1112. SharedDtor();
  1113. }
  1114. void DocumentTransform_FieldTransform::SharedDtor() {
  1115. field_path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1116. if (has_transform_type()) {
  1117. clear_transform_type();
  1118. }
  1119. }
  1120. void DocumentTransform_FieldTransform::SetCachedSize(int size) const {
  1121. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1122. _cached_size_ = size;
  1123. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1124. }
  1125. const ::google::protobuf::Descriptor* DocumentTransform_FieldTransform::descriptor() {
  1126. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  1127. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1128. }
  1129. const DocumentTransform_FieldTransform& DocumentTransform_FieldTransform::default_instance() {
  1130. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform();
  1131. return *internal_default_instance();
  1132. }
  1133. DocumentTransform_FieldTransform* DocumentTransform_FieldTransform::New(::google::protobuf::Arena* arena) const {
  1134. DocumentTransform_FieldTransform* n = new DocumentTransform_FieldTransform;
  1135. if (arena != NULL) {
  1136. arena->Own(n);
  1137. }
  1138. return n;
  1139. }
  1140. void DocumentTransform_FieldTransform::clear_transform_type() {
  1141. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1142. switch (transform_type_case()) {
  1143. case kSetToServerValue: {
  1144. // No need to clear
  1145. break;
  1146. }
  1147. case kIncrement: {
  1148. delete transform_type_.increment_;
  1149. break;
  1150. }
  1151. case kMaximum: {
  1152. delete transform_type_.maximum_;
  1153. break;
  1154. }
  1155. case kMinimum: {
  1156. delete transform_type_.minimum_;
  1157. break;
  1158. }
  1159. case kAppendMissingElements: {
  1160. delete transform_type_.append_missing_elements_;
  1161. break;
  1162. }
  1163. case kRemoveAllFromArray: {
  1164. delete transform_type_.remove_all_from_array_;
  1165. break;
  1166. }
  1167. case TRANSFORM_TYPE_NOT_SET: {
  1168. break;
  1169. }
  1170. }
  1171. _oneof_case_[0] = TRANSFORM_TYPE_NOT_SET;
  1172. }
  1173. void DocumentTransform_FieldTransform::Clear() {
  1174. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1175. ::google::protobuf::uint32 cached_has_bits = 0;
  1176. // Prevent compiler warnings about cached_has_bits being unused
  1177. (void) cached_has_bits;
  1178. field_path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1179. clear_transform_type();
  1180. _internal_metadata_.Clear();
  1181. }
  1182. bool DocumentTransform_FieldTransform::MergePartialFromCodedStream(
  1183. ::google::protobuf::io::CodedInputStream* input) {
  1184. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1185. ::google::protobuf::uint32 tag;
  1186. // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1187. for (;;) {
  1188. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1189. tag = p.first;
  1190. if (!p.second) goto handle_unusual;
  1191. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1192. // string field_path = 1;
  1193. case 1: {
  1194. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1195. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1196. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1197. input, this->mutable_field_path()));
  1198. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1199. this->field_path().data(), static_cast<int>(this->field_path().length()),
  1200. ::google::protobuf::internal::WireFormatLite::PARSE,
  1201. "google.firestore.v1.DocumentTransform.FieldTransform.field_path"));
  1202. } else {
  1203. goto handle_unusual;
  1204. }
  1205. break;
  1206. }
  1207. // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
  1208. case 2: {
  1209. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1210. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  1211. int value;
  1212. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1213. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1214. input, &value)));
  1215. set_set_to_server_value(static_cast< ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue >(value));
  1216. } else {
  1217. goto handle_unusual;
  1218. }
  1219. break;
  1220. }
  1221. // .google.firestore.v1.Value increment = 3;
  1222. case 3: {
  1223. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1224. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1225. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1226. input, mutable_increment()));
  1227. } else {
  1228. goto handle_unusual;
  1229. }
  1230. break;
  1231. }
  1232. // .google.firestore.v1.Value maximum = 4;
  1233. case 4: {
  1234. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1235. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  1236. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1237. input, mutable_maximum()));
  1238. } else {
  1239. goto handle_unusual;
  1240. }
  1241. break;
  1242. }
  1243. // .google.firestore.v1.Value minimum = 5;
  1244. case 5: {
  1245. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1246. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  1247. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1248. input, mutable_minimum()));
  1249. } else {
  1250. goto handle_unusual;
  1251. }
  1252. break;
  1253. }
  1254. // .google.firestore.v1.ArrayValue append_missing_elements = 6;
  1255. case 6: {
  1256. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1257. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  1258. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1259. input, mutable_append_missing_elements()));
  1260. } else {
  1261. goto handle_unusual;
  1262. }
  1263. break;
  1264. }
  1265. // .google.firestore.v1.ArrayValue remove_all_from_array = 7;
  1266. case 7: {
  1267. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1268. static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
  1269. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1270. input, mutable_remove_all_from_array()));
  1271. } else {
  1272. goto handle_unusual;
  1273. }
  1274. break;
  1275. }
  1276. default: {
  1277. handle_unusual:
  1278. if (tag == 0) {
  1279. goto success;
  1280. }
  1281. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1282. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1283. break;
  1284. }
  1285. }
  1286. }
  1287. success:
  1288. // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentTransform.FieldTransform)
  1289. return true;
  1290. failure:
  1291. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentTransform.FieldTransform)
  1292. return false;
  1293. #undef DO_
  1294. }
  1295. void DocumentTransform_FieldTransform::SerializeWithCachedSizes(
  1296. ::google::protobuf::io::CodedOutputStream* output) const {
  1297. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1298. ::google::protobuf::uint32 cached_has_bits = 0;
  1299. (void) cached_has_bits;
  1300. // string field_path = 1;
  1301. if (this->field_path().size() > 0) {
  1302. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1303. this->field_path().data(), static_cast<int>(this->field_path().length()),
  1304. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1305. "google.firestore.v1.DocumentTransform.FieldTransform.field_path");
  1306. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1307. 1, this->field_path(), output);
  1308. }
  1309. // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
  1310. if (has_set_to_server_value()) {
  1311. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1312. 2, this->set_to_server_value(), output);
  1313. }
  1314. // .google.firestore.v1.Value increment = 3;
  1315. if (has_increment()) {
  1316. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1317. 3, *transform_type_.increment_, output);
  1318. }
  1319. // .google.firestore.v1.Value maximum = 4;
  1320. if (has_maximum()) {
  1321. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1322. 4, *transform_type_.maximum_, output);
  1323. }
  1324. // .google.firestore.v1.Value minimum = 5;
  1325. if (has_minimum()) {
  1326. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1327. 5, *transform_type_.minimum_, output);
  1328. }
  1329. // .google.firestore.v1.ArrayValue append_missing_elements = 6;
  1330. if (has_append_missing_elements()) {
  1331. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1332. 6, *transform_type_.append_missing_elements_, output);
  1333. }
  1334. // .google.firestore.v1.ArrayValue remove_all_from_array = 7;
  1335. if (has_remove_all_from_array()) {
  1336. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1337. 7, *transform_type_.remove_all_from_array_, output);
  1338. }
  1339. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1340. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1341. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1342. }
  1343. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentTransform.FieldTransform)
  1344. }
  1345. ::google::protobuf::uint8* DocumentTransform_FieldTransform::InternalSerializeWithCachedSizesToArray(
  1346. bool deterministic, ::google::protobuf::uint8* target) const {
  1347. (void)deterministic; // Unused
  1348. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1349. ::google::protobuf::uint32 cached_has_bits = 0;
  1350. (void) cached_has_bits;
  1351. // string field_path = 1;
  1352. if (this->field_path().size() > 0) {
  1353. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1354. this->field_path().data(), static_cast<int>(this->field_path().length()),
  1355. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1356. "google.firestore.v1.DocumentTransform.FieldTransform.field_path");
  1357. target =
  1358. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1359. 1, this->field_path(), target);
  1360. }
  1361. // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
  1362. if (has_set_to_server_value()) {
  1363. target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
  1364. 2, this->set_to_server_value(), target);
  1365. }
  1366. // .google.firestore.v1.Value increment = 3;
  1367. if (has_increment()) {
  1368. target = ::google::protobuf::internal::WireFormatLite::
  1369. InternalWriteMessageToArray(
  1370. 3, *transform_type_.increment_, deterministic, target);
  1371. }
  1372. // .google.firestore.v1.Value maximum = 4;
  1373. if (has_maximum()) {
  1374. target = ::google::protobuf::internal::WireFormatLite::
  1375. InternalWriteMessageToArray(
  1376. 4, *transform_type_.maximum_, deterministic, target);
  1377. }
  1378. // .google.firestore.v1.Value minimum = 5;
  1379. if (has_minimum()) {
  1380. target = ::google::protobuf::internal::WireFormatLite::
  1381. InternalWriteMessageToArray(
  1382. 5, *transform_type_.minimum_, deterministic, target);
  1383. }
  1384. // .google.firestore.v1.ArrayValue append_missing_elements = 6;
  1385. if (has_append_missing_elements()) {
  1386. target = ::google::protobuf::internal::WireFormatLite::
  1387. InternalWriteMessageToArray(
  1388. 6, *transform_type_.append_missing_elements_, deterministic, target);
  1389. }
  1390. // .google.firestore.v1.ArrayValue remove_all_from_array = 7;
  1391. if (has_remove_all_from_array()) {
  1392. target = ::google::protobuf::internal::WireFormatLite::
  1393. InternalWriteMessageToArray(
  1394. 7, *transform_type_.remove_all_from_array_, deterministic, target);
  1395. }
  1396. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1397. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1398. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1399. }
  1400. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentTransform.FieldTransform)
  1401. return target;
  1402. }
  1403. size_t DocumentTransform_FieldTransform::ByteSizeLong() const {
  1404. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1405. size_t total_size = 0;
  1406. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1407. total_size +=
  1408. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1409. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1410. }
  1411. // string field_path = 1;
  1412. if (this->field_path().size() > 0) {
  1413. total_size += 1 +
  1414. ::google::protobuf::internal::WireFormatLite::StringSize(
  1415. this->field_path());
  1416. }
  1417. switch (transform_type_case()) {
  1418. // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
  1419. case kSetToServerValue: {
  1420. total_size += 1 +
  1421. ::google::protobuf::internal::WireFormatLite::EnumSize(this->set_to_server_value());
  1422. break;
  1423. }
  1424. // .google.firestore.v1.Value increment = 3;
  1425. case kIncrement: {
  1426. total_size += 1 +
  1427. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1428. *transform_type_.increment_);
  1429. break;
  1430. }
  1431. // .google.firestore.v1.Value maximum = 4;
  1432. case kMaximum: {
  1433. total_size += 1 +
  1434. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1435. *transform_type_.maximum_);
  1436. break;
  1437. }
  1438. // .google.firestore.v1.Value minimum = 5;
  1439. case kMinimum: {
  1440. total_size += 1 +
  1441. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1442. *transform_type_.minimum_);
  1443. break;
  1444. }
  1445. // .google.firestore.v1.ArrayValue append_missing_elements = 6;
  1446. case kAppendMissingElements: {
  1447. total_size += 1 +
  1448. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1449. *transform_type_.append_missing_elements_);
  1450. break;
  1451. }
  1452. // .google.firestore.v1.ArrayValue remove_all_from_array = 7;
  1453. case kRemoveAllFromArray: {
  1454. total_size += 1 +
  1455. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1456. *transform_type_.remove_all_from_array_);
  1457. break;
  1458. }
  1459. case TRANSFORM_TYPE_NOT_SET: {
  1460. break;
  1461. }
  1462. }
  1463. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1464. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1465. _cached_size_ = cached_size;
  1466. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1467. return total_size;
  1468. }
  1469. void DocumentTransform_FieldTransform::MergeFrom(const ::google::protobuf::Message& from) {
  1470. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1471. GOOGLE_DCHECK_NE(&from, this);
  1472. const DocumentTransform_FieldTransform* source =
  1473. ::google::protobuf::internal::DynamicCastToGenerated<const DocumentTransform_FieldTransform>(
  1474. &from);
  1475. if (source == NULL) {
  1476. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentTransform.FieldTransform)
  1477. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1478. } else {
  1479. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentTransform.FieldTransform)
  1480. MergeFrom(*source);
  1481. }
  1482. }
  1483. void DocumentTransform_FieldTransform::MergeFrom(const DocumentTransform_FieldTransform& from) {
  1484. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1485. GOOGLE_DCHECK_NE(&from, this);
  1486. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1487. ::google::protobuf::uint32 cached_has_bits = 0;
  1488. (void) cached_has_bits;
  1489. if (from.field_path().size() > 0) {
  1490. field_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  1491. }
  1492. switch (from.transform_type_case()) {
  1493. case kSetToServerValue: {
  1494. set_set_to_server_value(from.set_to_server_value());
  1495. break;
  1496. }
  1497. case kIncrement: {
  1498. mutable_increment()->::google::firestore::v1::Value::MergeFrom(from.increment());
  1499. break;
  1500. }
  1501. case kMaximum: {
  1502. mutable_maximum()->::google::firestore::v1::Value::MergeFrom(from.maximum());
  1503. break;
  1504. }
  1505. case kMinimum: {
  1506. mutable_minimum()->::google::firestore::v1::Value::MergeFrom(from.minimum());
  1507. break;
  1508. }
  1509. case kAppendMissingElements: {
  1510. mutable_append_missing_elements()->::google::firestore::v1::ArrayValue::MergeFrom(from.append_missing_elements());
  1511. break;
  1512. }
  1513. case kRemoveAllFromArray: {
  1514. mutable_remove_all_from_array()->::google::firestore::v1::ArrayValue::MergeFrom(from.remove_all_from_array());
  1515. break;
  1516. }
  1517. case TRANSFORM_TYPE_NOT_SET: {
  1518. break;
  1519. }
  1520. }
  1521. }
  1522. void DocumentTransform_FieldTransform::CopyFrom(const ::google::protobuf::Message& from) {
  1523. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1524. if (&from == this) return;
  1525. Clear();
  1526. MergeFrom(from);
  1527. }
  1528. void DocumentTransform_FieldTransform::CopyFrom(const DocumentTransform_FieldTransform& from) {
  1529. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  1530. if (&from == this) return;
  1531. Clear();
  1532. MergeFrom(from);
  1533. }
  1534. bool DocumentTransform_FieldTransform::IsInitialized() const {
  1535. return true;
  1536. }
  1537. void DocumentTransform_FieldTransform::Swap(DocumentTransform_FieldTransform* other) {
  1538. if (other == this) return;
  1539. InternalSwap(other);
  1540. }
  1541. void DocumentTransform_FieldTransform::InternalSwap(DocumentTransform_FieldTransform* other) {
  1542. using std::swap;
  1543. field_path_.Swap(&other->field_path_);
  1544. swap(transform_type_, other->transform_type_);
  1545. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1546. _internal_metadata_.Swap(&other->_internal_metadata_);
  1547. swap(_cached_size_, other->_cached_size_);
  1548. }
  1549. ::google::protobuf::Metadata DocumentTransform_FieldTransform::GetMetadata() const {
  1550. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  1551. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  1552. }
  1553. // ===================================================================
  1554. void DocumentTransform::InitAsDefaultInstance() {
  1555. }
  1556. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1557. const int DocumentTransform::kDocumentFieldNumber;
  1558. const int DocumentTransform::kFieldTransformsFieldNumber;
  1559. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1560. DocumentTransform::DocumentTransform()
  1561. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1562. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1563. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform();
  1564. }
  1565. SharedCtor();
  1566. // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentTransform)
  1567. }
  1568. DocumentTransform::DocumentTransform(const DocumentTransform& from)
  1569. : ::google::protobuf::Message(),
  1570. _internal_metadata_(NULL),
  1571. field_transforms_(from.field_transforms_),
  1572. _cached_size_(0) {
  1573. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1574. document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1575. if (from.document().size() > 0) {
  1576. document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  1577. }
  1578. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentTransform)
  1579. }
  1580. void DocumentTransform::SharedCtor() {
  1581. document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1582. _cached_size_ = 0;
  1583. }
  1584. DocumentTransform::~DocumentTransform() {
  1585. // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentTransform)
  1586. SharedDtor();
  1587. }
  1588. void DocumentTransform::SharedDtor() {
  1589. document_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1590. }
  1591. void DocumentTransform::SetCachedSize(int size) const {
  1592. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1593. _cached_size_ = size;
  1594. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1595. }
  1596. const ::google::protobuf::Descriptor* DocumentTransform::descriptor() {
  1597. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  1598. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1599. }
  1600. const DocumentTransform& DocumentTransform::default_instance() {
  1601. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform();
  1602. return *internal_default_instance();
  1603. }
  1604. DocumentTransform* DocumentTransform::New(::google::protobuf::Arena* arena) const {
  1605. DocumentTransform* n = new DocumentTransform;
  1606. if (arena != NULL) {
  1607. arena->Own(n);
  1608. }
  1609. return n;
  1610. }
  1611. void DocumentTransform::Clear() {
  1612. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentTransform)
  1613. ::google::protobuf::uint32 cached_has_bits = 0;
  1614. // Prevent compiler warnings about cached_has_bits being unused
  1615. (void) cached_has_bits;
  1616. field_transforms_.Clear();
  1617. document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1618. _internal_metadata_.Clear();
  1619. }
  1620. bool DocumentTransform::MergePartialFromCodedStream(
  1621. ::google::protobuf::io::CodedInputStream* input) {
  1622. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1623. ::google::protobuf::uint32 tag;
  1624. // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentTransform)
  1625. for (;;) {
  1626. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1627. tag = p.first;
  1628. if (!p.second) goto handle_unusual;
  1629. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1630. // string document = 1;
  1631. case 1: {
  1632. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1633. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1634. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1635. input, this->mutable_document()));
  1636. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1637. this->document().data(), static_cast<int>(this->document().length()),
  1638. ::google::protobuf::internal::WireFormatLite::PARSE,
  1639. "google.firestore.v1.DocumentTransform.document"));
  1640. } else {
  1641. goto handle_unusual;
  1642. }
  1643. break;
  1644. }
  1645. // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2;
  1646. case 2: {
  1647. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1648. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1649. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_field_transforms()));
  1650. } else {
  1651. goto handle_unusual;
  1652. }
  1653. break;
  1654. }
  1655. default: {
  1656. handle_unusual:
  1657. if (tag == 0) {
  1658. goto success;
  1659. }
  1660. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1661. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1662. break;
  1663. }
  1664. }
  1665. }
  1666. success:
  1667. // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentTransform)
  1668. return true;
  1669. failure:
  1670. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentTransform)
  1671. return false;
  1672. #undef DO_
  1673. }
  1674. void DocumentTransform::SerializeWithCachedSizes(
  1675. ::google::protobuf::io::CodedOutputStream* output) const {
  1676. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentTransform)
  1677. ::google::protobuf::uint32 cached_has_bits = 0;
  1678. (void) cached_has_bits;
  1679. // string document = 1;
  1680. if (this->document().size() > 0) {
  1681. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1682. this->document().data(), static_cast<int>(this->document().length()),
  1683. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1684. "google.firestore.v1.DocumentTransform.document");
  1685. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1686. 1, this->document(), output);
  1687. }
  1688. // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2;
  1689. for (unsigned int i = 0,
  1690. n = static_cast<unsigned int>(this->field_transforms_size()); i < n; i++) {
  1691. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1692. 2, this->field_transforms(static_cast<int>(i)), output);
  1693. }
  1694. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1695. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1696. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1697. }
  1698. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentTransform)
  1699. }
  1700. ::google::protobuf::uint8* DocumentTransform::InternalSerializeWithCachedSizesToArray(
  1701. bool deterministic, ::google::protobuf::uint8* target) const {
  1702. (void)deterministic; // Unused
  1703. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentTransform)
  1704. ::google::protobuf::uint32 cached_has_bits = 0;
  1705. (void) cached_has_bits;
  1706. // string document = 1;
  1707. if (this->document().size() > 0) {
  1708. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1709. this->document().data(), static_cast<int>(this->document().length()),
  1710. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1711. "google.firestore.v1.DocumentTransform.document");
  1712. target =
  1713. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  1714. 1, this->document(), target);
  1715. }
  1716. // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2;
  1717. for (unsigned int i = 0,
  1718. n = static_cast<unsigned int>(this->field_transforms_size()); i < n; i++) {
  1719. target = ::google::protobuf::internal::WireFormatLite::
  1720. InternalWriteMessageToArray(
  1721. 2, this->field_transforms(static_cast<int>(i)), deterministic, target);
  1722. }
  1723. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1724. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1725. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1726. }
  1727. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentTransform)
  1728. return target;
  1729. }
  1730. size_t DocumentTransform::ByteSizeLong() const {
  1731. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentTransform)
  1732. size_t total_size = 0;
  1733. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1734. total_size +=
  1735. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1736. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1737. }
  1738. // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2;
  1739. {
  1740. unsigned int count = static_cast<unsigned int>(this->field_transforms_size());
  1741. total_size += 1UL * count;
  1742. for (unsigned int i = 0; i < count; i++) {
  1743. total_size +=
  1744. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1745. this->field_transforms(static_cast<int>(i)));
  1746. }
  1747. }
  1748. // string document = 1;
  1749. if (this->document().size() > 0) {
  1750. total_size += 1 +
  1751. ::google::protobuf::internal::WireFormatLite::StringSize(
  1752. this->document());
  1753. }
  1754. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1755. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1756. _cached_size_ = cached_size;
  1757. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1758. return total_size;
  1759. }
  1760. void DocumentTransform::MergeFrom(const ::google::protobuf::Message& from) {
  1761. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentTransform)
  1762. GOOGLE_DCHECK_NE(&from, this);
  1763. const DocumentTransform* source =
  1764. ::google::protobuf::internal::DynamicCastToGenerated<const DocumentTransform>(
  1765. &from);
  1766. if (source == NULL) {
  1767. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentTransform)
  1768. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1769. } else {
  1770. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentTransform)
  1771. MergeFrom(*source);
  1772. }
  1773. }
  1774. void DocumentTransform::MergeFrom(const DocumentTransform& from) {
  1775. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentTransform)
  1776. GOOGLE_DCHECK_NE(&from, this);
  1777. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1778. ::google::protobuf::uint32 cached_has_bits = 0;
  1779. (void) cached_has_bits;
  1780. field_transforms_.MergeFrom(from.field_transforms_);
  1781. if (from.document().size() > 0) {
  1782. document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  1783. }
  1784. }
  1785. void DocumentTransform::CopyFrom(const ::google::protobuf::Message& from) {
  1786. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentTransform)
  1787. if (&from == this) return;
  1788. Clear();
  1789. MergeFrom(from);
  1790. }
  1791. void DocumentTransform::CopyFrom(const DocumentTransform& from) {
  1792. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentTransform)
  1793. if (&from == this) return;
  1794. Clear();
  1795. MergeFrom(from);
  1796. }
  1797. bool DocumentTransform::IsInitialized() const {
  1798. return true;
  1799. }
  1800. void DocumentTransform::Swap(DocumentTransform* other) {
  1801. if (other == this) return;
  1802. InternalSwap(other);
  1803. }
  1804. void DocumentTransform::InternalSwap(DocumentTransform* other) {
  1805. using std::swap;
  1806. field_transforms_.InternalSwap(&other->field_transforms_);
  1807. document_.Swap(&other->document_);
  1808. _internal_metadata_.Swap(&other->_internal_metadata_);
  1809. swap(_cached_size_, other->_cached_size_);
  1810. }
  1811. ::google::protobuf::Metadata DocumentTransform::GetMetadata() const {
  1812. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  1813. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  1814. }
  1815. // ===================================================================
  1816. void WriteResult::InitAsDefaultInstance() {
  1817. ::google::firestore::v1::_WriteResult_default_instance_._instance.get_mutable()->update_time_ = const_cast< ::google::protobuf::Timestamp*>(
  1818. ::google::protobuf::Timestamp::internal_default_instance());
  1819. }
  1820. void WriteResult::clear_update_time() {
  1821. if (GetArenaNoVirtual() == NULL && update_time_ != NULL) {
  1822. delete update_time_;
  1823. }
  1824. update_time_ = NULL;
  1825. }
  1826. void WriteResult::clear_transform_results() {
  1827. transform_results_.Clear();
  1828. }
  1829. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1830. const int WriteResult::kUpdateTimeFieldNumber;
  1831. const int WriteResult::kTransformResultsFieldNumber;
  1832. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1833. WriteResult::WriteResult()
  1834. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1835. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1836. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteResult();
  1837. }
  1838. SharedCtor();
  1839. // @@protoc_insertion_point(constructor:google.firestore.v1.WriteResult)
  1840. }
  1841. WriteResult::WriteResult(const WriteResult& from)
  1842. : ::google::protobuf::Message(),
  1843. _internal_metadata_(NULL),
  1844. transform_results_(from.transform_results_),
  1845. _cached_size_(0) {
  1846. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1847. if (from.has_update_time()) {
  1848. update_time_ = new ::google::protobuf::Timestamp(*from.update_time_);
  1849. } else {
  1850. update_time_ = NULL;
  1851. }
  1852. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteResult)
  1853. }
  1854. void WriteResult::SharedCtor() {
  1855. update_time_ = NULL;
  1856. _cached_size_ = 0;
  1857. }
  1858. WriteResult::~WriteResult() {
  1859. // @@protoc_insertion_point(destructor:google.firestore.v1.WriteResult)
  1860. SharedDtor();
  1861. }
  1862. void WriteResult::SharedDtor() {
  1863. if (this != internal_default_instance()) delete update_time_;
  1864. }
  1865. void WriteResult::SetCachedSize(int size) const {
  1866. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1867. _cached_size_ = size;
  1868. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1869. }
  1870. const ::google::protobuf::Descriptor* WriteResult::descriptor() {
  1871. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  1872. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1873. }
  1874. const WriteResult& WriteResult::default_instance() {
  1875. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteResult();
  1876. return *internal_default_instance();
  1877. }
  1878. WriteResult* WriteResult::New(::google::protobuf::Arena* arena) const {
  1879. WriteResult* n = new WriteResult;
  1880. if (arena != NULL) {
  1881. arena->Own(n);
  1882. }
  1883. return n;
  1884. }
  1885. void WriteResult::Clear() {
  1886. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteResult)
  1887. ::google::protobuf::uint32 cached_has_bits = 0;
  1888. // Prevent compiler warnings about cached_has_bits being unused
  1889. (void) cached_has_bits;
  1890. transform_results_.Clear();
  1891. if (GetArenaNoVirtual() == NULL && update_time_ != NULL) {
  1892. delete update_time_;
  1893. }
  1894. update_time_ = NULL;
  1895. _internal_metadata_.Clear();
  1896. }
  1897. bool WriteResult::MergePartialFromCodedStream(
  1898. ::google::protobuf::io::CodedInputStream* input) {
  1899. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1900. ::google::protobuf::uint32 tag;
  1901. // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteResult)
  1902. for (;;) {
  1903. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1904. tag = p.first;
  1905. if (!p.second) goto handle_unusual;
  1906. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1907. // .google.protobuf.Timestamp update_time = 1;
  1908. case 1: {
  1909. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1910. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1911. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1912. input, mutable_update_time()));
  1913. } else {
  1914. goto handle_unusual;
  1915. }
  1916. break;
  1917. }
  1918. // repeated .google.firestore.v1.Value transform_results = 2;
  1919. case 2: {
  1920. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1921. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1922. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_transform_results()));
  1923. } else {
  1924. goto handle_unusual;
  1925. }
  1926. break;
  1927. }
  1928. default: {
  1929. handle_unusual:
  1930. if (tag == 0) {
  1931. goto success;
  1932. }
  1933. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1934. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1935. break;
  1936. }
  1937. }
  1938. }
  1939. success:
  1940. // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteResult)
  1941. return true;
  1942. failure:
  1943. // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteResult)
  1944. return false;
  1945. #undef DO_
  1946. }
  1947. void WriteResult::SerializeWithCachedSizes(
  1948. ::google::protobuf::io::CodedOutputStream* output) const {
  1949. // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteResult)
  1950. ::google::protobuf::uint32 cached_has_bits = 0;
  1951. (void) cached_has_bits;
  1952. // .google.protobuf.Timestamp update_time = 1;
  1953. if (this->has_update_time()) {
  1954. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1955. 1, *this->update_time_, output);
  1956. }
  1957. // repeated .google.firestore.v1.Value transform_results = 2;
  1958. for (unsigned int i = 0,
  1959. n = static_cast<unsigned int>(this->transform_results_size()); i < n; i++) {
  1960. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1961. 2, this->transform_results(static_cast<int>(i)), output);
  1962. }
  1963. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1964. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1965. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1966. }
  1967. // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteResult)
  1968. }
  1969. ::google::protobuf::uint8* WriteResult::InternalSerializeWithCachedSizesToArray(
  1970. bool deterministic, ::google::protobuf::uint8* target) const {
  1971. (void)deterministic; // Unused
  1972. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteResult)
  1973. ::google::protobuf::uint32 cached_has_bits = 0;
  1974. (void) cached_has_bits;
  1975. // .google.protobuf.Timestamp update_time = 1;
  1976. if (this->has_update_time()) {
  1977. target = ::google::protobuf::internal::WireFormatLite::
  1978. InternalWriteMessageToArray(
  1979. 1, *this->update_time_, deterministic, target);
  1980. }
  1981. // repeated .google.firestore.v1.Value transform_results = 2;
  1982. for (unsigned int i = 0,
  1983. n = static_cast<unsigned int>(this->transform_results_size()); i < n; i++) {
  1984. target = ::google::protobuf::internal::WireFormatLite::
  1985. InternalWriteMessageToArray(
  1986. 2, this->transform_results(static_cast<int>(i)), deterministic, target);
  1987. }
  1988. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1989. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1990. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1991. }
  1992. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteResult)
  1993. return target;
  1994. }
  1995. size_t WriteResult::ByteSizeLong() const {
  1996. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteResult)
  1997. size_t total_size = 0;
  1998. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1999. total_size +=
  2000. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2001. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2002. }
  2003. // repeated .google.firestore.v1.Value transform_results = 2;
  2004. {
  2005. unsigned int count = static_cast<unsigned int>(this->transform_results_size());
  2006. total_size += 1UL * count;
  2007. for (unsigned int i = 0; i < count; i++) {
  2008. total_size +=
  2009. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2010. this->transform_results(static_cast<int>(i)));
  2011. }
  2012. }
  2013. // .google.protobuf.Timestamp update_time = 1;
  2014. if (this->has_update_time()) {
  2015. total_size += 1 +
  2016. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2017. *this->update_time_);
  2018. }
  2019. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2020. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2021. _cached_size_ = cached_size;
  2022. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2023. return total_size;
  2024. }
  2025. void WriteResult::MergeFrom(const ::google::protobuf::Message& from) {
  2026. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteResult)
  2027. GOOGLE_DCHECK_NE(&from, this);
  2028. const WriteResult* source =
  2029. ::google::protobuf::internal::DynamicCastToGenerated<const WriteResult>(
  2030. &from);
  2031. if (source == NULL) {
  2032. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteResult)
  2033. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2034. } else {
  2035. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteResult)
  2036. MergeFrom(*source);
  2037. }
  2038. }
  2039. void WriteResult::MergeFrom(const WriteResult& from) {
  2040. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteResult)
  2041. GOOGLE_DCHECK_NE(&from, this);
  2042. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2043. ::google::protobuf::uint32 cached_has_bits = 0;
  2044. (void) cached_has_bits;
  2045. transform_results_.MergeFrom(from.transform_results_);
  2046. if (from.has_update_time()) {
  2047. mutable_update_time()->::google::protobuf::Timestamp::MergeFrom(from.update_time());
  2048. }
  2049. }
  2050. void WriteResult::CopyFrom(const ::google::protobuf::Message& from) {
  2051. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteResult)
  2052. if (&from == this) return;
  2053. Clear();
  2054. MergeFrom(from);
  2055. }
  2056. void WriteResult::CopyFrom(const WriteResult& from) {
  2057. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteResult)
  2058. if (&from == this) return;
  2059. Clear();
  2060. MergeFrom(from);
  2061. }
  2062. bool WriteResult::IsInitialized() const {
  2063. return true;
  2064. }
  2065. void WriteResult::Swap(WriteResult* other) {
  2066. if (other == this) return;
  2067. InternalSwap(other);
  2068. }
  2069. void WriteResult::InternalSwap(WriteResult* other) {
  2070. using std::swap;
  2071. transform_results_.InternalSwap(&other->transform_results_);
  2072. swap(update_time_, other->update_time_);
  2073. _internal_metadata_.Swap(&other->_internal_metadata_);
  2074. swap(_cached_size_, other->_cached_size_);
  2075. }
  2076. ::google::protobuf::Metadata WriteResult::GetMetadata() const {
  2077. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  2078. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  2079. }
  2080. // ===================================================================
  2081. void DocumentChange::InitAsDefaultInstance() {
  2082. ::google::firestore::v1::_DocumentChange_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
  2083. ::google::firestore::v1::Document::internal_default_instance());
  2084. }
  2085. void DocumentChange::clear_document() {
  2086. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  2087. delete document_;
  2088. }
  2089. document_ = NULL;
  2090. }
  2091. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2092. const int DocumentChange::kDocumentFieldNumber;
  2093. const int DocumentChange::kTargetIdsFieldNumber;
  2094. const int DocumentChange::kRemovedTargetIdsFieldNumber;
  2095. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2096. DocumentChange::DocumentChange()
  2097. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2098. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2099. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentChange();
  2100. }
  2101. SharedCtor();
  2102. // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentChange)
  2103. }
  2104. DocumentChange::DocumentChange(const DocumentChange& from)
  2105. : ::google::protobuf::Message(),
  2106. _internal_metadata_(NULL),
  2107. target_ids_(from.target_ids_),
  2108. removed_target_ids_(from.removed_target_ids_),
  2109. _cached_size_(0) {
  2110. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2111. if (from.has_document()) {
  2112. document_ = new ::google::firestore::v1::Document(*from.document_);
  2113. } else {
  2114. document_ = NULL;
  2115. }
  2116. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentChange)
  2117. }
  2118. void DocumentChange::SharedCtor() {
  2119. document_ = NULL;
  2120. _cached_size_ = 0;
  2121. }
  2122. DocumentChange::~DocumentChange() {
  2123. // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentChange)
  2124. SharedDtor();
  2125. }
  2126. void DocumentChange::SharedDtor() {
  2127. if (this != internal_default_instance()) delete document_;
  2128. }
  2129. void DocumentChange::SetCachedSize(int size) const {
  2130. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2131. _cached_size_ = size;
  2132. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2133. }
  2134. const ::google::protobuf::Descriptor* DocumentChange::descriptor() {
  2135. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  2136. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2137. }
  2138. const DocumentChange& DocumentChange::default_instance() {
  2139. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentChange();
  2140. return *internal_default_instance();
  2141. }
  2142. DocumentChange* DocumentChange::New(::google::protobuf::Arena* arena) const {
  2143. DocumentChange* n = new DocumentChange;
  2144. if (arena != NULL) {
  2145. arena->Own(n);
  2146. }
  2147. return n;
  2148. }
  2149. void DocumentChange::Clear() {
  2150. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentChange)
  2151. ::google::protobuf::uint32 cached_has_bits = 0;
  2152. // Prevent compiler warnings about cached_has_bits being unused
  2153. (void) cached_has_bits;
  2154. target_ids_.Clear();
  2155. removed_target_ids_.Clear();
  2156. if (GetArenaNoVirtual() == NULL && document_ != NULL) {
  2157. delete document_;
  2158. }
  2159. document_ = NULL;
  2160. _internal_metadata_.Clear();
  2161. }
  2162. bool DocumentChange::MergePartialFromCodedStream(
  2163. ::google::protobuf::io::CodedInputStream* input) {
  2164. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2165. ::google::protobuf::uint32 tag;
  2166. // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentChange)
  2167. for (;;) {
  2168. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2169. tag = p.first;
  2170. if (!p.second) goto handle_unusual;
  2171. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2172. // .google.firestore.v1.Document document = 1;
  2173. case 1: {
  2174. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2175. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2176. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2177. input, mutable_document()));
  2178. } else {
  2179. goto handle_unusual;
  2180. }
  2181. break;
  2182. }
  2183. // repeated int32 target_ids = 5;
  2184. case 5: {
  2185. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2186. static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
  2187. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  2188. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2189. input, this->mutable_target_ids())));
  2190. } else if (
  2191. static_cast< ::google::protobuf::uint8>(tag) ==
  2192. static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
  2193. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  2194. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2195. 1, 42u, input, this->mutable_target_ids())));
  2196. } else {
  2197. goto handle_unusual;
  2198. }
  2199. break;
  2200. }
  2201. // repeated int32 removed_target_ids = 6;
  2202. case 6: {
  2203. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2204. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  2205. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  2206. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2207. input, this->mutable_removed_target_ids())));
  2208. } else if (
  2209. static_cast< ::google::protobuf::uint8>(tag) ==
  2210. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  2211. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  2212. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2213. 1, 50u, input, this->mutable_removed_target_ids())));
  2214. } else {
  2215. goto handle_unusual;
  2216. }
  2217. break;
  2218. }
  2219. default: {
  2220. handle_unusual:
  2221. if (tag == 0) {
  2222. goto success;
  2223. }
  2224. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2225. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2226. break;
  2227. }
  2228. }
  2229. }
  2230. success:
  2231. // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentChange)
  2232. return true;
  2233. failure:
  2234. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentChange)
  2235. return false;
  2236. #undef DO_
  2237. }
  2238. void DocumentChange::SerializeWithCachedSizes(
  2239. ::google::protobuf::io::CodedOutputStream* output) const {
  2240. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentChange)
  2241. ::google::protobuf::uint32 cached_has_bits = 0;
  2242. (void) cached_has_bits;
  2243. // .google.firestore.v1.Document document = 1;
  2244. if (this->has_document()) {
  2245. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2246. 1, *this->document_, output);
  2247. }
  2248. // repeated int32 target_ids = 5;
  2249. if (this->target_ids_size() > 0) {
  2250. ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  2251. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  2252. _target_ids_cached_byte_size_));
  2253. }
  2254. for (int i = 0, n = this->target_ids_size(); i < n; i++) {
  2255. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  2256. this->target_ids(i), output);
  2257. }
  2258. // repeated int32 removed_target_ids = 6;
  2259. if (this->removed_target_ids_size() > 0) {
  2260. ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  2261. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  2262. _removed_target_ids_cached_byte_size_));
  2263. }
  2264. for (int i = 0, n = this->removed_target_ids_size(); i < n; i++) {
  2265. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  2266. this->removed_target_ids(i), output);
  2267. }
  2268. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2269. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2270. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2271. }
  2272. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentChange)
  2273. }
  2274. ::google::protobuf::uint8* DocumentChange::InternalSerializeWithCachedSizesToArray(
  2275. bool deterministic, ::google::protobuf::uint8* target) const {
  2276. (void)deterministic; // Unused
  2277. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentChange)
  2278. ::google::protobuf::uint32 cached_has_bits = 0;
  2279. (void) cached_has_bits;
  2280. // .google.firestore.v1.Document document = 1;
  2281. if (this->has_document()) {
  2282. target = ::google::protobuf::internal::WireFormatLite::
  2283. InternalWriteMessageToArray(
  2284. 1, *this->document_, deterministic, target);
  2285. }
  2286. // repeated int32 target_ids = 5;
  2287. if (this->target_ids_size() > 0) {
  2288. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  2289. 5,
  2290. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  2291. target);
  2292. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  2293. static_cast< ::google::protobuf::int32>(
  2294. _target_ids_cached_byte_size_), target);
  2295. target = ::google::protobuf::internal::WireFormatLite::
  2296. WriteInt32NoTagToArray(this->target_ids_, target);
  2297. }
  2298. // repeated int32 removed_target_ids = 6;
  2299. if (this->removed_target_ids_size() > 0) {
  2300. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  2301. 6,
  2302. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  2303. target);
  2304. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  2305. static_cast< ::google::protobuf::int32>(
  2306. _removed_target_ids_cached_byte_size_), target);
  2307. target = ::google::protobuf::internal::WireFormatLite::
  2308. WriteInt32NoTagToArray(this->removed_target_ids_, target);
  2309. }
  2310. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2311. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2312. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2313. }
  2314. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentChange)
  2315. return target;
  2316. }
  2317. size_t DocumentChange::ByteSizeLong() const {
  2318. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentChange)
  2319. size_t total_size = 0;
  2320. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2321. total_size +=
  2322. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2323. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2324. }
  2325. // repeated int32 target_ids = 5;
  2326. {
  2327. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  2328. Int32Size(this->target_ids_);
  2329. if (data_size > 0) {
  2330. total_size += 1 +
  2331. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2332. static_cast< ::google::protobuf::int32>(data_size));
  2333. }
  2334. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  2335. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2336. _target_ids_cached_byte_size_ = cached_size;
  2337. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2338. total_size += data_size;
  2339. }
  2340. // repeated int32 removed_target_ids = 6;
  2341. {
  2342. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  2343. Int32Size(this->removed_target_ids_);
  2344. if (data_size > 0) {
  2345. total_size += 1 +
  2346. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2347. static_cast< ::google::protobuf::int32>(data_size));
  2348. }
  2349. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  2350. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2351. _removed_target_ids_cached_byte_size_ = cached_size;
  2352. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2353. total_size += data_size;
  2354. }
  2355. // .google.firestore.v1.Document document = 1;
  2356. if (this->has_document()) {
  2357. total_size += 1 +
  2358. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2359. *this->document_);
  2360. }
  2361. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2362. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2363. _cached_size_ = cached_size;
  2364. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2365. return total_size;
  2366. }
  2367. void DocumentChange::MergeFrom(const ::google::protobuf::Message& from) {
  2368. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentChange)
  2369. GOOGLE_DCHECK_NE(&from, this);
  2370. const DocumentChange* source =
  2371. ::google::protobuf::internal::DynamicCastToGenerated<const DocumentChange>(
  2372. &from);
  2373. if (source == NULL) {
  2374. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentChange)
  2375. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2376. } else {
  2377. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentChange)
  2378. MergeFrom(*source);
  2379. }
  2380. }
  2381. void DocumentChange::MergeFrom(const DocumentChange& from) {
  2382. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentChange)
  2383. GOOGLE_DCHECK_NE(&from, this);
  2384. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2385. ::google::protobuf::uint32 cached_has_bits = 0;
  2386. (void) cached_has_bits;
  2387. target_ids_.MergeFrom(from.target_ids_);
  2388. removed_target_ids_.MergeFrom(from.removed_target_ids_);
  2389. if (from.has_document()) {
  2390. mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document());
  2391. }
  2392. }
  2393. void DocumentChange::CopyFrom(const ::google::protobuf::Message& from) {
  2394. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentChange)
  2395. if (&from == this) return;
  2396. Clear();
  2397. MergeFrom(from);
  2398. }
  2399. void DocumentChange::CopyFrom(const DocumentChange& from) {
  2400. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentChange)
  2401. if (&from == this) return;
  2402. Clear();
  2403. MergeFrom(from);
  2404. }
  2405. bool DocumentChange::IsInitialized() const {
  2406. return true;
  2407. }
  2408. void DocumentChange::Swap(DocumentChange* other) {
  2409. if (other == this) return;
  2410. InternalSwap(other);
  2411. }
  2412. void DocumentChange::InternalSwap(DocumentChange* other) {
  2413. using std::swap;
  2414. target_ids_.InternalSwap(&other->target_ids_);
  2415. removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  2416. swap(document_, other->document_);
  2417. _internal_metadata_.Swap(&other->_internal_metadata_);
  2418. swap(_cached_size_, other->_cached_size_);
  2419. }
  2420. ::google::protobuf::Metadata DocumentChange::GetMetadata() const {
  2421. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  2422. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  2423. }
  2424. // ===================================================================
  2425. void DocumentDelete::InitAsDefaultInstance() {
  2426. ::google::firestore::v1::_DocumentDelete_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  2427. ::google::protobuf::Timestamp::internal_default_instance());
  2428. }
  2429. void DocumentDelete::clear_read_time() {
  2430. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  2431. delete read_time_;
  2432. }
  2433. read_time_ = NULL;
  2434. }
  2435. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2436. const int DocumentDelete::kDocumentFieldNumber;
  2437. const int DocumentDelete::kRemovedTargetIdsFieldNumber;
  2438. const int DocumentDelete::kReadTimeFieldNumber;
  2439. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2440. DocumentDelete::DocumentDelete()
  2441. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2442. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2443. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentDelete();
  2444. }
  2445. SharedCtor();
  2446. // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentDelete)
  2447. }
  2448. DocumentDelete::DocumentDelete(const DocumentDelete& from)
  2449. : ::google::protobuf::Message(),
  2450. _internal_metadata_(NULL),
  2451. removed_target_ids_(from.removed_target_ids_),
  2452. _cached_size_(0) {
  2453. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2454. document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2455. if (from.document().size() > 0) {
  2456. document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  2457. }
  2458. if (from.has_read_time()) {
  2459. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  2460. } else {
  2461. read_time_ = NULL;
  2462. }
  2463. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentDelete)
  2464. }
  2465. void DocumentDelete::SharedCtor() {
  2466. document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2467. read_time_ = NULL;
  2468. _cached_size_ = 0;
  2469. }
  2470. DocumentDelete::~DocumentDelete() {
  2471. // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentDelete)
  2472. SharedDtor();
  2473. }
  2474. void DocumentDelete::SharedDtor() {
  2475. document_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2476. if (this != internal_default_instance()) delete read_time_;
  2477. }
  2478. void DocumentDelete::SetCachedSize(int size) const {
  2479. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2480. _cached_size_ = size;
  2481. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2482. }
  2483. const ::google::protobuf::Descriptor* DocumentDelete::descriptor() {
  2484. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  2485. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2486. }
  2487. const DocumentDelete& DocumentDelete::default_instance() {
  2488. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentDelete();
  2489. return *internal_default_instance();
  2490. }
  2491. DocumentDelete* DocumentDelete::New(::google::protobuf::Arena* arena) const {
  2492. DocumentDelete* n = new DocumentDelete;
  2493. if (arena != NULL) {
  2494. arena->Own(n);
  2495. }
  2496. return n;
  2497. }
  2498. void DocumentDelete::Clear() {
  2499. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentDelete)
  2500. ::google::protobuf::uint32 cached_has_bits = 0;
  2501. // Prevent compiler warnings about cached_has_bits being unused
  2502. (void) cached_has_bits;
  2503. removed_target_ids_.Clear();
  2504. document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2505. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  2506. delete read_time_;
  2507. }
  2508. read_time_ = NULL;
  2509. _internal_metadata_.Clear();
  2510. }
  2511. bool DocumentDelete::MergePartialFromCodedStream(
  2512. ::google::protobuf::io::CodedInputStream* input) {
  2513. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2514. ::google::protobuf::uint32 tag;
  2515. // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentDelete)
  2516. for (;;) {
  2517. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2518. tag = p.first;
  2519. if (!p.second) goto handle_unusual;
  2520. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2521. // string document = 1;
  2522. case 1: {
  2523. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2524. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2525. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2526. input, this->mutable_document()));
  2527. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2528. this->document().data(), static_cast<int>(this->document().length()),
  2529. ::google::protobuf::internal::WireFormatLite::PARSE,
  2530. "google.firestore.v1.DocumentDelete.document"));
  2531. } else {
  2532. goto handle_unusual;
  2533. }
  2534. break;
  2535. }
  2536. // .google.protobuf.Timestamp read_time = 4;
  2537. case 4: {
  2538. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2539. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  2540. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2541. input, mutable_read_time()));
  2542. } else {
  2543. goto handle_unusual;
  2544. }
  2545. break;
  2546. }
  2547. // repeated int32 removed_target_ids = 6;
  2548. case 6: {
  2549. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2550. static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
  2551. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  2552. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2553. input, this->mutable_removed_target_ids())));
  2554. } else if (
  2555. static_cast< ::google::protobuf::uint8>(tag) ==
  2556. static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
  2557. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  2558. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2559. 1, 50u, input, this->mutable_removed_target_ids())));
  2560. } else {
  2561. goto handle_unusual;
  2562. }
  2563. break;
  2564. }
  2565. default: {
  2566. handle_unusual:
  2567. if (tag == 0) {
  2568. goto success;
  2569. }
  2570. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2571. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2572. break;
  2573. }
  2574. }
  2575. }
  2576. success:
  2577. // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentDelete)
  2578. return true;
  2579. failure:
  2580. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentDelete)
  2581. return false;
  2582. #undef DO_
  2583. }
  2584. void DocumentDelete::SerializeWithCachedSizes(
  2585. ::google::protobuf::io::CodedOutputStream* output) const {
  2586. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentDelete)
  2587. ::google::protobuf::uint32 cached_has_bits = 0;
  2588. (void) cached_has_bits;
  2589. // string document = 1;
  2590. if (this->document().size() > 0) {
  2591. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2592. this->document().data(), static_cast<int>(this->document().length()),
  2593. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2594. "google.firestore.v1.DocumentDelete.document");
  2595. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2596. 1, this->document(), output);
  2597. }
  2598. // .google.protobuf.Timestamp read_time = 4;
  2599. if (this->has_read_time()) {
  2600. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2601. 4, *this->read_time_, output);
  2602. }
  2603. // repeated int32 removed_target_ids = 6;
  2604. if (this->removed_target_ids_size() > 0) {
  2605. ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  2606. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  2607. _removed_target_ids_cached_byte_size_));
  2608. }
  2609. for (int i = 0, n = this->removed_target_ids_size(); i < n; i++) {
  2610. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  2611. this->removed_target_ids(i), output);
  2612. }
  2613. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2614. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2615. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2616. }
  2617. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentDelete)
  2618. }
  2619. ::google::protobuf::uint8* DocumentDelete::InternalSerializeWithCachedSizesToArray(
  2620. bool deterministic, ::google::protobuf::uint8* target) const {
  2621. (void)deterministic; // Unused
  2622. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentDelete)
  2623. ::google::protobuf::uint32 cached_has_bits = 0;
  2624. (void) cached_has_bits;
  2625. // string document = 1;
  2626. if (this->document().size() > 0) {
  2627. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2628. this->document().data(), static_cast<int>(this->document().length()),
  2629. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2630. "google.firestore.v1.DocumentDelete.document");
  2631. target =
  2632. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2633. 1, this->document(), target);
  2634. }
  2635. // .google.protobuf.Timestamp read_time = 4;
  2636. if (this->has_read_time()) {
  2637. target = ::google::protobuf::internal::WireFormatLite::
  2638. InternalWriteMessageToArray(
  2639. 4, *this->read_time_, deterministic, target);
  2640. }
  2641. // repeated int32 removed_target_ids = 6;
  2642. if (this->removed_target_ids_size() > 0) {
  2643. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  2644. 6,
  2645. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  2646. target);
  2647. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  2648. static_cast< ::google::protobuf::int32>(
  2649. _removed_target_ids_cached_byte_size_), target);
  2650. target = ::google::protobuf::internal::WireFormatLite::
  2651. WriteInt32NoTagToArray(this->removed_target_ids_, target);
  2652. }
  2653. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2654. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2655. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2656. }
  2657. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentDelete)
  2658. return target;
  2659. }
  2660. size_t DocumentDelete::ByteSizeLong() const {
  2661. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentDelete)
  2662. size_t total_size = 0;
  2663. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2664. total_size +=
  2665. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  2666. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  2667. }
  2668. // repeated int32 removed_target_ids = 6;
  2669. {
  2670. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  2671. Int32Size(this->removed_target_ids_);
  2672. if (data_size > 0) {
  2673. total_size += 1 +
  2674. ::google::protobuf::internal::WireFormatLite::Int32Size(
  2675. static_cast< ::google::protobuf::int32>(data_size));
  2676. }
  2677. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  2678. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2679. _removed_target_ids_cached_byte_size_ = cached_size;
  2680. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2681. total_size += data_size;
  2682. }
  2683. // string document = 1;
  2684. if (this->document().size() > 0) {
  2685. total_size += 1 +
  2686. ::google::protobuf::internal::WireFormatLite::StringSize(
  2687. this->document());
  2688. }
  2689. // .google.protobuf.Timestamp read_time = 4;
  2690. if (this->has_read_time()) {
  2691. total_size += 1 +
  2692. ::google::protobuf::internal::WireFormatLite::MessageSize(
  2693. *this->read_time_);
  2694. }
  2695. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  2696. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2697. _cached_size_ = cached_size;
  2698. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2699. return total_size;
  2700. }
  2701. void DocumentDelete::MergeFrom(const ::google::protobuf::Message& from) {
  2702. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentDelete)
  2703. GOOGLE_DCHECK_NE(&from, this);
  2704. const DocumentDelete* source =
  2705. ::google::protobuf::internal::DynamicCastToGenerated<const DocumentDelete>(
  2706. &from);
  2707. if (source == NULL) {
  2708. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentDelete)
  2709. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  2710. } else {
  2711. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentDelete)
  2712. MergeFrom(*source);
  2713. }
  2714. }
  2715. void DocumentDelete::MergeFrom(const DocumentDelete& from) {
  2716. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentDelete)
  2717. GOOGLE_DCHECK_NE(&from, this);
  2718. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2719. ::google::protobuf::uint32 cached_has_bits = 0;
  2720. (void) cached_has_bits;
  2721. removed_target_ids_.MergeFrom(from.removed_target_ids_);
  2722. if (from.document().size() > 0) {
  2723. document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  2724. }
  2725. if (from.has_read_time()) {
  2726. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  2727. }
  2728. }
  2729. void DocumentDelete::CopyFrom(const ::google::protobuf::Message& from) {
  2730. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentDelete)
  2731. if (&from == this) return;
  2732. Clear();
  2733. MergeFrom(from);
  2734. }
  2735. void DocumentDelete::CopyFrom(const DocumentDelete& from) {
  2736. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentDelete)
  2737. if (&from == this) return;
  2738. Clear();
  2739. MergeFrom(from);
  2740. }
  2741. bool DocumentDelete::IsInitialized() const {
  2742. return true;
  2743. }
  2744. void DocumentDelete::Swap(DocumentDelete* other) {
  2745. if (other == this) return;
  2746. InternalSwap(other);
  2747. }
  2748. void DocumentDelete::InternalSwap(DocumentDelete* other) {
  2749. using std::swap;
  2750. removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  2751. document_.Swap(&other->document_);
  2752. swap(read_time_, other->read_time_);
  2753. _internal_metadata_.Swap(&other->_internal_metadata_);
  2754. swap(_cached_size_, other->_cached_size_);
  2755. }
  2756. ::google::protobuf::Metadata DocumentDelete::GetMetadata() const {
  2757. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  2758. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  2759. }
  2760. // ===================================================================
  2761. void DocumentRemove::InitAsDefaultInstance() {
  2762. ::google::firestore::v1::_DocumentRemove_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  2763. ::google::protobuf::Timestamp::internal_default_instance());
  2764. }
  2765. void DocumentRemove::clear_read_time() {
  2766. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  2767. delete read_time_;
  2768. }
  2769. read_time_ = NULL;
  2770. }
  2771. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  2772. const int DocumentRemove::kDocumentFieldNumber;
  2773. const int DocumentRemove::kRemovedTargetIdsFieldNumber;
  2774. const int DocumentRemove::kReadTimeFieldNumber;
  2775. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  2776. DocumentRemove::DocumentRemove()
  2777. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  2778. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  2779. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentRemove();
  2780. }
  2781. SharedCtor();
  2782. // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentRemove)
  2783. }
  2784. DocumentRemove::DocumentRemove(const DocumentRemove& from)
  2785. : ::google::protobuf::Message(),
  2786. _internal_metadata_(NULL),
  2787. removed_target_ids_(from.removed_target_ids_),
  2788. _cached_size_(0) {
  2789. _internal_metadata_.MergeFrom(from._internal_metadata_);
  2790. document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2791. if (from.document().size() > 0) {
  2792. document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  2793. }
  2794. if (from.has_read_time()) {
  2795. read_time_ = new ::google::protobuf::Timestamp(*from.read_time_);
  2796. } else {
  2797. read_time_ = NULL;
  2798. }
  2799. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentRemove)
  2800. }
  2801. void DocumentRemove::SharedCtor() {
  2802. document_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2803. read_time_ = NULL;
  2804. _cached_size_ = 0;
  2805. }
  2806. DocumentRemove::~DocumentRemove() {
  2807. // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentRemove)
  2808. SharedDtor();
  2809. }
  2810. void DocumentRemove::SharedDtor() {
  2811. document_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2812. if (this != internal_default_instance()) delete read_time_;
  2813. }
  2814. void DocumentRemove::SetCachedSize(int size) const {
  2815. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  2816. _cached_size_ = size;
  2817. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  2818. }
  2819. const ::google::protobuf::Descriptor* DocumentRemove::descriptor() {
  2820. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  2821. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  2822. }
  2823. const DocumentRemove& DocumentRemove::default_instance() {
  2824. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentRemove();
  2825. return *internal_default_instance();
  2826. }
  2827. DocumentRemove* DocumentRemove::New(::google::protobuf::Arena* arena) const {
  2828. DocumentRemove* n = new DocumentRemove;
  2829. if (arena != NULL) {
  2830. arena->Own(n);
  2831. }
  2832. return n;
  2833. }
  2834. void DocumentRemove::Clear() {
  2835. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentRemove)
  2836. ::google::protobuf::uint32 cached_has_bits = 0;
  2837. // Prevent compiler warnings about cached_has_bits being unused
  2838. (void) cached_has_bits;
  2839. removed_target_ids_.Clear();
  2840. document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  2841. if (GetArenaNoVirtual() == NULL && read_time_ != NULL) {
  2842. delete read_time_;
  2843. }
  2844. read_time_ = NULL;
  2845. _internal_metadata_.Clear();
  2846. }
  2847. bool DocumentRemove::MergePartialFromCodedStream(
  2848. ::google::protobuf::io::CodedInputStream* input) {
  2849. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  2850. ::google::protobuf::uint32 tag;
  2851. // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentRemove)
  2852. for (;;) {
  2853. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  2854. tag = p.first;
  2855. if (!p.second) goto handle_unusual;
  2856. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  2857. // string document = 1;
  2858. case 1: {
  2859. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2860. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  2861. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  2862. input, this->mutable_document()));
  2863. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2864. this->document().data(), static_cast<int>(this->document().length()),
  2865. ::google::protobuf::internal::WireFormatLite::PARSE,
  2866. "google.firestore.v1.DocumentRemove.document"));
  2867. } else {
  2868. goto handle_unusual;
  2869. }
  2870. break;
  2871. }
  2872. // repeated int32 removed_target_ids = 2;
  2873. case 2: {
  2874. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2875. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  2876. DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
  2877. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2878. input, this->mutable_removed_target_ids())));
  2879. } else if (
  2880. static_cast< ::google::protobuf::uint8>(tag) ==
  2881. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  2882. DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
  2883. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  2884. 1, 18u, input, this->mutable_removed_target_ids())));
  2885. } else {
  2886. goto handle_unusual;
  2887. }
  2888. break;
  2889. }
  2890. // .google.protobuf.Timestamp read_time = 4;
  2891. case 4: {
  2892. if (static_cast< ::google::protobuf::uint8>(tag) ==
  2893. static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
  2894. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  2895. input, mutable_read_time()));
  2896. } else {
  2897. goto handle_unusual;
  2898. }
  2899. break;
  2900. }
  2901. default: {
  2902. handle_unusual:
  2903. if (tag == 0) {
  2904. goto success;
  2905. }
  2906. DO_(::google::protobuf::internal::WireFormat::SkipField(
  2907. input, tag, _internal_metadata_.mutable_unknown_fields()));
  2908. break;
  2909. }
  2910. }
  2911. }
  2912. success:
  2913. // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentRemove)
  2914. return true;
  2915. failure:
  2916. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentRemove)
  2917. return false;
  2918. #undef DO_
  2919. }
  2920. void DocumentRemove::SerializeWithCachedSizes(
  2921. ::google::protobuf::io::CodedOutputStream* output) const {
  2922. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentRemove)
  2923. ::google::protobuf::uint32 cached_has_bits = 0;
  2924. (void) cached_has_bits;
  2925. // string document = 1;
  2926. if (this->document().size() > 0) {
  2927. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2928. this->document().data(), static_cast<int>(this->document().length()),
  2929. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2930. "google.firestore.v1.DocumentRemove.document");
  2931. ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  2932. 1, this->document(), output);
  2933. }
  2934. // repeated int32 removed_target_ids = 2;
  2935. if (this->removed_target_ids_size() > 0) {
  2936. ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
  2937. output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
  2938. _removed_target_ids_cached_byte_size_));
  2939. }
  2940. for (int i = 0, n = this->removed_target_ids_size(); i < n; i++) {
  2941. ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
  2942. this->removed_target_ids(i), output);
  2943. }
  2944. // .google.protobuf.Timestamp read_time = 4;
  2945. if (this->has_read_time()) {
  2946. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  2947. 4, *this->read_time_, output);
  2948. }
  2949. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2950. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  2951. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  2952. }
  2953. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentRemove)
  2954. }
  2955. ::google::protobuf::uint8* DocumentRemove::InternalSerializeWithCachedSizesToArray(
  2956. bool deterministic, ::google::protobuf::uint8* target) const {
  2957. (void)deterministic; // Unused
  2958. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentRemove)
  2959. ::google::protobuf::uint32 cached_has_bits = 0;
  2960. (void) cached_has_bits;
  2961. // string document = 1;
  2962. if (this->document().size() > 0) {
  2963. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  2964. this->document().data(), static_cast<int>(this->document().length()),
  2965. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  2966. "google.firestore.v1.DocumentRemove.document");
  2967. target =
  2968. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  2969. 1, this->document(), target);
  2970. }
  2971. // repeated int32 removed_target_ids = 2;
  2972. if (this->removed_target_ids_size() > 0) {
  2973. target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
  2974. 2,
  2975. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
  2976. target);
  2977. target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
  2978. static_cast< ::google::protobuf::int32>(
  2979. _removed_target_ids_cached_byte_size_), target);
  2980. target = ::google::protobuf::internal::WireFormatLite::
  2981. WriteInt32NoTagToArray(this->removed_target_ids_, target);
  2982. }
  2983. // .google.protobuf.Timestamp read_time = 4;
  2984. if (this->has_read_time()) {
  2985. target = ::google::protobuf::internal::WireFormatLite::
  2986. InternalWriteMessageToArray(
  2987. 4, *this->read_time_, deterministic, target);
  2988. }
  2989. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  2990. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  2991. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  2992. }
  2993. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentRemove)
  2994. return target;
  2995. }
  2996. size_t DocumentRemove::ByteSizeLong() const {
  2997. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentRemove)
  2998. size_t total_size = 0;
  2999. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3000. total_size +=
  3001. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3002. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3003. }
  3004. // repeated int32 removed_target_ids = 2;
  3005. {
  3006. size_t data_size = ::google::protobuf::internal::WireFormatLite::
  3007. Int32Size(this->removed_target_ids_);
  3008. if (data_size > 0) {
  3009. total_size += 1 +
  3010. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3011. static_cast< ::google::protobuf::int32>(data_size));
  3012. }
  3013. int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
  3014. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3015. _removed_target_ids_cached_byte_size_ = cached_size;
  3016. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3017. total_size += data_size;
  3018. }
  3019. // string document = 1;
  3020. if (this->document().size() > 0) {
  3021. total_size += 1 +
  3022. ::google::protobuf::internal::WireFormatLite::StringSize(
  3023. this->document());
  3024. }
  3025. // .google.protobuf.Timestamp read_time = 4;
  3026. if (this->has_read_time()) {
  3027. total_size += 1 +
  3028. ::google::protobuf::internal::WireFormatLite::MessageSize(
  3029. *this->read_time_);
  3030. }
  3031. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3032. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3033. _cached_size_ = cached_size;
  3034. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3035. return total_size;
  3036. }
  3037. void DocumentRemove::MergeFrom(const ::google::protobuf::Message& from) {
  3038. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentRemove)
  3039. GOOGLE_DCHECK_NE(&from, this);
  3040. const DocumentRemove* source =
  3041. ::google::protobuf::internal::DynamicCastToGenerated<const DocumentRemove>(
  3042. &from);
  3043. if (source == NULL) {
  3044. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentRemove)
  3045. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3046. } else {
  3047. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentRemove)
  3048. MergeFrom(*source);
  3049. }
  3050. }
  3051. void DocumentRemove::MergeFrom(const DocumentRemove& from) {
  3052. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentRemove)
  3053. GOOGLE_DCHECK_NE(&from, this);
  3054. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3055. ::google::protobuf::uint32 cached_has_bits = 0;
  3056. (void) cached_has_bits;
  3057. removed_target_ids_.MergeFrom(from.removed_target_ids_);
  3058. if (from.document().size() > 0) {
  3059. document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_);
  3060. }
  3061. if (from.has_read_time()) {
  3062. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  3063. }
  3064. }
  3065. void DocumentRemove::CopyFrom(const ::google::protobuf::Message& from) {
  3066. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentRemove)
  3067. if (&from == this) return;
  3068. Clear();
  3069. MergeFrom(from);
  3070. }
  3071. void DocumentRemove::CopyFrom(const DocumentRemove& from) {
  3072. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentRemove)
  3073. if (&from == this) return;
  3074. Clear();
  3075. MergeFrom(from);
  3076. }
  3077. bool DocumentRemove::IsInitialized() const {
  3078. return true;
  3079. }
  3080. void DocumentRemove::Swap(DocumentRemove* other) {
  3081. if (other == this) return;
  3082. InternalSwap(other);
  3083. }
  3084. void DocumentRemove::InternalSwap(DocumentRemove* other) {
  3085. using std::swap;
  3086. removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  3087. document_.Swap(&other->document_);
  3088. swap(read_time_, other->read_time_);
  3089. _internal_metadata_.Swap(&other->_internal_metadata_);
  3090. swap(_cached_size_, other->_cached_size_);
  3091. }
  3092. ::google::protobuf::Metadata DocumentRemove::GetMetadata() const {
  3093. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  3094. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  3095. }
  3096. // ===================================================================
  3097. void ExistenceFilter::InitAsDefaultInstance() {
  3098. }
  3099. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  3100. const int ExistenceFilter::kTargetIdFieldNumber;
  3101. const int ExistenceFilter::kCountFieldNumber;
  3102. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  3103. ExistenceFilter::ExistenceFilter()
  3104. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  3105. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  3106. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsExistenceFilter();
  3107. }
  3108. SharedCtor();
  3109. // @@protoc_insertion_point(constructor:google.firestore.v1.ExistenceFilter)
  3110. }
  3111. ExistenceFilter::ExistenceFilter(const ExistenceFilter& from)
  3112. : ::google::protobuf::Message(),
  3113. _internal_metadata_(NULL),
  3114. _cached_size_(0) {
  3115. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3116. ::memcpy(&target_id_, &from.target_id_,
  3117. static_cast<size_t>(reinterpret_cast<char*>(&count_) -
  3118. reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  3119. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ExistenceFilter)
  3120. }
  3121. void ExistenceFilter::SharedCtor() {
  3122. ::memset(&target_id_, 0, static_cast<size_t>(
  3123. reinterpret_cast<char*>(&count_) -
  3124. reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  3125. _cached_size_ = 0;
  3126. }
  3127. ExistenceFilter::~ExistenceFilter() {
  3128. // @@protoc_insertion_point(destructor:google.firestore.v1.ExistenceFilter)
  3129. SharedDtor();
  3130. }
  3131. void ExistenceFilter::SharedDtor() {
  3132. }
  3133. void ExistenceFilter::SetCachedSize(int size) const {
  3134. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3135. _cached_size_ = size;
  3136. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3137. }
  3138. const ::google::protobuf::Descriptor* ExistenceFilter::descriptor() {
  3139. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  3140. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  3141. }
  3142. const ExistenceFilter& ExistenceFilter::default_instance() {
  3143. ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsExistenceFilter();
  3144. return *internal_default_instance();
  3145. }
  3146. ExistenceFilter* ExistenceFilter::New(::google::protobuf::Arena* arena) const {
  3147. ExistenceFilter* n = new ExistenceFilter;
  3148. if (arena != NULL) {
  3149. arena->Own(n);
  3150. }
  3151. return n;
  3152. }
  3153. void ExistenceFilter::Clear() {
  3154. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.ExistenceFilter)
  3155. ::google::protobuf::uint32 cached_has_bits = 0;
  3156. // Prevent compiler warnings about cached_has_bits being unused
  3157. (void) cached_has_bits;
  3158. ::memset(&target_id_, 0, static_cast<size_t>(
  3159. reinterpret_cast<char*>(&count_) -
  3160. reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  3161. _internal_metadata_.Clear();
  3162. }
  3163. bool ExistenceFilter::MergePartialFromCodedStream(
  3164. ::google::protobuf::io::CodedInputStream* input) {
  3165. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  3166. ::google::protobuf::uint32 tag;
  3167. // @@protoc_insertion_point(parse_start:google.firestore.v1.ExistenceFilter)
  3168. for (;;) {
  3169. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  3170. tag = p.first;
  3171. if (!p.second) goto handle_unusual;
  3172. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  3173. // int32 target_id = 1;
  3174. case 1: {
  3175. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3176. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  3177. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3178. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  3179. input, &target_id_)));
  3180. } else {
  3181. goto handle_unusual;
  3182. }
  3183. break;
  3184. }
  3185. // int32 count = 2;
  3186. case 2: {
  3187. if (static_cast< ::google::protobuf::uint8>(tag) ==
  3188. static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
  3189. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  3190. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  3191. input, &count_)));
  3192. } else {
  3193. goto handle_unusual;
  3194. }
  3195. break;
  3196. }
  3197. default: {
  3198. handle_unusual:
  3199. if (tag == 0) {
  3200. goto success;
  3201. }
  3202. DO_(::google::protobuf::internal::WireFormat::SkipField(
  3203. input, tag, _internal_metadata_.mutable_unknown_fields()));
  3204. break;
  3205. }
  3206. }
  3207. }
  3208. success:
  3209. // @@protoc_insertion_point(parse_success:google.firestore.v1.ExistenceFilter)
  3210. return true;
  3211. failure:
  3212. // @@protoc_insertion_point(parse_failure:google.firestore.v1.ExistenceFilter)
  3213. return false;
  3214. #undef DO_
  3215. }
  3216. void ExistenceFilter::SerializeWithCachedSizes(
  3217. ::google::protobuf::io::CodedOutputStream* output) const {
  3218. // @@protoc_insertion_point(serialize_start:google.firestore.v1.ExistenceFilter)
  3219. ::google::protobuf::uint32 cached_has_bits = 0;
  3220. (void) cached_has_bits;
  3221. // int32 target_id = 1;
  3222. if (this->target_id() != 0) {
  3223. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->target_id(), output);
  3224. }
  3225. // int32 count = 2;
  3226. if (this->count() != 0) {
  3227. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->count(), output);
  3228. }
  3229. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3230. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  3231. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  3232. }
  3233. // @@protoc_insertion_point(serialize_end:google.firestore.v1.ExistenceFilter)
  3234. }
  3235. ::google::protobuf::uint8* ExistenceFilter::InternalSerializeWithCachedSizesToArray(
  3236. bool deterministic, ::google::protobuf::uint8* target) const {
  3237. (void)deterministic; // Unused
  3238. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ExistenceFilter)
  3239. ::google::protobuf::uint32 cached_has_bits = 0;
  3240. (void) cached_has_bits;
  3241. // int32 target_id = 1;
  3242. if (this->target_id() != 0) {
  3243. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->target_id(), target);
  3244. }
  3245. // int32 count = 2;
  3246. if (this->count() != 0) {
  3247. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->count(), target);
  3248. }
  3249. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3250. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  3251. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  3252. }
  3253. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ExistenceFilter)
  3254. return target;
  3255. }
  3256. size_t ExistenceFilter::ByteSizeLong() const {
  3257. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ExistenceFilter)
  3258. size_t total_size = 0;
  3259. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  3260. total_size +=
  3261. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  3262. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  3263. }
  3264. // int32 target_id = 1;
  3265. if (this->target_id() != 0) {
  3266. total_size += 1 +
  3267. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3268. this->target_id());
  3269. }
  3270. // int32 count = 2;
  3271. if (this->count() != 0) {
  3272. total_size += 1 +
  3273. ::google::protobuf::internal::WireFormatLite::Int32Size(
  3274. this->count());
  3275. }
  3276. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  3277. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  3278. _cached_size_ = cached_size;
  3279. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  3280. return total_size;
  3281. }
  3282. void ExistenceFilter::MergeFrom(const ::google::protobuf::Message& from) {
  3283. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ExistenceFilter)
  3284. GOOGLE_DCHECK_NE(&from, this);
  3285. const ExistenceFilter* source =
  3286. ::google::protobuf::internal::DynamicCastToGenerated<const ExistenceFilter>(
  3287. &from);
  3288. if (source == NULL) {
  3289. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ExistenceFilter)
  3290. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  3291. } else {
  3292. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ExistenceFilter)
  3293. MergeFrom(*source);
  3294. }
  3295. }
  3296. void ExistenceFilter::MergeFrom(const ExistenceFilter& from) {
  3297. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ExistenceFilter)
  3298. GOOGLE_DCHECK_NE(&from, this);
  3299. _internal_metadata_.MergeFrom(from._internal_metadata_);
  3300. ::google::protobuf::uint32 cached_has_bits = 0;
  3301. (void) cached_has_bits;
  3302. if (from.target_id() != 0) {
  3303. set_target_id(from.target_id());
  3304. }
  3305. if (from.count() != 0) {
  3306. set_count(from.count());
  3307. }
  3308. }
  3309. void ExistenceFilter::CopyFrom(const ::google::protobuf::Message& from) {
  3310. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ExistenceFilter)
  3311. if (&from == this) return;
  3312. Clear();
  3313. MergeFrom(from);
  3314. }
  3315. void ExistenceFilter::CopyFrom(const ExistenceFilter& from) {
  3316. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ExistenceFilter)
  3317. if (&from == this) return;
  3318. Clear();
  3319. MergeFrom(from);
  3320. }
  3321. bool ExistenceFilter::IsInitialized() const {
  3322. return true;
  3323. }
  3324. void ExistenceFilter::Swap(ExistenceFilter* other) {
  3325. if (other == this) return;
  3326. InternalSwap(other);
  3327. }
  3328. void ExistenceFilter::InternalSwap(ExistenceFilter* other) {
  3329. using std::swap;
  3330. swap(target_id_, other->target_id_);
  3331. swap(count_, other->count_);
  3332. _internal_metadata_.Swap(&other->_internal_metadata_);
  3333. swap(_cached_size_, other->_cached_size_);
  3334. }
  3335. ::google::protobuf::Metadata ExistenceFilter::GetMetadata() const {
  3336. protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce();
  3337. return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages];
  3338. }
  3339. // @@protoc_insertion_point(namespace_scope)
  3340. } // namespace v1
  3341. } // namespace firestore
  3342. } // namespace google
  3343. // @@protoc_insertion_point(global_scope)