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

Webhooks host the developer's business logic. During a session, webhooks
allow the developer to use the data extracted by Dialogflow's natural
language processing to generate dynamic responses, validate collected data,
or trigger actions on the backend.

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

## 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 webhook. Required for the [Webhooks.UpdateWebhook](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.WebhooksClient#_Google_Cloud_Dialogflow_Cx_V3_Client_WebhooksClient__updateWebhook__) method. [Webhooks.CreateWebhook](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.WebhooksClient#_Google_Cloud_Dialogflow_Cx_V3_Client_WebhooksClient__createWebhook__) populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`. |
| `↳ display_name` | `string` Required. The human-readable name of the webhook, unique within the agent. |
| `↳ generic_web_service` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Webhook.GenericWebService` Configuration for a generic web service. |
| `↳ service_directory` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Webhook.ServiceDirectoryConfig` Configuration for a [Service Directory](https://cloud.google.com/service-directory) service. |
| `↳ timeout` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Webhook execution timeout. Execution is considered failed if Dialogflow doesn't receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds. |
| `↳ disabled` | `bool` Indicates whether the webhook is disabled. |

### getName

The unique identifier of the webhook.

Required for the
[Webhooks.UpdateWebhook](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.WebhooksClient#_Google_Cloud_Dialogflow_Cx_V3_Client_WebhooksClient__updateWebhook__)
method.
[Webhooks.CreateWebhook](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.WebhooksClient#_Google_Cloud_Dialogflow_Cx_V3_Client_WebhooksClient__createWebhook__)
populates the name automatically. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.

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

### setName

The unique identifier of the webhook.

Required for the
[Webhooks.UpdateWebhook](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.WebhooksClient#_Google_Cloud_Dialogflow_Cx_V3_Client_WebhooksClient__updateWebhook__)
method.
[Webhooks.CreateWebhook](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.WebhooksClient#_Google_Cloud_Dialogflow_Cx_V3_Client_WebhooksClient__createWebhook__)
populates the name automatically. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.

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

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

### getDisplayName

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

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

### setDisplayName

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

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

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

### getGenericWebService

Configuration for a generic web service.

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

### hasGenericWebService

### setGenericWebService

Configuration for a generic web service.

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

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

### getServiceDirectory

Configuration for a [Service
Directory](https://cloud.google.com/service-directory) service.

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

### hasServiceDirectory

### setServiceDirectory

Configuration for a [Service
Directory](https://cloud.google.com/service-directory) service.

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

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

### getTimeout

Webhook execution timeout. Execution is considered failed if Dialogflow
doesn't receive a response from webhook at the end of the timeout period.

Defaults to 5 seconds, maximum allowed timeout is 30 seconds.

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

### hasTimeout

### clearTimeout

### setTimeout

Webhook execution timeout. Execution is considered failed if Dialogflow
doesn't receive a response from webhook at the end of the timeout period.

Defaults to 5 seconds, maximum allowed timeout is 30 seconds.

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

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

### getDisabled

Indicates whether the webhook is disabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDisabled

Indicates whether the webhook is disabled.

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

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

### getWebhook

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