# ExerciseCompletionGoal.DurationGoal

# ExerciseCompletionGoal.DurationGoal

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/records/ExerciseCompletionGoal.kt+class:androidx.health.connect.client.records.ExerciseCompletionGoal.DurationGoal)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal "View this page in Java")

<br />

```
class ExerciseCompletionGoal.DurationGoal : ExerciseCompletionGoal
```

<br />

|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                                                            |||
| ↳ | [androidx.health.connect.client.records.ExerciseCompletionGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal)                              ||
|   | ↳ | [androidx.health.connect.client.records.ExerciseCompletionGoal.DurationGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal) |

*** ** * ** ***

An[ExerciseCompletionGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal)that requires a specified duration to elapse.

## Summary

|                                                                                                                        ### Public constructors                                                                                                                        |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [DurationGoal](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#DurationGoal(java.time.Duration))`(duration: `[Duration](https://developer.android.com/reference/java/time/Duration.html)`)` |

|                                        ### Public functions                                         |
|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                  | [hashCode](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#hashCode())`()`                                                                                            |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)            | [toString](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#toString())`()`                                                                                            |

|                            ### Public properties                            |
|-----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| [Duration](https://developer.android.com/reference/java/time/Duration.html) | [duration](https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseCompletionGoal.DurationGoal#duration()) |

## Public constructors

### DurationGoal

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
DurationGoal(duration: Duration)
```  

## Public functions

### equals

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

### hashCode

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

### toString

```
open fun toString(): String
```  

## Public properties

### duration

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)  

```
val duration: Duration
```