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

A handler that is triggered on the specific
[lifecycle_stage](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Handler.LifecycleHandler#_Google_Cloud_Dialogflow_Cx_V3_Handler_LifecycleHandler__getLifecycleStage__)
of the playbook execution.

Generated from protobuf message `google.cloud.dialogflow.cx.v3.Handler.LifecycleHandler`

## Namespace

Google \\ Cloud \\ Dialogflow \\ Cx \\ V3 \\ Handler

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ lifecycle_stage` | `string` Required. The name of the lifecycle stage that triggers this handler. Supported values: \* \* `playbook-start` \* \* `pre-action-selection` \* \* `pre-action-execution` |
| `↳ condition` | `string` Optional. The condition that must be satisfied to trigger this handler. |
| `↳ fulfillment` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Fulfillment` Required. The fulfillment to call when this handler is triggered. |

### getLifecycleStage

Required. The name of the lifecycle stage that triggers this handler.

Supported values:

- `playbook-start`
- `pre-action-selection`
- `pre-action-execution`

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

### setLifecycleStage

Required. The name of the lifecycle stage that triggers this handler.

Supported values:

- `playbook-start`
- `pre-action-selection`
- `pre-action-execution`

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

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

### getCondition

Optional. The condition that must be satisfied to trigger this handler.

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

### setCondition

Optional. The condition that must be satisfied to trigger this handler.

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

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

### getFulfillment

Required. The fulfillment to call when this handler is triggered.

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

### hasFulfillment

### clearFulfillment

### setFulfillment

Required. The fulfillment to call when this handler is triggered.

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

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