# Google Cloud Dialogflow Cx V3 Client - Class Playbook (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 Playbook.

Playbook is the basic building block to instruct the LLM how to execute a
certain task.

A playbook consists of a goal to accomplish, an optional list of step by step
instructions (the step instruction may refers to name of the custom or
default plugin tools to use) to perform the task,
a list of contextual input data to be passed in at the beginning of the
invoked, and a list of output parameters to store the playbook result.

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

## 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 playbook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`. |
| `↳ display_name` | `string` Required. The human-readable name of the playbook, unique within an agent. |
| `↳ goal` | `string` Required. High level description of the goal the playbook intend to accomplish. A goal should be concise since it's visible to other playbooks that may reference this playbook. |
| `↳ input_parameter_definitions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ParameterDefinition>` Optional. Defined structured input parameters for this playbook. |
| `↳ output_parameter_definitions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ParameterDefinition>` Optional. Defined structured output parameters for this playbook. |
| `↳ instruction` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Playbook.Instruction` Instruction to accomplish target goal. |
| `↳ token_count` | `int|string` Output only. Estimated number of tokes current playbook takes when sent to the LLM. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp of initial playbook creation. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Last time the playbook version was updated. |
| `↳ referenced_playbooks` | `string[]` Output only. The resource name of other playbooks referenced by the current playbook in the instructions. |
| `↳ referenced_flows` | `string[]` Output only. The resource name of flows referenced by the current playbook in the instructions. |
| `↳ referenced_tools` | `string[]` Optional. The resource name of tools referenced by the current playbook in the instructions. If not provided explicitly, they are will be implied using the tool being referenced in goal and steps. |
| `↳ inline_actions` | `string[]` Optional. Output only. Names of inline actions scoped to this playbook. These actions are in addition to those belonging to referenced tools, child playbooks, and flows, e.g. actions that are defined in the playbook's code block. |
| `↳ code_block` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.CodeBlock` Optional. The playbook's scoped code block, which may implement handlers and actions. |
| `↳ llm_model_settings` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.LlmModelSettings` Optional. Llm model settings for the playbook. |
| `↳ handlers` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Handler>` Optional. A list of registered handlers to execuate based on the specified triggers. |
| `↳ playbook_type` | `int` Optional. Type of the playbook. |

### getName

The unique identifier of the playbook.

Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.

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

### setName

The unique identifier of the playbook.

Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.

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

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

### getDisplayName

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

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

### setDisplayName

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

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

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

### getGoal

Required. High level description of the goal the playbook intend to
accomplish. A goal should be concise since it's visible to other playbooks
that may reference this playbook.

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

### setGoal

Required. High level description of the goal the playbook intend to
accomplish. A goal should be concise since it's visible to other playbooks
that may reference this playbook.

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

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

### getInputParameterDefinitions

Optional. Defined structured input parameters for this playbook.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ParameterDefinition>` |   |

### setInputParameterDefinitions

Optional. Defined structured input parameters for this playbook.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ParameterDefinition>` |

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

### getOutputParameterDefinitions

Optional. Defined structured output parameters for this playbook.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ParameterDefinition>` |   |

### setOutputParameterDefinitions

Optional. Defined structured output parameters for this playbook.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ParameterDefinition>` |

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

### getInstruction

Instruction to accomplish target goal.

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

### hasInstruction

### clearInstruction

### setInstruction

Instruction to accomplish target goal.

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

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

### getTokenCount

Output only. Estimated number of tokes current playbook takes when sent to
the LLM.

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

### setTokenCount

Output only. Estimated number of tokes current playbook takes when sent to
the LLM.

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

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

### getCreateTime

Output only. The timestamp of initial playbook creation.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp of initial playbook creation.

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

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

### getUpdateTime

Output only. Last time the playbook version was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Last time the playbook version was updated.

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

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

### getReferencedPlaybooks

Output only. The resource name of other playbooks referenced by the current
playbook in the instructions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setReferencedPlaybooks

Output only. The resource name of other playbooks referenced by the current
playbook in the instructions.

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

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

### getReferencedFlows

Output only. The resource name of flows referenced by the current playbook
in the instructions.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setReferencedFlows

Output only. The resource name of flows referenced by the current playbook
in the instructions.

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

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

### getReferencedTools

Optional. The resource name of tools referenced by the current playbook in
the instructions. If not provided explicitly, they are will
be implied using the tool being referenced in goal and steps.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setReferencedTools

Optional. The resource name of tools referenced by the current playbook in
the instructions. If not provided explicitly, they are will
be implied using the tool being referenced in goal and steps.

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

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

### getInlineActions

Optional. Output only. Names of inline actions scoped to this playbook.

These actions are in addition to those belonging to referenced tools, child
playbooks, and flows, e.g. actions that are defined in the playbook's code
block.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setInlineActions

Optional. Output only. Names of inline actions scoped to this playbook.

These actions are in addition to those belonging to referenced tools, child
playbooks, and flows, e.g. actions that are defined in the playbook's code
block.

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

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

### getCodeBlock

Optional. The playbook's scoped code block, which may implement handlers
and actions.

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

### hasCodeBlock

### clearCodeBlock

### setCodeBlock

Optional. The playbook's scoped code block, which may implement handlers
and actions.

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

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

### getLlmModelSettings

Optional. Llm model settings for the playbook.

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

### hasLlmModelSettings

### clearLlmModelSettings

### setLlmModelSettings

Optional. Llm model settings for the playbook.

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

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

### getHandlers

Optional. A list of registered handlers to execuate based on the specified
triggers.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Handler>` |   |

### setHandlers

Optional. A list of registered handlers to execuate based on the specified
triggers.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Handler>` |

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

### getPlaybookType

Optional. Type of the playbook.

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

### setPlaybookType

Optional. Type of the playbook.

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

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