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

The request message for a webhook call. The request is sent as a JSON object
and the field names will be presented in camel cases.

You may see undocumented fields in an actual request. These fields are used
internally by Dialogflow and should be ignored.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ detect_intent_response_id` | `string` Always present. The unique identifier of the [DetectIntentResponse](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.DetectIntentResponse) that will be returned to the API caller. |
| `↳ text` | `string` If [natural language text](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TextInput) was provided as input, this field will contain a copy of the text. |
| `↳ trigger_intent` | `string` If an [intent](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.IntentInput) was provided as input, this field will contain a copy of the intent identifier. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`. |
| `↳ transcript` | `string` If [natural language speech audio](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.AudioInput) was provided as input, this field will contain the transcript for the audio. |
| `↳ trigger_event` | `string` If an [event](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.EventInput) was provided as input, this field will contain the name of the event. |
| `↳ dtmf_digits` | `string` If [DTMF](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.DtmfInput) was provided as input, this field will contain the DTMF digits. |
| `↳ language_code` | `string` The language code specified in the original request. |
| `↳ fulfillment_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookRequest.FulfillmentInfo` Always present. Information about the fulfillment that triggered this webhook call. |
| `↳ intent_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookRequest.IntentInfo` Information about the last matched intent. |
| `↳ page_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.PageInfo` Information about page status. |
| `↳ session_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.SessionInfo` Information about session status. |
| `↳ messages` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ResponseMessage>` The list of rich message responses to present to the user. Webhook can choose to append or replace this list in [WebhookResponse.fulfillment_response](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookResponse#_Google_Cloud_Dialogflow_Cx_V3_WebhookResponse__getFulfillmentResponse__); |
| `↳ payload` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Custom data set in [QueryParameters.payload](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.QueryParameters#_Google_Cloud_Dialogflow_Cx_V3_QueryParameters__getPayload__). |
| `↳ sentiment_analysis_result` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookRequest.SentimentAnalysisResult` The sentiment analysis result of the current user request. The field is filled when sentiment analysis is configured to be enabled for the request. |
| `↳ language_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.LanguageInfo` Information about the language of the request. |

### getDetectIntentResponseId

Always present. The unique identifier of the
[DetectIntentResponse](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.DetectIntentResponse)
that will be returned to the API caller.

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

### setDetectIntentResponseId

Always present. The unique identifier of the
[DetectIntentResponse](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.DetectIntentResponse)
that will be returned to the API caller.

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

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

### getText

If [natural language text](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TextInput) was
provided as input, this field will contain a copy of the text.

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

### hasText

### setText

If [natural language text](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TextInput) was
provided as input, this field will contain a copy of the text.

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

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

### getTriggerIntent

If an [intent](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.IntentInput) was provided as
input, this field will contain a copy of the intent identifier. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.

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

### hasTriggerIntent

### setTriggerIntent

If an [intent](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.IntentInput) was provided as
input, this field will contain a copy of the intent identifier. Format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.

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

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

### getTranscript

If [natural language speech
audio](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.AudioInput) was provided as input,
this field will contain the transcript for the audio.

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

### hasTranscript

### setTranscript

If [natural language speech
audio](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.AudioInput) was provided as input,
this field will contain the transcript for the audio.

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

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

### getTriggerEvent

If an [event](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.EventInput) was provided as
input, this field will contain the name of the event.

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

### hasTriggerEvent

### setTriggerEvent

If an [event](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.EventInput) was provided as
input, this field will contain the name of the event.

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

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

### getDtmfDigits

If [DTMF](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.DtmfInput) was provided as input,
this field will contain the DTMF digits.

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

### hasDtmfDigits

### setDtmfDigits

If [DTMF](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.DtmfInput) was provided as input,
this field will contain the DTMF digits.

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

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

### getLanguageCode

The language code specified in the original request.

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

### setLanguageCode

The language code specified in the original request.

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

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

### getFulfillmentInfo

Always present. Information about the fulfillment that triggered this
webhook call.

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

### hasFulfillmentInfo

### clearFulfillmentInfo

### setFulfillmentInfo

Always present. Information about the fulfillment that triggered this
webhook call.

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

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

### getIntentInfo

Information about the last matched intent.

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

### hasIntentInfo

### clearIntentInfo

### setIntentInfo

Information about the last matched intent.

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

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

### getPageInfo

Information about page status.

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

### hasPageInfo

### clearPageInfo

### setPageInfo

Information about page status.

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

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

### getSessionInfo

Information about session status.

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

### hasSessionInfo

### clearSessionInfo

### setSessionInfo

Information about session status.

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

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

### getMessages

The list of rich message responses to present to the user. Webhook can
choose to append or replace this list in
[WebhookResponse.fulfillment_response](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookResponse#_Google_Cloud_Dialogflow_Cx_V3_WebhookResponse__getFulfillmentResponse__);

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

### setMessages

The list of rich message responses to present to the user. Webhook can
choose to append or replace this list in
[WebhookResponse.fulfillment_response](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.WebhookResponse#_Google_Cloud_Dialogflow_Cx_V3_WebhookResponse__getFulfillmentResponse__);

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

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

### getPayload

Custom data set in
[QueryParameters.payload](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.QueryParameters#_Google_Cloud_Dialogflow_Cx_V3_QueryParameters__getPayload__).

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

### hasPayload

### clearPayload

### setPayload

Custom data set in
[QueryParameters.payload](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.QueryParameters#_Google_Cloud_Dialogflow_Cx_V3_QueryParameters__getPayload__).

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

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

### getSentimentAnalysisResult

The sentiment analysis result of the current user request. The field is
filled when sentiment analysis is configured to be enabled for the request.

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

### hasSentimentAnalysisResult

### clearSentimentAnalysisResult

### setSentimentAnalysisResult

The sentiment analysis result of the current user request. The field is
filled when sentiment analysis is configured to be enabled for the request.

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

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

### getLanguageInfo

Information about the language of the request.

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

### hasLanguageInfo

### clearLanguageInfo

### setLanguageInfo

Information about the language of the request.

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

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

### getQuery

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