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 MockedToolCall.

A mocked tool call.

Expresses the target tool + a pattern to match against that tool's
args / inputs. If the pattern matches, then the mock response will be
returned.

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

## Namespace

Google \\ Cloud \\ Ces \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ tool_id` | `string` Optional. The name of the tool to mock. Format: `projects/{project}/locations/{location}/apps/{app}/tools/{tool}` |
| `↳ toolset` | `ToolsetTool` Optional. The toolset to mock. |
| `↳ tool` | `string` Optional. Deprecated. Use tool_identifier instead. |
| `↳ expected_args_pattern` | `Google\Protobuf\Struct` Required. A pattern to match against the args / inputs of all dispatched tool calls. If the tool call inputs match this pattern, then mock output will be returned. |
| `↳ mock_response` | `Google\Protobuf\Struct` Optional. The mock response / output to return if the tool call args / inputs match the pattern. |

### getToolId

Optional. The name of the tool to mock.

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

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

### hasToolId

### setToolId

Optional. The name of the tool to mock.

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

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

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

### getToolset

Optional. The toolset to mock.

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

### hasToolset

### setToolset

Optional. The toolset to mock.

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

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

### getTool

Optional. Deprecated. Use tool_identifier instead.

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

### setTool

Optional. Deprecated. Use tool_identifier instead.

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

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

### getExpectedArgsPattern

Required. A pattern to match against the args / inputs of all dispatched
tool calls. If the tool call inputs match this pattern, then mock output
will be returned.

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

### hasExpectedArgsPattern

### clearExpectedArgsPattern

### setExpectedArgsPattern

Required. A pattern to match against the args / inputs of all dispatched
tool calls. If the tool call inputs match this pattern, then mock output
will be returned.

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

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

### getMockResponse

Optional. The mock response / output to return if the tool call args /
inputs match the pattern.

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

### hasMockResponse

### clearMockResponse

### setMockResponse

Optional. The mock response / output to return if the tool call args /
inputs match the pattern.

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

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

### getToolIdentifier

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