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

Example represents a sample execution of the playbook in the conversation.

An example consists of a list of ordered actions performed by end user
or Dialogflow agent according the playbook instructions to fulfill the task.

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

## 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 example. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>/examples/<ExampleID>`. |
| `↳ playbook_input` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.PlaybookInput` Optional. The input to the playbook in the example. |
| `↳ playbook_output` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.PlaybookOutput` Optional. The output of the playbook in the example. |
| `↳ actions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Action>` Required. The ordered list of actions performed by the end user and the Dialogflow agent. |
| `↳ display_name` | `string` Required. The display name of the example. |
| `↳ description` | `string` Optional. The high level concise description of the example. The max number of characters is 200. |
| `↳ token_count` | `int|string` Output only. Estimated number of tokes current example takes when sent to the LLM. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp of initial example creation. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Last time the example was updated. |
| `↳ conversation_state` | `int` Required. Example's output state. |
| `↳ language_code` | `string` Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents. |

### getName

The unique identifier of the playbook example.

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

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

### setName

The unique identifier of the playbook example.

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

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

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

### getPlaybookInput

Optional. The input to the playbook in the example.

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

### hasPlaybookInput

### clearPlaybookInput

### setPlaybookInput

Optional. The input to the playbook in the example.

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

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

### getPlaybookOutput

Optional. The output of the playbook in the example.

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

### hasPlaybookOutput

### clearPlaybookOutput

### setPlaybookOutput

Optional. The output of the playbook in the example.

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

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

### getActions

Required. The ordered list of actions performed by the end user and the
Dialogflow agent.

| **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.Action>` |   |

### setActions

Required. The ordered list of actions performed by the end user and the
Dialogflow agent.

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

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

### getDisplayName

Required. The display name of the example.

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

### setDisplayName

Required. The display name of the example.

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

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

### getDescription

Optional. The high level concise description of the example. The max number
of characters is 200.

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

### setDescription

Optional. The high level concise description of the example. The max number
of characters is 200.

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

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

### getTokenCount

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

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

### setTokenCount

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

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

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

### getCreateTime

Output only. The timestamp of initial example creation.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp of initial example 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 example was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Last time the example was updated.

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

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

### getConversationState

Required. Example's output state.

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

### setConversationState

Required. Example's output state.

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

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

### getLanguageCode

Optional. The language code of the example.

If not specified, the agent's default language is used.
Note: languages must be enabled in the agent before they can be used.
Note: example's language code is not currently used in dialogflow agents.

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

### setLanguageCode

Optional. The language code of the example.

If not specified, the agent's default language is used.
Note: languages must be enabled in the agent before they can be used.
Note: example's language code is not currently used in dialogflow agents.

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

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