common.pb.cc 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803
  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/common.proto
  18. #include "google/firestore/v1/common.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 DocumentMaskDefaultTypeInternal {
  38. public:
  39. ::google::protobuf::internal::ExplicitlyConstructed<DocumentMask>
  40. _instance;
  41. } _DocumentMask_default_instance_;
  42. class PreconditionDefaultTypeInternal {
  43. public:
  44. ::google::protobuf::internal::ExplicitlyConstructed<Precondition>
  45. _instance;
  46. bool exists_;
  47. const ::google::protobuf::Timestamp* update_time_;
  48. } _Precondition_default_instance_;
  49. class TransactionOptions_ReadWriteDefaultTypeInternal {
  50. public:
  51. ::google::protobuf::internal::ExplicitlyConstructed<TransactionOptions_ReadWrite>
  52. _instance;
  53. } _TransactionOptions_ReadWrite_default_instance_;
  54. class TransactionOptions_ReadOnlyDefaultTypeInternal {
  55. public:
  56. ::google::protobuf::internal::ExplicitlyConstructed<TransactionOptions_ReadOnly>
  57. _instance;
  58. const ::google::protobuf::Timestamp* read_time_;
  59. } _TransactionOptions_ReadOnly_default_instance_;
  60. class TransactionOptionsDefaultTypeInternal {
  61. public:
  62. ::google::protobuf::internal::ExplicitlyConstructed<TransactionOptions>
  63. _instance;
  64. const ::google::firestore::v1::TransactionOptions_ReadOnly* read_only_;
  65. const ::google::firestore::v1::TransactionOptions_ReadWrite* read_write_;
  66. } _TransactionOptions_default_instance_;
  67. } // namespace v1
  68. } // namespace firestore
  69. } // namespace google
  70. namespace protobuf_google_2ffirestore_2fv1_2fcommon_2eproto {
  71. void InitDefaultsDocumentMaskImpl() {
  72. GOOGLE_PROTOBUF_VERIFY_VERSION;
  73. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  74. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  75. #else
  76. ::google::protobuf::internal::InitProtobufDefaults();
  77. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  78. {
  79. void* ptr = &::google::firestore::v1::_DocumentMask_default_instance_;
  80. new (ptr) ::google::firestore::v1::DocumentMask();
  81. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  82. }
  83. ::google::firestore::v1::DocumentMask::InitAsDefaultInstance();
  84. }
  85. void InitDefaultsDocumentMask() {
  86. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  87. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDocumentMaskImpl);
  88. }
  89. void InitDefaultsPreconditionImpl() {
  90. GOOGLE_PROTOBUF_VERIFY_VERSION;
  91. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  92. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  93. #else
  94. ::google::protobuf::internal::InitProtobufDefaults();
  95. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  96. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  97. {
  98. void* ptr = &::google::firestore::v1::_Precondition_default_instance_;
  99. new (ptr) ::google::firestore::v1::Precondition();
  100. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  101. }
  102. ::google::firestore::v1::Precondition::InitAsDefaultInstance();
  103. }
  104. void InitDefaultsPrecondition() {
  105. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  106. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsPreconditionImpl);
  107. }
  108. void InitDefaultsTransactionOptions_ReadWriteImpl() {
  109. GOOGLE_PROTOBUF_VERIFY_VERSION;
  110. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  111. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  112. #else
  113. ::google::protobuf::internal::InitProtobufDefaults();
  114. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  115. {
  116. void* ptr = &::google::firestore::v1::_TransactionOptions_ReadWrite_default_instance_;
  117. new (ptr) ::google::firestore::v1::TransactionOptions_ReadWrite();
  118. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  119. }
  120. ::google::firestore::v1::TransactionOptions_ReadWrite::InitAsDefaultInstance();
  121. }
  122. void InitDefaultsTransactionOptions_ReadWrite() {
  123. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  124. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTransactionOptions_ReadWriteImpl);
  125. }
  126. void InitDefaultsTransactionOptions_ReadOnlyImpl() {
  127. GOOGLE_PROTOBUF_VERIFY_VERSION;
  128. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  129. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  130. #else
  131. ::google::protobuf::internal::InitProtobufDefaults();
  132. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  133. protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
  134. {
  135. void* ptr = &::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_;
  136. new (ptr) ::google::firestore::v1::TransactionOptions_ReadOnly();
  137. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  138. }
  139. ::google::firestore::v1::TransactionOptions_ReadOnly::InitAsDefaultInstance();
  140. }
  141. void InitDefaultsTransactionOptions_ReadOnly() {
  142. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  143. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTransactionOptions_ReadOnlyImpl);
  144. }
  145. void InitDefaultsTransactionOptionsImpl() {
  146. GOOGLE_PROTOBUF_VERIFY_VERSION;
  147. #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  148. ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
  149. #else
  150. ::google::protobuf::internal::InitProtobufDefaults();
  151. #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
  152. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly();
  153. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite();
  154. {
  155. void* ptr = &::google::firestore::v1::_TransactionOptions_default_instance_;
  156. new (ptr) ::google::firestore::v1::TransactionOptions();
  157. ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  158. }
  159. ::google::firestore::v1::TransactionOptions::InitAsDefaultInstance();
  160. }
  161. void InitDefaultsTransactionOptions() {
  162. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  163. ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTransactionOptionsImpl);
  164. }
  165. ::google::protobuf::Metadata file_level_metadata[5];
  166. const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  167. ~0u, // no _has_bits_
  168. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentMask, _internal_metadata_),
  169. ~0u, // no _extensions_
  170. ~0u, // no _oneof_case_
  171. ~0u, // no _weak_field_map_
  172. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentMask, field_paths_),
  173. ~0u, // no _has_bits_
  174. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Precondition, _internal_metadata_),
  175. ~0u, // no _extensions_
  176. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Precondition, _oneof_case_[0]),
  177. ~0u, // no _weak_field_map_
  178. offsetof(::google::firestore::v1::PreconditionDefaultTypeInternal, exists_),
  179. offsetof(::google::firestore::v1::PreconditionDefaultTypeInternal, update_time_),
  180. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Precondition, condition_type_),
  181. ~0u, // no _has_bits_
  182. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadWrite, _internal_metadata_),
  183. ~0u, // no _extensions_
  184. ~0u, // no _oneof_case_
  185. ~0u, // no _weak_field_map_
  186. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadWrite, retry_transaction_),
  187. ~0u, // no _has_bits_
  188. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _internal_metadata_),
  189. ~0u, // no _extensions_
  190. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _oneof_case_[0]),
  191. ~0u, // no _weak_field_map_
  192. offsetof(::google::firestore::v1::TransactionOptions_ReadOnlyDefaultTypeInternal, read_time_),
  193. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, consistency_selector_),
  194. ~0u, // no _has_bits_
  195. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _internal_metadata_),
  196. ~0u, // no _extensions_
  197. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _oneof_case_[0]),
  198. ~0u, // no _weak_field_map_
  199. offsetof(::google::firestore::v1::TransactionOptionsDefaultTypeInternal, read_only_),
  200. offsetof(::google::firestore::v1::TransactionOptionsDefaultTypeInternal, read_write_),
  201. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, mode_),
  202. };
  203. static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  204. { 0, -1, sizeof(::google::firestore::v1::DocumentMask)},
  205. { 6, -1, sizeof(::google::firestore::v1::Precondition)},
  206. { 14, -1, sizeof(::google::firestore::v1::TransactionOptions_ReadWrite)},
  207. { 20, -1, sizeof(::google::firestore::v1::TransactionOptions_ReadOnly)},
  208. { 27, -1, sizeof(::google::firestore::v1::TransactionOptions)},
  209. };
  210. static ::google::protobuf::Message const * const file_default_instances[] = {
  211. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_DocumentMask_default_instance_),
  212. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_Precondition_default_instance_),
  213. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_TransactionOptions_ReadWrite_default_instance_),
  214. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_),
  215. reinterpret_cast<const ::google::protobuf::Message*>(&::google::firestore::v1::_TransactionOptions_default_instance_),
  216. };
  217. void protobuf_AssignDescriptors() {
  218. AddDescriptors();
  219. ::google::protobuf::MessageFactory* factory = NULL;
  220. AssignDescriptors(
  221. "google/firestore/v1/common.proto", schemas, file_default_instances, TableStruct::offsets, factory,
  222. file_level_metadata, NULL, NULL);
  223. }
  224. void protobuf_AssignDescriptorsOnce() {
  225. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  226. ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
  227. }
  228. void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
  229. void protobuf_RegisterTypes(const ::std::string&) {
  230. protobuf_AssignDescriptorsOnce();
  231. ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
  232. }
  233. void AddDescriptorsImpl() {
  234. InitDefaults();
  235. static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  236. "\n google/firestore/v1/common.proto\022\023goog"
  237. "le.firestore.v1\032\034google/api/annotations."
  238. "proto\032\037google/protobuf/timestamp.proto\"#"
  239. "\n\014DocumentMask\022\023\n\013field_paths\030\001 \003(\t\"e\n\014P"
  240. "recondition\022\020\n\006exists\030\001 \001(\010H\000\0221\n\013update_"
  241. "time\030\002 \001(\0132\032.google.protobuf.TimestampH\000"
  242. "B\020\n\016condition_type\"\251\002\n\022TransactionOption"
  243. "s\022E\n\tread_only\030\002 \001(\01320.google.firestore."
  244. "v1.TransactionOptions.ReadOnlyH\000\022G\n\nread"
  245. "_write\030\003 \001(\01321.google.firestore.v1.Trans"
  246. "actionOptions.ReadWriteH\000\032&\n\tReadWrite\022\031"
  247. "\n\021retry_transaction\030\001 \001(\014\032S\n\010ReadOnly\022/\n"
  248. "\tread_time\030\002 \001(\0132\032.google.protobuf.Times"
  249. "tampH\000B\026\n\024consistency_selectorB\006\n\004modeB\257"
  250. "\001\n\027com.google.firestore.v1B\013CommonProtoP"
  251. "\001Z<google.golang.org/genproto/googleapis"
  252. "/firestore/v1;firestore\242\002\004GCFS\252\002\036Google."
  253. "Cloud.Firestore.V1Beta1\312\002\036Google\\Cloud\\F"
  254. "irestore\\V1beta1b\006proto3"
  255. };
  256. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  257. descriptor, 744);
  258. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  259. "google/firestore/v1/common.proto", &protobuf_RegisterTypes);
  260. ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors();
  261. ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors();
  262. }
  263. void AddDescriptors() {
  264. static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  265. ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
  266. }
  267. // Force AddDescriptors() to be called at dynamic initialization time.
  268. struct StaticDescriptorInitializer {
  269. StaticDescriptorInitializer() {
  270. AddDescriptors();
  271. }
  272. } static_descriptor_initializer;
  273. } // namespace protobuf_google_2ffirestore_2fv1_2fcommon_2eproto
  274. namespace google {
  275. namespace firestore {
  276. namespace v1 {
  277. // ===================================================================
  278. void DocumentMask::InitAsDefaultInstance() {
  279. }
  280. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  281. const int DocumentMask::kFieldPathsFieldNumber;
  282. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  283. DocumentMask::DocumentMask()
  284. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  285. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  286. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  287. }
  288. SharedCtor();
  289. // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentMask)
  290. }
  291. DocumentMask::DocumentMask(const DocumentMask& from)
  292. : ::google::protobuf::Message(),
  293. _internal_metadata_(NULL),
  294. field_paths_(from.field_paths_),
  295. _cached_size_(0) {
  296. _internal_metadata_.MergeFrom(from._internal_metadata_);
  297. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentMask)
  298. }
  299. void DocumentMask::SharedCtor() {
  300. _cached_size_ = 0;
  301. }
  302. DocumentMask::~DocumentMask() {
  303. // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentMask)
  304. SharedDtor();
  305. }
  306. void DocumentMask::SharedDtor() {
  307. }
  308. void DocumentMask::SetCachedSize(int size) const {
  309. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  310. _cached_size_ = size;
  311. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  312. }
  313. const ::google::protobuf::Descriptor* DocumentMask::descriptor() {
  314. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  315. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  316. }
  317. const DocumentMask& DocumentMask::default_instance() {
  318. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask();
  319. return *internal_default_instance();
  320. }
  321. DocumentMask* DocumentMask::New(::google::protobuf::Arena* arena) const {
  322. DocumentMask* n = new DocumentMask;
  323. if (arena != NULL) {
  324. arena->Own(n);
  325. }
  326. return n;
  327. }
  328. void DocumentMask::Clear() {
  329. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentMask)
  330. ::google::protobuf::uint32 cached_has_bits = 0;
  331. // Prevent compiler warnings about cached_has_bits being unused
  332. (void) cached_has_bits;
  333. field_paths_.Clear();
  334. _internal_metadata_.Clear();
  335. }
  336. bool DocumentMask::MergePartialFromCodedStream(
  337. ::google::protobuf::io::CodedInputStream* input) {
  338. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  339. ::google::protobuf::uint32 tag;
  340. // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentMask)
  341. for (;;) {
  342. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  343. tag = p.first;
  344. if (!p.second) goto handle_unusual;
  345. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  346. // repeated string field_paths = 1;
  347. case 1: {
  348. if (static_cast< ::google::protobuf::uint8>(tag) ==
  349. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  350. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  351. input, this->add_field_paths()));
  352. DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  353. this->field_paths(this->field_paths_size() - 1).data(),
  354. static_cast<int>(this->field_paths(this->field_paths_size() - 1).length()),
  355. ::google::protobuf::internal::WireFormatLite::PARSE,
  356. "google.firestore.v1.DocumentMask.field_paths"));
  357. } else {
  358. goto handle_unusual;
  359. }
  360. break;
  361. }
  362. default: {
  363. handle_unusual:
  364. if (tag == 0) {
  365. goto success;
  366. }
  367. DO_(::google::protobuf::internal::WireFormat::SkipField(
  368. input, tag, _internal_metadata_.mutable_unknown_fields()));
  369. break;
  370. }
  371. }
  372. }
  373. success:
  374. // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentMask)
  375. return true;
  376. failure:
  377. // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentMask)
  378. return false;
  379. #undef DO_
  380. }
  381. void DocumentMask::SerializeWithCachedSizes(
  382. ::google::protobuf::io::CodedOutputStream* output) const {
  383. // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentMask)
  384. ::google::protobuf::uint32 cached_has_bits = 0;
  385. (void) cached_has_bits;
  386. // repeated string field_paths = 1;
  387. for (int i = 0, n = this->field_paths_size(); i < n; i++) {
  388. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  389. this->field_paths(i).data(), static_cast<int>(this->field_paths(i).length()),
  390. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  391. "google.firestore.v1.DocumentMask.field_paths");
  392. ::google::protobuf::internal::WireFormatLite::WriteString(
  393. 1, this->field_paths(i), output);
  394. }
  395. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  396. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  397. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  398. }
  399. // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentMask)
  400. }
  401. ::google::protobuf::uint8* DocumentMask::InternalSerializeWithCachedSizesToArray(
  402. bool deterministic, ::google::protobuf::uint8* target) const {
  403. (void)deterministic; // Unused
  404. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentMask)
  405. ::google::protobuf::uint32 cached_has_bits = 0;
  406. (void) cached_has_bits;
  407. // repeated string field_paths = 1;
  408. for (int i = 0, n = this->field_paths_size(); i < n; i++) {
  409. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  410. this->field_paths(i).data(), static_cast<int>(this->field_paths(i).length()),
  411. ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  412. "google.firestore.v1.DocumentMask.field_paths");
  413. target = ::google::protobuf::internal::WireFormatLite::
  414. WriteStringToArray(1, this->field_paths(i), target);
  415. }
  416. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  417. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  418. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  419. }
  420. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentMask)
  421. return target;
  422. }
  423. size_t DocumentMask::ByteSizeLong() const {
  424. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentMask)
  425. size_t total_size = 0;
  426. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  427. total_size +=
  428. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  429. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  430. }
  431. // repeated string field_paths = 1;
  432. total_size += 1 *
  433. ::google::protobuf::internal::FromIntSize(this->field_paths_size());
  434. for (int i = 0, n = this->field_paths_size(); i < n; i++) {
  435. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  436. this->field_paths(i));
  437. }
  438. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  439. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  440. _cached_size_ = cached_size;
  441. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  442. return total_size;
  443. }
  444. void DocumentMask::MergeFrom(const ::google::protobuf::Message& from) {
  445. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentMask)
  446. GOOGLE_DCHECK_NE(&from, this);
  447. const DocumentMask* source =
  448. ::google::protobuf::internal::DynamicCastToGenerated<const DocumentMask>(
  449. &from);
  450. if (source == NULL) {
  451. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentMask)
  452. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  453. } else {
  454. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentMask)
  455. MergeFrom(*source);
  456. }
  457. }
  458. void DocumentMask::MergeFrom(const DocumentMask& from) {
  459. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentMask)
  460. GOOGLE_DCHECK_NE(&from, this);
  461. _internal_metadata_.MergeFrom(from._internal_metadata_);
  462. ::google::protobuf::uint32 cached_has_bits = 0;
  463. (void) cached_has_bits;
  464. field_paths_.MergeFrom(from.field_paths_);
  465. }
  466. void DocumentMask::CopyFrom(const ::google::protobuf::Message& from) {
  467. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentMask)
  468. if (&from == this) return;
  469. Clear();
  470. MergeFrom(from);
  471. }
  472. void DocumentMask::CopyFrom(const DocumentMask& from) {
  473. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentMask)
  474. if (&from == this) return;
  475. Clear();
  476. MergeFrom(from);
  477. }
  478. bool DocumentMask::IsInitialized() const {
  479. return true;
  480. }
  481. void DocumentMask::Swap(DocumentMask* other) {
  482. if (other == this) return;
  483. InternalSwap(other);
  484. }
  485. void DocumentMask::InternalSwap(DocumentMask* other) {
  486. using std::swap;
  487. field_paths_.InternalSwap(&other->field_paths_);
  488. _internal_metadata_.Swap(&other->_internal_metadata_);
  489. swap(_cached_size_, other->_cached_size_);
  490. }
  491. ::google::protobuf::Metadata DocumentMask::GetMetadata() const {
  492. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  493. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages];
  494. }
  495. // ===================================================================
  496. void Precondition::InitAsDefaultInstance() {
  497. ::google::firestore::v1::_Precondition_default_instance_.exists_ = false;
  498. ::google::firestore::v1::_Precondition_default_instance_.update_time_ = const_cast< ::google::protobuf::Timestamp*>(
  499. ::google::protobuf::Timestamp::internal_default_instance());
  500. }
  501. void Precondition::set_allocated_update_time(::google::protobuf::Timestamp* update_time) {
  502. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  503. clear_condition_type();
  504. if (update_time) {
  505. ::google::protobuf::Arena* submessage_arena =
  506. reinterpret_cast< ::google::protobuf::MessageLite*>(update_time)->GetArena();
  507. if (message_arena != submessage_arena) {
  508. update_time = ::google::protobuf::internal::GetOwnedMessage(
  509. message_arena, update_time, submessage_arena);
  510. }
  511. set_has_update_time();
  512. condition_type_.update_time_ = update_time;
  513. }
  514. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Precondition.update_time)
  515. }
  516. void Precondition::clear_update_time() {
  517. if (has_update_time()) {
  518. delete condition_type_.update_time_;
  519. clear_has_condition_type();
  520. }
  521. }
  522. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  523. const int Precondition::kExistsFieldNumber;
  524. const int Precondition::kUpdateTimeFieldNumber;
  525. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  526. Precondition::Precondition()
  527. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  528. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  529. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition();
  530. }
  531. SharedCtor();
  532. // @@protoc_insertion_point(constructor:google.firestore.v1.Precondition)
  533. }
  534. Precondition::Precondition(const Precondition& from)
  535. : ::google::protobuf::Message(),
  536. _internal_metadata_(NULL),
  537. _cached_size_(0) {
  538. _internal_metadata_.MergeFrom(from._internal_metadata_);
  539. clear_has_condition_type();
  540. switch (from.condition_type_case()) {
  541. case kExists: {
  542. set_exists(from.exists());
  543. break;
  544. }
  545. case kUpdateTime: {
  546. mutable_update_time()->::google::protobuf::Timestamp::MergeFrom(from.update_time());
  547. break;
  548. }
  549. case CONDITION_TYPE_NOT_SET: {
  550. break;
  551. }
  552. }
  553. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Precondition)
  554. }
  555. void Precondition::SharedCtor() {
  556. clear_has_condition_type();
  557. _cached_size_ = 0;
  558. }
  559. Precondition::~Precondition() {
  560. // @@protoc_insertion_point(destructor:google.firestore.v1.Precondition)
  561. SharedDtor();
  562. }
  563. void Precondition::SharedDtor() {
  564. if (has_condition_type()) {
  565. clear_condition_type();
  566. }
  567. }
  568. void Precondition::SetCachedSize(int size) const {
  569. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  570. _cached_size_ = size;
  571. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  572. }
  573. const ::google::protobuf::Descriptor* Precondition::descriptor() {
  574. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  575. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  576. }
  577. const Precondition& Precondition::default_instance() {
  578. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition();
  579. return *internal_default_instance();
  580. }
  581. Precondition* Precondition::New(::google::protobuf::Arena* arena) const {
  582. Precondition* n = new Precondition;
  583. if (arena != NULL) {
  584. arena->Own(n);
  585. }
  586. return n;
  587. }
  588. void Precondition::clear_condition_type() {
  589. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Precondition)
  590. switch (condition_type_case()) {
  591. case kExists: {
  592. // No need to clear
  593. break;
  594. }
  595. case kUpdateTime: {
  596. delete condition_type_.update_time_;
  597. break;
  598. }
  599. case CONDITION_TYPE_NOT_SET: {
  600. break;
  601. }
  602. }
  603. _oneof_case_[0] = CONDITION_TYPE_NOT_SET;
  604. }
  605. void Precondition::Clear() {
  606. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Precondition)
  607. ::google::protobuf::uint32 cached_has_bits = 0;
  608. // Prevent compiler warnings about cached_has_bits being unused
  609. (void) cached_has_bits;
  610. clear_condition_type();
  611. _internal_metadata_.Clear();
  612. }
  613. bool Precondition::MergePartialFromCodedStream(
  614. ::google::protobuf::io::CodedInputStream* input) {
  615. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  616. ::google::protobuf::uint32 tag;
  617. // @@protoc_insertion_point(parse_start:google.firestore.v1.Precondition)
  618. for (;;) {
  619. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  620. tag = p.first;
  621. if (!p.second) goto handle_unusual;
  622. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  623. // bool exists = 1;
  624. case 1: {
  625. if (static_cast< ::google::protobuf::uint8>(tag) ==
  626. static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  627. clear_condition_type();
  628. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  629. bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
  630. input, &condition_type_.exists_)));
  631. set_has_exists();
  632. } else {
  633. goto handle_unusual;
  634. }
  635. break;
  636. }
  637. // .google.protobuf.Timestamp update_time = 2;
  638. case 2: {
  639. if (static_cast< ::google::protobuf::uint8>(tag) ==
  640. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  641. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  642. input, mutable_update_time()));
  643. } else {
  644. goto handle_unusual;
  645. }
  646. break;
  647. }
  648. default: {
  649. handle_unusual:
  650. if (tag == 0) {
  651. goto success;
  652. }
  653. DO_(::google::protobuf::internal::WireFormat::SkipField(
  654. input, tag, _internal_metadata_.mutable_unknown_fields()));
  655. break;
  656. }
  657. }
  658. }
  659. success:
  660. // @@protoc_insertion_point(parse_success:google.firestore.v1.Precondition)
  661. return true;
  662. failure:
  663. // @@protoc_insertion_point(parse_failure:google.firestore.v1.Precondition)
  664. return false;
  665. #undef DO_
  666. }
  667. void Precondition::SerializeWithCachedSizes(
  668. ::google::protobuf::io::CodedOutputStream* output) const {
  669. // @@protoc_insertion_point(serialize_start:google.firestore.v1.Precondition)
  670. ::google::protobuf::uint32 cached_has_bits = 0;
  671. (void) cached_has_bits;
  672. // bool exists = 1;
  673. if (has_exists()) {
  674. ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->exists(), output);
  675. }
  676. // .google.protobuf.Timestamp update_time = 2;
  677. if (has_update_time()) {
  678. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  679. 2, *condition_type_.update_time_, output);
  680. }
  681. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  682. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  683. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  684. }
  685. // @@protoc_insertion_point(serialize_end:google.firestore.v1.Precondition)
  686. }
  687. ::google::protobuf::uint8* Precondition::InternalSerializeWithCachedSizesToArray(
  688. bool deterministic, ::google::protobuf::uint8* target) const {
  689. (void)deterministic; // Unused
  690. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Precondition)
  691. ::google::protobuf::uint32 cached_has_bits = 0;
  692. (void) cached_has_bits;
  693. // bool exists = 1;
  694. if (has_exists()) {
  695. target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->exists(), target);
  696. }
  697. // .google.protobuf.Timestamp update_time = 2;
  698. if (has_update_time()) {
  699. target = ::google::protobuf::internal::WireFormatLite::
  700. InternalWriteMessageToArray(
  701. 2, *condition_type_.update_time_, deterministic, target);
  702. }
  703. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  704. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  705. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  706. }
  707. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Precondition)
  708. return target;
  709. }
  710. size_t Precondition::ByteSizeLong() const {
  711. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Precondition)
  712. size_t total_size = 0;
  713. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  714. total_size +=
  715. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  716. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  717. }
  718. switch (condition_type_case()) {
  719. // bool exists = 1;
  720. case kExists: {
  721. total_size += 1 + 1;
  722. break;
  723. }
  724. // .google.protobuf.Timestamp update_time = 2;
  725. case kUpdateTime: {
  726. total_size += 1 +
  727. ::google::protobuf::internal::WireFormatLite::MessageSize(
  728. *condition_type_.update_time_);
  729. break;
  730. }
  731. case CONDITION_TYPE_NOT_SET: {
  732. break;
  733. }
  734. }
  735. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  736. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  737. _cached_size_ = cached_size;
  738. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  739. return total_size;
  740. }
  741. void Precondition::MergeFrom(const ::google::protobuf::Message& from) {
  742. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Precondition)
  743. GOOGLE_DCHECK_NE(&from, this);
  744. const Precondition* source =
  745. ::google::protobuf::internal::DynamicCastToGenerated<const Precondition>(
  746. &from);
  747. if (source == NULL) {
  748. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Precondition)
  749. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  750. } else {
  751. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Precondition)
  752. MergeFrom(*source);
  753. }
  754. }
  755. void Precondition::MergeFrom(const Precondition& from) {
  756. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Precondition)
  757. GOOGLE_DCHECK_NE(&from, this);
  758. _internal_metadata_.MergeFrom(from._internal_metadata_);
  759. ::google::protobuf::uint32 cached_has_bits = 0;
  760. (void) cached_has_bits;
  761. switch (from.condition_type_case()) {
  762. case kExists: {
  763. set_exists(from.exists());
  764. break;
  765. }
  766. case kUpdateTime: {
  767. mutable_update_time()->::google::protobuf::Timestamp::MergeFrom(from.update_time());
  768. break;
  769. }
  770. case CONDITION_TYPE_NOT_SET: {
  771. break;
  772. }
  773. }
  774. }
  775. void Precondition::CopyFrom(const ::google::protobuf::Message& from) {
  776. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Precondition)
  777. if (&from == this) return;
  778. Clear();
  779. MergeFrom(from);
  780. }
  781. void Precondition::CopyFrom(const Precondition& from) {
  782. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Precondition)
  783. if (&from == this) return;
  784. Clear();
  785. MergeFrom(from);
  786. }
  787. bool Precondition::IsInitialized() const {
  788. return true;
  789. }
  790. void Precondition::Swap(Precondition* other) {
  791. if (other == this) return;
  792. InternalSwap(other);
  793. }
  794. void Precondition::InternalSwap(Precondition* other) {
  795. using std::swap;
  796. swap(condition_type_, other->condition_type_);
  797. swap(_oneof_case_[0], other->_oneof_case_[0]);
  798. _internal_metadata_.Swap(&other->_internal_metadata_);
  799. swap(_cached_size_, other->_cached_size_);
  800. }
  801. ::google::protobuf::Metadata Precondition::GetMetadata() const {
  802. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  803. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages];
  804. }
  805. // ===================================================================
  806. void TransactionOptions_ReadWrite::InitAsDefaultInstance() {
  807. }
  808. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  809. const int TransactionOptions_ReadWrite::kRetryTransactionFieldNumber;
  810. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  811. TransactionOptions_ReadWrite::TransactionOptions_ReadWrite()
  812. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  813. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  814. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite();
  815. }
  816. SharedCtor();
  817. // @@protoc_insertion_point(constructor:google.firestore.v1.TransactionOptions.ReadWrite)
  818. }
  819. TransactionOptions_ReadWrite::TransactionOptions_ReadWrite(const TransactionOptions_ReadWrite& from)
  820. : ::google::protobuf::Message(),
  821. _internal_metadata_(NULL),
  822. _cached_size_(0) {
  823. _internal_metadata_.MergeFrom(from._internal_metadata_);
  824. retry_transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  825. if (from.retry_transaction().size() > 0) {
  826. retry_transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.retry_transaction_);
  827. }
  828. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions.ReadWrite)
  829. }
  830. void TransactionOptions_ReadWrite::SharedCtor() {
  831. retry_transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  832. _cached_size_ = 0;
  833. }
  834. TransactionOptions_ReadWrite::~TransactionOptions_ReadWrite() {
  835. // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions.ReadWrite)
  836. SharedDtor();
  837. }
  838. void TransactionOptions_ReadWrite::SharedDtor() {
  839. retry_transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  840. }
  841. void TransactionOptions_ReadWrite::SetCachedSize(int size) const {
  842. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  843. _cached_size_ = size;
  844. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  845. }
  846. const ::google::protobuf::Descriptor* TransactionOptions_ReadWrite::descriptor() {
  847. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  848. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  849. }
  850. const TransactionOptions_ReadWrite& TransactionOptions_ReadWrite::default_instance() {
  851. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite();
  852. return *internal_default_instance();
  853. }
  854. TransactionOptions_ReadWrite* TransactionOptions_ReadWrite::New(::google::protobuf::Arena* arena) const {
  855. TransactionOptions_ReadWrite* n = new TransactionOptions_ReadWrite;
  856. if (arena != NULL) {
  857. arena->Own(n);
  858. }
  859. return n;
  860. }
  861. void TransactionOptions_ReadWrite::Clear() {
  862. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions.ReadWrite)
  863. ::google::protobuf::uint32 cached_has_bits = 0;
  864. // Prevent compiler warnings about cached_has_bits being unused
  865. (void) cached_has_bits;
  866. retry_transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  867. _internal_metadata_.Clear();
  868. }
  869. bool TransactionOptions_ReadWrite::MergePartialFromCodedStream(
  870. ::google::protobuf::io::CodedInputStream* input) {
  871. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  872. ::google::protobuf::uint32 tag;
  873. // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions.ReadWrite)
  874. for (;;) {
  875. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  876. tag = p.first;
  877. if (!p.second) goto handle_unusual;
  878. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  879. // bytes retry_transaction = 1;
  880. case 1: {
  881. if (static_cast< ::google::protobuf::uint8>(tag) ==
  882. static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  883. DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  884. input, this->mutable_retry_transaction()));
  885. } else {
  886. goto handle_unusual;
  887. }
  888. break;
  889. }
  890. default: {
  891. handle_unusual:
  892. if (tag == 0) {
  893. goto success;
  894. }
  895. DO_(::google::protobuf::internal::WireFormat::SkipField(
  896. input, tag, _internal_metadata_.mutable_unknown_fields()));
  897. break;
  898. }
  899. }
  900. }
  901. success:
  902. // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions.ReadWrite)
  903. return true;
  904. failure:
  905. // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions.ReadWrite)
  906. return false;
  907. #undef DO_
  908. }
  909. void TransactionOptions_ReadWrite::SerializeWithCachedSizes(
  910. ::google::protobuf::io::CodedOutputStream* output) const {
  911. // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions.ReadWrite)
  912. ::google::protobuf::uint32 cached_has_bits = 0;
  913. (void) cached_has_bits;
  914. // bytes retry_transaction = 1;
  915. if (this->retry_transaction().size() > 0) {
  916. ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  917. 1, this->retry_transaction(), output);
  918. }
  919. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  920. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  921. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  922. }
  923. // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions.ReadWrite)
  924. }
  925. ::google::protobuf::uint8* TransactionOptions_ReadWrite::InternalSerializeWithCachedSizesToArray(
  926. bool deterministic, ::google::protobuf::uint8* target) const {
  927. (void)deterministic; // Unused
  928. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadWrite)
  929. ::google::protobuf::uint32 cached_has_bits = 0;
  930. (void) cached_has_bits;
  931. // bytes retry_transaction = 1;
  932. if (this->retry_transaction().size() > 0) {
  933. target =
  934. ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
  935. 1, this->retry_transaction(), target);
  936. }
  937. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  938. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  939. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  940. }
  941. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadWrite)
  942. return target;
  943. }
  944. size_t TransactionOptions_ReadWrite::ByteSizeLong() const {
  945. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadWrite)
  946. size_t total_size = 0;
  947. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  948. total_size +=
  949. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  950. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  951. }
  952. // bytes retry_transaction = 1;
  953. if (this->retry_transaction().size() > 0) {
  954. total_size += 1 +
  955. ::google::protobuf::internal::WireFormatLite::BytesSize(
  956. this->retry_transaction());
  957. }
  958. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  959. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  960. _cached_size_ = cached_size;
  961. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  962. return total_size;
  963. }
  964. void TransactionOptions_ReadWrite::MergeFrom(const ::google::protobuf::Message& from) {
  965. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TransactionOptions.ReadWrite)
  966. GOOGLE_DCHECK_NE(&from, this);
  967. const TransactionOptions_ReadWrite* source =
  968. ::google::protobuf::internal::DynamicCastToGenerated<const TransactionOptions_ReadWrite>(
  969. &from);
  970. if (source == NULL) {
  971. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TransactionOptions.ReadWrite)
  972. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  973. } else {
  974. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TransactionOptions.ReadWrite)
  975. MergeFrom(*source);
  976. }
  977. }
  978. void TransactionOptions_ReadWrite::MergeFrom(const TransactionOptions_ReadWrite& from) {
  979. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions.ReadWrite)
  980. GOOGLE_DCHECK_NE(&from, this);
  981. _internal_metadata_.MergeFrom(from._internal_metadata_);
  982. ::google::protobuf::uint32 cached_has_bits = 0;
  983. (void) cached_has_bits;
  984. if (from.retry_transaction().size() > 0) {
  985. retry_transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.retry_transaction_);
  986. }
  987. }
  988. void TransactionOptions_ReadWrite::CopyFrom(const ::google::protobuf::Message& from) {
  989. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TransactionOptions.ReadWrite)
  990. if (&from == this) return;
  991. Clear();
  992. MergeFrom(from);
  993. }
  994. void TransactionOptions_ReadWrite::CopyFrom(const TransactionOptions_ReadWrite& from) {
  995. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions.ReadWrite)
  996. if (&from == this) return;
  997. Clear();
  998. MergeFrom(from);
  999. }
  1000. bool TransactionOptions_ReadWrite::IsInitialized() const {
  1001. return true;
  1002. }
  1003. void TransactionOptions_ReadWrite::Swap(TransactionOptions_ReadWrite* other) {
  1004. if (other == this) return;
  1005. InternalSwap(other);
  1006. }
  1007. void TransactionOptions_ReadWrite::InternalSwap(TransactionOptions_ReadWrite* other) {
  1008. using std::swap;
  1009. retry_transaction_.Swap(&other->retry_transaction_);
  1010. _internal_metadata_.Swap(&other->_internal_metadata_);
  1011. swap(_cached_size_, other->_cached_size_);
  1012. }
  1013. ::google::protobuf::Metadata TransactionOptions_ReadWrite::GetMetadata() const {
  1014. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  1015. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages];
  1016. }
  1017. // ===================================================================
  1018. void TransactionOptions_ReadOnly::InitAsDefaultInstance() {
  1019. ::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>(
  1020. ::google::protobuf::Timestamp::internal_default_instance());
  1021. }
  1022. void TransactionOptions_ReadOnly::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  1023. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1024. clear_consistency_selector();
  1025. if (read_time) {
  1026. ::google::protobuf::Arena* submessage_arena =
  1027. reinterpret_cast< ::google::protobuf::MessageLite*>(read_time)->GetArena();
  1028. if (message_arena != submessage_arena) {
  1029. read_time = ::google::protobuf::internal::GetOwnedMessage(
  1030. message_arena, read_time, submessage_arena);
  1031. }
  1032. set_has_read_time();
  1033. consistency_selector_.read_time_ = read_time;
  1034. }
  1035. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
  1036. }
  1037. void TransactionOptions_ReadOnly::clear_read_time() {
  1038. if (has_read_time()) {
  1039. delete consistency_selector_.read_time_;
  1040. clear_has_consistency_selector();
  1041. }
  1042. }
  1043. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1044. const int TransactionOptions_ReadOnly::kReadTimeFieldNumber;
  1045. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1046. TransactionOptions_ReadOnly::TransactionOptions_ReadOnly()
  1047. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1048. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1049. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly();
  1050. }
  1051. SharedCtor();
  1052. // @@protoc_insertion_point(constructor:google.firestore.v1.TransactionOptions.ReadOnly)
  1053. }
  1054. TransactionOptions_ReadOnly::TransactionOptions_ReadOnly(const TransactionOptions_ReadOnly& from)
  1055. : ::google::protobuf::Message(),
  1056. _internal_metadata_(NULL),
  1057. _cached_size_(0) {
  1058. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1059. clear_has_consistency_selector();
  1060. switch (from.consistency_selector_case()) {
  1061. case kReadTime: {
  1062. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1063. break;
  1064. }
  1065. case CONSISTENCY_SELECTOR_NOT_SET: {
  1066. break;
  1067. }
  1068. }
  1069. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions.ReadOnly)
  1070. }
  1071. void TransactionOptions_ReadOnly::SharedCtor() {
  1072. clear_has_consistency_selector();
  1073. _cached_size_ = 0;
  1074. }
  1075. TransactionOptions_ReadOnly::~TransactionOptions_ReadOnly() {
  1076. // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions.ReadOnly)
  1077. SharedDtor();
  1078. }
  1079. void TransactionOptions_ReadOnly::SharedDtor() {
  1080. if (has_consistency_selector()) {
  1081. clear_consistency_selector();
  1082. }
  1083. }
  1084. void TransactionOptions_ReadOnly::SetCachedSize(int size) const {
  1085. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1086. _cached_size_ = size;
  1087. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1088. }
  1089. const ::google::protobuf::Descriptor* TransactionOptions_ReadOnly::descriptor() {
  1090. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  1091. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1092. }
  1093. const TransactionOptions_ReadOnly& TransactionOptions_ReadOnly::default_instance() {
  1094. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly();
  1095. return *internal_default_instance();
  1096. }
  1097. TransactionOptions_ReadOnly* TransactionOptions_ReadOnly::New(::google::protobuf::Arena* arena) const {
  1098. TransactionOptions_ReadOnly* n = new TransactionOptions_ReadOnly;
  1099. if (arena != NULL) {
  1100. arena->Own(n);
  1101. }
  1102. return n;
  1103. }
  1104. void TransactionOptions_ReadOnly::clear_consistency_selector() {
  1105. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1106. switch (consistency_selector_case()) {
  1107. case kReadTime: {
  1108. delete consistency_selector_.read_time_;
  1109. break;
  1110. }
  1111. case CONSISTENCY_SELECTOR_NOT_SET: {
  1112. break;
  1113. }
  1114. }
  1115. _oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  1116. }
  1117. void TransactionOptions_ReadOnly::Clear() {
  1118. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1119. ::google::protobuf::uint32 cached_has_bits = 0;
  1120. // Prevent compiler warnings about cached_has_bits being unused
  1121. (void) cached_has_bits;
  1122. clear_consistency_selector();
  1123. _internal_metadata_.Clear();
  1124. }
  1125. bool TransactionOptions_ReadOnly::MergePartialFromCodedStream(
  1126. ::google::protobuf::io::CodedInputStream* input) {
  1127. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1128. ::google::protobuf::uint32 tag;
  1129. // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1130. for (;;) {
  1131. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1132. tag = p.first;
  1133. if (!p.second) goto handle_unusual;
  1134. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1135. // .google.protobuf.Timestamp read_time = 2;
  1136. case 2: {
  1137. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1138. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1139. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1140. input, mutable_read_time()));
  1141. } else {
  1142. goto handle_unusual;
  1143. }
  1144. break;
  1145. }
  1146. default: {
  1147. handle_unusual:
  1148. if (tag == 0) {
  1149. goto success;
  1150. }
  1151. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1152. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1153. break;
  1154. }
  1155. }
  1156. }
  1157. success:
  1158. // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions.ReadOnly)
  1159. return true;
  1160. failure:
  1161. // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions.ReadOnly)
  1162. return false;
  1163. #undef DO_
  1164. }
  1165. void TransactionOptions_ReadOnly::SerializeWithCachedSizes(
  1166. ::google::protobuf::io::CodedOutputStream* output) const {
  1167. // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1168. ::google::protobuf::uint32 cached_has_bits = 0;
  1169. (void) cached_has_bits;
  1170. // .google.protobuf.Timestamp read_time = 2;
  1171. if (has_read_time()) {
  1172. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1173. 2, *consistency_selector_.read_time_, output);
  1174. }
  1175. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1176. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1177. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1178. }
  1179. // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions.ReadOnly)
  1180. }
  1181. ::google::protobuf::uint8* TransactionOptions_ReadOnly::InternalSerializeWithCachedSizesToArray(
  1182. bool deterministic, ::google::protobuf::uint8* target) const {
  1183. (void)deterministic; // Unused
  1184. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1185. ::google::protobuf::uint32 cached_has_bits = 0;
  1186. (void) cached_has_bits;
  1187. // .google.protobuf.Timestamp read_time = 2;
  1188. if (has_read_time()) {
  1189. target = ::google::protobuf::internal::WireFormatLite::
  1190. InternalWriteMessageToArray(
  1191. 2, *consistency_selector_.read_time_, deterministic, target);
  1192. }
  1193. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1194. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1195. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1196. }
  1197. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadOnly)
  1198. return target;
  1199. }
  1200. size_t TransactionOptions_ReadOnly::ByteSizeLong() const {
  1201. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1202. size_t total_size = 0;
  1203. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1204. total_size +=
  1205. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1206. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1207. }
  1208. switch (consistency_selector_case()) {
  1209. // .google.protobuf.Timestamp read_time = 2;
  1210. case kReadTime: {
  1211. total_size += 1 +
  1212. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1213. *consistency_selector_.read_time_);
  1214. break;
  1215. }
  1216. case CONSISTENCY_SELECTOR_NOT_SET: {
  1217. break;
  1218. }
  1219. }
  1220. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1221. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1222. _cached_size_ = cached_size;
  1223. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1224. return total_size;
  1225. }
  1226. void TransactionOptions_ReadOnly::MergeFrom(const ::google::protobuf::Message& from) {
  1227. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1228. GOOGLE_DCHECK_NE(&from, this);
  1229. const TransactionOptions_ReadOnly* source =
  1230. ::google::protobuf::internal::DynamicCastToGenerated<const TransactionOptions_ReadOnly>(
  1231. &from);
  1232. if (source == NULL) {
  1233. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TransactionOptions.ReadOnly)
  1234. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1235. } else {
  1236. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TransactionOptions.ReadOnly)
  1237. MergeFrom(*source);
  1238. }
  1239. }
  1240. void TransactionOptions_ReadOnly::MergeFrom(const TransactionOptions_ReadOnly& from) {
  1241. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1242. GOOGLE_DCHECK_NE(&from, this);
  1243. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1244. ::google::protobuf::uint32 cached_has_bits = 0;
  1245. (void) cached_has_bits;
  1246. switch (from.consistency_selector_case()) {
  1247. case kReadTime: {
  1248. mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time());
  1249. break;
  1250. }
  1251. case CONSISTENCY_SELECTOR_NOT_SET: {
  1252. break;
  1253. }
  1254. }
  1255. }
  1256. void TransactionOptions_ReadOnly::CopyFrom(const ::google::protobuf::Message& from) {
  1257. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1258. if (&from == this) return;
  1259. Clear();
  1260. MergeFrom(from);
  1261. }
  1262. void TransactionOptions_ReadOnly::CopyFrom(const TransactionOptions_ReadOnly& from) {
  1263. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1264. if (&from == this) return;
  1265. Clear();
  1266. MergeFrom(from);
  1267. }
  1268. bool TransactionOptions_ReadOnly::IsInitialized() const {
  1269. return true;
  1270. }
  1271. void TransactionOptions_ReadOnly::Swap(TransactionOptions_ReadOnly* other) {
  1272. if (other == this) return;
  1273. InternalSwap(other);
  1274. }
  1275. void TransactionOptions_ReadOnly::InternalSwap(TransactionOptions_ReadOnly* other) {
  1276. using std::swap;
  1277. swap(consistency_selector_, other->consistency_selector_);
  1278. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1279. _internal_metadata_.Swap(&other->_internal_metadata_);
  1280. swap(_cached_size_, other->_cached_size_);
  1281. }
  1282. ::google::protobuf::Metadata TransactionOptions_ReadOnly::GetMetadata() const {
  1283. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  1284. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages];
  1285. }
  1286. // ===================================================================
  1287. void TransactionOptions::InitAsDefaultInstance() {
  1288. ::google::firestore::v1::_TransactionOptions_default_instance_.read_only_ = const_cast< ::google::firestore::v1::TransactionOptions_ReadOnly*>(
  1289. ::google::firestore::v1::TransactionOptions_ReadOnly::internal_default_instance());
  1290. ::google::firestore::v1::_TransactionOptions_default_instance_.read_write_ = const_cast< ::google::firestore::v1::TransactionOptions_ReadWrite*>(
  1291. ::google::firestore::v1::TransactionOptions_ReadWrite::internal_default_instance());
  1292. }
  1293. void TransactionOptions::set_allocated_read_only(::google::firestore::v1::TransactionOptions_ReadOnly* read_only) {
  1294. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1295. clear_mode();
  1296. if (read_only) {
  1297. ::google::protobuf::Arena* submessage_arena = NULL;
  1298. if (message_arena != submessage_arena) {
  1299. read_only = ::google::protobuf::internal::GetOwnedMessage(
  1300. message_arena, read_only, submessage_arena);
  1301. }
  1302. set_has_read_only();
  1303. mode_.read_only_ = read_only;
  1304. }
  1305. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.read_only)
  1306. }
  1307. void TransactionOptions::set_allocated_read_write(::google::firestore::v1::TransactionOptions_ReadWrite* read_write) {
  1308. ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
  1309. clear_mode();
  1310. if (read_write) {
  1311. ::google::protobuf::Arena* submessage_arena = NULL;
  1312. if (message_arena != submessage_arena) {
  1313. read_write = ::google::protobuf::internal::GetOwnedMessage(
  1314. message_arena, read_write, submessage_arena);
  1315. }
  1316. set_has_read_write();
  1317. mode_.read_write_ = read_write;
  1318. }
  1319. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.read_write)
  1320. }
  1321. #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1322. const int TransactionOptions::kReadOnlyFieldNumber;
  1323. const int TransactionOptions::kReadWriteFieldNumber;
  1324. #endif // !defined(_MSC_VER) || _MSC_VER >= 1900
  1325. TransactionOptions::TransactionOptions()
  1326. : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  1327. if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
  1328. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  1329. }
  1330. SharedCtor();
  1331. // @@protoc_insertion_point(constructor:google.firestore.v1.TransactionOptions)
  1332. }
  1333. TransactionOptions::TransactionOptions(const TransactionOptions& from)
  1334. : ::google::protobuf::Message(),
  1335. _internal_metadata_(NULL),
  1336. _cached_size_(0) {
  1337. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1338. clear_has_mode();
  1339. switch (from.mode_case()) {
  1340. case kReadOnly: {
  1341. mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from.read_only());
  1342. break;
  1343. }
  1344. case kReadWrite: {
  1345. mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from.read_write());
  1346. break;
  1347. }
  1348. case MODE_NOT_SET: {
  1349. break;
  1350. }
  1351. }
  1352. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions)
  1353. }
  1354. void TransactionOptions::SharedCtor() {
  1355. clear_has_mode();
  1356. _cached_size_ = 0;
  1357. }
  1358. TransactionOptions::~TransactionOptions() {
  1359. // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions)
  1360. SharedDtor();
  1361. }
  1362. void TransactionOptions::SharedDtor() {
  1363. if (has_mode()) {
  1364. clear_mode();
  1365. }
  1366. }
  1367. void TransactionOptions::SetCachedSize(int size) const {
  1368. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1369. _cached_size_ = size;
  1370. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1371. }
  1372. const ::google::protobuf::Descriptor* TransactionOptions::descriptor() {
  1373. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  1374. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
  1375. }
  1376. const TransactionOptions& TransactionOptions::default_instance() {
  1377. ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions();
  1378. return *internal_default_instance();
  1379. }
  1380. TransactionOptions* TransactionOptions::New(::google::protobuf::Arena* arena) const {
  1381. TransactionOptions* n = new TransactionOptions;
  1382. if (arena != NULL) {
  1383. arena->Own(n);
  1384. }
  1385. return n;
  1386. }
  1387. void TransactionOptions::clear_mode() {
  1388. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.TransactionOptions)
  1389. switch (mode_case()) {
  1390. case kReadOnly: {
  1391. delete mode_.read_only_;
  1392. break;
  1393. }
  1394. case kReadWrite: {
  1395. delete mode_.read_write_;
  1396. break;
  1397. }
  1398. case MODE_NOT_SET: {
  1399. break;
  1400. }
  1401. }
  1402. _oneof_case_[0] = MODE_NOT_SET;
  1403. }
  1404. void TransactionOptions::Clear() {
  1405. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions)
  1406. ::google::protobuf::uint32 cached_has_bits = 0;
  1407. // Prevent compiler warnings about cached_has_bits being unused
  1408. (void) cached_has_bits;
  1409. clear_mode();
  1410. _internal_metadata_.Clear();
  1411. }
  1412. bool TransactionOptions::MergePartialFromCodedStream(
  1413. ::google::protobuf::io::CodedInputStream* input) {
  1414. #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1415. ::google::protobuf::uint32 tag;
  1416. // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions)
  1417. for (;;) {
  1418. ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1419. tag = p.first;
  1420. if (!p.second) goto handle_unusual;
  1421. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1422. // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
  1423. case 2: {
  1424. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1425. static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1426. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1427. input, mutable_read_only()));
  1428. } else {
  1429. goto handle_unusual;
  1430. }
  1431. break;
  1432. }
  1433. // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
  1434. case 3: {
  1435. if (static_cast< ::google::protobuf::uint8>(tag) ==
  1436. static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1437. DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1438. input, mutable_read_write()));
  1439. } else {
  1440. goto handle_unusual;
  1441. }
  1442. break;
  1443. }
  1444. default: {
  1445. handle_unusual:
  1446. if (tag == 0) {
  1447. goto success;
  1448. }
  1449. DO_(::google::protobuf::internal::WireFormat::SkipField(
  1450. input, tag, _internal_metadata_.mutable_unknown_fields()));
  1451. break;
  1452. }
  1453. }
  1454. }
  1455. success:
  1456. // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions)
  1457. return true;
  1458. failure:
  1459. // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions)
  1460. return false;
  1461. #undef DO_
  1462. }
  1463. void TransactionOptions::SerializeWithCachedSizes(
  1464. ::google::protobuf::io::CodedOutputStream* output) const {
  1465. // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions)
  1466. ::google::protobuf::uint32 cached_has_bits = 0;
  1467. (void) cached_has_bits;
  1468. // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
  1469. if (has_read_only()) {
  1470. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1471. 2, *mode_.read_only_, output);
  1472. }
  1473. // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
  1474. if (has_read_write()) {
  1475. ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
  1476. 3, *mode_.read_write_, output);
  1477. }
  1478. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1479. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  1480. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
  1481. }
  1482. // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions)
  1483. }
  1484. ::google::protobuf::uint8* TransactionOptions::InternalSerializeWithCachedSizesToArray(
  1485. bool deterministic, ::google::protobuf::uint8* target) const {
  1486. (void)deterministic; // Unused
  1487. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions)
  1488. ::google::protobuf::uint32 cached_has_bits = 0;
  1489. (void) cached_has_bits;
  1490. // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
  1491. if (has_read_only()) {
  1492. target = ::google::protobuf::internal::WireFormatLite::
  1493. InternalWriteMessageToArray(
  1494. 2, *mode_.read_only_, deterministic, target);
  1495. }
  1496. // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
  1497. if (has_read_write()) {
  1498. target = ::google::protobuf::internal::WireFormatLite::
  1499. InternalWriteMessageToArray(
  1500. 3, *mode_.read_write_, deterministic, target);
  1501. }
  1502. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1503. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  1504. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
  1505. }
  1506. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions)
  1507. return target;
  1508. }
  1509. size_t TransactionOptions::ByteSizeLong() const {
  1510. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions)
  1511. size_t total_size = 0;
  1512. if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
  1513. total_size +=
  1514. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  1515. (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
  1516. }
  1517. switch (mode_case()) {
  1518. // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
  1519. case kReadOnly: {
  1520. total_size += 1 +
  1521. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1522. *mode_.read_only_);
  1523. break;
  1524. }
  1525. // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
  1526. case kReadWrite: {
  1527. total_size += 1 +
  1528. ::google::protobuf::internal::WireFormatLite::MessageSize(
  1529. *mode_.read_write_);
  1530. break;
  1531. }
  1532. case MODE_NOT_SET: {
  1533. break;
  1534. }
  1535. }
  1536. int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1537. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  1538. _cached_size_ = cached_size;
  1539. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  1540. return total_size;
  1541. }
  1542. void TransactionOptions::MergeFrom(const ::google::protobuf::Message& from) {
  1543. // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TransactionOptions)
  1544. GOOGLE_DCHECK_NE(&from, this);
  1545. const TransactionOptions* source =
  1546. ::google::protobuf::internal::DynamicCastToGenerated<const TransactionOptions>(
  1547. &from);
  1548. if (source == NULL) {
  1549. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TransactionOptions)
  1550. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  1551. } else {
  1552. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TransactionOptions)
  1553. MergeFrom(*source);
  1554. }
  1555. }
  1556. void TransactionOptions::MergeFrom(const TransactionOptions& from) {
  1557. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions)
  1558. GOOGLE_DCHECK_NE(&from, this);
  1559. _internal_metadata_.MergeFrom(from._internal_metadata_);
  1560. ::google::protobuf::uint32 cached_has_bits = 0;
  1561. (void) cached_has_bits;
  1562. switch (from.mode_case()) {
  1563. case kReadOnly: {
  1564. mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from.read_only());
  1565. break;
  1566. }
  1567. case kReadWrite: {
  1568. mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from.read_write());
  1569. break;
  1570. }
  1571. case MODE_NOT_SET: {
  1572. break;
  1573. }
  1574. }
  1575. }
  1576. void TransactionOptions::CopyFrom(const ::google::protobuf::Message& from) {
  1577. // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TransactionOptions)
  1578. if (&from == this) return;
  1579. Clear();
  1580. MergeFrom(from);
  1581. }
  1582. void TransactionOptions::CopyFrom(const TransactionOptions& from) {
  1583. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions)
  1584. if (&from == this) return;
  1585. Clear();
  1586. MergeFrom(from);
  1587. }
  1588. bool TransactionOptions::IsInitialized() const {
  1589. return true;
  1590. }
  1591. void TransactionOptions::Swap(TransactionOptions* other) {
  1592. if (other == this) return;
  1593. InternalSwap(other);
  1594. }
  1595. void TransactionOptions::InternalSwap(TransactionOptions* other) {
  1596. using std::swap;
  1597. swap(mode_, other->mode_);
  1598. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1599. _internal_metadata_.Swap(&other->_internal_metadata_);
  1600. swap(_cached_size_, other->_cached_size_);
  1601. }
  1602. ::google::protobuf::Metadata TransactionOptions::GetMetadata() const {
  1603. protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce();
  1604. return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages];
  1605. }
  1606. // @@protoc_insertion_point(namespace_scope)
  1607. } // namespace v1
  1608. } // namespace firestore
  1609. } // namespace google
  1610. // @@protoc_insertion_point(global_scope)