# StorageDomain.ExcludedData

Artifact: [androidx.test.backup:backup-host](https://developer.android.com/jetpack/androidx/releases/test-backup) [View Source](https://cs.android.com/search?q=file:androidx/test/backup/host/StorageDomain.kt+class:androidx.test.backup.host.StorageDomain.ExcludedData) Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

*** ** * ** ***


```
class StorageDomain.ExcludedData : StorageDomain
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.test.backup.host.StorageDomain](https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain) ||
|   | ↳ | [androidx.test.backup.host.StorageDomain.ExcludedData](https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.ExcludedData) |

*** ** * ** ***

Targets data that the restore doesn't bring back, such as data that the app's backup rules exclude.

The flow seeds `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.ExcludedData#domain()` before the backup, and verifies after the restore that the preference key, the database row with the primary key value, or the file is absent. A flow needs a restored domain as well, to verify that the restore happened: a flow with only excluded data fails with an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.ExcludedData#ExcludedData(androidx.test.backup.host.StorageDomain)(domain: https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain)` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.ExcludedData#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/test/backup/host/StorageDomain.ExcludedData#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.ExcludedData#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain` | `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.ExcludedData#domain()` data to seed and then expect absent: a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.Preference` or `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.DataStorePreference` with a value, a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.Database`, a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.TextFile` or a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.BinaryFile`. |

## Public constructors

### ExcludedData

Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

```
ExcludedData(domain: StorageDomain)
```

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### domain

Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

```
val domain: StorageDomain
```

data to seed and then expect absent: a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.Preference` or `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.DataStorePreference` with a value, a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.Database`, a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.TextFile` or a `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.BinaryFile`. Any other domain fails construction with an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html`.