Service Client: Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::WebhooksClient
Client stub representing the remote Webhooks gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to dialogflow.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook - Compiled Protocol Buffers messages for google/cloud/dialogflow/cx/v3beta1/webhook.proto
SYNOPSIS
use Google::Cloud::Dialogflow::Cx::V3beta1::Webhook;
my $msg = Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Webhook->new({
name => $name,
display_name => $display_name,
generic_web_service => $generic_web_service,
service_directory => $service_directory,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Webhook->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/cx/v3beta1/webhook.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::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.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringThe unique identifier of the webhook. Required for the [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook] method. [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook] populates the name automatically. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
$msg->display_name()/$msg->display_name($value)Type:
StringRequired. The human-readable name of the webhook, unique within the agent.
$msg->generic_web_service()/$msg->generic_web_service($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Webhook::GenericWebService)Configuration for a generic web service.
$msg->service_directory()/$msg->service_directory($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Webhook::ServiceDirectoryConfig)Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
$msg->timeout()/$msg->timeout($value)Type:
Message(Google::Protobuf::Duration::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.
$msg->disabled()/$msg->disabled($value)Type:
BoolIndicates whether the webhook is disabled.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::ListWebhooksRequest
The request message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3beta1.Webhooks.ListWebhooks].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The agent to list all webhooks for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of items to return in a single page. By default 100 and at most 1000.
$msg->page_token()/$msg->page_token($value)Type:
StringThe next_page_token value returned from a previous list request.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::ListWebhooksResponse
The response message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3beta1.Webhooks.ListWebhooks].
Inherits from Protobuf::Message.
Accessors
$msg->webhooks()/$msg->webhooks($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Webhook)The list of webhooks. There will be a maximum number of items returned based on the page_size field in the request.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringToken to retrieve the next page of results, or empty if there are no more results in the list.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::GetWebhookRequest
The request message for [Webhooks.GetWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.GetWebhook].
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the webhook. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::CreateWebhookRequest
The request message for [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook].
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The agent to create a webhook for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
$msg->webhook()/$msg->webhook($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Webhook)Required. The webhook to create.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::UpdateWebhookRequest
The request message for [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook].
Inherits from Protobuf::Message.
Accessors
$msg->webhook()/$msg->webhook($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Webhook)Required. The webhook to update.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The mask to control which fields get updated. If the mask is not present, all fields will be updated.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::DeleteWebhookRequest
The request message for [Webhooks.DeleteWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.DeleteWebhook].
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the webhook to delete. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/webhooks/<WebhookID>`.
$msg->force()/$msg->force($value)Type:
BoolThis field has no effect for webhook not being used. For webhooks that are used by pages/flows/transition route groups:
* If `force` is set to false, an error will be returned with message indicating the referenced resources. * If `force` is set to true, Dialogflow will remove the webhook, as well as any references to the webhook (i.e. [Webhook][google.cloud.dialogflow.cx.v3beta1.Fulfillment.webhook] and [tag][google.cloud.dialogflow.cx.v3beta1.Fulfillment.tag]in fulfillments that point to this webhook will be removed).
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::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.
Inherits from Protobuf::Message.
Accessors
$msg->detect_intent_response_id()/$msg->detect_intent_response_id($value)Type:
StringAlways present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that will be returned to the API caller.
$msg->text()/$msg->text($value)Type:
StringIf [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput] was provided as input, this field will contain a copy of the text.
$msg->trigger_intent()/$msg->trigger_intent($value)Type:
StringIf an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will contain a copy of the intent identifier. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/intents/<IntentID>`.
$msg->transcript()/$msg->transcript($value)Type:
StringIf [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input, this field will contain the transcript for the audio.
$msg->trigger_event()/$msg->trigger_event($value)Type:
StringIf an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will contain the name of the event.
$msg->dtmf_digits()/$msg->dtmf_digits($value)Type:
StringIf [DTMF][google.cloud.dialogflow.cx.v3beta1.DtmfInput] was provided as input, this field will contain the DTMF digits.
$msg->language_code()/$msg->language_code($value)Type:
StringThe language code specified in the [original request][QueryInput.language_code].
$msg->fulfillment_info()/$msg->fulfillment_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::WebhookRequest::FulfillmentInfo)Always present. Information about the fulfillment that triggered this webhook call.
$msg->intent_info()/$msg->intent_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::WebhookRequest::IntentInfo)Information about the last matched intent.
$msg->page_info()/$msg->page_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::PageInfo)Information about page status.
$msg->session_info()/$msg->session_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::SessionInfo)Information about session status.
$msg->messages()/$msg->messages($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::ResponseMessage::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][google.cloud.dialogflow.cx.v3beta1.WebhookResponse.fulfillment_response];
$msg->payload()/$msg->payload($value)Type:
Message(Google::Protobuf::Struct::Struct)Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3beta1.QueryParameters.payload].
$msg->sentiment_analysis_result()/$msg->sentiment_analysis_result($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::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.
$msg->language_info()/$msg->language_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::LanguageInfo)Information about the language of the request.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::WebhookResponse
The response message for a webhook call.
Inherits from Protobuf::Message.
Accessors
$msg->fulfillment_response()/$msg->fulfillment_response($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::WebhookResponse::FulfillmentResponse)The fulfillment response to send to the user. This field can be omitted by the webhook if it does not intend to send any response to the user.
$msg->page_info()/$msg->page_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::PageInfo)Information about page status. This field can be omitted by the webhook if it does not intend to modify page status.
$msg->session_info()/$msg->session_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::SessionInfo)Information about session status. This field can be omitted by the webhook if it does not intend to modify session status.
$msg->payload()/$msg->payload($value)Type:
Message(Google::Protobuf::Struct::Struct)Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3beta1.QueryResult.webhook_payloads].
$msg->target_page()/$msg->target_page($value)Type:
StringThe target page to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
$msg->target_flow()/$msg->target_flow($value)Type:
StringThe target flow to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::PageInfo
Represents page information communicated to and from the webhook.
Inherits from Protobuf::Message.
Accessors
$msg->current_page()/$msg->current_page($value)Type:
StringAlways present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. The unique identifier of the current page. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
$msg->display_name()/$msg->display_name($value)Type:
StringAlways present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. The display name of the current page.
$msg->form_info()/$msg->form_info($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::PageInfo::FormInfo)Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. Information about the form.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::SessionInfo
Represents session information communicated to and from the webhook.
Inherits from Protobuf::Message.
Accessors
$msg->session()/$msg->session($value)Type:
StringAlways present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. The unique identifier of the [session][google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.session]. This field can be used by the webhook to identify a session. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/sessions/<SessionID>` or `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>/sessions/<SessionID>` if environment is specified.
$msg->parameters()/$msg->parameters($value)Type:
Message(Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::SessionInfo::ParametersEntry)Optional for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Optional for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. The map is keyed by parameters' display names.
Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::LanguageInfo
Represents the language information of the request.
Inherits from Protobuf::Message.
Accessors
$msg->input_language_code()/$msg->input_language_code($value)Type:
StringThe language code specified in the original [request][google.cloud.dialogflow.cx.v3beta1.QueryInput.language_code].
$msg->resolved_language_code()/$msg->resolved_language_code($value)Type:
StringThe language code detected for this request based on the user conversation.
$msg->confidence_score()/$msg->confidence_score($value)Type:
FloatThe confidence score of the detected language between 0 and 1.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::Cx::V3beta1::Webhook::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.