ExecuteAppFunctionResponse.Builder


public static final class ExecuteAppFunctionResponse.Builder
extends Object

java.lang.Object
   ↳ android.app.appsearch.functions.ExecuteAppFunctionResponse.Builder


The builder for creating ExecuteAppFunctionResponse instances.

Summary

Public constructors

Builder()

Public methods

ExecuteAppFunctionResponse build()

Constructs a new ExecuteAppFunctionResponse from the contents of this builder.

ExecuteAppFunctionResponse.Builder setExtras(Bundle extras)

Sets the additional metadata relevant to this function execution response.

ExecuteAppFunctionResponse.Builder setResult(GenericDocument result)

Sets the result of the app function execution.

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public ExecuteAppFunctionResponse build ()

Constructs a new ExecuteAppFunctionResponse from the contents of this builder.

Returns
ExecuteAppFunctionResponse This value cannot be null.

setExtras

public ExecuteAppFunctionResponse.Builder setExtras (Bundle extras)

Sets the additional metadata relevant to this function execution response. Defaults to Bundle.EMPTY if not set.

Parameters
extras Bundle: This value cannot be null.

Returns
ExecuteAppFunctionResponse.Builder This value cannot be null.

setResult

public ExecuteAppFunctionResponse.Builder setResult (GenericDocument result)

Sets the result of the app function execution. The result is stored within a GenericDocument under the property name ExecuteAppFunctionResponse.PROPERTY_RESULT. An empty GenericDocument indicates that the function does not produce a return value. Defaults to an empty GenericDocument if not set.

Parameters
result GenericDocument: This value cannot be null.

Returns
ExecuteAppFunctionResponse.Builder This value cannot be null.