0.6.0 (latest) 0.5.0 0.4.4 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Ces V1 Client class ToolResponse.

The execution result of a specific tool from the client or the agent.

Generated from protobuf message `google.cloud.ces.v1.ToolResponse`

## Namespace

Google \\ Cloud \\ Ces \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ tool` | `string` Optional. The name of the tool to execute. Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` |
| `↳ toolset_tool` | `ToolsetTool` Optional. The toolset tool that got executed. |
| `↳ id` | `string` Optional. The matching ID of the [tool call](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.ToolCall.md.txt) the response is for. |
| `↳ display_name` | `string` Output only. Display name of the tool. |
| `↳ response` | `Google\Protobuf\Struct` Required. The tool execution result in JSON object format. Use "output" key to specify tool response and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as tool execution result. |

### getTool

Optional. The name of the tool to execute.

Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`

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

### hasTool

### setTool

Optional. The name of the tool to execute.

Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}`

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

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

### getToolsetTool

Optional. The toolset tool that got executed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ToolsetTool|null` |   |

### hasToolsetTool

### setToolsetTool

Optional. The toolset tool that got executed.

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

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

### getId

Optional. The matching ID of the [tool call](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.ToolCall.md.txt)
the response is for.

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

### setId

Optional. The matching ID of the [tool call](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.ToolCall.md.txt)
the response is for.

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

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

### getDisplayName

Output only. Display name of the tool.

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

### setDisplayName

Output only. Display name of the tool.

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

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

### getResponse

Required. The tool execution result in JSON object format.

Use "output" key to specify tool response and "error" key to specify
error details (if any). If "output" and "error" keys are not specified,
then whole "response" is treated as tool execution result.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Struct|null` |   |

### hasResponse

### clearResponse

### setResponse

Required. The tool execution result in JSON object format.

Use "output" key to specify tool response and "error" key to specify
error details (if any). If "output" and "error" keys are not specified,
then whole "response" is treated as tool execution result.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Struct` |

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

### getToolIdentifier

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