4.6.0 (latest) 4.5.0 4.4.0 4.3.0 4.2.0 4.1.0 4.0.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.1 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.5.0 2.4.0 2.3.0

    public sealed class StructuredAggregationQuery.Types.Aggregation.Types.Avg : IMessage<StructuredAggregationQuery.Types.Aggregation.Types.Avg>, IEquatable<StructuredAggregationQuery.Types.Aggregation.Types.Avg>, IDeepCloneable<StructuredAggregationQuery.Types.Aggregation.Types.Avg>, IBufferMessage, IMessage

Reference documentation and code samples for the Firestore v1 API class StructuredAggregationQuery.Types.Aggregation.Types.Avg.

Average of the values of the requested field.

- Only numeric values will be aggregated. All non-numeric values
  including `NULL` are skipped.

- If the aggregated values contain `NaN`, returns `NaN`. Infinity math
  follows IEEE-754 standards.

- If the aggregated value set is empty, returns `NULL`.

- Always returns the result as a double.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> StructuredAggregationQuery.Types.Aggregation.Types.Avg

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[StructuredAggregationQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types)[Aggregation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types)[Avg](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Avg), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[StructuredAggregationQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types)[Aggregation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types)[Avg](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Avg), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[StructuredAggregationQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types)[Aggregation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types)[Avg](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Avg), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Firestore.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1)

## Assembly

Google.Cloud.Firestore.V1.dll

## Constructors

### Avg()

    public Avg()

### Avg(Avg)

    public Avg(StructuredAggregationQuery.Types.Aggregation.Types.Avg other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQueryhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredAggregationQuery.Types.Aggregation.Types.Avg` |

## Properties

### Field

    public StructuredQuery.Types.FieldReference Field { get; set; }

The field to aggregate on.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredQueryhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredQuery.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.StructuredQuery.Types.FieldReference` |   |