• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.firestore.v1;
18
19import "google/firestore/v1/document.proto";
20
21option csharp_namespace = "Google.Cloud.Firestore.V1";
22option go_package = "cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb";
23option java_multiple_files = true;
24option java_outer_classname = "AggregationResultProto";
25option java_package = "com.google.firestore.v1";
26option objc_class_prefix = "GCFS";
27option php_namespace = "Google\\Cloud\\Firestore\\V1";
28option ruby_package = "Google::Cloud::Firestore::V1";
29
30// The result of a single bucket from a Firestore aggregation query.
31//
32// The keys of `aggregate_fields` are the same for all results in an aggregation
33// query, unlike document queries which can have different fields present for
34// each result.
35message AggregationResult {
36  // The result of the aggregation functions, ex: `COUNT(*) AS total_docs`.
37  //
38  // The key is the
39  // [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias]
40  // assigned to the aggregation function on input and the size of this map
41  // equals the number of aggregation functions in the query.
42  map<string, Value> aggregate_fields = 2;
43}
44