# MeterAggregation

## Example Usage

```typescript
import { MeterAggregation } from "@flexprice/sdk/sdk/models";

let value: MeterAggregation = {};
```

## Fields

| Field                                                                                                                                                                                                                                                                                                     | Type                                                                                                                                                                                                                                                                                                      | Required                                                                                                                                                                                                                                                                                                  | Description                                                                                                                                                                                                                                                                                               |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bucketSize`                                                                                                                                                                                                                                                                                              | [models.WindowSize](../../sdk/models/window-size.md)                                                                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                                                        | N/A                                                                                                                                                                                                                                                                                                       |
| `expression`                                                                                                                                                                                                                                                                                              | *string*                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                        | Expression is an optional CEL expression to compute per-event quantity from event.properties.<br/>When set, it replaces Field-based extraction. Property names are used directly (e.g., token * duration * pixel).                                                                                        |
| `field`                                                                                                                                                                                                                                                                                                   | *string*                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                        | Field is the key in $event.properties on which the aggregation is to be applied<br/>For ex if the aggregation type is sum for API usage, the field could be "duration_ms"<br/>Ignored when Expression is set.                                                                                             |
| `groupBy`                                                                                                                                                                                                                                                                                                 | *string*                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                        | GroupBy is the property name in event.properties to group by before aggregating.<br/>Currently only supported for MAX aggregation with bucket_size.<br/>When set, aggregation is applied per unique value of this property within each bucket,<br/>then the per-group results are summed to produce the bucket total. |
| `multiplier`                                                                                                                                                                                                                                                                                              | *string*                                                                                                                                                                                                                                                                                                  | :heavy_minus_sign:                                                                                                                                                                                                                                                                                        | Multiplier is the multiplier for the aggregation<br/>For ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000<br/>to scale up by a factor of 1000. If not provided, it will be null.                                                                             |
| `type`                                                                                                                                                                                                                                                                                                    | [models.AggregationType](../../sdk/models/aggregation-type.md)                                                                                                                                                                                                                                            | :heavy_minus_sign:                                                                                                                                                                                                                                                                                        | N/A                                                                                                                                                                                                                                                                                                       |