# Google Cloud Dialogflow V2 Client - Class Tool (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 Tool.

Represents a tool.

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

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. The resource name of the tool. Format: `projects/<Project ID>/locations/<Location ID>/tools/<Tool ID>`. |
| `↳ tool_key` | `string` Required. A human readable short name of the tool, which should be unique within the project. It should only contain letters, numbers, and underscores, and it will be used by LLM to identify the tool. |
| `↳ display_name` | `string` Optional. A human readable short name of the tool, to be shown on the UI. |
| `↳ description` | `string` Optional. A human readable description of the tool. |
| `↳ action_confirmation_requirement` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Confirmation requirement for the actions. Each key is an action name in the action_schemas. If an action's confirmation requirement is unspecified (either the key is not present, or its value is CONFIRMATION_REQUIREMENT_UNSPECIFIED), the requirement is inferred from the action's method_type - confirmation is not required if and only if method_type is GET. |
| `↳ extension_spec` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Tool.ExtensionTool` Vertex extension tool specification. |
| `↳ function_spec` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Tool.FunctionTool` Client side executed function specification. |
| `↳ connector_spec` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Tool.ConnectorTool` Integration connectors tool specification. |
| `↳ open_api_spec` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Tool.OpenApiTool` OpenAPI tool. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Creation time of this tool. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Update time of this tool. |
| `↳ satisfies_pzs` | `bool` Output only. A read only boolean field reflecting Zone Separation status of the tool. If the field is absent, it means the status is unknown. |
| `↳ satisfies_pzi` | `bool` Output only. A read only boolean field reflecting Zone Isolation status of the tool. If the field is absent, it means the status is unknown. |

### getName

Output only. Identifier. The resource name of the tool. Format:
`projects/<Project ID>/locations/<Location ID>/tools/<Tool ID>`.

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

### setName

Output only. Identifier. The resource name of the tool. Format:
`projects/<Project ID>/locations/<Location ID>/tools/<Tool ID>`.

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

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

### getToolKey

Required. A human readable short name of the tool, which should be unique
within the project. It should only contain letters, numbers, and
underscores, and it will be used by LLM to identify the tool.

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

### setToolKey

Required. A human readable short name of the tool, which should be unique
within the project. It should only contain letters, numbers, and
underscores, and it will be used by LLM to identify the tool.

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

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

### getDisplayName

Optional. A human readable short name of the tool, to be shown on the UI.

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

### setDisplayName

Optional. A human readable short name of the tool, to be shown on the UI.

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

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

### getDescription

Optional. A human readable description of the tool.

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

### setDescription

Optional. A human readable description of the tool.

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

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

### getActionConfirmationRequirement

Optional. Confirmation requirement for the actions. Each key is an action
name in the action_schemas. If an action's confirmation requirement is
unspecified (either the key is not present, or its value is
CONFIRMATION_REQUIREMENT_UNSPECIFIED), the requirement is inferred from the
action's method_type - confirmation is not required if and only if
method_type is GET.

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

### setActionConfirmationRequirement

Optional. Confirmation requirement for the actions. Each key is an action
name in the action_schemas. If an action's confirmation requirement is
unspecified (either the key is not present, or its value is
CONFIRMATION_REQUIREMENT_UNSPECIFIED), the requirement is inferred from the
action's method_type - confirmation is not required if and only if
method_type is GET.

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

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

### getExtensionSpec

Vertex extension tool specification.

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

### hasExtensionSpec

### setExtensionSpec

Vertex extension tool specification.

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

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

### getFunctionSpec

Client side executed function specification.

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

### hasFunctionSpec

### setFunctionSpec

Client side executed function specification.

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

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

### getConnectorSpec

Integration connectors tool specification.

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

### hasConnectorSpec

### setConnectorSpec

Integration connectors tool specification.

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

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

### getOpenApiSpec

OpenAPI tool.

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

### hasOpenApiSpec

### setOpenApiSpec

OpenAPI tool.

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

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

### getCreateTime

Output only. Creation time of this tool.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Creation time of this tool.

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

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

### getUpdateTime

Output only. Update time of this tool.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Update time of this tool.

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

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

### getSatisfiesPzs

Output only. A read only boolean field reflecting Zone Separation
status of the tool. If the field is absent, it means the status is unknown.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzs

### clearSatisfiesPzs

### setSatisfiesPzs

Output only. A read only boolean field reflecting Zone Separation
status of the tool. If the field is absent, it means the status is unknown.

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

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

### getSatisfiesPzi

Output only. A read only boolean field reflecting Zone Isolation status
of the tool. If the field is absent, it means the status is unknown.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzi

### clearSatisfiesPzi

### setSatisfiesPzi

Output only. A read only boolean field reflecting Zone Isolation status
of the tool. If the field is absent, it means the status is unknown.

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

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

### getSpecification

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