HeartRateRecord


class HeartRateRecord : Record


Captures the user's heart rate. Each record represents a series of measurements.

Summary

Nested types

Represents a single measurement of the heart rate.

Public companion properties

AggregateMetric<Long>

Metric identifier to retrieve the average heart rate from AggregationResult.

AggregateMetric<Long>

Metric identifier to retrieve the maximum heart rate from AggregationResult.

AggregateMetric<Long>

Metric identifier to retrieve the minimum heart rate from AggregationResult.

AggregateMetric<Long>

Metric identifier to retrieve the number of heart rate measurements from AggregationResult.

Public constructors

HeartRateRecord(
    startTime: Instant,
    startZoneOffset: ZoneOffset?,
    endTime: Instant,
    endZoneOffset: ZoneOffset?,
    samples: List<HeartRateRecord.Sample>,
    metadata: Metadata
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

open Instant

End time of the record.

open ZoneOffset?

User experienced zone offset at endTime, or null if unknown.

open Metadata

Set of common metadata associated with the written record.

open List<HeartRateRecord.Sample>
open Instant

Start time of the record.

open ZoneOffset?

User experienced zone offset at startTime, or null if unknown.

Public companion properties

BPM_AVG

val BPM_AVG: AggregateMetric<Long>

Metric identifier to retrieve the average heart rate from AggregationResult.

BPM_MAX

val BPM_MAX: AggregateMetric<Long>

Metric identifier to retrieve the maximum heart rate from AggregationResult.

BPM_MIN

val BPM_MIN: AggregateMetric<Long>

Metric identifier to retrieve the minimum heart rate from AggregationResult.

MEASUREMENTS_COUNT

val MEASUREMENTS_COUNT: AggregateMetric<Long>

Metric identifier to retrieve the number of heart rate measurements from AggregationResult.

Public constructors

HeartRateRecord

Added in 1.1.0
HeartRateRecord(
    startTime: Instant,
    startZoneOffset: ZoneOffset?,
    endTime: Instant,
    endZoneOffset: ZoneOffset?,
    samples: List<HeartRateRecord.Sample>,
    metadata: Metadata
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

endTime

Added in 1.1.0
open val endTime: Instant

End time of the record.

endZoneOffset

Added in 1.1.0
open val endZoneOffset: ZoneOffset?

User experienced zone offset at endTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.

metadata

open val metadata: Metadata

Set of common metadata associated with the written record.

samples

Added in 1.1.0
open val samples: List<HeartRateRecord.Sample>

startTime

Added in 1.1.0
open val startTime: Instant

Start time of the record.

startZoneOffset

Added in 1.1.0
open val startZoneOffset: ZoneOffset?

User experienced zone offset at startTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent.