Google Cloud Dialogflow Cx V3 Client - Class WebhookRequest (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
NameDescription
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: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.

↳ 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
TypeDescription
string

setDetectIntentResponseId

Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getText

If natural language text was provided as input, this field will contain a copy of the text.

Returns
TypeDescription
string

hasText

setText

If natural language text was provided as input, this field will contain a copy of the text.

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getTranscript

If natural language speech audio was provided as input, this field will contain the transcript for the audio.

Returns
TypeDescription
string

hasTranscript

setTranscript

If natural language speech audio was provided as input, this field will contain the transcript for the audio.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTriggerEvent

If an event was provided as input, this field will contain the name of the event.

Returns
TypeDescription
string

hasTriggerEvent

setTriggerEvent

If an event was provided as input, this field will contain the name of the event.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDtmfDigits

If DTMF was provided as input, this field will contain the DTMF digits.

Returns
TypeDescription
string

hasDtmfDigits

setDtmfDigits

If DTMF was provided as input, this field will contain the DTMF digits.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLanguageCode

The language code specified in the original request.

Returns
TypeDescription
string

setLanguageCode

The language code specified in the original request.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getFulfillmentInfo

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

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo|null

hasFulfillmentInfo

clearFulfillmentInfo

setFulfillmentInfo

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

Parameter
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\FulfillmentInfo
Returns
TypeDescription
$this

getIntentInfo

Information about the last matched intent.

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo|null

hasIntentInfo

clearIntentInfo

setIntentInfo

Information about the last matched intent.

Parameter
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\IntentInfo
Returns
TypeDescription
$this

getPageInfo

Information about page status.

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\PageInfo|null

hasPageInfo

clearPageInfo

setPageInfo

Information about page status.

Parameter
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\PageInfo
Returns
TypeDescription
$this

getSessionInfo

Information about session status.

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\SessionInfo|null

hasSessionInfo

clearSessionInfo

setSessionInfo

Information about session status.

Parameter
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\SessionInfo
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var array<Google\Cloud\Dialogflow\Cx\V3\ResponseMessage>
Returns
TypeDescription
$this

getPayload

Custom data set in QueryParameters.payload.

Returns
TypeDescription
Google\Protobuf\Struct|null

hasPayload

clearPayload

setPayload

Custom data set in QueryParameters.payload.

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\WebhookRequest\SentimentAnalysisResult
Returns
TypeDescription
$this

getQuery

Returns
TypeDescription
string