# StorageDomain.CustomData

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.CustomData) Added in [1.0.0-alpha04](https://developer.android.com/jetpack/androidx/releases/test-backup#1.0.0-alpha04)

*** ** * ** ***


```
class StorageDomain.CustomData : 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.CustomData](https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData) |

*** ** * ** ***

Targets data that device actions of your own seed and verify, such as a restore credential that only the app's code can create and read.

The flow runs `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#populateAction()` with `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#(kotlin.String,kotlin.String,kotlin.collections.Map)` before the backup. After the restore, it runs `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#verifyAction()` with `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#(kotlin.String,kotlin.String,kotlin.collections.Map)` and the data that `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#populateAction()` returned, except its `status` and `error`. That data replaces the values of `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#(kotlin.String,kotlin.String,kotlin.collections.Map)` with the same keys. The flow fails if either action fails, or if `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#populateAction()` returns a key that the runner reserves.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#CustomData(kotlin.String,kotlin.String,kotlin.collections.Map)( populateAction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, verifyAction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, args: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html> )` |

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

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#args()` arguments for both actions, as `https://developer.android.com/reference/kotlin/androidx/test/backup/host/BackupRestoreController#runOnDevice(kotlin.String,kotlin.collections.Map,java.time.Duration,kotlin.Boolean)` takes them. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#populateAction()` class name of the `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction` that seeds the data |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/host/StorageDomain.CustomData#verifyAction()` class name of the `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction` that verifies the data after the restore |

## Public constructors

### CustomData

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

```
CustomData(
    populateAction: String,
    verifyAction: String,
    args: Map<String, String> = emptyMap()
)
```

## Public functions

### equals

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

### hashCode

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

### toString

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

## Public properties

### args

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

```
val args: Map<String, String>
```

arguments for both actions, as `https://developer.android.com/reference/kotlin/androidx/test/backup/host/BackupRestoreController#runOnDevice(kotlin.String,kotlin.collections.Map,java.time.Duration,kotlin.Boolean)` takes them. The keys `actionClass`, `argsFile`, `debug` and `redirect_dir` are reserved for the runner; with one of them, construction fails with an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html`. The domain keeps a copy of it.

### populateAction

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

```
val populateAction: String
```

class name of the `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction` that seeds the data

### verifyAction

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

```
val verifyAction: String
```

class name of the `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction` that verifies the data after the restore