# KeyedAppState.KeyedAppStateBuilder

Artifact: [androidx.enterprise:enterprise-feedback](https://developer.android.com/jetpack/androidx/releases/enterprise) [View Source](https://cs.android.com/search?q=file:androidx/enterprise/feedback/KeyedAppState.java+class:androidx.enterprise.feedback.KeyedAppState.KeyedAppStateBuilder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/enterprise#1.0.0)

*** ** * ** ***


```
@AutoValue.Builder
public abstract class KeyedAppState.KeyedAppStateBuilder
```

<br />

*** ** * ** ***

The builder for `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState`.

## Summary

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState` | `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder#build()()` Instantiate the `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState`. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder` | `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder#setData(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html data)` Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getData()`. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder` | `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder#setKey(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html key)` Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getKey()`. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder` | `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder#setMessage(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html message)` Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getMessage()`. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder` | `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState.KeyedAppStateBuilder#setSeverity(int)(int severity)` Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getSeverity()`. |

## Public methods

### build

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/enterprise#1.0.0)

```
public @NonNull KeyedAppState build()
```

Instantiate the `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState`.

Severity will default to `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#SEVERITY_INFO()` if not set.

Assumes the key is set, key length is at most 100 characters, message length is as most 1000 characters, data length is at most 1000 characters, and severity is set to either `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#SEVERITY_INFO()` or `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#SEVERITY_ERROR()`.

### setData

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/enterprise#1.0.0)

```
public abstract @NonNull KeyedAppState.KeyedAppStateBuilder setData(@Nullable String data)
```

Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getData()`.

### setKey

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/enterprise#1.0.0)

```
public abstract @NonNull KeyedAppState.KeyedAppStateBuilder setKey(@NonNull String key)
```

Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getKey()`.

### setMessage

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/enterprise#1.0.0)

```
public abstract @NonNull KeyedAppState.KeyedAppStateBuilder setMessage(@Nullable String message)
```

Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getMessage()`.

### setSeverity

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/enterprise#1.0.0)

```
public abstract @NonNull KeyedAppState.KeyedAppStateBuilder setSeverity(int severity)
```

Set `https://developer.android.com/reference/androidx/enterprise/feedback/KeyedAppState#getSeverity()`.