# AppFunctionData.Builder

Artifact: [androidx.appfunctions:appfunctions](https://developer.android.com/jetpack/androidx/releases/appfunctions) [View Source](https://cs.android.com/search?q=file:androidx/appfunctions/AppFunctionData.kt+class:androidx.appfunctions.AppFunctionData.Builder) Added in [1.0.0-rc01](https://developer.android.com/jetpack/androidx/releases/appfunctions#1.0.0-rc01)

*** ** * ** ***


```
public final class AppFunctionData.Builder
```

<br />

*** ** * ** ***

Builder for constructing `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData`

For example, to write an `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` for calling an AppFunction

```
fun callCreateNoteFunction(metadata: AppFunctionMetadata) {
  val appFunctionData = AppFunctionData.Builder(
    metadata.parameters,
    metadata.components,
  ).apply {
    setString("title", "Note Title")
    // If the function doesn't accept "owner" as parameter, it would throw an error
    setString("owner", "Me")
    // If the function actually expects "content" as String, it would throw an error
    setInt("content", 100)
  }
   .build()
}
```

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#Builder(androidx.appfunctions.metadata.AppFunctionAllOfTypeMetadata,androidx.appfunctions.metadata.AppFunctionComponentsMetadata)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionAllOfTypeMetadata allOfTypeMetadata, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata )` Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` representing an all-of object. |
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#Builder(androidx.appfunctions.metadata.AppFunctionObjectTypeMetadata,androidx.appfunctions.metadata.AppFunctionComponentsMetadata)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionObjectTypeMetadata objectTypeMetadata, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata )` Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` representing an object. |
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#Builder(kotlin.collections.List,androidx.appfunctions.metadata.AppFunctionComponentsMetadata)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionParameterMetadata> parameterMetadataList, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata )` Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create input data for an AppFunction execution call. |
| `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#Builder(androidx.appfunctions.metadata.AppFunctionResponseMetadata,androidx.appfunctions.metadata.AppFunctionComponentsMetadata)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionResponseMetadata responseMetadata, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata )` Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` representing a response. |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` | `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#build()()` Builds `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionData(kotlin.String,androidx.appfunctions.AppFunctionData)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData value)` Sets an `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionData(kotlin.String,androidx.appfunctions.AppFunctionData)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionDataList(kotlin.String,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData> value )` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionDataList(kotlin.String,kotlin.collections.List)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBoolean(kotlin.String,kotlin.Boolean)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, boolean value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBoolean(kotlin.String,kotlin.Boolean)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBooleanArray(kotlin.String,kotlin.BooleanArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull boolean[] value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBooleanArray(kotlin.String,kotlin.BooleanArray)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setByteArray(kotlin.String,kotlin.ByteArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull byte[] value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setByteArray(kotlin.String,kotlin.ByteArray)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDouble(kotlin.String,kotlin.Double)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, double value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDouble(kotlin.String,kotlin.Double)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDoubleArray(kotlin.String,kotlin.DoubleArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull double[] value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDoubleArray(kotlin.String,kotlin.DoubleArray)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloat(kotlin.String,kotlin.Float)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, float value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloat(kotlin.String,kotlin.Float)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloatArray(kotlin.String,kotlin.FloatArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull float[] value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloatArray(kotlin.String,kotlin.FloatArray)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setInt(kotlin.String,kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, int value)` Sets an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setInt(kotlin.String,kotlin.Int)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setIntArray(kotlin.String,kotlin.IntArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull int[] value)` Sets an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setIntArray(kotlin.String,kotlin.IntArray)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLong(kotlin.String,kotlin.Long)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, long value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLong(kotlin.String,kotlin.Long)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLongArray(kotlin.String,kotlin.LongArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull long[] value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLongArray(kotlin.String,kotlin.LongArray)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html <T extends https://developer.android.com/reference/android/os/Parcelable.html> https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelable(kotlin.String,android.os.Parcelable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull T value)` Sets a `https://developer.android.com/reference/android/os/Parcelable.html` value of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelable(kotlin.String,android.os.Parcelable)` for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelable(kotlin.String,android.os.Parcelable)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html <T extends https://developer.android.com/reference/android/os/Parcelable.html> https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value )` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/android/os/Parcelable.html` values of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List)` for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html <T extends https://developer.android.com/reference/android/os/Parcelable.html> https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List,java.lang.Class)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> clazz )` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/android/os/Parcelable.html` values of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List,java.lang.Class)` for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List,java.lang.Class)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setString(kotlin.String,kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setString(kotlin.String,kotlin.String)`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setStringList(kotlin.String,kotlin.collections.List)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> value)` Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setStringList(kotlin.String,kotlin.collections.List)`. |

## Public constructors

### Builder

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

```
public Builder(
    @NonNull AppFunctionAllOfTypeMetadata allOfTypeMetadata,
    @NonNull AppFunctionComponentsMetadata componentMetadata
)
```

Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` representing an all-of object.

The caller can use this to construct the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` that conforms with the provided `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#(androidx.appfunctions.metadata.AppFunctionAllOfTypeMetadata,androidx.appfunctions.metadata.AppFunctionComponentsMetadata)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionAllOfTypeMetadata allOfTypeMetadata` | `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionAllOfTypeMetadata` defining the object structure. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata` | `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` that has the shared data types. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionAllOfTypeMetadata` |   |
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` |   |

### Builder

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

```
public Builder(
    @NonNull AppFunctionObjectTypeMetadata objectTypeMetadata,
    @NonNull AppFunctionComponentsMetadata componentMetadata
)
```

Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` representing an object.

The caller can use this to construct the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` that conforms with the provided `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#(androidx.appfunctions.metadata.AppFunctionObjectTypeMetadata,androidx.appfunctions.metadata.AppFunctionComponentsMetadata)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionObjectTypeMetadata objectTypeMetadata` | `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionObjectTypeMetadata` defining the object structure. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata` | `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` that has the shared data types. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionObjectTypeMetadata` |   |
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` |   |

### Builder

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

```
public Builder(
    @NonNull List<@NonNull AppFunctionParameterMetadata> parameterMetadataList,
    @NonNull AppFunctionComponentsMetadata componentMetadata
)
```

Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create input data for an AppFunction execution call.

The caller can use this to construct the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` for `https://developer.android.com/reference/androidx/appfunctions/ExecuteAppFunctionRequest#functionParameters()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionParameterMetadata> parameterMetadataList` | List of `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionParameterMetadata` defining the input parameters. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata` | `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` that has the shared data types. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionParameterMetadata` |   |
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` |   |

### Builder

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

```
public Builder(
    @NonNull AppFunctionResponseMetadata responseMetadata,
    @NonNull AppFunctionComponentsMetadata componentMetadata
)
```

Constructs a `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder` to create `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` representing a response.

The caller can use this to construct the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` for `https://developer.android.com/reference/androidx/appfunctions/ExecuteAppFunctionResponse.Success#returnValue()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionResponseMetadata responseMetadata` | `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionResponseMetadata` defining the response structure. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata componentMetadata` | `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` that has the shared data types. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionResponseMetadata` |   |
| `https://developer.android.com/reference/androidx/appfunctions/metadata/AppFunctionComponentsMetadata` |   |

## Public methods

### build

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

```
public final @NonNull AppFunctionData build()
```

Builds `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData`

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if any required property, as defined by the metadata specification, is missing. |

### setAppFunctionData

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setAppFunctionData(@NonNull String key, @NonNull AppFunctionData value)
```

Sets an `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionData(kotlin.String,androidx.appfunctions.AppFunctionData)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData value` | The `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionData(kotlin.String,androidx.appfunctions.AppFunctionData)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionData(kotlin.String,androidx.appfunctions.AppFunctionData)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionData(kotlin.String,androidx.appfunctions.AppFunctionData)`. |

### setAppFunctionDataList

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setAppFunctionDataList(
    @NonNull String key,
    @NonNull List<@NonNull AppFunctionData> value
)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionDataList(kotlin.String,kotlin.collections.List)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/appfunctions/AppFunctionData> value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionDataList(kotlin.String,kotlin.collections.List)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionDataList(kotlin.String,kotlin.collections.List)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setAppFunctionDataList(kotlin.String,kotlin.collections.List)`. |

### setBoolean

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setBoolean(@NonNull String key, boolean value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBoolean(kotlin.String,kotlin.Boolean)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` value for. |
| `boolean value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBoolean(kotlin.String,kotlin.Boolean)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBoolean(kotlin.String,kotlin.Boolean)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBoolean(kotlin.String,kotlin.Boolean)`. |

### setBooleanArray

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setBooleanArray(@NonNull String key, @NonNull boolean[] value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBooleanArray(kotlin.String,kotlin.BooleanArray)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean-array/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull boolean[] value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean-array/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBooleanArray(kotlin.String,kotlin.BooleanArray)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBooleanArray(kotlin.String,kotlin.BooleanArray)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setBooleanArray(kotlin.String,kotlin.BooleanArray)`. |

### setByteArray

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setByteArray(@NonNull String key, @NonNull byte[] value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setByteArray(kotlin.String,kotlin.ByteArray)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull byte[] value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setByteArray(kotlin.String,kotlin.ByteArray)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setByteArray(kotlin.String,kotlin.ByteArray)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setByteArray(kotlin.String,kotlin.ByteArray)`. |

### setDouble

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setDouble(@NonNull String key, double value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDouble(kotlin.String,kotlin.Double)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value for. |
| `double value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDouble(kotlin.String,kotlin.Double)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDouble(kotlin.String,kotlin.Double)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDouble(kotlin.String,kotlin.Double)`. |

### setDoubleArray

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setDoubleArray(@NonNull String key, @NonNull double[] value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDoubleArray(kotlin.String,kotlin.DoubleArray)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull double[] value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDoubleArray(kotlin.String,kotlin.DoubleArray)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDoubleArray(kotlin.String,kotlin.DoubleArray)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setDoubleArray(kotlin.String,kotlin.DoubleArray)`. |

### setFloat

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setFloat(@NonNull String key, float value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloat(kotlin.String,kotlin.Float)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` value for. |
| `float value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloat(kotlin.String,kotlin.Float)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloat(kotlin.String,kotlin.Float)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloat(kotlin.String,kotlin.Float)`. |

### setFloatArray

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setFloatArray(@NonNull String key, @NonNull float[] value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloatArray(kotlin.String,kotlin.FloatArray)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull float[] value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloatArray(kotlin.String,kotlin.FloatArray)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloatArray(kotlin.String,kotlin.FloatArray)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setFloatArray(kotlin.String,kotlin.FloatArray)`. |

### setInt

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setInt(@NonNull String key, int value)
```

Sets an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setInt(kotlin.String,kotlin.Int)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value for. |
| `int value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setInt(kotlin.String,kotlin.Int)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setInt(kotlin.String,kotlin.Int)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setInt(kotlin.String,kotlin.Int)`. |

### setIntArray

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setIntArray(@NonNull String key, @NonNull int[] value)
```

Sets an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setIntArray(kotlin.String,kotlin.IntArray)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull int[] value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setIntArray(kotlin.String,kotlin.IntArray)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setIntArray(kotlin.String,kotlin.IntArray)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setIntArray(kotlin.String,kotlin.IntArray)`. |

### setLong

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setLong(@NonNull String key, long value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLong(kotlin.String,kotlin.Long)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` value for. |
| `long value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLong(kotlin.String,kotlin.Long)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLong(kotlin.String,kotlin.Long)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLong(kotlin.String,kotlin.Long)`. |

### setLongArray

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setLongArray(@NonNull String key, @NonNull long[] value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLongArray(kotlin.String,kotlin.LongArray)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull long[] value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLongArray(kotlin.String,kotlin.LongArray)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLongArray(kotlin.String,kotlin.LongArray)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setLongArray(kotlin.String,kotlin.LongArray)`. |

### setParcelable

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder <T extends Parcelable> setParcelable(@NonNull String key, @NonNull T value)
```

Sets a `https://developer.android.com/reference/android/os/Parcelable.html` value of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelable(kotlin.String,android.os.Parcelable)` for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelable(kotlin.String,android.os.Parcelable)`.

For `Parcelable` types not defined by the Android platform (e.g., custom classes shared between agents and apps), forward and backward compatibility is **not guaranteed** by this library. The sender and receiver of the `Parcelable` are responsible for managing any compatibility and versioning concerns.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull T value` | The `https://developer.android.com/reference/android/os/Parcelable.html` value of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelable(kotlin.String,android.os.Parcelable)` to set. |

### setParcelableList

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder <T extends Parcelable> setParcelableList(
    @NonNull String key,
    @NonNull List<@NonNull T> value
)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/android/os/Parcelable.html` values of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List)` for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List)`.

For `Parcelable` types not defined by the Android platform (e.g., custom classes shared between agents and apps), forward and backward compatibility is **not guaranteed** by this framework. The sender and receiver of the `Parcelable` are responsible for managing any compatibility and versioning concerns.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the list for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/android/os/Parcelable.html` values of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List)` to set. |

### setParcelableList

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder <T extends Parcelable> setParcelableList(
    @NonNull String key,
    @NonNull List<@NonNull T> value,
    @NonNull Class<@NonNull T> clazz
)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/android/os/Parcelable.html` values of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List,java.lang.Class)` for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List,java.lang.Class)`.

For `Parcelable` types not defined by the Android platform (e.g., custom classes shared between agents and apps), forward and backward compatibility is **not guaranteed** by this framework. The sender and receiver of the `Parcelable` are responsible for managing any compatibility and versioning concerns.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the list for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://developer.android.com/reference/android/os/Parcelable.html` values of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List,java.lang.Class)` to set. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> clazz` | The `https://developer.android.com/reference/java/lang/Class.html` of the `https://developer.android.com/reference/android/os/Parcelable.html` list to set, of type `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setParcelableList(kotlin.String,kotlin.collections.List,java.lang.Class)`. |

### setString

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setString(@NonNull String key, @NonNull String value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setString(kotlin.String,kotlin.String)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setString(kotlin.String,kotlin.String)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setString(kotlin.String,kotlin.String)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setString(kotlin.String,kotlin.String)`. |

### setStringList

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

```
@CanIgnoreReturnValue
public final @NonNull AppFunctionData.Builder setStringList(@NonNull String key, @NonNull List<@NonNull String> value)
```

Sets a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value for the given `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setStringList(kotlin.String,kotlin.collections.List)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html key` | The key to set the `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value for. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html> value` | The `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html` of `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` value to set. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setStringList(kotlin.String,kotlin.collections.List)` is not allowed or the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setStringList(kotlin.String,kotlin.collections.List)` does not match the metadata specification associated with the `https://developer.android.com/reference/androidx/appfunctions/AppFunctionData.Builder#setStringList(kotlin.String,kotlin.collections.List)`. |