# AggregateGroupByPeriodRequest

Artifact: [androidx.health.connect:connect-client](https://developer.android.com/jetpack/androidx/releases/health-connect) [View Source](https://cs.android.com/search?q=file:androidx/health/connect/client/request/AggregateGroupByPeriodRequest.kt+class:androidx.health.connect.client.request.AggregateGroupByPeriodRequest) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***

<br />

```
class AggregateGroupByPeriodRequest
```

<br />

*** ** * ** ***

Request object to read time bucketed aggregations for given `https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric`s in Android Health Platform.

`https://developer.android.com/reference/kotlin/androidx/health/connect/client/request/AggregateGroupByPeriodRequest#(kotlin.collections.Set,androidx.health.connect.client.time.TimeRangeFilter,java.time.Period,kotlin.collections.Set)` contains a `https://developer.android.com/reference/java/time/Period.html` of variable length time intervals, such as per day, which may be anywhere between 23, 24, or 25 hour. Use `https://developer.android.com/reference/kotlin/androidx/health/connect/client/request/AggregateGroupByDurationRequest` if time slice is of fixed intervals, such as an hour, every ten minutes.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/request/AggregateGroupByPeriodRequest#AggregateGroupByPeriodRequest(kotlin.collections.Set,androidx.health.connect.client.time.TimeRangeFilter,java.time.Period,kotlin.collections.Set)( metrics: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric<*>>, timeRangeFilter: https://developer.android.com/reference/kotlin/androidx/health/connect/client/time/TimeRangeFilter, timeRangeSlicer: https://developer.android.com/reference/java/time/Period.html, dataOriginFilter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/DataOrigin> )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/request/AggregateGroupByPeriodRequest#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/request/AggregateGroupByPeriodRequest#hashCode()()` |

## Public constructors

### AggregateGroupByPeriodRequest

```
AggregateGroupByPeriodRequest(
    metrics: Set<AggregateMetric<*>>,
    timeRangeFilter: TimeRangeFilter,
    timeRangeSlicer: Period,
    dataOriginFilter: Set<DataOrigin> = emptySet()
)
```

| Parameters |
|---|---|
| `metrics: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric<*>>` | Set of `https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric`s to aggregate. |
| `timeRangeFilter: https://developer.android.com/reference/kotlin/androidx/health/connect/client/time/TimeRangeFilter` | The `https://developer.android.com/reference/kotlin/androidx/health/connect/client/time/TimeRangeFilter` to read from. |
| `timeRangeSlicer: https://developer.android.com/reference/java/time/Period.html` | The bucket size of each returned aggregate row. `https://developer.android.com/reference/kotlin/androidx/health/connect/client/request/AggregateGroupByPeriodRequest#timeRangeFilter()` will be sliced into several equal-sized time buckets (except for the last one). |
| `dataOriginFilter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/DataOrigin> = emptySet()` | Set of `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/DataOrigin`s to read from, or empty for no filter. |

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```