# ConsentScreenOptions


```
data class ConsentScreenOptions
```

<br />

*** ** * ** ***

Options to customize the consent screen.

Valid parameter combinations are:

1. **Invitation Flow** : Only `invitationToken` is set. All other parameters must be null or false.

2. **Structure Migration** : `structureId` is set, `isAllowStructureChange` is false, and `allowedStructureIds` is null/empty.

3. **Structure Hinting** : `structureId` is set, `isAllowStructureChange` is true. `allowedStructureIds` can optionally be set to limit selection.

4. **No Structure Hinting (Default / Fallback)** : `structureId` is null, `isAllowStructureChange` is false, and `allowedStructureIds` is null/empty. *Note* : This is the recommended configuration to "Preselect nothing, allow selecting any structure". The WebView frontend will automatically default the structure change permission to `true` in this case.

| Throws |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/index.html` | if an invalid combination of options is provided. |

## Summary

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/ConsentScreenOptions#ConsentScreenOptions(kotlin.String,kotlin.collections.List,kotlin.Boolean,kotlin.String,kotlin.String)( structureId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?, allowedStructureIds: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>?, isAllowStructureChange: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, invitationToken: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?, appScope: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html? )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>?` | `https://developers.home.google.com/reference/kotlin/com/google/home/ConsentScreenOptions#allowedStructureIds()` The IDs of the structures that the user is allowed to grant permissions to. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/ConsentScreenOptions#appScope()` Optional application scope to be associated with the current permissions flow. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/ConsentScreenOptions#invitationToken()` Optional invitation token to be used for accepting an invitation. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/ConsentScreenOptions#isAllowStructureChange()` Whether the user is allowed to change the structure that they want to grant permissions to. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/ConsentScreenOptions#structureId()` The ID of the structure that the user wants to grant permissions to. |

## Public constructors

### ConsentScreenOptions

```
ConsentScreenOptions(
    structureId: String? = null,
    allowedStructureIds: List<String>? = null,
    isAllowStructureChange: Boolean = false,
    invitationToken: String? = null,
    appScope: String? = null
)
```

## Public properties

### allowedStructureIds

```
val allowedStructureIds: List<String>?
```

The IDs of the structures that the user is allowed to grant permissions to. Can only be set when `isAllowStructureChange` is true.

### appScope

```
val appScope: String?
```

Optional application scope to be associated with the current permissions flow.

### invitationToken

```
val invitationToken: String?
```

Optional invitation token to be used for accepting an invitation. Not valid with any structure parameters.

### isAllowStructureChange

```
val isAllowStructureChange: Boolean
```

Whether the user is allowed to change the structure that they want to grant permissions to.

### structureId

```
val structureId: String?
```

The ID of the structure that the user wants to grant permissions to.