# Google Cloud Dialogflow V2 Client - Class WebhookRequest (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class WebhookRequest.

The request message for a webhook call.

Generated from protobuf message `google.cloud.dialogflow.v2.WebhookRequest`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ session` | `string` The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>`. |
| `↳ response_id` | `string` The unique identifier of the response. Contains the same value as `[Streaming]DetectIntentResponse.response_id`. |
| `↳ query_result` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.QueryResult` The result of the conversational query or event processing. Contains the same value as `[Streaming]DetectIntentResponse.query_result`. |
| `↳ original_detect_intent_request` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.OriginalDetectIntentRequest` Optional. The contents of the original request that was passed to `[Streaming]DetectIntent` call. |

### getSession

The unique identifier of detectIntent request session.

Can be used to identify end-user inside webhook implementation.
Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or
`projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>`.

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

### setSession

The unique identifier of detectIntent request session.

Can be used to identify end-user inside webhook implementation.
Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or
`projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>`.

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

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

### getResponseId

The unique identifier of the response. Contains the same value as
`[Streaming]DetectIntentResponse.response_id`.

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

### setResponseId

The unique identifier of the response. Contains the same value as
`[Streaming]DetectIntentResponse.response_id`.

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

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

### getQueryResult

The result of the conversational query or event processing. Contains the
same value as `[Streaming]DetectIntentResponse.query_result`.

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

### hasQueryResult

### clearQueryResult

### setQueryResult

The result of the conversational query or event processing. Contains the
same value as `[Streaming]DetectIntentResponse.query_result`.

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

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

### getOriginalDetectIntentRequest

Optional. The contents of the original request that was passed to
`[Streaming]DetectIntent` call.

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

### hasOriginalDetectIntentRequest

### clearOriginalDetectIntentRequest

### setOriginalDetectIntentRequest

Optional. The contents of the original request that was passed to
`[Streaming]DetectIntent` call.

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

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