@@ -357,6 +357,73 @@ interface VectorValue
357357 NativeHandle Constructor ( NSNumber [ ] array ) ;
358358 }
359359
360+ // @interface FIRAggregateField : NSObject
361+ [ DisableDefaultCtor ]
362+ [ BaseType ( typeof ( NSObject ) , Name = "FIRAggregateField" ) ]
363+ interface AggregateField
364+ {
365+ // +(instancetype _Nonnull)aggregateFieldForCount;
366+ [ Static ]
367+ [ Export ( "aggregateFieldForCount" ) ]
368+ AggregateField Count { get ; }
369+
370+ // +(instancetype _Nonnull)aggregateFieldForSumOfField:(NSString * _Nonnull)field;
371+ [ Static ]
372+ [ Export ( "aggregateFieldForSumOfField:" ) ]
373+ AggregateField Sum ( string field ) ;
374+
375+ // +(instancetype _Nonnull)aggregateFieldForSumOfFieldPath:(FIRFieldPath * _Nonnull)fieldPath;
376+ [ Static ]
377+ [ Export ( "aggregateFieldForSumOfFieldPath:" ) ]
378+ AggregateField Sum ( FieldPath fieldPath ) ;
379+
380+ // +(instancetype _Nonnull)aggregateFieldForAverageOfField:(NSString * _Nonnull)field;
381+ [ Static ]
382+ [ Export ( "aggregateFieldForAverageOfField:" ) ]
383+ AggregateField Average ( string field ) ;
384+
385+ // +(instancetype _Nonnull)aggregateFieldForAverageOfFieldPath:(FIRFieldPath * _Nonnull)fieldPath;
386+ [ Static ]
387+ [ Export ( "aggregateFieldForAverageOfFieldPath:" ) ]
388+ AggregateField Average ( FieldPath fieldPath ) ;
389+ }
390+
391+ // typedef void (^FIRAggregateQuerySnapshotBlock)(FIRAggregateQuerySnapshot * _Nullable, NSError * _Nullable);
392+ delegate void AggregateQuerySnapshotHandler ( [ NullAllowed ] AggregateQuerySnapshot snapshot , [ NullAllowed ] NSError error ) ;
393+
394+ // @interface FIRAggregateQuery : NSObject
395+ [ DisableDefaultCtor ]
396+ [ BaseType ( typeof ( NSObject ) , Name = "FIRAggregateQuery" ) ]
397+ interface AggregateQuery
398+ {
399+ // @property (readonly, nonatomic) FIRQuery * _Nonnull query;
400+ [ Export ( "query" , ArgumentSemantic . Strong ) ]
401+ Query Query { get ; }
402+
403+ // -(void)aggregationWithSource:(FIRAggregateSource)source completion:(void (^ _Nonnull)(FIRAggregateQuerySnapshot * _Nullable, NSError * _Nullable))completion;
404+ [ Async ]
405+ [ Export ( "aggregationWithSource:completion:" ) ]
406+ void GetAggregation ( AggregateSource source , AggregateQuerySnapshotHandler completion ) ;
407+ }
408+
409+ // @interface FIRAggregateQuerySnapshot : NSObject
410+ [ DisableDefaultCtor ]
411+ [ BaseType ( typeof ( NSObject ) , Name = "FIRAggregateQuerySnapshot" ) ]
412+ interface AggregateQuerySnapshot
413+ {
414+ // @property (readonly, nonatomic) FIRAggregateQuery * _Nonnull query;
415+ [ Export ( "query" , ArgumentSemantic . Strong ) ]
416+ AggregateQuery Query { get ; }
417+
418+ // @property (readonly, nonatomic) NSNumber * _Nonnull count;
419+ [ Export ( "count" , ArgumentSemantic . Strong ) ]
420+ NSNumber Count { get ; }
421+
422+ // -(id _Nonnull)valueForAggregateField:(FIRAggregateField * _Nonnull)aggregateField;
423+ [ Export ( "valueForAggregateField:" ) ]
424+ NSObject GetValue ( AggregateField aggregateField ) ;
425+ }
426+
360427 // void (^)(id _Nullable result, NSError *_Nullable error)
361428 delegate void TransactionCompletionHandler ( [ NullAllowed ] NSObject result , [ NullAllowed ] NSError error ) ;
362429 // (nullable void (^)(FIRLoadBundleTaskProgress *_Nullable progress, NSError *_Nullable error)
@@ -783,6 +850,14 @@ interface Query
783850
784851 [ Wrap ( "EndingAt (CloudFirestoreHelper.GetNSObjects (fieldValues))" ) ]
785852 Query EndingAt ( object [ ] fieldValues ) ;
853+
854+ // @property (readonly, nonatomic) FIRAggregateQuery * _Nonnull count;
855+ [ Export ( "count" , ArgumentSemantic . Strong ) ]
856+ AggregateQuery Count { get ; }
857+
858+ // -(FIRAggregateQuery * _Nonnull)aggregate:(NSArray<FIRAggregateField *> * _Nonnull)aggregateFields;
859+ [ Export ( "aggregate:" ) ]
860+ AggregateQuery Aggregate ( AggregateField [ ] aggregateFields ) ;
786861 }
787862
788863 // @interface FIRQuerySnapshot : NSObject
0 commit comments