Google Cloud Dialogflow Cx V3 Client - Class Webhook (0.7.2)

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 method. Webhooks.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
Webhook\GenericWebService

Configuration for a generic web service.

↳ service_directory
Webhook\ServiceDirectoryConfig

Configuration for a Service Directory service.

↳ timeout
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 method. Webhooks.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 method. Webhooks.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

hasGenericWebService

setGenericWebService

Configuration for a generic web service.

Parameter
Name
Description
Returns
Type
Description
$this

getServiceDirectory

Configuration for a Service Directory service.

Returns
Type
Description

hasServiceDirectory

setServiceDirectory

Configuration for a Service Directory service.

Parameter
Name
Description
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

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
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
Design a Mobile Site
View Site in Mobile | Classic
Share by: