# BackupDeviceActionArgs

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

*** ** * ** ***


```
class BackupDeviceActionArgs
```

<br />

*** ** * ** ***

Arguments passed from the host orchestrator to a `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction`.

The payload is a flat map of string keys to string values. `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupActionInputKeys` documents every key the actions bundled with this library understand, and `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupActionValues` documents the values those keys accept. Keys an action does not recognize are ignored, so one payload can drive both phases of a flow. Custom `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction` implementations may define keys of their own.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceActionArgs#BackupDeviceActionArgs(kotlin.collections.Map)(payload: 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/BackupDeviceActionArgs#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceActionArgs#get(kotlin.String)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns the argument stored under `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceActionArgs#get(kotlin.String)`, or `null` when the host did not supply it. |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceActionArgs#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceActionArgs#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/BackupDeviceActionArgs#payload()` key-value arguments for the action, keyed by `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupActionInputKeys` |

## Public constructors

### BackupDeviceActionArgs

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

```
BackupDeviceActionArgs(payload: Map<String, String> = emptyMap())
```

## Public functions

### equals

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

### get

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

```
operator fun get(key: String): String?
```

Returns the argument stored under `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceActionArgs#get(kotlin.String)`, or `null` when the host did not supply it.

Any key may be read, so a custom `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupDeviceAction` can query keys of its own alongside the `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupActionInputKeys` constants.

### hashCode

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

### toString

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

## Public properties

### payload

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

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

key-value arguments for the action, keyed by `https://developer.android.com/reference/kotlin/androidx/test/backup/BackupActionInputKeys`