Debian Codegraph @

datastore/apiv1/datastorepb/aggregation_result.pb.go

raw
1 // Copyright 2025 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
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.35.2
18 // protoc v4.25.7
19 // source: google/datastore/v1/aggregation_result.proto
20
21 package datastorepb
22
23 import (
24 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
25 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
26 timestamppb "google.golang.org/protobuf/types/known/timestamppb"
27 reflect "reflect"
28 sync "sync"
29 )
30
31 const (
32 // Verify that this generated code is sufficiently up-to-date.
33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
34 // Verify that runtime/protoimpl is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
36 )
37
38 // The result of a single bucket from a Datastore aggregation query.
39 //
40 // The keys of `aggregate_properties` are the same for all results in an
41 // aggregation query, unlike entity queries which can have different fields
42 // present for each result.
43 type AggregationResult struct {
44 state protoimpl.MessageState
45 sizeCache protoimpl.SizeCache
46 unknownFields protoimpl.UnknownFields
47
48 // The result of the aggregation functions, ex: `COUNT(*) AS total_entities`.
49 //
50 // The key is the
51 // [alias][google.datastore.v1.AggregationQuery.Aggregation.alias] assigned to
52 // the aggregation function on input and the size of this map equals the
53 // number of aggregation functions in the query.
54 AggregateProperties map[string]*Value `protobuf:"bytes,2,rep,name=aggregate_properties,json=aggregateProperties,proto3" json:"aggregate_properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
55 }
56
57 func (x *AggregationResult) Reset() {
58 *x = AggregationResult{}
59 mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[0]
60 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
61 ms.StoreMessageInfo(mi)
62 }
63
64 func (x *AggregationResult) String() string {
65 return protoimpl.X.MessageStringOf(x)
66 }
67
68 func (*AggregationResult) ProtoMessage() {}
69
70 func (x *AggregationResult) ProtoReflect() protoreflect.Message {
71 mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[0]
72 if x != nil {
73 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
74 if ms.LoadMessageInfo() == nil {
75 ms.StoreMessageInfo(mi)
76 }
77 return ms
78 }
79 return mi.MessageOf(x)
80 }
81
82 // Deprecated: Use AggregationResult.ProtoReflect.Descriptor instead.
83 func (*AggregationResult) Descriptor() ([]byte, []int) {
84 return file_google_datastore_v1_aggregation_result_proto_rawDescGZIP(), []int{0}
85 }
86
87 func (x *AggregationResult) GetAggregateProperties() map[string]*Value {
88 if x != nil {
89 return x.AggregateProperties
90 }
91 return nil
92 }
93
94 // A batch of aggregation results produced by an aggregation query.
95 type AggregationResultBatch struct {
96 state protoimpl.MessageState
97 sizeCache protoimpl.SizeCache
98 unknownFields protoimpl.UnknownFields
99
100 // The aggregation results for this batch.
101 AggregationResults []*AggregationResult `protobuf:"bytes,1,rep,name=aggregation_results,json=aggregationResults,proto3" json:"aggregation_results,omitempty"`
102 // The state of the query after the current batch.
103 // Only COUNT(*) aggregations are supported in the initial launch. Therefore,
104 // expected result type is limited to `NO_MORE_RESULTS`.
105 MoreResults QueryResultBatch_MoreResultsType `protobuf:"varint,2,opt,name=more_results,json=moreResults,proto3,enum=google.datastore.v1.QueryResultBatch_MoreResultsType" json:"more_results,omitempty"`
106 // Read timestamp this batch was returned from.
107 //
108 // In a single transaction, subsequent query result batches for the same query
109 // can have a greater timestamp. Each batch's read timestamp
110 // is valid for all preceding batches.
111 ReadTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
112 }
113
114 func (x *AggregationResultBatch) Reset() {
115 *x = AggregationResultBatch{}
116 mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[1]
117 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
118 ms.StoreMessageInfo(mi)
119 }
120
121 func (x *AggregationResultBatch) String() string {
122 return protoimpl.X.MessageStringOf(x)
123 }
124
125 func (*AggregationResultBatch) ProtoMessage() {}
126
127 func (x *AggregationResultBatch) ProtoReflect() protoreflect.Message {
128 mi := &file_google_datastore_v1_aggregation_result_proto_msgTypes[1]
129 if x != nil {
130 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
131 if ms.LoadMessageInfo() == nil {
132 ms.StoreMessageInfo(mi)
133 }
134 return ms
135 }
136 return mi.MessageOf(x)
137 }
138
139 // Deprecated: Use AggregationResultBatch.ProtoReflect.Descriptor instead.
140 func (*AggregationResultBatch) Descriptor() ([]byte, []int) {
141 return file_google_datastore_v1_aggregation_result_proto_rawDescGZIP(), []int{1}
142 }
143
144 func (x *AggregationResultBatch) GetAggregationResults() []*AggregationResult {
145 if x != nil {
146 return x.AggregationResults
147 }
148 return nil
149 }
150
151 func (x *AggregationResultBatch) GetMoreResults() QueryResultBatch_MoreResultsType {
152 if x != nil {
153 return x.MoreResults
154 }
155 return QueryResultBatch_MORE_RESULTS_TYPE_UNSPECIFIED
156 }
157
158 func (x *AggregationResultBatch) GetReadTime() *timestamppb.Timestamp {
159 if x != nil {
160 return x.ReadTime
161 }
162 return nil
163 }
164
165 var File_google_datastore_v1_aggregation_result_proto protoreflect.FileDescriptor
166
167 var file_google_datastore_v1_aggregation_result_proto_rawDesc = []byte{
168 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f,
169 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f,
170 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13,
171 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65,
172 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61,
173 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e,
174 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61,
175 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79,
176 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
177 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
178 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xeb, 0x01, 0x0a, 0x11, 0x41, 0x67, 0x67, 0x72,
179 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x72, 0x0a,
180 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65,
181 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f,
182 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76,
183 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
184 0x75, 0x6c, 0x74, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f,
185 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x13, 0x61, 0x67,
186 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65,
187 0x73, 0x1a, 0x62, 0x0a, 0x18, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72,
188 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
189 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
190 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
191 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72,
192 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
193 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x02, 0x0a, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67,
194 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68,
195 0x12, 0x57, 0x0a, 0x13, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
196 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e,
197 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65,
198 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
199 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x12, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69,
200 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x0c, 0x6d, 0x6f, 0x72,
201 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
202 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f,
203 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c,
204 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x4d, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c,
205 0x74, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x75,
206 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65,
207 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
208 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
209 0x6d, 0x70, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x42, 0xc7, 0x01, 0x0a,
210 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61,
211 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x16, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67,
212 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
213 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
214 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72,
215 0x65, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72,
216 0x65, 0x70, 0x62, 0x3b, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x70, 0x62, 0xaa,
217 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44,
218 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x47, 0x6f,
219 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44, 0x61, 0x74, 0x61, 0x73,
220 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
221 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f,
222 0x72, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
223 }
224
225 var (
226 file_google_datastore_v1_aggregation_result_proto_rawDescOnce sync.Once
227 file_google_datastore_v1_aggregation_result_proto_rawDescData = file_google_datastore_v1_aggregation_result_proto_rawDesc
228 )
229
230 func file_google_datastore_v1_aggregation_result_proto_rawDescGZIP() []byte {
231 file_google_datastore_v1_aggregation_result_proto_rawDescOnce.Do(func() {
232 file_google_datastore_v1_aggregation_result_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_datastore_v1_aggregation_result_proto_rawDescData)
233 })
234 return file_google_datastore_v1_aggregation_result_proto_rawDescData
235 }
236
237 var file_google_datastore_v1_aggregation_result_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
238 var file_google_datastore_v1_aggregation_result_proto_goTypes = []any{
239 (*AggregationResult)(nil), // 0: google.datastore.v1.AggregationResult
240 (*AggregationResultBatch)(nil), // 1: google.datastore.v1.AggregationResultBatch
241 nil, // 2: google.datastore.v1.AggregationResult.AggregatePropertiesEntry
242 (QueryResultBatch_MoreResultsType)(0), // 3: google.datastore.v1.QueryResultBatch.MoreResultsType
243 (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
244 (*Value)(nil), // 5: google.datastore.v1.Value
245 }
246 var file_google_datastore_v1_aggregation_result_proto_depIdxs = []int32{
247 2, // 0: google.datastore.v1.AggregationResult.aggregate_properties:type_name -> google.datastore.v1.AggregationResult.AggregatePropertiesEntry
248 0, // 1: google.datastore.v1.AggregationResultBatch.aggregation_results:type_name -> google.datastore.v1.AggregationResult
249 3, // 2: google.datastore.v1.AggregationResultBatch.more_results:type_name -> google.datastore.v1.QueryResultBatch.MoreResultsType
250 4, // 3: google.datastore.v1.AggregationResultBatch.read_time:type_name -> google.protobuf.Timestamp
251 5, // 4: google.datastore.v1.AggregationResult.AggregatePropertiesEntry.value:type_name -> google.datastore.v1.Value
252 5, // [5:5] is the sub-list for method output_type
253 5, // [5:5] is the sub-list for method input_type
254 5, // [5:5] is the sub-list for extension type_name
255 5, // [5:5] is the sub-list for extension extendee
256 0, // [0:5] is the sub-list for field type_name
257 }
258
259 func init() { file_google_datastore_v1_aggregation_result_proto_init() }
260 func file_google_datastore_v1_aggregation_result_proto_init() {
261 if File_google_datastore_v1_aggregation_result_proto != nil {
262 return
263 }
264 file_google_datastore_v1_entity_proto_init()
265 file_google_datastore_v1_query_proto_init()
266 type x struct{}
267 out := protoimpl.TypeBuilder{
268 File: protoimpl.DescBuilder{
269 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
270 RawDescriptor: file_google_datastore_v1_aggregation_result_proto_rawDesc,
271 NumEnums: 0,
272 NumMessages: 3,
273 NumExtensions: 0,
274 NumServices: 0,
275 },
276 GoTypes: file_google_datastore_v1_aggregation_result_proto_goTypes,
277 DependencyIndexes: file_google_datastore_v1_aggregation_result_proto_depIdxs,
278 MessageInfos: file_google_datastore_v1_aggregation_result_proto_msgTypes,
279 }.Build()
280 File_google_datastore_v1_aggregation_result_proto = out.File
281 file_google_datastore_v1_aggregation_result_proto_rawDesc = nil
282 file_google_datastore_v1_aggregation_result_proto_goTypes = nil
283 file_google_datastore_v1_aggregation_result_proto_depIdxs = nil
284 }