Builder
class Builder
| kotlin.Any | |
| ↳ | android.health.connect.datatypes.PlannedExerciseSessionRecord.Builder |
Builder class for PlannedExerciseSessionRecord.
Summary
| Public constructors | |
|---|---|
Public constructors
Builder
Builder(
metadata: Metadata,
exerciseType: Int,
startTime: Instant,
endTime: Instant)
Builder
Builder(
metadata: Metadata,
exerciseType: Int,
startDate: LocalDate,
duration: Duration)
Public methods
addBlock
fun addBlock(block: PlannedExerciseBlock): PlannedExerciseSessionRecord.Builder
Adds a block to this planned session..
| Parameters | |
|---|---|
block |
PlannedExerciseBlock: An PlannedExerciseBlock to add to this planned session.. This value cannot be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
build
fun build(): PlannedExerciseSessionRecord
Returns PlannedExerciseSessionRecord.
| Return | |
|---|---|
PlannedExerciseSessionRecord |
This value cannot be null. |
clearBlocks
fun clearBlocks(): PlannedExerciseSessionRecord.Builder
Clears the blocks of this planned session.
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
clearEndZoneOffset
fun clearEndZoneOffset(): PlannedExerciseSessionRecord.Builder
Sets the start zone offset of this record to system default.
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
clearStartZoneOffset
fun clearStartZoneOffset(): PlannedExerciseSessionRecord.Builder
Sets the start zone offset of this record to system default.
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setBlocks
fun setBlocks(blocks: MutableList<PlannedExerciseBlock!>): PlannedExerciseSessionRecord.Builder
Sets the blocks of this planned session.
| Parameters | |
|---|---|
blocks |
MutableList<PlannedExerciseBlock!>: A list of PlannedExerciseBlock to set for this planned session. This value cannot be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setEndTime
fun setEndTime(endTime: Instant): PlannedExerciseSessionRecord.Builder
Sets the planned end time of the session.
| Parameters | |
|---|---|
endTime |
Instant: This value cannot be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setEndZoneOffset
fun setEndZoneOffset(endZoneOffset: ZoneOffset): PlannedExerciseSessionRecord.Builder
Sets the zone offset of when the workout should end.
| Parameters | |
|---|---|
endZoneOffset |
ZoneOffset: This value cannot be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setExerciseType
fun setExerciseType(exerciseType: Int): PlannedExerciseSessionRecord.Builder
Sets the exercise type.
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setMetadata
fun setMetadata(metadata: Metadata): PlannedExerciseSessionRecord.Builder
Set the metadata for the record.
| Parameters | |
|---|---|
metadata |
Metadata: This value cannot be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setNotes
fun setNotes(notes: CharSequence?): PlannedExerciseSessionRecord.Builder
Sets notes for this activity.
| Parameters | |
|---|---|
notes |
CharSequence?: Notes for this activity. This value may be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setStartTime
fun setStartTime(startTime: Instant): PlannedExerciseSessionRecord.Builder
Sets the planned start time of the session.
| Parameters | |
|---|---|
startTime |
Instant: This value cannot be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setStartZoneOffset
fun setStartZoneOffset(startZoneOffset: ZoneOffset): PlannedExerciseSessionRecord.Builder
Sets the zone offset of when the workout should start.
| Parameters | |
|---|---|
startZoneOffset |
ZoneOffset: This value cannot be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |
setTitle
fun setTitle(title: CharSequence?): PlannedExerciseSessionRecord.Builder
Sets a title of this planned session.
| Parameters | |
|---|---|
title |
CharSequence?: Title of this activity. This value may be null. |
| Return | |
|---|---|
PlannedExerciseSessionRecord.Builder |
This value cannot be null. |