# FunctionDeclaration


```
public final class FunctionDeclaration
```

<br />

*** ** * ** ***

Represents a tool/function declaration that the model can request to execute.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionDeclaration#FunctionDeclaration(kotlin.String,kotlin.String,com.google.mlkit.genai.schema.tools.FunctionSchema,com.google.mlkit.genai.schema.tools.FunctionSchema)( @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/lang/String.html description, https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionSchema parameters, https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionSchema responseSchema )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionDeclaration#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `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/schema/tools/FunctionDeclaration#getDescription()()` human-readable description of what the tool does |
| `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/schema/tools/FunctionDeclaration#getName()()` the name of the function to call |
| `final https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionSchema` | `https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionDeclaration#getParameters()()` the schema describing the parameters this function accepts |
| `final https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionSchema` | `https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionDeclaration#getResponseSchema()()` the schema describing the expected output of this function |
| `int` | `https://developers.google.com/android/reference/com/google/mlkit/genai/schema/tools/FunctionDeclaration#hashCode()()` |
| `@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/schema/tools/FunctionDeclaration#toString()()` |

## Public constructors

### FunctionDeclaration

```
public FunctionDeclaration(
    @NonNull String name,
    @NonNull String description,
    FunctionSchema parameters,
    FunctionSchema responseSchema
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getDescription

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

human-readable description of what the tool does

### getName

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

the name of the function to call

### getParameters

```
public final FunctionSchema getParameters()
```

the schema describing the parameters this function accepts

### getResponseSchema

```
public final FunctionSchema getResponseSchema()
```

the schema describing the expected output of this function

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```