Builder

class Builder

A builder to create a HealthDataPoint instance.

Since

1.0.0

Functions

Link copied to clipboard
fun <T> addFieldData(field: Field<T>, value: T?): HealthDataPoint.Builder

Set a value of a specified field.

Link copied to clipboard

Builds a HealthDataPoint instance from the configuration of this builder.

Link copied to clipboard

Sets a data ID optionally provided by a partner app.

Link copied to clipboard

Sets a data version optionally provided by a partner app.

Link copied to clipboard

Set the ID of the device that generated the data.

Link copied to clipboard
fun setEndTime(endTime: Instant, zoneOffset: ZoneOffset? = null): HealthDataPoint.Builder

Sets the end time of the data.

Link copied to clipboard

Sets the end time of the data as a LocalDateTime.

Link copied to clipboard

Sets the start time of the data as a LocalDateTime.

Link copied to clipboard
fun setStartTime(startTime: Instant, zoneOffset: ZoneOffset? = null): HealthDataPoint.Builder

Sets the start time of the data as an Instant. The start time is inclusive and represented in milliseconds.

Preferences Submitted

You have successfully updated your cookie preferences.