common.pb.cc 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487
  1. /*
  2. * Copyright 2024 Google LLC
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/firestore/v1/common.proto
  18. #include "google/firestore/v1/common.pb.h"
  19. #include <algorithm>
  20. #include "google/protobuf/io/coded_stream.h"
  21. #include "google/protobuf/extension_set.h"
  22. #include "google/protobuf/wire_format_lite.h"
  23. #include "google/protobuf/descriptor.h"
  24. #include "google/protobuf/generated_message_reflection.h"
  25. #include "google/protobuf/reflection_ops.h"
  26. #include "google/protobuf/wire_format.h"
  27. #include "google/protobuf/generated_message_tctable_impl.h"
  28. // @@protoc_insertion_point(includes)
  29. // Must be included last.
  30. #include "google/protobuf/port_def.inc"
  31. PROTOBUF_PRAGMA_INIT_SEG
  32. namespace _pb = ::google::protobuf;
  33. namespace _pbi = ::google::protobuf::internal;
  34. namespace _fl = ::google::protobuf::internal::field_layout;
  35. namespace google {
  36. namespace firestore {
  37. namespace v1 {
  38. inline constexpr TransactionOptions_ReadWrite::Impl_::Impl_(
  39. ::_pbi::ConstantInitialized) noexcept
  40. : retry_transaction_(
  41. &::google::protobuf::internal::fixed_address_empty_string,
  42. ::_pbi::ConstantInitialized()),
  43. _cached_size_{0} {}
  44. template <typename>
  45. PROTOBUF_CONSTEXPR TransactionOptions_ReadWrite::TransactionOptions_ReadWrite(::_pbi::ConstantInitialized)
  46. : _impl_(::_pbi::ConstantInitialized()) {}
  47. struct TransactionOptions_ReadWriteDefaultTypeInternal {
  48. PROTOBUF_CONSTEXPR TransactionOptions_ReadWriteDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  49. ~TransactionOptions_ReadWriteDefaultTypeInternal() {}
  50. union {
  51. TransactionOptions_ReadWrite _instance;
  52. };
  53. };
  54. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  55. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransactionOptions_ReadWriteDefaultTypeInternal _TransactionOptions_ReadWrite_default_instance_;
  56. inline constexpr DocumentMask::Impl_::Impl_(
  57. ::_pbi::ConstantInitialized) noexcept
  58. : field_paths_{},
  59. _cached_size_{0} {}
  60. template <typename>
  61. PROTOBUF_CONSTEXPR DocumentMask::DocumentMask(::_pbi::ConstantInitialized)
  62. : _impl_(::_pbi::ConstantInitialized()) {}
  63. struct DocumentMaskDefaultTypeInternal {
  64. PROTOBUF_CONSTEXPR DocumentMaskDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  65. ~DocumentMaskDefaultTypeInternal() {}
  66. union {
  67. DocumentMask _instance;
  68. };
  69. };
  70. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  71. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DocumentMaskDefaultTypeInternal _DocumentMask_default_instance_;
  72. inline constexpr TransactionOptions_ReadOnly::Impl_::Impl_(
  73. ::_pbi::ConstantInitialized) noexcept
  74. : consistency_selector_{},
  75. _cached_size_{0},
  76. _oneof_case_{} {}
  77. template <typename>
  78. PROTOBUF_CONSTEXPR TransactionOptions_ReadOnly::TransactionOptions_ReadOnly(::_pbi::ConstantInitialized)
  79. : _impl_(::_pbi::ConstantInitialized()) {}
  80. struct TransactionOptions_ReadOnlyDefaultTypeInternal {
  81. PROTOBUF_CONSTEXPR TransactionOptions_ReadOnlyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  82. ~TransactionOptions_ReadOnlyDefaultTypeInternal() {}
  83. union {
  84. TransactionOptions_ReadOnly _instance;
  85. };
  86. };
  87. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  88. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransactionOptions_ReadOnlyDefaultTypeInternal _TransactionOptions_ReadOnly_default_instance_;
  89. inline constexpr Precondition::Impl_::Impl_(
  90. ::_pbi::ConstantInitialized) noexcept
  91. : condition_type_{},
  92. _cached_size_{0},
  93. _oneof_case_{} {}
  94. template <typename>
  95. PROTOBUF_CONSTEXPR Precondition::Precondition(::_pbi::ConstantInitialized)
  96. : _impl_(::_pbi::ConstantInitialized()) {}
  97. struct PreconditionDefaultTypeInternal {
  98. PROTOBUF_CONSTEXPR PreconditionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  99. ~PreconditionDefaultTypeInternal() {}
  100. union {
  101. Precondition _instance;
  102. };
  103. };
  104. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  105. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PreconditionDefaultTypeInternal _Precondition_default_instance_;
  106. inline constexpr TransactionOptions::Impl_::Impl_(
  107. ::_pbi::ConstantInitialized) noexcept
  108. : mode_{},
  109. _cached_size_{0},
  110. _oneof_case_{} {}
  111. template <typename>
  112. PROTOBUF_CONSTEXPR TransactionOptions::TransactionOptions(::_pbi::ConstantInitialized)
  113. : _impl_(::_pbi::ConstantInitialized()) {}
  114. struct TransactionOptionsDefaultTypeInternal {
  115. PROTOBUF_CONSTEXPR TransactionOptionsDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  116. ~TransactionOptionsDefaultTypeInternal() {}
  117. union {
  118. TransactionOptions _instance;
  119. };
  120. };
  121. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  122. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransactionOptionsDefaultTypeInternal _TransactionOptions_default_instance_;
  123. } // namespace v1
  124. } // namespace firestore
  125. } // namespace google
  126. static ::_pb::Metadata file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto[5];
  127. static constexpr const ::_pb::EnumDescriptor**
  128. file_level_enum_descriptors_google_2ffirestore_2fv1_2fcommon_2eproto = nullptr;
  129. static constexpr const ::_pb::ServiceDescriptor**
  130. file_level_service_descriptors_google_2ffirestore_2fv1_2fcommon_2eproto = nullptr;
  131. const ::uint32_t TableStruct_google_2ffirestore_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  132. protodesc_cold) = {
  133. ~0u, // no _has_bits_
  134. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentMask, _internal_metadata_),
  135. ~0u, // no _extensions_
  136. ~0u, // no _oneof_case_
  137. ~0u, // no _weak_field_map_
  138. ~0u, // no _inlined_string_donated_
  139. ~0u, // no _split_
  140. ~0u, // no sizeof(Split)
  141. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentMask, _impl_.field_paths_),
  142. ~0u, // no _has_bits_
  143. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Precondition, _internal_metadata_),
  144. ~0u, // no _extensions_
  145. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Precondition, _impl_._oneof_case_[0]),
  146. ~0u, // no _weak_field_map_
  147. ~0u, // no _inlined_string_donated_
  148. ~0u, // no _split_
  149. ~0u, // no sizeof(Split)
  150. ::_pbi::kInvalidFieldOffsetTag,
  151. ::_pbi::kInvalidFieldOffsetTag,
  152. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Precondition, _impl_.condition_type_),
  153. ~0u, // no _has_bits_
  154. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadWrite, _internal_metadata_),
  155. ~0u, // no _extensions_
  156. ~0u, // no _oneof_case_
  157. ~0u, // no _weak_field_map_
  158. ~0u, // no _inlined_string_donated_
  159. ~0u, // no _split_
  160. ~0u, // no sizeof(Split)
  161. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadWrite, _impl_.retry_transaction_),
  162. ~0u, // no _has_bits_
  163. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _internal_metadata_),
  164. ~0u, // no _extensions_
  165. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _impl_._oneof_case_[0]),
  166. ~0u, // no _weak_field_map_
  167. ~0u, // no _inlined_string_donated_
  168. ~0u, // no _split_
  169. ~0u, // no sizeof(Split)
  170. ::_pbi::kInvalidFieldOffsetTag,
  171. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _impl_.consistency_selector_),
  172. ~0u, // no _has_bits_
  173. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _internal_metadata_),
  174. ~0u, // no _extensions_
  175. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _impl_._oneof_case_[0]),
  176. ~0u, // no _weak_field_map_
  177. ~0u, // no _inlined_string_donated_
  178. ~0u, // no _split_
  179. ~0u, // no sizeof(Split)
  180. ::_pbi::kInvalidFieldOffsetTag,
  181. ::_pbi::kInvalidFieldOffsetTag,
  182. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _impl_.mode_),
  183. };
  184. static const ::_pbi::MigrationSchema
  185. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  186. {0, -1, -1, sizeof(::google::firestore::v1::DocumentMask)},
  187. {9, -1, -1, sizeof(::google::firestore::v1::Precondition)},
  188. {20, -1, -1, sizeof(::google::firestore::v1::TransactionOptions_ReadWrite)},
  189. {29, -1, -1, sizeof(::google::firestore::v1::TransactionOptions_ReadOnly)},
  190. {39, -1, -1, sizeof(::google::firestore::v1::TransactionOptions)},
  191. };
  192. static const ::_pb::Message* const file_default_instances[] = {
  193. &::google::firestore::v1::_DocumentMask_default_instance_._instance,
  194. &::google::firestore::v1::_Precondition_default_instance_._instance,
  195. &::google::firestore::v1::_TransactionOptions_ReadWrite_default_instance_._instance,
  196. &::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_._instance,
  197. &::google::firestore::v1::_TransactionOptions_default_instance_._instance,
  198. };
  199. const char descriptor_table_protodef_google_2ffirestore_2fv1_2fcommon_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  200. "\n google/firestore/v1/common.proto\022\023goog"
  201. "le.firestore.v1\032\037google/protobuf/timesta"
  202. "mp.proto\"#\n\014DocumentMask\022\023\n\013field_paths\030"
  203. "\001 \003(\t\"e\n\014Precondition\022\020\n\006exists\030\001 \001(\010H\000\022"
  204. "1\n\013update_time\030\002 \001(\0132\032.google.protobuf.T"
  205. "imestampH\000B\020\n\016condition_type\"\251\002\n\022Transac"
  206. "tionOptions\022E\n\tread_only\030\002 \001(\01320.google."
  207. "firestore.v1.TransactionOptions.ReadOnly"
  208. "H\000\022G\n\nread_write\030\003 \001(\01321.google.firestor"
  209. "e.v1.TransactionOptions.ReadWriteH\000\032&\n\tR"
  210. "eadWrite\022\031\n\021retry_transaction\030\001 \001(\014\032S\n\010R"
  211. "eadOnly\022/\n\tread_time\030\002 \001(\0132\032.google.prot"
  212. "obuf.TimestampH\000B\026\n\024consistency_selector"
  213. "B\006\n\004modeB\257\001\n\027com.google.firestore.v1B\013Co"
  214. "mmonProtoP\001Z<google.golang.org/genproto/"
  215. "googleapis/firestore/v1;firestore\242\002\004GCFS"
  216. "\252\002\036Google.Cloud.Firestore.V1Beta1\312\002\036Goog"
  217. "le\\Cloud\\Firestore\\V1beta1b\006proto3"
  218. };
  219. static const ::_pbi::DescriptorTable* const descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_deps[1] =
  220. {
  221. &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
  222. };
  223. static ::absl::once_flag descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_once;
  224. const ::_pbi::DescriptorTable descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto = {
  225. false,
  226. false,
  227. 714,
  228. descriptor_table_protodef_google_2ffirestore_2fv1_2fcommon_2eproto,
  229. "google/firestore/v1/common.proto",
  230. &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_once,
  231. descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_deps,
  232. 1,
  233. 5,
  234. schemas,
  235. file_default_instances,
  236. TableStruct_google_2ffirestore_2fv1_2fcommon_2eproto::offsets,
  237. file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto,
  238. file_level_enum_descriptors_google_2ffirestore_2fv1_2fcommon_2eproto,
  239. file_level_service_descriptors_google_2ffirestore_2fv1_2fcommon_2eproto,
  240. };
  241. // This function exists to be marked as weak.
  242. // It can significantly speed up compilation by breaking up LLVM's SCC
  243. // in the .pb.cc translation units. Large translation units see a
  244. // reduction of more than 35% of walltime for optimized builds. Without
  245. // the weak attribute all the messages in the file, including all the
  246. // vtables and everything they use become part of the same SCC through
  247. // a cycle like:
  248. // GetMetadata -> descriptor table -> default instances ->
  249. // vtables -> GetMetadata
  250. // By adding a weak function here we break the connection from the
  251. // individual vtables back into the descriptor table.
  252. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_getter() {
  253. return &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto;
  254. }
  255. // Force running AddDescriptors() at dynamic initialization time.
  256. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  257. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2ffirestore_2fv1_2fcommon_2eproto(&descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto);
  258. namespace google {
  259. namespace firestore {
  260. namespace v1 {
  261. // ===================================================================
  262. class DocumentMask::_Internal {
  263. public:
  264. };
  265. DocumentMask::DocumentMask(::google::protobuf::Arena* arena)
  266. : ::google::protobuf::Message(arena) {
  267. SharedCtor(arena);
  268. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.DocumentMask)
  269. }
  270. inline PROTOBUF_NDEBUG_INLINE DocumentMask::Impl_::Impl_(
  271. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  272. const Impl_& from)
  273. : field_paths_{visibility, arena, from.field_paths_},
  274. _cached_size_{0} {}
  275. DocumentMask::DocumentMask(
  276. ::google::protobuf::Arena* arena,
  277. const DocumentMask& from)
  278. : ::google::protobuf::Message(arena) {
  279. DocumentMask* const _this = this;
  280. (void)_this;
  281. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  282. from._internal_metadata_);
  283. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  284. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentMask)
  285. }
  286. inline PROTOBUF_NDEBUG_INLINE DocumentMask::Impl_::Impl_(
  287. ::google::protobuf::internal::InternalVisibility visibility,
  288. ::google::protobuf::Arena* arena)
  289. : field_paths_{visibility, arena},
  290. _cached_size_{0} {}
  291. inline void DocumentMask::SharedCtor(::_pb::Arena* arena) {
  292. new (&_impl_) Impl_(internal_visibility(), arena);
  293. }
  294. DocumentMask::~DocumentMask() {
  295. // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentMask)
  296. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  297. SharedDtor();
  298. }
  299. inline void DocumentMask::SharedDtor() {
  300. ABSL_DCHECK(GetArena() == nullptr);
  301. _impl_.~Impl_();
  302. }
  303. PROTOBUF_NOINLINE void DocumentMask::Clear() {
  304. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentMask)
  305. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  306. ::uint32_t cached_has_bits = 0;
  307. // Prevent compiler warnings about cached_has_bits being unused
  308. (void) cached_has_bits;
  309. _impl_.field_paths_.Clear();
  310. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  311. }
  312. const char* DocumentMask::_InternalParse(
  313. const char* ptr, ::_pbi::ParseContext* ctx) {
  314. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  315. return ptr;
  316. }
  317. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  318. const ::_pbi::TcParseTable<0, 1, 0, 52, 2> DocumentMask::_table_ = {
  319. {
  320. 0, // no _has_bits_
  321. 0, // no _extensions_
  322. 1, 0, // max_field_number, fast_idx_mask
  323. offsetof(decltype(_table_), field_lookup_table),
  324. 4294967294, // skipmap
  325. offsetof(decltype(_table_), field_entries),
  326. 1, // num_field_entries
  327. 0, // num_aux_entries
  328. offsetof(decltype(_table_), field_names), // no aux_entries
  329. &_DocumentMask_default_instance_._instance,
  330. ::_pbi::TcParser::GenericFallback, // fallback
  331. }, {{
  332. // repeated string field_paths = 1;
  333. {::_pbi::TcParser::FastUR1,
  334. {10, 63, 0, PROTOBUF_FIELD_OFFSET(DocumentMask, _impl_.field_paths_)}},
  335. }}, {{
  336. 65535, 65535
  337. }}, {{
  338. // repeated string field_paths = 1;
  339. {PROTOBUF_FIELD_OFFSET(DocumentMask, _impl_.field_paths_), 0, 0,
  340. (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
  341. }},
  342. // no aux_entries
  343. {{
  344. "\40\13\0\0\0\0\0\0"
  345. "google.firestore.v1.DocumentMask"
  346. "field_paths"
  347. }},
  348. };
  349. ::uint8_t* DocumentMask::_InternalSerialize(
  350. ::uint8_t* target,
  351. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  352. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentMask)
  353. ::uint32_t cached_has_bits = 0;
  354. (void)cached_has_bits;
  355. // repeated string field_paths = 1;
  356. for (int i = 0, n = this->_internal_field_paths_size(); i < n; ++i) {
  357. const auto& s = this->_internal_field_paths().Get(i);
  358. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  359. s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.DocumentMask.field_paths");
  360. target = stream->WriteString(1, s, target);
  361. }
  362. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  363. target =
  364. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  365. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  366. }
  367. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentMask)
  368. return target;
  369. }
  370. ::size_t DocumentMask::ByteSizeLong() const {
  371. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentMask)
  372. ::size_t total_size = 0;
  373. ::uint32_t cached_has_bits = 0;
  374. // Prevent compiler warnings about cached_has_bits being unused
  375. (void) cached_has_bits;
  376. // repeated string field_paths = 1;
  377. total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_field_paths().size());
  378. for (int i = 0, n = _internal_field_paths().size(); i < n; ++i) {
  379. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  380. _internal_field_paths().Get(i));
  381. }
  382. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  383. }
  384. const ::google::protobuf::Message::ClassData DocumentMask::_class_data_ = {
  385. DocumentMask::MergeImpl,
  386. nullptr, // OnDemandRegisterArenaDtor
  387. };
  388. const ::google::protobuf::Message::ClassData* DocumentMask::GetClassData() const {
  389. return &_class_data_;
  390. }
  391. void DocumentMask::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  392. auto* const _this = static_cast<DocumentMask*>(&to_msg);
  393. auto& from = static_cast<const DocumentMask&>(from_msg);
  394. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentMask)
  395. ABSL_DCHECK_NE(&from, _this);
  396. ::uint32_t cached_has_bits = 0;
  397. (void) cached_has_bits;
  398. _this->_internal_mutable_field_paths()->MergeFrom(from._internal_field_paths());
  399. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  400. }
  401. void DocumentMask::CopyFrom(const DocumentMask& from) {
  402. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentMask)
  403. if (&from == this) return;
  404. Clear();
  405. MergeFrom(from);
  406. }
  407. PROTOBUF_NOINLINE bool DocumentMask::IsInitialized() const {
  408. return true;
  409. }
  410. ::_pbi::CachedSize* DocumentMask::AccessCachedSize() const {
  411. return &_impl_._cached_size_;
  412. }
  413. void DocumentMask::InternalSwap(DocumentMask* PROTOBUF_RESTRICT other) {
  414. using std::swap;
  415. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  416. _impl_.field_paths_.InternalSwap(&other->_impl_.field_paths_);
  417. }
  418. ::google::protobuf::Metadata DocumentMask::GetMetadata() const {
  419. return ::_pbi::AssignDescriptors(
  420. &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_once,
  421. file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto[0]);
  422. }
  423. // ===================================================================
  424. class Precondition::_Internal {
  425. public:
  426. static constexpr ::int32_t kOneofCaseOffset =
  427. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Precondition, _impl_._oneof_case_);
  428. static const ::google::protobuf::Timestamp& update_time(const Precondition* msg);
  429. };
  430. const ::google::protobuf::Timestamp& Precondition::_Internal::update_time(const Precondition* msg) {
  431. return *msg->_impl_.condition_type_.update_time_;
  432. }
  433. void Precondition::set_allocated_update_time(::google::protobuf::Timestamp* update_time) {
  434. ::google::protobuf::Arena* message_arena = GetArena();
  435. clear_condition_type();
  436. if (update_time) {
  437. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(update_time)->GetArena();
  438. if (message_arena != submessage_arena) {
  439. update_time = ::google::protobuf::internal::GetOwnedMessage(message_arena, update_time, submessage_arena);
  440. }
  441. set_has_update_time();
  442. _impl_.condition_type_.update_time_ = update_time;
  443. }
  444. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Precondition.update_time)
  445. }
  446. void Precondition::clear_update_time() {
  447. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  448. if (condition_type_case() == kUpdateTime) {
  449. if (GetArena() == nullptr) {
  450. delete _impl_.condition_type_.update_time_;
  451. }
  452. clear_has_condition_type();
  453. }
  454. }
  455. Precondition::Precondition(::google::protobuf::Arena* arena)
  456. : ::google::protobuf::Message(arena) {
  457. SharedCtor(arena);
  458. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.Precondition)
  459. }
  460. inline PROTOBUF_NDEBUG_INLINE Precondition::Impl_::Impl_(
  461. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  462. const Impl_& from)
  463. : condition_type_{},
  464. _cached_size_{0},
  465. _oneof_case_{from._oneof_case_[0]} {}
  466. Precondition::Precondition(
  467. ::google::protobuf::Arena* arena,
  468. const Precondition& from)
  469. : ::google::protobuf::Message(arena) {
  470. Precondition* const _this = this;
  471. (void)_this;
  472. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  473. from._internal_metadata_);
  474. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  475. switch (condition_type_case()) {
  476. case CONDITION_TYPE_NOT_SET:
  477. break;
  478. case kExists:
  479. _impl_.condition_type_.exists_ = from._impl_.condition_type_.exists_;
  480. break;
  481. case kUpdateTime:
  482. _impl_.condition_type_.update_time_ = CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.condition_type_.update_time_);
  483. break;
  484. }
  485. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Precondition)
  486. }
  487. inline PROTOBUF_NDEBUG_INLINE Precondition::Impl_::Impl_(
  488. ::google::protobuf::internal::InternalVisibility visibility,
  489. ::google::protobuf::Arena* arena)
  490. : condition_type_{},
  491. _cached_size_{0},
  492. _oneof_case_{} {}
  493. inline void Precondition::SharedCtor(::_pb::Arena* arena) {
  494. new (&_impl_) Impl_(internal_visibility(), arena);
  495. }
  496. Precondition::~Precondition() {
  497. // @@protoc_insertion_point(destructor:google.firestore.v1.Precondition)
  498. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  499. SharedDtor();
  500. }
  501. inline void Precondition::SharedDtor() {
  502. ABSL_DCHECK(GetArena() == nullptr);
  503. if (has_condition_type()) {
  504. clear_condition_type();
  505. }
  506. _impl_.~Impl_();
  507. }
  508. void Precondition::clear_condition_type() {
  509. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Precondition)
  510. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  511. switch (condition_type_case()) {
  512. case kExists: {
  513. // No need to clear
  514. break;
  515. }
  516. case kUpdateTime: {
  517. if (GetArena() == nullptr) {
  518. delete _impl_.condition_type_.update_time_;
  519. }
  520. break;
  521. }
  522. case CONDITION_TYPE_NOT_SET: {
  523. break;
  524. }
  525. }
  526. _impl_._oneof_case_[0] = CONDITION_TYPE_NOT_SET;
  527. }
  528. PROTOBUF_NOINLINE void Precondition::Clear() {
  529. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Precondition)
  530. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  531. ::uint32_t cached_has_bits = 0;
  532. // Prevent compiler warnings about cached_has_bits being unused
  533. (void) cached_has_bits;
  534. clear_condition_type();
  535. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  536. }
  537. const char* Precondition::_InternalParse(
  538. const char* ptr, ::_pbi::ParseContext* ctx) {
  539. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  540. return ptr;
  541. }
  542. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  543. const ::_pbi::TcParseTable<0, 2, 1, 0, 2> Precondition::_table_ = {
  544. {
  545. 0, // no _has_bits_
  546. 0, // no _extensions_
  547. 2, 0, // max_field_number, fast_idx_mask
  548. offsetof(decltype(_table_), field_lookup_table),
  549. 4294967292, // skipmap
  550. offsetof(decltype(_table_), field_entries),
  551. 2, // num_field_entries
  552. 1, // num_aux_entries
  553. offsetof(decltype(_table_), aux_entries),
  554. &_Precondition_default_instance_._instance,
  555. ::_pbi::TcParser::GenericFallback, // fallback
  556. }, {{
  557. {::_pbi::TcParser::MiniParse, {}},
  558. }}, {{
  559. 65535, 65535
  560. }}, {{
  561. // bool exists = 1;
  562. {PROTOBUF_FIELD_OFFSET(Precondition, _impl_.condition_type_.exists_), _Internal::kOneofCaseOffset + 0, 0,
  563. (0 | ::_fl::kFcOneof | ::_fl::kBool)},
  564. // .google.protobuf.Timestamp update_time = 2;
  565. {PROTOBUF_FIELD_OFFSET(Precondition, _impl_.condition_type_.update_time_), _Internal::kOneofCaseOffset + 0, 0,
  566. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  567. }}, {{
  568. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  569. }}, {{
  570. }},
  571. };
  572. ::uint8_t* Precondition::_InternalSerialize(
  573. ::uint8_t* target,
  574. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  575. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Precondition)
  576. ::uint32_t cached_has_bits = 0;
  577. (void)cached_has_bits;
  578. switch (condition_type_case()) {
  579. case kExists: {
  580. target = stream->EnsureSpace(target);
  581. target = ::_pbi::WireFormatLite::WriteBoolToArray(
  582. 1, this->_internal_exists(), target);
  583. break;
  584. }
  585. case kUpdateTime: {
  586. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  587. 2, _Internal::update_time(this),
  588. _Internal::update_time(this).GetCachedSize(), target, stream);
  589. break;
  590. }
  591. default:
  592. break;
  593. }
  594. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  595. target =
  596. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  597. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  598. }
  599. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Precondition)
  600. return target;
  601. }
  602. ::size_t Precondition::ByteSizeLong() const {
  603. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Precondition)
  604. ::size_t total_size = 0;
  605. ::uint32_t cached_has_bits = 0;
  606. // Prevent compiler warnings about cached_has_bits being unused
  607. (void) cached_has_bits;
  608. switch (condition_type_case()) {
  609. // bool exists = 1;
  610. case kExists: {
  611. total_size += 2;
  612. break;
  613. }
  614. // .google.protobuf.Timestamp update_time = 2;
  615. case kUpdateTime: {
  616. total_size +=
  617. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.condition_type_.update_time_);
  618. break;
  619. }
  620. case CONDITION_TYPE_NOT_SET: {
  621. break;
  622. }
  623. }
  624. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  625. }
  626. const ::google::protobuf::Message::ClassData Precondition::_class_data_ = {
  627. Precondition::MergeImpl,
  628. nullptr, // OnDemandRegisterArenaDtor
  629. };
  630. const ::google::protobuf::Message::ClassData* Precondition::GetClassData() const {
  631. return &_class_data_;
  632. }
  633. void Precondition::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  634. auto* const _this = static_cast<Precondition*>(&to_msg);
  635. auto& from = static_cast<const Precondition&>(from_msg);
  636. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Precondition)
  637. ABSL_DCHECK_NE(&from, _this);
  638. ::uint32_t cached_has_bits = 0;
  639. (void) cached_has_bits;
  640. switch (from.condition_type_case()) {
  641. case kExists: {
  642. _this->_internal_set_exists(from._internal_exists());
  643. break;
  644. }
  645. case kUpdateTime: {
  646. _this->_internal_mutable_update_time()->::google::protobuf::Timestamp::MergeFrom(
  647. from._internal_update_time());
  648. break;
  649. }
  650. case CONDITION_TYPE_NOT_SET: {
  651. break;
  652. }
  653. }
  654. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  655. }
  656. void Precondition::CopyFrom(const Precondition& from) {
  657. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Precondition)
  658. if (&from == this) return;
  659. Clear();
  660. MergeFrom(from);
  661. }
  662. PROTOBUF_NOINLINE bool Precondition::IsInitialized() const {
  663. return true;
  664. }
  665. ::_pbi::CachedSize* Precondition::AccessCachedSize() const {
  666. return &_impl_._cached_size_;
  667. }
  668. void Precondition::InternalSwap(Precondition* PROTOBUF_RESTRICT other) {
  669. using std::swap;
  670. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  671. swap(_impl_.condition_type_, other->_impl_.condition_type_);
  672. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  673. }
  674. ::google::protobuf::Metadata Precondition::GetMetadata() const {
  675. return ::_pbi::AssignDescriptors(
  676. &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_once,
  677. file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto[1]);
  678. }
  679. // ===================================================================
  680. class TransactionOptions_ReadWrite::_Internal {
  681. public:
  682. };
  683. TransactionOptions_ReadWrite::TransactionOptions_ReadWrite(::google::protobuf::Arena* arena)
  684. : ::google::protobuf::Message(arena) {
  685. SharedCtor(arena);
  686. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.TransactionOptions.ReadWrite)
  687. }
  688. inline PROTOBUF_NDEBUG_INLINE TransactionOptions_ReadWrite::Impl_::Impl_(
  689. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  690. const Impl_& from)
  691. : retry_transaction_(arena, from.retry_transaction_),
  692. _cached_size_{0} {}
  693. TransactionOptions_ReadWrite::TransactionOptions_ReadWrite(
  694. ::google::protobuf::Arena* arena,
  695. const TransactionOptions_ReadWrite& from)
  696. : ::google::protobuf::Message(arena) {
  697. TransactionOptions_ReadWrite* const _this = this;
  698. (void)_this;
  699. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  700. from._internal_metadata_);
  701. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  702. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions.ReadWrite)
  703. }
  704. inline PROTOBUF_NDEBUG_INLINE TransactionOptions_ReadWrite::Impl_::Impl_(
  705. ::google::protobuf::internal::InternalVisibility visibility,
  706. ::google::protobuf::Arena* arena)
  707. : retry_transaction_(arena),
  708. _cached_size_{0} {}
  709. inline void TransactionOptions_ReadWrite::SharedCtor(::_pb::Arena* arena) {
  710. new (&_impl_) Impl_(internal_visibility(), arena);
  711. }
  712. TransactionOptions_ReadWrite::~TransactionOptions_ReadWrite() {
  713. // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions.ReadWrite)
  714. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  715. SharedDtor();
  716. }
  717. inline void TransactionOptions_ReadWrite::SharedDtor() {
  718. ABSL_DCHECK(GetArena() == nullptr);
  719. _impl_.retry_transaction_.Destroy();
  720. _impl_.~Impl_();
  721. }
  722. PROTOBUF_NOINLINE void TransactionOptions_ReadWrite::Clear() {
  723. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions.ReadWrite)
  724. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  725. ::uint32_t cached_has_bits = 0;
  726. // Prevent compiler warnings about cached_has_bits being unused
  727. (void) cached_has_bits;
  728. _impl_.retry_transaction_.ClearToEmpty();
  729. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  730. }
  731. const char* TransactionOptions_ReadWrite::_InternalParse(
  732. const char* ptr, ::_pbi::ParseContext* ctx) {
  733. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  734. return ptr;
  735. }
  736. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  737. const ::_pbi::TcParseTable<0, 1, 0, 0, 2> TransactionOptions_ReadWrite::_table_ = {
  738. {
  739. 0, // no _has_bits_
  740. 0, // no _extensions_
  741. 1, 0, // max_field_number, fast_idx_mask
  742. offsetof(decltype(_table_), field_lookup_table),
  743. 4294967294, // skipmap
  744. offsetof(decltype(_table_), field_entries),
  745. 1, // num_field_entries
  746. 0, // num_aux_entries
  747. offsetof(decltype(_table_), field_names), // no aux_entries
  748. &_TransactionOptions_ReadWrite_default_instance_._instance,
  749. ::_pbi::TcParser::GenericFallback, // fallback
  750. }, {{
  751. // bytes retry_transaction = 1;
  752. {::_pbi::TcParser::FastBS1,
  753. {10, 63, 0, PROTOBUF_FIELD_OFFSET(TransactionOptions_ReadWrite, _impl_.retry_transaction_)}},
  754. }}, {{
  755. 65535, 65535
  756. }}, {{
  757. // bytes retry_transaction = 1;
  758. {PROTOBUF_FIELD_OFFSET(TransactionOptions_ReadWrite, _impl_.retry_transaction_), 0, 0,
  759. (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)},
  760. }},
  761. // no aux_entries
  762. {{
  763. }},
  764. };
  765. ::uint8_t* TransactionOptions_ReadWrite::_InternalSerialize(
  766. ::uint8_t* target,
  767. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  768. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadWrite)
  769. ::uint32_t cached_has_bits = 0;
  770. (void)cached_has_bits;
  771. // bytes retry_transaction = 1;
  772. if (!this->_internal_retry_transaction().empty()) {
  773. const std::string& _s = this->_internal_retry_transaction();
  774. target = stream->WriteBytesMaybeAliased(1, _s, target);
  775. }
  776. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  777. target =
  778. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  779. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  780. }
  781. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadWrite)
  782. return target;
  783. }
  784. ::size_t TransactionOptions_ReadWrite::ByteSizeLong() const {
  785. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadWrite)
  786. ::size_t total_size = 0;
  787. ::uint32_t cached_has_bits = 0;
  788. // Prevent compiler warnings about cached_has_bits being unused
  789. (void) cached_has_bits;
  790. // bytes retry_transaction = 1;
  791. if (!this->_internal_retry_transaction().empty()) {
  792. total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
  793. this->_internal_retry_transaction());
  794. }
  795. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  796. }
  797. const ::google::protobuf::Message::ClassData TransactionOptions_ReadWrite::_class_data_ = {
  798. TransactionOptions_ReadWrite::MergeImpl,
  799. nullptr, // OnDemandRegisterArenaDtor
  800. };
  801. const ::google::protobuf::Message::ClassData* TransactionOptions_ReadWrite::GetClassData() const {
  802. return &_class_data_;
  803. }
  804. void TransactionOptions_ReadWrite::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  805. auto* const _this = static_cast<TransactionOptions_ReadWrite*>(&to_msg);
  806. auto& from = static_cast<const TransactionOptions_ReadWrite&>(from_msg);
  807. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions.ReadWrite)
  808. ABSL_DCHECK_NE(&from, _this);
  809. ::uint32_t cached_has_bits = 0;
  810. (void) cached_has_bits;
  811. if (!from._internal_retry_transaction().empty()) {
  812. _this->_internal_set_retry_transaction(from._internal_retry_transaction());
  813. }
  814. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  815. }
  816. void TransactionOptions_ReadWrite::CopyFrom(const TransactionOptions_ReadWrite& from) {
  817. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions.ReadWrite)
  818. if (&from == this) return;
  819. Clear();
  820. MergeFrom(from);
  821. }
  822. PROTOBUF_NOINLINE bool TransactionOptions_ReadWrite::IsInitialized() const {
  823. return true;
  824. }
  825. ::_pbi::CachedSize* TransactionOptions_ReadWrite::AccessCachedSize() const {
  826. return &_impl_._cached_size_;
  827. }
  828. void TransactionOptions_ReadWrite::InternalSwap(TransactionOptions_ReadWrite* PROTOBUF_RESTRICT other) {
  829. using std::swap;
  830. auto* arena = GetArena();
  831. ABSL_DCHECK_EQ(arena, other->GetArena());
  832. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  833. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.retry_transaction_, &other->_impl_.retry_transaction_, arena);
  834. }
  835. ::google::protobuf::Metadata TransactionOptions_ReadWrite::GetMetadata() const {
  836. return ::_pbi::AssignDescriptors(
  837. &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_once,
  838. file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto[2]);
  839. }
  840. // ===================================================================
  841. class TransactionOptions_ReadOnly::_Internal {
  842. public:
  843. static constexpr ::int32_t kOneofCaseOffset =
  844. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _impl_._oneof_case_);
  845. static const ::google::protobuf::Timestamp& read_time(const TransactionOptions_ReadOnly* msg);
  846. };
  847. const ::google::protobuf::Timestamp& TransactionOptions_ReadOnly::_Internal::read_time(const TransactionOptions_ReadOnly* msg) {
  848. return *msg->_impl_.consistency_selector_.read_time_;
  849. }
  850. void TransactionOptions_ReadOnly::set_allocated_read_time(::google::protobuf::Timestamp* read_time) {
  851. ::google::protobuf::Arena* message_arena = GetArena();
  852. clear_consistency_selector();
  853. if (read_time) {
  854. ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(read_time)->GetArena();
  855. if (message_arena != submessage_arena) {
  856. read_time = ::google::protobuf::internal::GetOwnedMessage(message_arena, read_time, submessage_arena);
  857. }
  858. set_has_read_time();
  859. _impl_.consistency_selector_.read_time_ = read_time;
  860. }
  861. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.ReadOnly.read_time)
  862. }
  863. void TransactionOptions_ReadOnly::clear_read_time() {
  864. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  865. if (consistency_selector_case() == kReadTime) {
  866. if (GetArena() == nullptr) {
  867. delete _impl_.consistency_selector_.read_time_;
  868. }
  869. clear_has_consistency_selector();
  870. }
  871. }
  872. TransactionOptions_ReadOnly::TransactionOptions_ReadOnly(::google::protobuf::Arena* arena)
  873. : ::google::protobuf::Message(arena) {
  874. SharedCtor(arena);
  875. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.TransactionOptions.ReadOnly)
  876. }
  877. inline PROTOBUF_NDEBUG_INLINE TransactionOptions_ReadOnly::Impl_::Impl_(
  878. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  879. const Impl_& from)
  880. : consistency_selector_{},
  881. _cached_size_{0},
  882. _oneof_case_{from._oneof_case_[0]} {}
  883. TransactionOptions_ReadOnly::TransactionOptions_ReadOnly(
  884. ::google::protobuf::Arena* arena,
  885. const TransactionOptions_ReadOnly& from)
  886. : ::google::protobuf::Message(arena) {
  887. TransactionOptions_ReadOnly* const _this = this;
  888. (void)_this;
  889. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  890. from._internal_metadata_);
  891. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  892. switch (consistency_selector_case()) {
  893. case CONSISTENCY_SELECTOR_NOT_SET:
  894. break;
  895. case kReadTime:
  896. _impl_.consistency_selector_.read_time_ = CreateMaybeMessage<::google::protobuf::Timestamp>(arena, *from._impl_.consistency_selector_.read_time_);
  897. break;
  898. }
  899. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions.ReadOnly)
  900. }
  901. inline PROTOBUF_NDEBUG_INLINE TransactionOptions_ReadOnly::Impl_::Impl_(
  902. ::google::protobuf::internal::InternalVisibility visibility,
  903. ::google::protobuf::Arena* arena)
  904. : consistency_selector_{},
  905. _cached_size_{0},
  906. _oneof_case_{} {}
  907. inline void TransactionOptions_ReadOnly::SharedCtor(::_pb::Arena* arena) {
  908. new (&_impl_) Impl_(internal_visibility(), arena);
  909. }
  910. TransactionOptions_ReadOnly::~TransactionOptions_ReadOnly() {
  911. // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions.ReadOnly)
  912. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  913. SharedDtor();
  914. }
  915. inline void TransactionOptions_ReadOnly::SharedDtor() {
  916. ABSL_DCHECK(GetArena() == nullptr);
  917. if (has_consistency_selector()) {
  918. clear_consistency_selector();
  919. }
  920. _impl_.~Impl_();
  921. }
  922. void TransactionOptions_ReadOnly::clear_consistency_selector() {
  923. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.TransactionOptions.ReadOnly)
  924. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  925. switch (consistency_selector_case()) {
  926. case kReadTime: {
  927. if (GetArena() == nullptr) {
  928. delete _impl_.consistency_selector_.read_time_;
  929. }
  930. break;
  931. }
  932. case CONSISTENCY_SELECTOR_NOT_SET: {
  933. break;
  934. }
  935. }
  936. _impl_._oneof_case_[0] = CONSISTENCY_SELECTOR_NOT_SET;
  937. }
  938. PROTOBUF_NOINLINE void TransactionOptions_ReadOnly::Clear() {
  939. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions.ReadOnly)
  940. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  941. ::uint32_t cached_has_bits = 0;
  942. // Prevent compiler warnings about cached_has_bits being unused
  943. (void) cached_has_bits;
  944. clear_consistency_selector();
  945. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  946. }
  947. const char* TransactionOptions_ReadOnly::_InternalParse(
  948. const char* ptr, ::_pbi::ParseContext* ctx) {
  949. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  950. return ptr;
  951. }
  952. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  953. const ::_pbi::TcParseTable<0, 1, 1, 0, 2> TransactionOptions_ReadOnly::_table_ = {
  954. {
  955. 0, // no _has_bits_
  956. 0, // no _extensions_
  957. 2, 0, // max_field_number, fast_idx_mask
  958. offsetof(decltype(_table_), field_lookup_table),
  959. 4294967293, // skipmap
  960. offsetof(decltype(_table_), field_entries),
  961. 1, // num_field_entries
  962. 1, // num_aux_entries
  963. offsetof(decltype(_table_), aux_entries),
  964. &_TransactionOptions_ReadOnly_default_instance_._instance,
  965. ::_pbi::TcParser::GenericFallback, // fallback
  966. }, {{
  967. {::_pbi::TcParser::MiniParse, {}},
  968. }}, {{
  969. 65535, 65535
  970. }}, {{
  971. // .google.protobuf.Timestamp read_time = 2;
  972. {PROTOBUF_FIELD_OFFSET(TransactionOptions_ReadOnly, _impl_.consistency_selector_.read_time_), _Internal::kOneofCaseOffset + 0, 0,
  973. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  974. }}, {{
  975. {::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>()},
  976. }}, {{
  977. }},
  978. };
  979. ::uint8_t* TransactionOptions_ReadOnly::_InternalSerialize(
  980. ::uint8_t* target,
  981. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  982. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadOnly)
  983. ::uint32_t cached_has_bits = 0;
  984. (void)cached_has_bits;
  985. // .google.protobuf.Timestamp read_time = 2;
  986. if (consistency_selector_case() == kReadTime) {
  987. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  988. 2, _Internal::read_time(this),
  989. _Internal::read_time(this).GetCachedSize(), target, stream);
  990. }
  991. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  992. target =
  993. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  994. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  995. }
  996. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadOnly)
  997. return target;
  998. }
  999. ::size_t TransactionOptions_ReadOnly::ByteSizeLong() const {
  1000. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1001. ::size_t total_size = 0;
  1002. ::uint32_t cached_has_bits = 0;
  1003. // Prevent compiler warnings about cached_has_bits being unused
  1004. (void) cached_has_bits;
  1005. switch (consistency_selector_case()) {
  1006. // .google.protobuf.Timestamp read_time = 2;
  1007. case kReadTime: {
  1008. total_size +=
  1009. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.consistency_selector_.read_time_);
  1010. break;
  1011. }
  1012. case CONSISTENCY_SELECTOR_NOT_SET: {
  1013. break;
  1014. }
  1015. }
  1016. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1017. }
  1018. const ::google::protobuf::Message::ClassData TransactionOptions_ReadOnly::_class_data_ = {
  1019. TransactionOptions_ReadOnly::MergeImpl,
  1020. nullptr, // OnDemandRegisterArenaDtor
  1021. };
  1022. const ::google::protobuf::Message::ClassData* TransactionOptions_ReadOnly::GetClassData() const {
  1023. return &_class_data_;
  1024. }
  1025. void TransactionOptions_ReadOnly::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  1026. auto* const _this = static_cast<TransactionOptions_ReadOnly*>(&to_msg);
  1027. auto& from = static_cast<const TransactionOptions_ReadOnly&>(from_msg);
  1028. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1029. ABSL_DCHECK_NE(&from, _this);
  1030. ::uint32_t cached_has_bits = 0;
  1031. (void) cached_has_bits;
  1032. switch (from.consistency_selector_case()) {
  1033. case kReadTime: {
  1034. _this->_internal_mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(
  1035. from._internal_read_time());
  1036. break;
  1037. }
  1038. case CONSISTENCY_SELECTOR_NOT_SET: {
  1039. break;
  1040. }
  1041. }
  1042. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  1043. }
  1044. void TransactionOptions_ReadOnly::CopyFrom(const TransactionOptions_ReadOnly& from) {
  1045. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions.ReadOnly)
  1046. if (&from == this) return;
  1047. Clear();
  1048. MergeFrom(from);
  1049. }
  1050. PROTOBUF_NOINLINE bool TransactionOptions_ReadOnly::IsInitialized() const {
  1051. return true;
  1052. }
  1053. ::_pbi::CachedSize* TransactionOptions_ReadOnly::AccessCachedSize() const {
  1054. return &_impl_._cached_size_;
  1055. }
  1056. void TransactionOptions_ReadOnly::InternalSwap(TransactionOptions_ReadOnly* PROTOBUF_RESTRICT other) {
  1057. using std::swap;
  1058. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1059. swap(_impl_.consistency_selector_, other->_impl_.consistency_selector_);
  1060. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  1061. }
  1062. ::google::protobuf::Metadata TransactionOptions_ReadOnly::GetMetadata() const {
  1063. return ::_pbi::AssignDescriptors(
  1064. &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_once,
  1065. file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto[3]);
  1066. }
  1067. // ===================================================================
  1068. class TransactionOptions::_Internal {
  1069. public:
  1070. static constexpr ::int32_t kOneofCaseOffset =
  1071. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _impl_._oneof_case_);
  1072. static const ::google::firestore::v1::TransactionOptions_ReadOnly& read_only(const TransactionOptions* msg);
  1073. static const ::google::firestore::v1::TransactionOptions_ReadWrite& read_write(const TransactionOptions* msg);
  1074. };
  1075. const ::google::firestore::v1::TransactionOptions_ReadOnly& TransactionOptions::_Internal::read_only(const TransactionOptions* msg) {
  1076. return *msg->_impl_.mode_.read_only_;
  1077. }
  1078. const ::google::firestore::v1::TransactionOptions_ReadWrite& TransactionOptions::_Internal::read_write(const TransactionOptions* msg) {
  1079. return *msg->_impl_.mode_.read_write_;
  1080. }
  1081. void TransactionOptions::set_allocated_read_only(::google::firestore::v1::TransactionOptions_ReadOnly* read_only) {
  1082. ::google::protobuf::Arena* message_arena = GetArena();
  1083. clear_mode();
  1084. if (read_only) {
  1085. ::google::protobuf::Arena* submessage_arena = read_only->GetArena();
  1086. if (message_arena != submessage_arena) {
  1087. read_only = ::google::protobuf::internal::GetOwnedMessage(message_arena, read_only, submessage_arena);
  1088. }
  1089. set_has_read_only();
  1090. _impl_.mode_.read_only_ = read_only;
  1091. }
  1092. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.read_only)
  1093. }
  1094. void TransactionOptions::set_allocated_read_write(::google::firestore::v1::TransactionOptions_ReadWrite* read_write) {
  1095. ::google::protobuf::Arena* message_arena = GetArena();
  1096. clear_mode();
  1097. if (read_write) {
  1098. ::google::protobuf::Arena* submessage_arena = read_write->GetArena();
  1099. if (message_arena != submessage_arena) {
  1100. read_write = ::google::protobuf::internal::GetOwnedMessage(message_arena, read_write, submessage_arena);
  1101. }
  1102. set_has_read_write();
  1103. _impl_.mode_.read_write_ = read_write;
  1104. }
  1105. // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.read_write)
  1106. }
  1107. TransactionOptions::TransactionOptions(::google::protobuf::Arena* arena)
  1108. : ::google::protobuf::Message(arena) {
  1109. SharedCtor(arena);
  1110. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.TransactionOptions)
  1111. }
  1112. inline PROTOBUF_NDEBUG_INLINE TransactionOptions::Impl_::Impl_(
  1113. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  1114. const Impl_& from)
  1115. : mode_{},
  1116. _cached_size_{0},
  1117. _oneof_case_{from._oneof_case_[0]} {}
  1118. TransactionOptions::TransactionOptions(
  1119. ::google::protobuf::Arena* arena,
  1120. const TransactionOptions& from)
  1121. : ::google::protobuf::Message(arena) {
  1122. TransactionOptions* const _this = this;
  1123. (void)_this;
  1124. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  1125. from._internal_metadata_);
  1126. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  1127. switch (mode_case()) {
  1128. case MODE_NOT_SET:
  1129. break;
  1130. case kReadOnly:
  1131. _impl_.mode_.read_only_ = CreateMaybeMessage<::google::firestore::v1::TransactionOptions_ReadOnly>(arena, *from._impl_.mode_.read_only_);
  1132. break;
  1133. case kReadWrite:
  1134. _impl_.mode_.read_write_ = CreateMaybeMessage<::google::firestore::v1::TransactionOptions_ReadWrite>(arena, *from._impl_.mode_.read_write_);
  1135. break;
  1136. }
  1137. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions)
  1138. }
  1139. inline PROTOBUF_NDEBUG_INLINE TransactionOptions::Impl_::Impl_(
  1140. ::google::protobuf::internal::InternalVisibility visibility,
  1141. ::google::protobuf::Arena* arena)
  1142. : mode_{},
  1143. _cached_size_{0},
  1144. _oneof_case_{} {}
  1145. inline void TransactionOptions::SharedCtor(::_pb::Arena* arena) {
  1146. new (&_impl_) Impl_(internal_visibility(), arena);
  1147. }
  1148. TransactionOptions::~TransactionOptions() {
  1149. // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions)
  1150. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  1151. SharedDtor();
  1152. }
  1153. inline void TransactionOptions::SharedDtor() {
  1154. ABSL_DCHECK(GetArena() == nullptr);
  1155. if (has_mode()) {
  1156. clear_mode();
  1157. }
  1158. _impl_.~Impl_();
  1159. }
  1160. void TransactionOptions::clear_mode() {
  1161. // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.TransactionOptions)
  1162. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  1163. switch (mode_case()) {
  1164. case kReadOnly: {
  1165. if (GetArena() == nullptr) {
  1166. delete _impl_.mode_.read_only_;
  1167. }
  1168. break;
  1169. }
  1170. case kReadWrite: {
  1171. if (GetArena() == nullptr) {
  1172. delete _impl_.mode_.read_write_;
  1173. }
  1174. break;
  1175. }
  1176. case MODE_NOT_SET: {
  1177. break;
  1178. }
  1179. }
  1180. _impl_._oneof_case_[0] = MODE_NOT_SET;
  1181. }
  1182. PROTOBUF_NOINLINE void TransactionOptions::Clear() {
  1183. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions)
  1184. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  1185. ::uint32_t cached_has_bits = 0;
  1186. // Prevent compiler warnings about cached_has_bits being unused
  1187. (void) cached_has_bits;
  1188. clear_mode();
  1189. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  1190. }
  1191. const char* TransactionOptions::_InternalParse(
  1192. const char* ptr, ::_pbi::ParseContext* ctx) {
  1193. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  1194. return ptr;
  1195. }
  1196. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  1197. const ::_pbi::TcParseTable<0, 2, 2, 0, 2> TransactionOptions::_table_ = {
  1198. {
  1199. 0, // no _has_bits_
  1200. 0, // no _extensions_
  1201. 3, 0, // max_field_number, fast_idx_mask
  1202. offsetof(decltype(_table_), field_lookup_table),
  1203. 4294967289, // skipmap
  1204. offsetof(decltype(_table_), field_entries),
  1205. 2, // num_field_entries
  1206. 2, // num_aux_entries
  1207. offsetof(decltype(_table_), aux_entries),
  1208. &_TransactionOptions_default_instance_._instance,
  1209. ::_pbi::TcParser::GenericFallback, // fallback
  1210. }, {{
  1211. {::_pbi::TcParser::MiniParse, {}},
  1212. }}, {{
  1213. 65535, 65535
  1214. }}, {{
  1215. // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
  1216. {PROTOBUF_FIELD_OFFSET(TransactionOptions, _impl_.mode_.read_only_), _Internal::kOneofCaseOffset + 0, 0,
  1217. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  1218. // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
  1219. {PROTOBUF_FIELD_OFFSET(TransactionOptions, _impl_.mode_.read_write_), _Internal::kOneofCaseOffset + 0, 1,
  1220. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  1221. }}, {{
  1222. {::_pbi::TcParser::GetTable<::google::firestore::v1::TransactionOptions_ReadOnly>()},
  1223. {::_pbi::TcParser::GetTable<::google::firestore::v1::TransactionOptions_ReadWrite>()},
  1224. }}, {{
  1225. }},
  1226. };
  1227. ::uint8_t* TransactionOptions::_InternalSerialize(
  1228. ::uint8_t* target,
  1229. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  1230. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions)
  1231. ::uint32_t cached_has_bits = 0;
  1232. (void)cached_has_bits;
  1233. switch (mode_case()) {
  1234. case kReadOnly: {
  1235. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  1236. 2, _Internal::read_only(this),
  1237. _Internal::read_only(this).GetCachedSize(), target, stream);
  1238. break;
  1239. }
  1240. case kReadWrite: {
  1241. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  1242. 3, _Internal::read_write(this),
  1243. _Internal::read_write(this).GetCachedSize(), target, stream);
  1244. break;
  1245. }
  1246. default:
  1247. break;
  1248. }
  1249. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1250. target =
  1251. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  1252. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  1253. }
  1254. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions)
  1255. return target;
  1256. }
  1257. ::size_t TransactionOptions::ByteSizeLong() const {
  1258. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions)
  1259. ::size_t total_size = 0;
  1260. ::uint32_t cached_has_bits = 0;
  1261. // Prevent compiler warnings about cached_has_bits being unused
  1262. (void) cached_has_bits;
  1263. switch (mode_case()) {
  1264. // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2;
  1265. case kReadOnly: {
  1266. total_size +=
  1267. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.mode_.read_only_);
  1268. break;
  1269. }
  1270. // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3;
  1271. case kReadWrite: {
  1272. total_size +=
  1273. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.mode_.read_write_);
  1274. break;
  1275. }
  1276. case MODE_NOT_SET: {
  1277. break;
  1278. }
  1279. }
  1280. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  1281. }
  1282. const ::google::protobuf::Message::ClassData TransactionOptions::_class_data_ = {
  1283. TransactionOptions::MergeImpl,
  1284. nullptr, // OnDemandRegisterArenaDtor
  1285. };
  1286. const ::google::protobuf::Message::ClassData* TransactionOptions::GetClassData() const {
  1287. return &_class_data_;
  1288. }
  1289. void TransactionOptions::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  1290. auto* const _this = static_cast<TransactionOptions*>(&to_msg);
  1291. auto& from = static_cast<const TransactionOptions&>(from_msg);
  1292. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions)
  1293. ABSL_DCHECK_NE(&from, _this);
  1294. ::uint32_t cached_has_bits = 0;
  1295. (void) cached_has_bits;
  1296. switch (from.mode_case()) {
  1297. case kReadOnly: {
  1298. _this->_internal_mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(
  1299. from._internal_read_only());
  1300. break;
  1301. }
  1302. case kReadWrite: {
  1303. _this->_internal_mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(
  1304. from._internal_read_write());
  1305. break;
  1306. }
  1307. case MODE_NOT_SET: {
  1308. break;
  1309. }
  1310. }
  1311. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  1312. }
  1313. void TransactionOptions::CopyFrom(const TransactionOptions& from) {
  1314. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions)
  1315. if (&from == this) return;
  1316. Clear();
  1317. MergeFrom(from);
  1318. }
  1319. PROTOBUF_NOINLINE bool TransactionOptions::IsInitialized() const {
  1320. return true;
  1321. }
  1322. ::_pbi::CachedSize* TransactionOptions::AccessCachedSize() const {
  1323. return &_impl_._cached_size_;
  1324. }
  1325. void TransactionOptions::InternalSwap(TransactionOptions* PROTOBUF_RESTRICT other) {
  1326. using std::swap;
  1327. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1328. swap(_impl_.mode_, other->_impl_.mode_);
  1329. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  1330. }
  1331. ::google::protobuf::Metadata TransactionOptions::GetMetadata() const {
  1332. return ::_pbi::AssignDescriptors(
  1333. &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto_once,
  1334. file_level_metadata_google_2ffirestore_2fv1_2fcommon_2eproto[4]);
  1335. }
  1336. // @@protoc_insertion_point(namespace_scope)
  1337. } // namespace v1
  1338. } // namespace firestore
  1339. } // namespace google
  1340. namespace google {
  1341. namespace protobuf {
  1342. } // namespace protobuf
  1343. } // namespace google
  1344. // @@protoc_insertion_point(global_scope)
  1345. #include "google/protobuf/port_undef.inc"