Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

# Builder

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/health/connect/datatypes/PlannedExerciseBlock.Builder "View this page in Java")

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.health.connect.datatypes.PlannedExerciseBlock.Builder](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#) |

Builder of `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock`.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#Builder(kotlin.Int)(repetitions: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` <br /> |

| Public methods ||
|---|---|
| [PlannedExerciseBlock.Builder](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#) | `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#addStep(android.health.connect.datatypes.PlannedExerciseStep)(step: https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep)` Adds a `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep`. |
| [PlannedExerciseBlock](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock) | `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#build()()` <br /> |
| [PlannedExerciseBlock.Builder](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#) | `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#clearSteps()()` Clears the `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep` entries. |
| [PlannedExerciseBlock.Builder](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#) | `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#setDescription(kotlin.CharSequence)(description: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html?)` Sets the description. |
| [PlannedExerciseBlock.Builder](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#) | `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#setRepetitions(kotlin.Int)(repetitions: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Sets the number of repetitions. |
| [PlannedExerciseBlock.Builder](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#) | `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#setSteps(kotlin.collections.MutableList)(steps: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep!>)` Sets the `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep` entries. |

## Public constructors

### Builder

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
Builder(repetitions: Int)
```

| Parameters ||
|---|---|
| `repetitions` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The number of times this block should be repeated by the user. |

## Public methods

### addStep

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
fun addStep(step: PlannedExerciseStep): PlannedExerciseBlock.Builder
```

Adds a `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep`.

| Parameters ||
|---|---|
| `step` | [PlannedExerciseStep](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep): This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#` | This value cannot be `null`. |

### build

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
fun build(): PlannedExerciseBlock
```

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock` | Object of `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock`. This value cannot be `null`. |

### clearSteps

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
fun clearSteps(): PlannedExerciseBlock.Builder
```

Clears the `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep` entries.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#` | This value cannot be `null`. |

### setDescription

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
fun setDescription(description: CharSequence?): PlannedExerciseBlock.Builder
```

Sets the description.

| Parameters ||
|---|---|
| `description` | [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html)?: This value may be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#` | This value cannot be `null`. |

### setRepetitions

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
fun setRepetitions(repetitions: Int): PlannedExerciseBlock.Builder
```

Sets the number of repetitions.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#` | This value cannot be `null`. |

### setSteps

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [U Extensions 13](https://developer.android.com/sdkExtensions)

```
fun setSteps(steps: MutableList<PlannedExerciseStep!>): PlannedExerciseBlock.Builder
```

Sets the `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep` entries.

| Parameters ||
|---|---|
| `steps` | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[PlannedExerciseStep](https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseStep)!\>: This value cannot be `null`. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/health/connect/datatypes/PlannedExerciseBlock.Builder#` | This value cannot be `null`. |