# BackupActionOutputKeys

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

*** ** * ** ***


```
public static class BackupActionOutputKeys
```

<br />

*** ** * ** ***

Keys produced in `https://developer.android.com/reference/androidx/test/backup/BackupDeviceActionResult#payload()` by the actions bundled with this library.

`https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys#STATUS()` is always present. `https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys#ERROR()` is present if and only if `https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys#STATUS()` is `https://developer.android.com/reference/androidx/test/backup/BackupActionValues#STATUS_FAILURE()`. Actions may add their own keys alongside these; the host orchestrator forwards the whole payload to the caller.

Prefer `https://developer.android.com/reference/androidx/test/backup/BackupDeviceActionResult#success(kotlin.collections.Map)` and `https://developer.android.com/reference/androidx/test/backup/BackupDeviceActionResult#failure(kotlin.String,kotlin.collections.Map)` over populating these keys by hand, and `https://developer.android.com/reference/androidx/test/backup/BackupDeviceActionResult#isSuccess()` and `https://developer.android.com/reference/androidx/test/backup/BackupDeviceActionResult#errorMessage()` over reading them by hand.

Input keys live in a separate namespace, `https://developer.android.com/reference/androidx/test/backup/BackupActionInputKeys`.

## Summary

| ### Constants |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys#ERROR()` Human-readable description of why the action failed. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys#STATUS()` Outcome of the action. |

| ### Public fields |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys` | `https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys#INSTANCE()` |

## Constants

### ERROR

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

```
public static final @NonNull String ERROR
```

Human-readable description of why the action failed.

Present if and only if `https://developer.android.com/reference/androidx/test/backup/BackupActionOutputKeys#STATUS()` is `https://developer.android.com/reference/androidx/test/backup/BackupActionValues#STATUS_FAILURE()`.

### STATUS

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

```
public static final @NonNull String STATUS
```

Outcome of the action.

Always one of `https://developer.android.com/reference/androidx/test/backup/BackupActionValues#STATUS_SUCCESS()` or `https://developer.android.com/reference/androidx/test/backup/BackupActionValues#STATUS_FAILURE()`. The outcome is carried as a string rather than a boolean so that further categories, such as a warning or a partial success, can be added without breaking the wire format.

## Public fields

### INSTANCE

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

```
public static @NonNull BackupActionOutputKeys INSTANCE
```