# Google Cloud Dialogflow V2 Client - Class FunctionTool (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class FunctionTool.

A Function tool describes the functions to be invoked on the client side.

Generated from protobuf message `google.cloud.dialogflow.v2.Tool.FunctionTool`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2 \\ Tool

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ input_schema` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Optional. The JSON schema is encapsulated in a [google.protobuf.Struct](https://protobuf.dev/reference/php/api-docs/google.protobuf.Struct) to describe the input of the function. This input is a JSON object that contains the function's parameters as properties of the object. |
| `↳ output_schema` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Optional. The JSON schema is encapsulated in a [google.protobuf.Struct](https://protobuf.dev/reference/php/api-docs/google.protobuf.Struct) to describe the output of the function. This output is a JSON object that contains the function's parameters as properties of the object. |
| `↳ method_type` | `int` Optional. The method type of the function. If not specified, the default value is GET. |

### getInputSchema

Optional. The JSON schema is encapsulated in a
[google.protobuf.Struct](https://protobuf.dev/reference/php/api-docs/google.protobuf.Struct) to describe the input of
the function. This input is a JSON object that contains the function's
parameters as properties of the object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasInputSchema

### clearInputSchema

### setInputSchema

Optional. The JSON schema is encapsulated in a
[google.protobuf.Struct](https://protobuf.dev/reference/php/api-docs/google.protobuf.Struct) to describe the input of
the function. This input is a JSON object that contains the function's
parameters as properties of the object.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOutputSchema

Optional. The JSON schema is encapsulated in a
[google.protobuf.Struct](https://protobuf.dev/reference/php/api-docs/google.protobuf.Struct) to describe the output
of the function. This output is a JSON object that contains the
function's parameters as properties of the object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasOutputSchema

### clearOutputSchema

### setOutputSchema

Optional. The JSON schema is encapsulated in a
[google.protobuf.Struct](https://protobuf.dev/reference/php/api-docs/google.protobuf.Struct) to describe the output
of the function. This output is a JSON object that contains the
function's parameters as properties of the object.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMethodType

Optional. The method type of the function. If not specified, the default
value is GET.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [MethodType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Tool.MethodType). |

### setMethodType

Optional. The method type of the function. If not specified, the default
value is GET.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [MethodType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Tool.MethodType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |