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

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/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.

↳ display_name string

Required. The human-readable name of the webhook, unique within the agent.

↳ generic_web_service Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService

Configuration for a generic web service.

↳ service_directory Google\Cloud\Dialogflow\Cx\V3\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/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.

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/<Project ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>.

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
Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService|null

hasGenericWebService

setGenericWebService

Configuration for a generic web service.

Parameter
Name Description
var Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService
Returns
Type Description
$this

getServiceDirectory

Configuration for a Service Directory service.

Returns
Type Description
Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig|null

hasServiceDirectory

setServiceDirectory

Configuration for a Service Directory service.

Parameter
Name Description
var Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig
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
Google\Protobuf\Duration|null

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
var Google\Protobuf\Duration
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