# AgentEvent.FunctionResponse


```
public final class AgentEvent.FunctionResponse implements AgentEvent
```

<br />

*** ** * ** ***

Emitted immediately after a function invocation completes.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.FunctionResponse#FunctionResponse(kotlin.String,kotlin.collections.Map)( @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html name, @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/lang/Object.html> response )` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.FunctionResponse#getName()()` The name of the function that was called. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/lang/Object.html>` | `https://developers.google.com/android/reference/com/google/mlkit/genai/agent/AgentEvent.FunctionResponse#getResponse()()` The response map returned by the function or error details. |

## Public constructors

### FunctionResponse

```
public FunctionResponse(
    @NonNull String name,
    @NonNull Map<@NonNull String, Object> response
)
```

## Public methods

### getName

```
public final @NonNull String getName()
```

The name of the function that was called.

### getResponse

```
public final @NonNull Map<@NonNull String, Object> getResponse()
```

The response map returned by the function or error details.