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

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

getDisplayName

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

Returns
TypeDescription
string

setDisplayName

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getGenericWebService

Configuration for a generic web service.

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\Webhook\GenericWebService|null

hasGenericWebService

setGenericWebService

Configuration for a generic web service.

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

getServiceDirectory

Configuration for a Service Directory service.

Returns
TypeDescription
Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig|null

hasServiceDirectory

setServiceDirectory

Configuration for a Service Directory service.

Parameter
NameDescription
var Google\Cloud\Dialogflow\Cx\V3\Webhook\ServiceDirectoryConfig
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getDisabled

Indicates whether the webhook is disabled.

Returns
TypeDescription
bool

setDisabled

Indicates whether the webhook is disabled.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getWebhook

Returns
TypeDescription
string