/* * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/firestore/v1/aggregation_result.proto #include "google/firestore/v1/aggregation_result.pb.h" #include #include #include #include #include #include #include #include // @@protoc_insertion_point(includes) #include extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_AggregationResult_AggregateFieldsEntry_DoNotUse_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto; extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto; namespace google { namespace firestore { namespace v1 { class AggregationResult_AggregateFieldsEntry_DoNotUseDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _AggregationResult_AggregateFieldsEntry_DoNotUse_default_instance_; class AggregationResultDefaultTypeInternal { public: ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _AggregationResult_default_instance_; } // namespace v1 } // namespace firestore } // namespace google static void InitDefaultsscc_info_AggregationResult_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::firestore::v1::_AggregationResult_default_instance_; new (ptr) ::google::firestore::v1::AggregationResult(); ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } ::google::firestore::v1::AggregationResult::InitAsDefaultInstance(); } ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_AggregationResult_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_AggregationResult_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto}, { &scc_info_AggregationResult_AggregateFieldsEntry_DoNotUse_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto.base,}}; static void InitDefaultsscc_info_AggregationResult_AggregateFieldsEntry_DoNotUse_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { void* ptr = &::google::firestore::v1::_AggregationResult_AggregateFieldsEntry_DoNotUse_default_instance_; new (ptr) ::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse(); } ::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse::InitAsDefaultInstance(); } ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_AggregationResult_AggregateFieldsEntry_DoNotUse_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto = {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_AggregationResult_AggregateFieldsEntry_DoNotUse_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto}, { &scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto.base,}}; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto[2]; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto = nullptr; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto = nullptr; const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, _has_bits_), PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, key_), PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ PROTOBUF_FIELD_OFFSET(::google::firestore::v1::AggregationResult, aggregate_fields_), }; static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, 7, sizeof(::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse)}, { 9, -1, sizeof(::google::firestore::v1::AggregationResult)}, }; static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { reinterpret_cast(&::google::firestore::v1::_AggregationResult_AggregateFieldsEntry_DoNotUse_default_instance_), reinterpret_cast(&::google::firestore::v1::_AggregationResult_default_instance_), }; const char descriptor_table_protodef_google_2ffirestore_2fv1_2faggregation_5fresult_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n,google/firestore/v1/aggregation_result" ".proto\022\023google.firestore.v1\032\"google/fire" "store/v1/document.proto\"\276\001\n\021AggregationR" "esult\022U\n\020aggregate_fields\030\002 \003(\0132;.google" ".firestore.v1.AggregationResult.Aggregat" "eFieldsEntry\032R\n\024AggregateFieldsEntry\022\013\n\003" "key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google.firest" "ore.v1.Value:\0028\001B\317\001\n\027com.google.firestor" "e.v1B\026AggregationResultProtoP\001ZDone(&ptr)) { ::PROTOBUF_NAMESPACE_ID::uint32 tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); CHK_(ptr); switch (tag >> 3) { // map aggregate_fields = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { ptr -= 1; do { ptr += 1; ptr = ctx->ParseMessage(&aggregate_fields_, ptr); CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); } else goto handle_unusual; continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { ctx->SetLastTag(tag); goto success; } ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); CHK_(ptr != nullptr); continue; } } // switch } // while success: return ptr; failure: ptr = nullptr; goto success; #undef CHK_ } ::PROTOBUF_NAMESPACE_ID::uint8* AggregationResult::_InternalSerialize( ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.AggregationResult) ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // map aggregate_fields = 2; if (!this->_internal_aggregate_fields().empty()) { typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::google::firestore::v1::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst Less; struct Utf8Check { static void Check(ConstPtr p) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "google.firestore.v1.AggregationResult.AggregateFieldsEntry.key"); } }; if (stream->IsSerializationDeterministic() && this->_internal_aggregate_fields().size() > 1) { ::std::unique_ptr items( new SortItem[this->_internal_aggregate_fields().size()]); typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::google::firestore::v1::Value >::size_type size_type; size_type n = 0; for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::google::firestore::v1::Value >::const_iterator it = this->_internal_aggregate_fields().begin(); it != this->_internal_aggregate_fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); } ::std::sort(&items[0], &items[static_cast(n)], Less()); for (size_type i = 0; i < n; i++) { target = AggregationResult_AggregateFieldsEntry_DoNotUse::Funcs::InternalSerialize(2, items[static_cast(i)]->first, items[static_cast(i)]->second, target, stream); Utf8Check::Check(&(*items[static_cast(i)])); } } else { for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::google::firestore::v1::Value >::const_iterator it = this->_internal_aggregate_fields().begin(); it != this->_internal_aggregate_fields().end(); ++it) { target = AggregationResult_AggregateFieldsEntry_DoNotUse::Funcs::InternalSerialize(2, it->first, it->second, target, stream); Utf8Check::Check(&(*it)); } } } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.AggregationResult) return target; } size_t AggregationResult::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.AggregationResult) size_t total_size = 0; ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // map aggregate_fields = 2; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_aggregate_fields_size()); for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::google::firestore::v1::Value >::const_iterator it = this->_internal_aggregate_fields().begin(); it != this->_internal_aggregate_fields().end(); ++it) { total_size += AggregationResult_AggregateFieldsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( _internal_metadata_, total_size, &_cached_size_); } int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } void AggregationResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.AggregationResult) GOOGLE_DCHECK_NE(&from, this); const AggregationResult* source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.AggregationResult) ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.AggregationResult) MergeFrom(*source); } } void AggregationResult::MergeFrom(const AggregationResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.AggregationResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; aggregate_fields_.MergeFrom(from.aggregate_fields_); } void AggregationResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.AggregationResult) if (&from == this) return; Clear(); MergeFrom(from); } void AggregationResult::CopyFrom(const AggregationResult& from) { // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.AggregationResult) if (&from == this) return; Clear(); MergeFrom(from); } bool AggregationResult::IsInitialized() const { return true; } void AggregationResult::InternalSwap(AggregationResult* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); aggregate_fields_.Swap(&other->aggregate_fields_); } ::PROTOBUF_NAMESPACE_ID::Metadata AggregationResult::GetMetadata() const { return GetMetadataStatic(); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace firestore } // namespace google PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE ::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse* Arena::CreateMaybeMessage< ::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse >(Arena* arena) { return Arena::CreateInternal< ::google::firestore::v1::AggregationResult_AggregateFieldsEntry_DoNotUse >(arena); } template<> PROTOBUF_NOINLINE ::google::firestore::v1::AggregationResult* Arena::CreateMaybeMessage< ::google::firestore::v1::AggregationResult >(Arena* arena) { return Arena::CreateInternal< ::google::firestore::v1::AggregationResult >(arena); } PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include