# PermissionsState

# PermissionsState


```
enum PermissionsState : Enum
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html) ||
|   | ↳ | [com.google.home.PermissionsState](https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState) |

*** ** * ** ***

The state of permissions to access home data for the requesting client.

## Summary

| ### Enum Values |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState#GRANTED` | The user has consented to share some subset of home data with the requesting client. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState#NOT_GRANTED` | The user has yet to consent to share any home data with the requesting client. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState#PERMISSIONS_STATE_UNAVAILABLE` | The platform cannot share whether the user has consented or not. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState#PERMISSIONS_STATE_UNINITIALIZED` | Initialization to determine permissions has not completed. |

| ### Public functions |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState` | `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState#valueOf(kotlin.String)(value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Returns the enum constant of this type with the specified name. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState>` | `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState#values()()` Returns an array containing the constants of this enum type, in the order they're declared. |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/kotlin/enums/EnumEntries<https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState>` | `https://developers.home.google.com/reference/kotlin/com/google/home/PermissionsState#entries()` Returns a representation of an immutable list of all enum entries, in the order they're declared. |

## Enum Values

### GRANTED

```
val PermissionsState.GRANTED: PermissionsState
```

The user has consented to share some subset of home data with the requesting client.

### NOT_GRANTED

```
val PermissionsState.NOT_GRANTED: PermissionsState
```

The user has yet to consent to share any home data with the requesting client.

### PERMISSIONS_STATE_UNAVAILABLE

```
val PermissionsState.PERMISSIONS_STATE_UNAVAILABLE: PermissionsState
```

The platform cannot share whether the user has consented or not. In this case, clients should check the home data available to them to determine whether they should ask the user for permissions.

### PERMISSIONS_STATE_UNINITIALIZED

```
val PermissionsState.PERMISSIONS_STATE_UNINITIALIZED: PermissionsState
```

Initialization to determine permissions has not completed. Clients should wait for another status.

## Public functions

### valueOf

```
fun valueOf(value: String): PermissionsState
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Throws |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/index.html` | if this enum type has no constant with the specified name |

### values

```
fun values(): Array<PermissionsState>
```

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

## Public properties

### entries

```
val entries: EnumEntries<PermissionsState>
```

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.