# Google Cloud Dialogflow Cx V3 Client - Class Tool (0.11.1)

0.11.1 (latest) 0.11.0 0.10.2 0.9.2 0.8.1 0.7.2 0.6.0 0.5.2 0.4.1 0.3.4 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class Tool.

A tool provides a list of actions which are available to the
[Playbook](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Playbook) to attain its goal. A Tool
consists of a description of the tool's usage and a specification of the tool
which contains the schema and authentication information.

Generated from protobuf message `google.cloud.dialogflow.cx.v3.Tool`

## Namespace

Google \\ Cloud \\ Dialogflow \\ Cx \\ V3

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The unique identifier of the Tool. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`. |
| `↳ display_name` | `string` Required. The human-readable name of the Tool, unique within an agent. |
| `↳ description` | `string` Required. High level description of the Tool and its usage. |
| `↳ open_api_spec` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.OpenApiTool` OpenAPI specification of the Tool. |
| `↳ data_store_spec` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.DataStoreTool` Data store search tool specification. |
| `↳ function_spec` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.FunctionTool` Client side executed function specification. |
| `↳ tool_type` | `int` Output only. The tool type. |

### getName

The unique identifier of the Tool.

Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

The unique identifier of the Tool.

Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getDisplayName

Required. The human-readable name of the Tool, unique within an agent.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDisplayName

Required. The human-readable name of the Tool, unique within an agent.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getDescription

Required. High level description of the Tool and its usage.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDescription

Required. High level description of the Tool and its usage.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getOpenApiSpec

OpenAPI specification of the Tool.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.OpenApiTool|null` |   |

### hasOpenApiSpec

### setOpenApiSpec

OpenAPI specification of the Tool.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.OpenApiTool` |

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

### getDataStoreSpec

Data store search tool specification.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.DataStoreTool|null` |   |

### hasDataStoreSpec

### setDataStoreSpec

Data store search tool specification.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.DataStoreTool` |

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

### getFunctionSpec

Client side executed function specification.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.FunctionTool|null` |   |

### hasFunctionSpec

### setFunctionSpec

Client side executed function specification.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.FunctionTool` |

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

### getToolType

Output only. The tool type.

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

### setToolType

Output only. The tool type.

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

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

### getSpecification

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |