# DataTypeAvailability

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/DataTypeAvailability.kt+class:androidx.health.services.client.data.DataTypeAvailability) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***


```
public final class DataTypeAvailability implements Availability
```

<br />

*** ** * ** ***

Availability of a `https://developer.android.com/reference/androidx/health/services/client/data/DataType`.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#ACQUIRING()` The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is currently acquiring. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#AVAILABLE()` The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is fully initialized and available. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#UNAVAILABLE()` The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is unavailable because health services cannot acquire it. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#UNAVAILABLE_DEVICE_OFF_BODY()` The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is not available because the device is currently off-body. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#UNKNOWN()` The availability is unknown, or is represented by a value too new for this library version to parse. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `static final https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#fromId(kotlin.Int)(int id)` |
| `int` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#getId()()` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#getName()()` |
| `int` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/services/client/data/DataTypeAvailability#toString()()` |

## Public fields

### ACQUIRING

```
public static final @NonNull DataTypeAvailability ACQUIRING
```

The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is currently acquiring.

### AVAILABLE

```
public static final @NonNull DataTypeAvailability AVAILABLE
```

The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is fully initialized and available.

### UNAVAILABLE

```
public static final @NonNull DataTypeAvailability UNAVAILABLE
```

The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is unavailable because health services cannot acquire it.

### UNAVAILABLE_DEVICE_OFF_BODY

```
public static final @NonNull DataTypeAvailability UNAVAILABLE_DEVICE_OFF_BODY
```

The `https://developer.android.com/reference/androidx/health/services/client/data/DataType` is not available because the device is currently off-body.

### UNKNOWN

```
public static final @NonNull DataTypeAvailability UNKNOWN
```

The availability is unknown, or is represented by a value too new for this library version to parse.

## Public methods

### equals

```
public boolean equals(Object other)
```

### fromId

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

```
public static final DataTypeAvailability fromId(int id)
```

### getId

```
public int getId()
```

### getName

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

```
public final @NonNull String getName()
```

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```