# GolfShotEvent

Artifact: [androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health) [View Source](https://cs.android.com/search?q=file:androidx/health/services/client/data/GolfShotEvent.kt+class:androidx.health.services.client.data.GolfShotEvent) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health#1.1.0)

*** ** * ** ***


```
class GolfShotEvent : ExerciseEvent
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.health.services.client.data.ExerciseEvent](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseEvent) ||
|   | ↳ | [androidx.health.services.client.data.GolfShotEvent](https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent) |

*** ** * ** ***

An `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/ExerciseEvent` that contains information about Golf Shot events for the current exercise.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent.GolfShotSwingType` Golf Shot Swing Types. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent#GolfShotEvent(java.time.Duration,androidx.health.services.client.data.GolfShotEvent.GolfShotSwingType)( durationSinceBoot: https://developer.android.com/reference/java/time/Duration.html, swingType: https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent.GolfShotSwingType )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/java/time/Duration.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent#durationSinceBoot()` `https://developer.android.com/reference/java/time/Duration.html` since device boot when the golf shot was detected. |
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent.GolfShotSwingType` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/GolfShotEvent#swingType()` The type of golf swing that was detected. |

## Public constructors

### GolfShotEvent

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

```
GolfShotEvent(
    durationSinceBoot: Duration,
    swingType: GolfShotEvent.GolfShotSwingType
)
```

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### durationSinceBoot

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

```
val durationSinceBoot: Duration
```

`https://developer.android.com/reference/java/time/Duration.html` since device boot when the golf shot was detected.

### swingType

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

```
val swingType: GolfShotEvent.GolfShotSwingType
```

The type of golf swing that was detected.