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 \ V3Methods
__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 that will be returned to the API caller. |
↳ text |
string
If natural language text was provided as input, this field will contain a copy of the text. |
↳ trigger_intent |
string
If an intent was provided as input, this field will contain a copy of the intent identifier. Format: |
↳ transcript |
string
If natural language speech audio was provided as input, this field will contain the transcript for the audio. |
↳ trigger_event |
string
If an event was provided as input, this field will contain the name of the event. |
↳ dtmf_digits |
string
If DTMF was provided as input, this field will contain the DTMF digits. |
↳ language_code |
string
The language code specified in the original request. |
↳ fulfillment_info |
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo
Always present. Information about the fulfillment that triggered this webhook call. |
↳ intent_info |
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo
Information about the last matched intent. |
↳ page_info |
Google\Cloud\Dialogflow\Cx\V3\PageInfo
Information about page status. |
↳ session_info |
Google\Cloud\Dialogflow\Cx\V3\SessionInfo
Information about session status. |
↳ messages |
array<Google\Cloud\Dialogflow\Cx\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; |
↳ payload |
Google\Protobuf\Struct
Custom data set in QueryParameters.payload. |
↳ sentiment_analysis_result |
Google\Cloud\Dialogflow\Cx\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. |
getDetectIntentResponseId
Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.
Returns | |
---|---|
Type | Description |
string |
setDetectIntentResponseId
Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getText
If natural language text was provided as input, this field will contain a copy of the text.
Returns | |
---|---|
Type | Description |
string |
hasText
setText
If natural language text 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 was provided as
input, this field will contain a copy of the intent identifier. Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/intents/<Intent ID>
.
Returns | |
---|---|
Type | Description |
string |
hasTriggerIntent
setTriggerIntent
If an intent was provided as
input, this field will contain a copy of the intent identifier. Format:
projects/<Project ID>/locations/<Location ID>/agents/<Agent
ID>/intents/<Intent ID>
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getTranscript
If natural language speech audio was provided as input, this field will contain the transcript for the audio.
Returns | |
---|---|
Type | Description |
string |
hasTranscript
setTranscript
If natural language speech audio 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 was provided as input, this field will contain the name of the event.
Returns | |
---|---|
Type | Description |
string |
hasTriggerEvent
setTriggerEvent
If an event 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 was provided as input, this field will contain the DTMF digits.
Returns | |
---|---|
Type | Description |
string |
hasDtmfDigits
setDtmfDigits
If DTMF 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 |
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo|null |
hasFulfillmentInfo
clearFulfillmentInfo
setFulfillmentInfo
Always present. Information about the fulfillment that triggered this webhook call.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo
|
Returns | |
---|---|
Type | Description |
$this |
getIntentInfo
Information about the last matched intent.
Returns | |
---|---|
Type | Description |
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo|null |
hasIntentInfo
clearIntentInfo
setIntentInfo
Information about the last matched intent.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo
|
Returns | |
---|---|
Type | Description |
$this |
getPageInfo
Information about page status.
Returns | |
---|---|
Type | Description |
Google\Cloud\Dialogflow\Cx\V3\PageInfo|null |
hasPageInfo
clearPageInfo
setPageInfo
Information about page status.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Dialogflow\Cx\V3\PageInfo
|
Returns | |
---|---|
Type | Description |
$this |
getSessionInfo
Information about session status.
Returns | |
---|---|
Type | Description |
Google\Cloud\Dialogflow\Cx\V3\SessionInfo|null |
hasSessionInfo
clearSessionInfo
setSessionInfo
Information about session status.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Dialogflow\Cx\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;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
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;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>
|
Returns | |
---|---|
Type | Description |
$this |
getPayload
Custom data set in QueryParameters.payload.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Struct|null |
hasPayload
clearPayload
setPayload
Custom data set in QueryParameters.payload.
Parameter | |
---|---|
Name | Description |
var |
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 |
Google\Cloud\Dialogflow\Cx\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 |
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult
|
Returns | |
---|---|
Type | Description |
$this |
getQuery
Returns | |
---|---|
Type | Description |
string |