aggregation_result.pb.cc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  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/aggregation_result.proto
  18. #include "google/firestore/v1/aggregation_result.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. template <typename>
  39. PROTOBUF_CONSTEXPR AggregationResult_AggregateFieldsEntry_DoNotUse::AggregationResult_AggregateFieldsEntry_DoNotUse(::_pbi::ConstantInitialized) {}
  40. struct AggregationResult_AggregateFieldsEntry_DoNotUseDefaultTypeInternal {
  41. PROTOBUF_CONSTEXPR AggregationResult_AggregateFieldsEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  42. ~AggregationResult_AggregateFieldsEntry_DoNotUseDefaultTypeInternal() {}
  43. union {
  44. AggregationResult_AggregateFieldsEntry_DoNotUse _instance;
  45. };
  46. };
  47. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  48. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AggregationResult_AggregateFieldsEntry_DoNotUseDefaultTypeInternal _AggregationResult_AggregateFieldsEntry_DoNotUse_default_instance_;
  49. inline constexpr AggregationResult::Impl_::Impl_(
  50. ::_pbi::ConstantInitialized) noexcept
  51. : aggregate_fields_{},
  52. _cached_size_{0} {}
  53. template <typename>
  54. PROTOBUF_CONSTEXPR AggregationResult::AggregationResult(::_pbi::ConstantInitialized)
  55. : _impl_(::_pbi::ConstantInitialized()) {}
  56. struct AggregationResultDefaultTypeInternal {
  57. PROTOBUF_CONSTEXPR AggregationResultDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  58. ~AggregationResultDefaultTypeInternal() {}
  59. union {
  60. AggregationResult _instance;
  61. };
  62. };
  63. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  64. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AggregationResultDefaultTypeInternal _AggregationResult_default_instance_;
  65. } // namespace v1
  66. } // namespace firestore
  67. } // namespace google
  68. static ::_pb::Metadata file_level_metadata_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto[2];
  69. static constexpr const ::_pb::EnumDescriptor**
  70. file_level_enum_descriptors_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto = nullptr;
  71. static constexpr const ::_pb::ServiceDescriptor**
  72. file_level_service_descriptors_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto = nullptr;
  73. const ::uint32_t TableStruct_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  74. protodesc_cold) = {
  75. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, _has_bits_),
  76. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, _internal_metadata_),
  77. ~0u, // no _extensions_
  78. ~0u, // no _oneof_case_
  79. ~0u, // no _weak_field_map_
  80. ~0u, // no _inlined_string_donated_
  81. ~0u, // no _split_
  82. ~0u, // no sizeof(Split)
  83. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, key_),
  84. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, value_),
  85. 0,
  86. 1,
  87. ~0u, // no _has_bits_
  88. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult, _internal_metadata_),
  89. ~0u, // no _extensions_
  90. ~0u, // no _oneof_case_
  91. ~0u, // no _weak_field_map_
  92. ~0u, // no _inlined_string_donated_
  93. ~0u, // no _split_
  94. ~0u, // no sizeof(Split)
  95. PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult, _impl_.aggregate_fields_),
  96. };
  97. static const ::_pbi::MigrationSchema
  98. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  99. {0, 10, -1, sizeof(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse)},
  100. {12, -1, -1, sizeof(::google::firestore::v1::AggregationResult)},
  101. };
  102. static const ::_pb::Message* const file_default_instances[] = {
  103. &::google::firestore::v1::_AggregationResult_AggregateFieldsEntry_DoNotUse_default_instance_._instance,
  104. &::google::firestore::v1::_AggregationResult_default_instance_._instance,
  105. };
  106. const char descriptor_table_protodef_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  107. "\n,google/firestore/v1/aggregation_result"
  108. ".proto\022\023google.firestore.v1\032\"google/fire"
  109. "store/v1/document.proto\"\276\001\n\021AggregationR"
  110. "esult\022U\n\020aggregate_fields\030\002 \003(\0132;.google"
  111. ".firestore.v1.AggregationResult.Aggregat"
  112. "eFieldsEntry\032R\n\024AggregateFieldsEntry\022\013\n\003"
  113. "key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google.firest"
  114. "ore.v1.Value:\0028\001B\317\001\n\027com.google.firestor"
  115. "e.v1B\026AggregationResultProtoP\001Z<google.g"
  116. "olang.org/genproto/googleapis/firestore/"
  117. "v1;firestore\242\002\004GCFS\252\002\031Google.Cloud.Fires"
  118. "tore.V1\312\002\031Google\\Cloud\\Firestore\\V1\352\002\034Go"
  119. "ogle::Cloud::Firestore::V1b\006proto3"
  120. };
  121. static const ::_pbi::DescriptorTable* const descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_deps[1] =
  122. {
  123. &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
  124. };
  125. static ::absl::once_flag descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_once;
  126. const ::_pbi::DescriptorTable descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto = {
  127. false,
  128. false,
  129. 514,
  130. descriptor_table_protodef_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto,
  131. "google/firestore/v1/aggregation_result.proto",
  132. &descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_once,
  133. descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_deps,
  134. 1,
  135. 2,
  136. schemas,
  137. file_default_instances,
  138. TableStruct_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto::offsets,
  139. file_level_metadata_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto,
  140. file_level_enum_descriptors_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto,
  141. file_level_service_descriptors_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto,
  142. };
  143. // This function exists to be marked as weak.
  144. // It can significantly speed up compilation by breaking up LLVM's SCC
  145. // in the .pb.cc translation units. Large translation units see a
  146. // reduction of more than 35% of walltime for optimized builds. Without
  147. // the weak attribute all the messages in the file, including all the
  148. // vtables and everything they use become part of the same SCC through
  149. // a cycle like:
  150. // GetMetadata -> descriptor table -> default instances ->
  151. // vtables -> GetMetadata
  152. // By adding a weak function here we break the connection from the
  153. // individual vtables back into the descriptor table.
  154. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_getter() {
  155. return &descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto;
  156. }
  157. // Force running AddDescriptors() at dynamic initialization time.
  158. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  159. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto(&descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto);
  160. namespace google {
  161. namespace firestore {
  162. namespace v1 {
  163. // ===================================================================
  164. AggregationResult_AggregateFieldsEntry_DoNotUse::AggregationResult_AggregateFieldsEntry_DoNotUse() {}
  165. AggregationResult_AggregateFieldsEntry_DoNotUse::AggregationResult_AggregateFieldsEntry_DoNotUse(::google::protobuf::Arena* arena)
  166. : SuperType(arena) {}
  167. ::google::protobuf::Metadata AggregationResult_AggregateFieldsEntry_DoNotUse::GetMetadata() const {
  168. return ::_pbi::AssignDescriptors(
  169. &descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_once,
  170. file_level_metadata_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto[0]);
  171. }
  172. // ===================================================================
  173. class AggregationResult::_Internal {
  174. public:
  175. };
  176. void AggregationResult::clear_aggregate_fields() {
  177. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  178. _impl_.aggregate_fields_.Clear();
  179. }
  180. AggregationResult::AggregationResult(::google::protobuf::Arena* arena)
  181. : ::google::protobuf::Message(arena) {
  182. SharedCtor(arena);
  183. // @@protoc_insertion_point(arena_constructor:google.firestore.v1.AggregationResult)
  184. }
  185. inline PROTOBUF_NDEBUG_INLINE AggregationResult::Impl_::Impl_(
  186. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  187. const Impl_& from)
  188. : aggregate_fields_{visibility, arena, from.aggregate_fields_},
  189. _cached_size_{0} {}
  190. AggregationResult::AggregationResult(
  191. ::google::protobuf::Arena* arena,
  192. const AggregationResult& from)
  193. : ::google::protobuf::Message(arena) {
  194. AggregationResult* const _this = this;
  195. (void)_this;
  196. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  197. from._internal_metadata_);
  198. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  199. // @@protoc_insertion_point(copy_constructor:google.firestore.v1.AggregationResult)
  200. }
  201. inline PROTOBUF_NDEBUG_INLINE AggregationResult::Impl_::Impl_(
  202. ::google::protobuf::internal::InternalVisibility visibility,
  203. ::google::protobuf::Arena* arena)
  204. : aggregate_fields_{visibility, arena},
  205. _cached_size_{0} {}
  206. inline void AggregationResult::SharedCtor(::_pb::Arena* arena) {
  207. new (&_impl_) Impl_(internal_visibility(), arena);
  208. }
  209. AggregationResult::~AggregationResult() {
  210. // @@protoc_insertion_point(destructor:google.firestore.v1.AggregationResult)
  211. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  212. SharedDtor();
  213. }
  214. inline void AggregationResult::SharedDtor() {
  215. ABSL_DCHECK(GetArena() == nullptr);
  216. _impl_.~Impl_();
  217. }
  218. PROTOBUF_NOINLINE void AggregationResult::Clear() {
  219. // @@protoc_insertion_point(message_clear_start:google.firestore.v1.AggregationResult)
  220. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  221. ::uint32_t cached_has_bits = 0;
  222. // Prevent compiler warnings about cached_has_bits being unused
  223. (void) cached_has_bits;
  224. _impl_.aggregate_fields_.Clear();
  225. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  226. }
  227. const char* AggregationResult::_InternalParse(
  228. const char* ptr, ::_pbi::ParseContext* ctx) {
  229. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  230. return ptr;
  231. }
  232. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  233. const ::_pbi::TcParseTable<0, 1, 2, 62, 2> AggregationResult::_table_ = {
  234. {
  235. 0, // no _has_bits_
  236. 0, // no _extensions_
  237. 2, 0, // max_field_number, fast_idx_mask
  238. offsetof(decltype(_table_), field_lookup_table),
  239. 4294967293, // skipmap
  240. offsetof(decltype(_table_), field_entries),
  241. 1, // num_field_entries
  242. 2, // num_aux_entries
  243. offsetof(decltype(_table_), aux_entries),
  244. &_AggregationResult_default_instance_._instance,
  245. ::_pbi::TcParser::GenericFallback, // fallback
  246. }, {{
  247. {::_pbi::TcParser::MiniParse, {}},
  248. }}, {{
  249. 65535, 65535
  250. }}, {{
  251. // map<string, .google.firestore.v1.Value> aggregate_fields = 2;
  252. {PROTOBUF_FIELD_OFFSET(AggregationResult, _impl_.aggregate_fields_), 0, 0,
  253. (0 | ::_fl::kFcRepeated | ::_fl::kMap)},
  254. }}, {{
  255. {::_pbi::TcParser::GetMapAuxInfo<
  256. decltype(AggregationResult()._impl_.aggregate_fields_)>(
  257. 1, 0, 0, 9,
  258. 11)},
  259. {::_pbi::TcParser::CreateInArenaStorageCb<::google::firestore::v1::Value>},
  260. }}, {{
  261. "\45\20\0\0\0\0\0\0"
  262. "google.firestore.v1.AggregationResult"
  263. "aggregate_fields"
  264. }},
  265. };
  266. ::uint8_t* AggregationResult::_InternalSerialize(
  267. ::uint8_t* target,
  268. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  269. // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.AggregationResult)
  270. ::uint32_t cached_has_bits = 0;
  271. (void)cached_has_bits;
  272. // map<string, .google.firestore.v1.Value> aggregate_fields = 2;
  273. if (!_internal_aggregate_fields().empty()) {
  274. using MapType = ::google::protobuf::Map<std::string, ::google::firestore::v1::Value>;
  275. using WireHelper = _pbi::MapEntryFuncs<std::string, ::google::firestore::v1::Value,
  276. _pbi::WireFormatLite::TYPE_STRING,
  277. _pbi::WireFormatLite::TYPE_MESSAGE>;
  278. const auto& field = _internal_aggregate_fields();
  279. if (stream->IsSerializationDeterministic() && field.size() > 1) {
  280. for (const auto& entry : ::google::protobuf::internal::MapSorterPtr<MapType>(field)) {
  281. target = WireHelper::InternalSerialize(
  282. 2, entry.first, entry.second, target, stream);
  283. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  284. entry.first.data(), static_cast<int>(entry.first.length()),
  285. ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.AggregationResult.aggregate_fields");
  286. }
  287. } else {
  288. for (const auto& entry : field) {
  289. target = WireHelper::InternalSerialize(
  290. 2, entry.first, entry.second, target, stream);
  291. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  292. entry.first.data(), static_cast<int>(entry.first.length()),
  293. ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.AggregationResult.aggregate_fields");
  294. }
  295. }
  296. }
  297. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  298. target =
  299. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  300. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  301. }
  302. // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.AggregationResult)
  303. return target;
  304. }
  305. ::size_t AggregationResult::ByteSizeLong() const {
  306. // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.AggregationResult)
  307. ::size_t total_size = 0;
  308. ::uint32_t cached_has_bits = 0;
  309. // Prevent compiler warnings about cached_has_bits being unused
  310. (void) cached_has_bits;
  311. // map<string, .google.firestore.v1.Value> aggregate_fields = 2;
  312. total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_aggregate_fields_size());
  313. for (const auto& entry : _internal_aggregate_fields()) {
  314. total_size += _pbi::MapEntryFuncs<std::string, ::google::firestore::v1::Value,
  315. _pbi::WireFormatLite::TYPE_STRING,
  316. _pbi::WireFormatLite::TYPE_MESSAGE>::ByteSizeLong(entry.first, entry.second);
  317. }
  318. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  319. }
  320. const ::google::protobuf::Message::ClassData AggregationResult::_class_data_ = {
  321. AggregationResult::MergeImpl,
  322. nullptr, // OnDemandRegisterArenaDtor
  323. };
  324. const ::google::protobuf::Message::ClassData* AggregationResult::GetClassData() const {
  325. return &_class_data_;
  326. }
  327. void AggregationResult::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  328. auto* const _this = static_cast<AggregationResult*>(&to_msg);
  329. auto& from = static_cast<const AggregationResult&>(from_msg);
  330. // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.AggregationResult)
  331. ABSL_DCHECK_NE(&from, _this);
  332. ::uint32_t cached_has_bits = 0;
  333. (void) cached_has_bits;
  334. _this->_impl_.aggregate_fields_.MergeFrom(from._impl_.aggregate_fields_);
  335. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  336. }
  337. void AggregationResult::CopyFrom(const AggregationResult& from) {
  338. // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.AggregationResult)
  339. if (&from == this) return;
  340. Clear();
  341. MergeFrom(from);
  342. }
  343. PROTOBUF_NOINLINE bool AggregationResult::IsInitialized() const {
  344. return true;
  345. }
  346. ::_pbi::CachedSize* AggregationResult::AccessCachedSize() const {
  347. return &_impl_._cached_size_;
  348. }
  349. void AggregationResult::InternalSwap(AggregationResult* PROTOBUF_RESTRICT other) {
  350. using std::swap;
  351. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  352. _impl_.aggregate_fields_.InternalSwap(&other->_impl_.aggregate_fields_);
  353. }
  354. ::google::protobuf::Metadata AggregationResult::GetMetadata() const {
  355. return ::_pbi::AssignDescriptors(
  356. &descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_getter, &descriptor_table_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto_once,
  357. file_level_metadata_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto[1]);
  358. }
  359. // @@protoc_insertion_point(namespace_scope)
  360. } // namespace v1
  361. } // namespace firestore
  362. } // namespace google
  363. namespace google {
  364. namespace protobuf {
  365. } // namespace protobuf
  366. } // namespace google
  367. // @@protoc_insertion_point(global_scope)
  368. #include "google/protobuf/port_undef.inc"