(a) Add additional binding for session with environment.
(b) Allow force delete entity types and webhooks.

PiperOrigin-RevId: 327289448
This commit is contained in:
Google APIs 2020-08-18 13:00:19 -07:00 committed by Copybara-Service
parent 18ffeb71f9
commit 6ee9393284
8 changed files with 546 additions and 342 deletions

View File

@ -16,10 +16,10 @@ syntax = "proto3";
package google.cloud.dialogflow.cx.v3beta1;
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/duration.proto";
import "google/api/annotations.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
@ -29,6 +29,31 @@ option java_outer_classname = "AudioConfigProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";
// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;
// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;
// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;
// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}
// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
// [Cloud Speech API
@ -78,31 +103,6 @@ enum AudioEncoding {
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
}
// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;
// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;
// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;
// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}
// Instructs the speech recognizer on how to process the audio content.
message InputAudioConfig {
// Required. Audio encoding of the audio content to process.
@ -115,10 +115,12 @@ message InputAudioConfig {
// more details.
int32 sample_rate_hertz = 2;
// Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo] in
// [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult] with information about the recognized speech
// words, e.g. start and end time offsets. If false or unspecified, Speech
// doesn't return any word-level information.
// Optional. If `true`, Dialogflow returns
// [SpeechWordInfo][google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo] in
// [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult]
// with information about the recognized speech words, e.g. start and end time
// offsets. If false or unspecified, Speech doesn't return any word-level
// information.
bool enable_word_info = 13;
// Optional. A list of strings containing words and phrases that the speech
@ -142,7 +144,8 @@ message InputAudioConfig {
// for more details.
string model = 7;
// Optional. Which variant of the [Speech model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
// Optional. Which variant of the [Speech
// model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
SpeechModelVariant model_variant = 10;
// Optional. If `false` (default), recognition does not cease until the
@ -156,7 +159,8 @@ message InputAudioConfig {
bool single_utterance = 8;
}
// Variant of the specified [Speech model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
// Variant of the specified [Speech
// model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] to use.
//
// See the [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
@ -185,8 +189,8 @@ enum SpeechModelVariant {
// Use an enhanced model variant:
//
// * If an enhanced variant does not exist for the given
// [model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] and request language, Dialogflow falls
// back to the standard variant.
// [model][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.model] and
// request language, Dialogflow falls back to the standard variant.
//
// The [Cloud Speech
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
@ -208,9 +212,10 @@ message VoiceSelectionParams {
// Optional. The preferred gender of the voice. If not set, the service will
// choose a voice based on the other parameters such as language_code and
// [name][google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.name]. Note that this is only a preference, not requirement. If a
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
// [name][google.cloud.dialogflow.cx.v3beta1.VoiceSelectionParams.name]. Note
// that this is only a preference, not requirement. If a voice of the
// appropriate gender is not available, the synthesizer should substitute a
// voice with a different gender rather than failing the request.
SsmlVoiceGender ssml_gender = 2;
}
@ -266,7 +271,8 @@ enum SsmlVoiceGender {
// Instructs the speech synthesizer how to generate the output audio content.
message OutputAudioConfig {
// Required. Audio encoding of the synthesized audio content.
OutputAudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED];
OutputAudioEncoding audio_encoding = 1
[(google.api.field_behavior) = REQUIRED];
// Optional. The synthesis sample rate (in hertz) for this audio. If not
// provided, then the synthesizer will use the default sample rate based on

View File

@ -31,7 +31,8 @@ option java_outer_classname = "EntityTypeProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";
// Service for managing [EntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityType].
// Service for managing
// [EntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityType].
service EntityTypes {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
@ -39,7 +40,8 @@ service EntityTypes {
"https://www.googleapis.com/auth/dialogflow";
// Returns the list of all entity types in the specified agent.
rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) {
rpc ListEntityTypes(ListEntityTypesRequest)
returns (ListEntityTypesResponse) {
option (google.api.http) = {
get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes"
};
@ -73,7 +75,8 @@ service EntityTypes {
}
// Deletes the specified entity type.
rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) {
rpc DeleteEntityType(DeleteEntityTypeRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/entityTypes/*}"
};
@ -104,7 +107,9 @@ service EntityTypes {
//
// * **User** - entities that are built for an individual user such as
// favorites, preferences, playlists, and so on. A user entity is
// represented by the [SessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityType] type.
// represented by the
// [SessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityType]
// type.
//
// For more information about entity types, see the [Dialogflow
// documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
@ -179,12 +184,14 @@ message EntityType {
}
// The unique identifier of the entity type.
// Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
// Required for
// [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/entityTypes/<Entity Type ID>`.
string name = 1;
// Required. The human-readable name of the entity type, unique within the agent.
// Required. The human-readable name of the entity type, unique within the
// agent.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Indicates the kind of entity type.
@ -207,7 +214,8 @@ message EntityType {
bool enable_fuzzy_extraction = 7;
}
// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
// The request message for
// [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
message ListEntityTypesRequest {
// Required. The agent to list all entity types for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@ -240,7 +248,8 @@ message ListEntityTypesRequest {
string page_token = 4;
}
// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
// The response message for
// [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes].
message ListEntityTypesResponse {
// The list of entity types. There will be a maximum number of items returned
// based on the page_size field in the request.
@ -251,7 +260,8 @@ message ListEntityTypesResponse {
string next_page_token = 2;
}
// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType].
// The request message for
// [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType].
message GetEntityTypeRequest {
// Required. The name of the entity type.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@ -278,7 +288,8 @@ message GetEntityTypeRequest {
string language_code = 2;
}
// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityType].
// The request message for
// [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.CreateEntityType].
message CreateEntityTypeRequest {
// Required. The agent to create a entity type for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@ -306,7 +317,8 @@ message CreateEntityTypeRequest {
string language_code = 3;
}
// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
// The request message for
// [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.UpdateEntityType].
message UpdateEntityTypeRequest {
// Required. The entity type to update.
EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED];
@ -328,7 +340,8 @@ message UpdateEntityTypeRequest {
google.protobuf.FieldMask update_mask = 3;
}
// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityType].
// The request message for
// [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.DeleteEntityType].
message DeleteEntityTypeRequest {
// Required. The name of the entity type to delete.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@ -339,4 +352,18 @@ message DeleteEntityTypeRequest {
type: "dialogflow.googleapis.com/EntityType"
}
];
// This field has no effect for entity type not being used.
// For entity types that are used by intents or pages:
//
// * If `force` is set to false, an error will be returned with message
// indicating the referencing resources.
// * If `force` is set to true, Dialogflow will remove the entity type, as
// well as any references to the entity type (i.e. Page
// [parameter][google.cloud.dialogflow.cx.v3beta1.Form.Parameter] of the
// entity type will be changed to
// '@sys.any' and intent
// [parameter][google.cloud.dialogflow.cx.v3beta1.Intent.Parameter] of the
// entity type will be removed).
bool force = 2;
}

View File

@ -107,9 +107,6 @@ message NluSettings {
// Use standard NLU model.
MODEL_TYPE_STANDARD = 1;
// Use custom NLU model.
MODEL_TYPE_CUSTOM = 2;
// Use advanced NLU model.
MODEL_TYPE_ADVANCED = 3;
}
@ -206,16 +203,18 @@ message Flow {
// regardless of the current page. Event handlers defined in the page
// have higher priority than those defined in the flow.
//
// Unlike [transition_routes][google.cloud.dialogflow.cx.v3beta1.Flow.transition_routes], these handlers are
// evaluated on a first-match basis. The first one that matches the event
// get executed, with the rest being ignored.
// Unlike
// [transition_routes][google.cloud.dialogflow.cx.v3beta1.Flow.transition_routes],
// these handlers are evaluated on a first-match basis. The first one that
// matches the event get executed, with the rest being ignored.
repeated EventHandler event_handlers = 10;
// NLU related settings of the flow.
NluSettings nlu_settings = 11;
}
// The request message for [Flows.CreateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow].
// The request message for
// [Flows.CreateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.CreateFlow].
message CreateFlowRequest {
// Required. The agent to create a flow for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@ -242,16 +241,15 @@ message CreateFlowRequest {
string language_code = 3;
}
// The request message for [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow].
// The request message for
// [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3beta1.Flows.DeleteFlow].
message DeleteFlowRequest {
// Required. The name of the flow to delete.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Flow"
}
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
];
// This field has no effect for flows with no incoming transitions.
@ -260,11 +258,15 @@ message DeleteFlowRequest {
// * If `force` is set to false, an error will be returned with message
// indicating the incoming transitions.
// * If `force` is set to true, Dialogflow will remove the flow, as well as
// any transitions to the flow.
// any transitions to the flow (i.e. [Target
// flow][EventHandler.target_flow] in event handlers or [Target
// flow][TransitionRoute.target_flow] in transition routes that point to
// this flow will be cleared).
bool force = 2;
}
// The request message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
// The request message for
// [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
message ListFlowsRequest {
// Required. The agent containing the flows.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@ -296,7 +298,8 @@ message ListFlowsRequest {
string language_code = 4;
}
// The response message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
// The response message for
// [Flows.ListFlows][google.cloud.dialogflow.cx.v3beta1.Flows.ListFlows].
message ListFlowsResponse {
// The list of flows. There will be a maximum number of items returned based
// on the page_size field in the request.
@ -307,16 +310,15 @@ message ListFlowsResponse {
string next_page_token = 2;
}
// The response message for [Flows.GetFlow][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow].
// The response message for
// [Flows.GetFlow][google.cloud.dialogflow.cx.v3beta1.Flows.GetFlow].
message GetFlowRequest {
// Required. The name of the flow to get.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Flow"
}
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
];
// The language to retrieve the flow for. The following fields are language
@ -333,14 +335,16 @@ message GetFlowRequest {
string language_code = 2;
}
// The request message for [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow].
// The request message for
// [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3beta1.Flows.UpdateFlow].
message UpdateFlowRequest {
// Required. The flow to update.
Flow flow = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The mask to control which fields get updated. If `update_mask` is not
// specified, an error will be returned.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The mask to control which fields get updated. If `update_mask` is
// not specified, an error will be returned.
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
// The language of the following fields in `flow`:
//
@ -355,7 +359,8 @@ message UpdateFlowRequest {
string language_code = 3;
}
// The request message for [Flows.TrainFlow][google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow].
// The request message for
// [Flows.TrainFlow][google.cloud.dialogflow.cx.v3beta1.Flows.TrainFlow].
message TrainFlowRequest {
// Required. The flow to train.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent

View File

@ -106,7 +106,10 @@ message Page {
};
// The unique identifier of the page.
// Required for the [Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage] method. [Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage]
// Required for the
// [Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage]
// method.
// [Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage]
// populates the name automatically.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/pages/<Page ID>`.
@ -122,8 +125,10 @@ message Page {
// relevant to the page.
Form form = 4;
// Ordered list of [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup] associated
// with the page. Transition route groups must be unique within a page.
// Ordered list of
// [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroup]
// associated with the page. Transition route groups must be unique within a
// page.
//
// * If multiple transition routes within a page scope refer to the same
// intent, then the precedence order is: page's transition route -> page's
@ -134,9 +139,10 @@ message Page {
//
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
repeated string transition_route_groups = 11 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TransitionRouteGroup"
}];
repeated string transition_route_groups = 11
[(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TransitionRouteGroup"
}];
// A list of transitions for the transition rules of this page.
// They route the conversation to another page in the same flow, or another
@ -147,7 +153,8 @@ message Page {
//
// * TransitionRoutes defined in the page with intent specified.
// * TransitionRoutes defined in the
// [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups].
// [transition route
// groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups].
// * TransitionRoutes defined in flow with intent specified.
// * TransitionRoutes defined in the page with only condition specified.
repeated TransitionRoute transition_routes = 9;
@ -160,8 +167,9 @@ message Page {
// A form is a data model that groups related parameters that can be collected
// from the user. The process in which the agent prompts the user and collects
// parameter values from the user is called form filling. A form can be added to
// a [page][google.cloud.dialogflow.cx.v3beta1.Page]. When form filling is done, the filled parameters will be
// written to the [session][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters].
// a [page][google.cloud.dialogflow.cx.v3beta1.Page]. When form filling is done,
// the filled parameters will be written to the
// [session][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters].
message Form {
// Represents a form parameter.
message Parameter {
@ -169,7 +177,8 @@ message Form {
message FillBehavior {
// Required. The fulfillment to provide the initial prompt that the agent
// can present to the user in order to fill the parameter.
Fulfillment initial_prompt_fulfillment = 3 [(google.api.field_behavior) = REQUIRED];
Fulfillment initial_prompt_fulfillment = 3
[(google.api.field_behavior) = REQUIRED];
// The handlers for parameter-level events, used to provide reprompt for
// the parameter or transition to a different page/flow. The supported
@ -243,17 +252,22 @@ message Form {
repeated Parameter parameters = 1;
}
// An event handler specifies an [event][google.cloud.dialogflow.cx.v3beta1.EventHandler.event] that can be handled
// during a session. When the specified event happens, the following actions are
// taken in order:
// An event handler specifies an
// [event][google.cloud.dialogflow.cx.v3beta1.EventHandler.event] that can be
// handled during a session. When the specified event happens, the following
// actions are taken in order:
//
// * If there is a
// [`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.EventHandler.trigger_fulfillment] associated with
// the event, it will be called.
// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_page] associated
// with the event, the session will transition into the specified page.
// * If there is a [`target_flow`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_flow] associated
// with the event, the session will transition into the specified flow.
// [`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.EventHandler.trigger_fulfillment]
// associated with the event, it will be called.
// * If there is a
// [`target_page`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_page]
// associated with the event, the session will transition into the specified
// page.
// * If there is a
// [`target_flow`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_flow]
// associated with the event, the session will transition into the specified
// flow.
message EventHandler {
// Output only. The unique identifier of this event handler.
string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
@ -268,41 +282,49 @@ message EventHandler {
Fulfillment trigger_fulfillment = 5;
// The target to transition to, either a page in the same host flow (the flow
// that owns this [TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute]), or another flow in the same agent.
// that owns this
// [TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute]), or
// another flow in the same agent.
oneof target {
// The target page to transition to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/pages/<Page ID>`.
string target_page = 2 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Page"
}];
type: "dialogflow.googleapis.com/Page"
}];
// The target flow to transition to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>`.
string target_flow = 3 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Flow"
}];
type: "dialogflow.googleapis.com/Flow"
}];
}
}
// A transition route specifies a [intent][google.cloud.dialogflow.cx.v3beta1.Intent] that can be matched and/or a
// data condition that can be evaluated during a session. When a specified
// transition is matched, the following actions are taken in order:
// A transition route specifies a
// [intent][google.cloud.dialogflow.cx.v3beta1.Intent] that can be matched
// and/or a data condition that can be evaluated during a session. When a
// specified transition is matched, the following actions are taken in order:
//
// * If there is a
// [`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.trigger_fulfillment] associated with
// the transition, it will be called.
// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_page] associated
// with the transition, the session will transition into the specified page.
// * If there is a [`target_flow`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_flow] associated
// with the transition, the session will transition into the specified flow.
// [`trigger_fulfillment`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.trigger_fulfillment]
// associated with the transition, it will be called.
// * If there is a
// [`target_page`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_page]
// associated with the transition, the session will transition into the
// specified page.
// * If there is a
// [`target_flow`][google.cloud.dialogflow.cx.v3beta1.TransitionRoute.target_flow]
// associated with the transition, the session will transition into the
// specified flow.
message TransitionRoute {
// Output only. The unique identifier of this transition route.
string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// The unique identifier of an [Intent][google.cloud.dialogflow.cx.v3beta1.Intent].
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// The unique identifier of an
// [Intent][google.cloud.dialogflow.cx.v3beta1.Intent]. Format:
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/intents/<Intent ID>`.
// Indicates that the transition can only happen when the given intent is
// matched.
@ -310,11 +332,12 @@ message TransitionRoute {
// `intent` and `condition` are specified, the transition can only happen
// when both are fulfilled.
string intent = 1 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Intent"
}];
type: "dialogflow.googleapis.com/Intent"
}];
// The condition to evaluate against [form parameters][google.cloud.dialogflow.cx.v3beta1.Form.parameters] or
// [session parameters][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters].
// The condition to evaluate against [form
// parameters][google.cloud.dialogflow.cx.v3beta1.Form.parameters] or [session
// parameters][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters].
//
// See the [conditions
// reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
@ -329,25 +352,28 @@ message TransitionRoute {
Fulfillment trigger_fulfillment = 3;
// The target to transition to, either a page in the same host flow (the flow
// that owns this [TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute]), or another flow in the same agent.
// that owns this
// [TransitionRoute][google.cloud.dialogflow.cx.v3beta1.TransitionRoute]), or
// another flow in the same agent.
oneof target {
// The target page to transition to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/pages/<Page ID>`.
string target_page = 4 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Page"
}];
type: "dialogflow.googleapis.com/Page"
}];
// The target flow to transition to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>`.
string target_flow = 5 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Flow"
}];
type: "dialogflow.googleapis.com/Flow"
}];
}
}
// The request message for [Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages].
// The request message for
// [Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages].
message ListPagesRequest {
// Required. The flow to list all pages for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@ -365,7 +391,7 @@ message ListPagesRequest {
// * `Page.entry_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
// * `Page.transition_route.trigger_fulfillment.messages`
// * `Page.transition_routes.trigger_fulfillment.messages`
// *
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
//
@ -384,7 +410,8 @@ message ListPagesRequest {
string page_token = 4;
}
// The response message for [Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages].
// The response message for
// [Pages.ListPages][google.cloud.dialogflow.cx.v3beta1.Pages.ListPages].
message ListPagesResponse {
// The list of pages. There will be a maximum number of items returned based
// on the page_size field in the request.
@ -395,16 +422,15 @@ message ListPagesResponse {
string next_page_token = 2;
}
// The request message for [Pages.GetPage][google.cloud.dialogflow.cx.v3beta1.Pages.GetPage].
// The request message for
// [Pages.GetPage][google.cloud.dialogflow.cx.v3beta1.Pages.GetPage].
message GetPageRequest {
// Required. The name of the page.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/pages/<Page ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Page"
}
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Page" }
];
// The language to retrieve the page for. The following fields are language
@ -413,7 +439,7 @@ message GetPageRequest {
// * `Page.entry_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
// * `Page.transition_route.trigger_fulfillment.messages`
// * `Page.transition_routes.trigger_fulfillment.messages`
// *
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
//
@ -425,7 +451,8 @@ message GetPageRequest {
string language_code = 2;
}
// The request message for [Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage].
// The request message for
// [Pages.CreatePage][google.cloud.dialogflow.cx.v3beta1.Pages.CreatePage].
message CreatePageRequest {
// Required. The flow to create a page for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@ -445,7 +472,7 @@ message CreatePageRequest {
// * `Page.entry_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
// * `Page.transition_route.trigger_fulfillment.messages`
// * `Page.transition_routes.trigger_fulfillment.messages`
// *
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
//
@ -457,7 +484,8 @@ message CreatePageRequest {
string language_code = 3;
}
// The request message for [Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage].
// The request message for
// [Pages.UpdatePage][google.cloud.dialogflow.cx.v3beta1.Pages.UpdatePage].
message UpdatePageRequest {
// Required. The page to update.
Page page = 1 [(google.api.field_behavior) = REQUIRED];
@ -467,7 +495,7 @@ message UpdatePageRequest {
// * `Page.entry_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
// * `Page.transition_route.trigger_fulfillment.messages`
// * `Page.transition_routes.trigger_fulfillment.messages`
// *
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
//
@ -483,16 +511,15 @@ message UpdatePageRequest {
google.protobuf.FieldMask update_mask = 3;
}
// The request message for [Pages.DeletePage][google.cloud.dialogflow.cx.v3beta1.Pages.DeletePage].
// The request message for
// [Pages.DeletePage][google.cloud.dialogflow.cx.v3beta1.Pages.DeletePage].
message DeletePageRequest {
// Required. The name of the page to delete.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/Flows/<flow ID>/pages/<Page ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Page"
}
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Page" }
];
// This field has no effect for pages with no incoming transitions.
@ -501,6 +528,9 @@ message DeletePageRequest {
// * If `force` is set to false, an error will be returned with message
// indicating the incoming transitions.
// * If `force` is set to true, Dialogflow will remove the page, as well as
// any transitions to the page.
// any transitions to the page (i.e. [Target
// page][EventHandler.target_page] in event handlers or [Target
// page][TransitionRoute.target_page] in transition routes that point to
// this page will be cleared).
bool force = 2;
}

View File

@ -16,9 +16,9 @@ syntax = "proto3";
package google.cloud.dialogflow.cx.v3beta1;
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
@ -51,30 +51,11 @@ message ResponseMessage {
// Required. A collection of text responses.
repeated string text = 1 [(google.api.field_behavior) = REQUIRED];
// Whether the playback of this message can be interrupted by the end
// user's speech and the client can then starts the next Dialogflow
// Output only. Whether the playback of this message can be interrupted by
// the end user's speech and the client can then starts the next Dialogflow
// request.
bool allow_playback_interruption = 2;
}
// Indicates that the conversation should be handed off to a human agent.
//
// Dialogflow only uses this to determine which conversations were handed off
// to a human agent for measurement purposes. What else to do with this signal
// is up to you and your handoff procedures.
//
// You may set this, for example:
// * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3beta1.Page] if
// entering the page indicates something went extremely wrong in the
// conversation.
// * In a webhook response when you determine that the customer issue can only
// be handled by a human.
message HumanAgentHandoff {
option deprecated = true;
// Custom metadata for your handoff procedure. Dialogflow doesn't impose
// any structure on this.
google.protobuf.Struct metadata = 1;
bool allow_playback_interruption = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// Indicates that the conversation should be handed off to a live agent.
@ -84,7 +65,9 @@ message ResponseMessage {
// is up to you and your handoff procedures.
//
// You may set this, for example:
// * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3beta1.Page] if
// * In the
// [entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment]
// of a [Page][google.cloud.dialogflow.cx.v3beta1.Page] if
// entering the page indicates something went extremely wrong in the
// conversation.
// * In a webhook response when you determine that the customer issue can only
@ -105,7 +88,9 @@ message ResponseMessage {
// [ConversationSuccess][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.ConversationSuccess].
//
// You may set this, for example:
// * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3beta1.Page] if
// * In the
// [entry_fulfillment][google.cloud.dialogflow.cx.v3beta1.Page.entry_fulfillment]
// of a [Page][google.cloud.dialogflow.cx.v3beta1.Page] if
// entering the page indicates that the conversation succeeded.
// * In a webhook response when you determine that you handled the customer
// issue.
@ -114,18 +99,6 @@ message ResponseMessage {
google.protobuf.Struct metadata = 1;
}
// Specifies an audio clip to be played by the client as part of the response.
message PlayAudio {
// Required. URI of the audio clip. Dialogflow does not impose any validation on this
// value. It is specific to the client that reads it.
string audio_uri = 1 [(google.api.field_behavior) = REQUIRED];
// Whether the playback of this message can be interrupted by the end
// user's speech and the client can then starts the next Dialogflow
// request.
bool allow_playback_interruption = 2;
}
// A text or ssml response that is preferentially used for TTS output audio
// synthesis, as described in the comment on the ResponseMessage message.
message OutputAudioText {
@ -143,9 +116,7 @@ message ResponseMessage {
// Indicates that interaction with the Dialogflow agent has ended.
// This message is generated by Dialogflow only and not supposed to be
// defined by the user.
message EndInteraction {
}
message EndInteraction {}
// Represents an audio message that is composed of both segments
// synthesized from the Dialogflow agent prompts and ones hosted externally
@ -168,16 +139,30 @@ message ResponseMessage {
string uri = 2;
}
// Whether the playback of this segment can be interrupted by the end
// user's speech and the client should then start the next Dialogflow
// request.
bool allow_playback_interruption = 3;
// Output only. Whether the playback of this segment can be interrupted by
// the end user's speech and the client should then start the next
// Dialogflow request.
bool allow_playback_interruption = 3
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// Segments this audio response is composed of.
repeated Segment segments = 1;
}
// Specifies an audio clip to be played by the client as part of the response.
message PlayAudio {
// Required. URI of the audio clip. Dialogflow does not impose any
// validation on this value. It is specific to the client that reads it.
string audio_uri = 1 [(google.api.field_behavior) = REQUIRED];
// Output only. Whether the playback of this message can be interrupted by
// the end user's speech and the client can then starts the next Dialogflow
// request.
bool allow_playback_interruption = 2
[(google.api.field_behavior) = OUTPUT_ONLY];
}
// Required. The rich response message.
oneof message {
// Returns a text response.
@ -186,9 +171,6 @@ message ResponseMessage {
// Returns a response containing a custom, platform-specific payload.
google.protobuf.Struct payload = 2;
// Hands off conversation to a human agent.
HumanAgentHandoff human_agent_handoff = 6 [deprecated = true];
// Indicates that the conversation succeeded.
ConversationSuccess conversation_success = 9;
@ -199,22 +181,23 @@ message ResponseMessage {
// Hands off conversation to a human agent.
LiveAgentHandoff live_agent_handoff = 10;
// Output only. A signal that indicates the interaction with the Dialogflow agent has
// ended.
// This message is generated by Dialogflow only when the conversation
// reaches `END_SESSION` or `END_PAGE` page. It is not supposed to be
// defined by the user.
// It's guaranteed that there is at most one such message in each response.
EndInteraction end_interaction = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. A signal that indicates the interaction with the Dialogflow
// agent has ended. This message is generated by Dialogflow only when the
// conversation reaches `END_SESSION` or `END_PAGE` page. It is not supposed
// to be defined by the user. It's guaranteed that there is at most one such
// message in each response.
EndInteraction end_interaction = 11
[(google.api.field_behavior) = OUTPUT_ONLY];
// Signal that the client should play an audio clip hosted at a
// client-specific URI. Dialogflow uses this to construct
// [mixed_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixed_audio]. However, Dialogflow itself
// does not try to read or process the URI in any way.
// [mixed_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.mixed_audio].
// However, Dialogflow itself does not try to read or process the URI in any
// way.
PlayAudio play_audio = 12;
// Output only. An audio response message composed of both the synthesized Dialogflow
// agent responses and responses defined via
// Output only. An audio response message composed of both the synthesized
// Dialogflow agent responses and responses defined via
// [play_audio][google.cloud.dialogflow.cx.v3beta1.ResponseMessage.play_audio].
// This message is generated by Dialogflow only and not supposed to be
// defined by the user.

View File

@ -17,6 +17,7 @@ syntax = "proto3";
package google.cloud.dialogflow.cx.v3beta1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/cx/v3beta1/audio_config.proto";
@ -28,7 +29,6 @@ import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/rpc/status.proto";
import "google/type/latlng.proto";
import "google/api/client.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
@ -44,8 +44,9 @@ option (google.api.resource_definition) = {
};
// A session represents an interaction with a user. You retrieve user input
// and pass it to the [DetectIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.DetectIntent] method to determine
// user intent and respond.
// and pass it to the
// [DetectIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.DetectIntent]
// method to determine user intent and respond.
service Sessions {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
@ -60,14 +61,18 @@ service Sessions {
option (google.api.http) = {
post: "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:detectIntent"
body: "*"
additional_bindings {
post: "/v3beta1/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:detectIntent"
body: "*"
}
};
}
// Processes a natural language query in audio format in a streaming fashion
// and returns structured, actionable data as a result. This method is only
// available via the gRPC API (not REST).
rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
}
rpc StreamingDetectIntent(stream StreamingDetectIntentRequest)
returns (stream StreamingDetectIntentResponse) {}
// Returns preliminary intent match results, doesn't change the session
// status.
@ -75,16 +80,28 @@ service Sessions {
option (google.api.http) = {
post: "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:matchIntent"
body: "*"
additional_bindings {
post: "/v3beta1/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:matchIntent"
body: "*"
}
};
}
// Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.MatchIntent].
// Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.MatchIntent], with input from
// [MatchIntentResponse][google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse]. Otherwise, the behavior is undefined.
// Fulfills a matched intent returned by
// [MatchIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.MatchIntent].
// Must be called after
// [MatchIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.MatchIntent],
// with input from
// [MatchIntentResponse][google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse].
// Otherwise, the behavior is undefined.
rpc FulfillIntent(FulfillIntentRequest) returns (FulfillIntentResponse) {
option (google.api.http) = {
post: "/v3beta1/{match_intent_request.session=projects/*/locations/*/agents/*/sessions/*}:fulfillIntent"
body: "*"
additional_bindings {
post: "/v3beta1/{match_intent_request.session=projects/*/locations/*/agents/*/environments/*/sessions/*}:fulfillIntent"
body: "*"
}
};
}
}
@ -93,7 +110,10 @@ service Sessions {
message DetectIntentRequest {
// Required. The name of the session this query is sent to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>`.
// ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment.
// It's up to the API caller to choose an appropriate `Session ID`. It can be
// a random number or some type of session identifiers (preferably hashed).
// The length of the `Session ID` must not exceed 36 characters.
@ -126,9 +146,9 @@ message DetectIntentResponse {
// The audio data bytes encoded as specified in the request.
// Note: The output audio is generated based on the values of default platform
// text responses found in the
// [`query_result.response_messages`][google.cloud.dialogflow.cx.v3beta1.QueryResult.response_messages] field. If
// multiple default text responses exist, they will be concatenated when
// generating audio. If no default platform text responses exist, the
// [`query_result.response_messages`][google.cloud.dialogflow.cx.v3beta1.QueryResult.response_messages]
// field. If multiple default text responses exist, they will be concatenated
// when generating audio. If no default platform text responses exist, the
// generated audio content will be empty.
//
// In some scenarios, multiple output audio fields may be present in the
@ -141,24 +161,29 @@ message DetectIntentResponse {
}
// The top-level message sent by the client to the
// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.StreamingDetectIntent] method.
// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3beta1.Sessions.StreamingDetectIntent]
// method.
//
// Multiple request messages should be sent in order:
//
// 1. The first message must contain
// [session][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.session],
// [query_input][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_input] plus optionally
// [query_params][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_params]. If the client
// wants to receive an audio response, it should also contain
// [query_input][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_input]
// plus optionally
// [query_params][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_params].
// If the client wants to receive an audio response, it should also contain
// [output_audio_config][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.output_audio_config].
//
// 2. If [query_input][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_input] was set to
// [query_input.audio.config][google.cloud.dialogflow.cx.v3beta1.AudioInput.config], all subsequent messages
// must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3beta1.AudioInput.audio] to continue with
// Speech recognition.
// If you decide to rather detect an intent from text
// input after you already started Speech recognition, please send a message
// with [query_input.text][google.cloud.dialogflow.cx.v3beta1.QueryInput.text].
// 2. If
// [query_input][google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest.query_input]
// was set to
// [query_input.audio.config][google.cloud.dialogflow.cx.v3beta1.AudioInput.config],
// all subsequent messages must contain
// [query_input.audio.audio][google.cloud.dialogflow.cx.v3beta1.AudioInput.audio]
// to continue with Speech recognition. If you decide to rather detect an
// intent from text input after you already started Speech recognition,
// please send a message with
// [query_input.text][google.cloud.dialogflow.cx.v3beta1.QueryInput.text].
//
// However, note that:
//
@ -171,14 +196,17 @@ message DetectIntentResponse {
message StreamingDetectIntentRequest {
// The name of the session this query is sent to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>`.
// ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment.
// It's up to the API caller to choose an appropriate `Session ID`. It can be
// a random number or some type of session identifiers (preferably hashed).
// The length of the `Session ID` must not exceed 36 characters.
// Note: session must be set in the first request.
string session = 1 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Session"
}];
type: "dialogflow.googleapis.com/Session"
}];
// The parameters of this query.
QueryParameters query_params = 2;
@ -259,8 +287,8 @@ message StreamingRecognitionResult {
// additional results). The client should stop sending additional audio
// data, half-close the gRPC connection, and wait for any additional results
// until the server closes the gRPC connection. This message is only sent if
// [`single_utterance`][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.single_utterance] was set to
// `true`, and is not used otherwise.
// [`single_utterance`][google.cloud.dialogflow.cx.v3beta1.InputAudioConfig.single_utterance]
// was set to `true`, and is not used otherwise.
END_OF_SINGLE_UTTERANCE = 2;
}
@ -296,7 +324,8 @@ message StreamingRecognitionResult {
float stability = 6;
// Word-specific information for the words recognized by Speech in
// [transcript][google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and
// [transcript][google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult.transcript].
// Populated if and only if `message_type` = `TRANSCRIPT` and
// [InputAudioConfig.enable_word_info] is set.
repeated SpeechWordInfo speech_word_info = 7;
@ -376,20 +405,22 @@ message QueryInput {
message QueryResult {
// The original conversational query.
oneof query {
// If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput] was provided as input, this field
// will contain a copy of the text.
// If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
// was provided as input, this field will contain a copy of the text.
string text = 1;
// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
// contain a copy of the intent identifier.
// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
// provided as input, this field will contain a copy of the intent
// identifier.
string trigger_intent = 11;
// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
// this field will contain the trascript for the audio.
// If [natural language speech
// audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
// input, this field will contain the trascript for the audio.
string transcript = 12;
// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will contain
// the name of the event.
// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided
// as input, this field will contain the name of the event.
string trigger_event = 14;
}
@ -399,7 +430,8 @@ message QueryResult {
// for a list of the currently supported language codes.
string language_code = 2;
// The collected [session parameters][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters].
// The collected [session
// parameters][google.cloud.dialogflow.cx.v3beta1.SessionInfo.parameters].
//
// Depending on your protocol or client library language, this is a
// map, associative array, symbol table, dictionary, or JSON object
@ -424,19 +456,23 @@ message QueryResult {
// The list of webhook call status in the order of call sequence.
repeated google.rpc.Status webhook_statuses = 13;
// The list of webhook payload in [WebhookResponse.payload][google.cloud.dialogflow.cx.v3beta1.WebhookResponse.payload], in
// the order of call sequence. If some webhook call fails or doesn't return
// The list of webhook payload in
// [WebhookResponse.payload][google.cloud.dialogflow.cx.v3beta1.WebhookResponse.payload],
// in the order of call sequence. If some webhook call fails or doesn't return
// any payload, an empty `Struct` would be used instead.
repeated google.protobuf.Struct webhook_payloads = 6;
// The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all fields are filled in this message,
// including but not limited to `name` and `display_name`.
// The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
// fields are filled in this message, including but not limited to `name` and
// `display_name`.
Page current_page = 7;
// The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that matched the conversational query. Some, not all fields
// are filled in this message, including but not limited to: `name` and
// `display_name`.
// This field is deprecated, please use [QueryResult.match][google.cloud.dialogflow.cx.v3beta1.QueryResult.match] instead.
// The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that matched the
// conversational query. Some, not all fields are filled in this message,
// including but not limited to: `name` and `display_name`. This field is
// deprecated, please use
// [QueryResult.match][google.cloud.dialogflow.cx.v3beta1.QueryResult.match]
// instead.
Intent intent = 8 [deprecated = true];
// The intent detection confidence. Values range from 0.0 (completely
@ -445,7 +481,9 @@ message QueryResult {
// help match the best intent within the classification threshold.
// This value may change for the same end-user expression at any time due to a
// model retraining or change in implementation.
// This field is deprecated, please use [QueryResult.match][google.cloud.dialogflow.cx.v3beta1.QueryResult.match] instead.
// This field is deprecated, please use
// [QueryResult.match][google.cloud.dialogflow.cx.v3beta1.QueryResult.match]
// instead.
float intent_detection_confidence = 9 [deprecated = true];
// Intent match result, could be an intent or an event.
@ -459,8 +497,8 @@ message QueryResult {
// Represents the natural language text to be processed.
message TextInput {
// Required. The UTF-8 encoded natural language text to be processed. Text length must
// not exceed 256 characters.
// Required. The UTF-8 encoded natural language text to be processed. Text
// length must not exceed 256 characters.
string text = 1 [(google.api.field_behavior) = REQUIRED];
}
@ -485,8 +523,9 @@ message AudioInput {
// The natural language speech audio to be processed.
// A single request can contain up to 1 minute of speech audio data.
// The [transcribed text][google.cloud.dialogflow.cx.v3beta1.QueryResult.transcript] cannot contain more than 256
// bytes.
// The [transcribed
// text][google.cloud.dialogflow.cx.v3beta1.QueryResult.transcript] cannot
// contain more than 256 bytes.
//
// For non-streaming audio detect intent, both `config` and `audio` must be
// provided.
@ -518,9 +557,10 @@ message Match {
NO_INPUT = 5;
}
// The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that matched the query. Some, not all fields are filled in
// this message, including but not limited to: `name` and `display_name`. Only
// filled for [`INTENT`][google.cloud.dialogflow.cx.v3beta1.Match.MatchType] match type.
// The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that matched the
// query. Some, not all fields are filled in this message, including but not
// limited to: `name` and `display_name`. Only filled for
// [`INTENT`][google.cloud.dialogflow.cx.v3beta1.Match.MatchType] match type.
Intent intent = 1;
// The collection of parameters extracted from the query.
@ -561,7 +601,10 @@ message Match {
message MatchIntentRequest {
// Required. The name of the session this query is sent to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>`.
// ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment.
// It's up to the API caller to choose an appropriate `Session ID`. It can be
// a random number or some type of session identifiers (preferably hashed).
// The length of the `Session ID` must not exceed 36 characters.
@ -583,16 +626,18 @@ message MatchIntentRequest {
message MatchIntentResponse {
// The original conversational query.
oneof query {
// If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput] was provided as input, this field
// will contain a copy of the text.
// If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput]
// was provided as input, this field will contain a copy of the text.
string text = 1;
// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
// contain a copy of the intent identifier.
// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was
// provided as input, this field will contain a copy of the intent
// identifier.
string trigger_intent = 2;
// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
// this field will contain the trascript for the audio.
// If [natural language speech
// audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as
// input, this field will contain the trascript for the audio.
string transcript = 3;
}
@ -600,8 +645,9 @@ message MatchIntentResponse {
// we have that the particular intent matches the query.
repeated Match matches = 4;
// The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all fields are filled in this message,
// including but not limited to `name` and `display_name`.
// The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
// fields are filled in this message, including but not limited to `name` and
// `display_name`.
Page current_page = 5;
}
@ -630,9 +676,9 @@ message FulfillIntentResponse {
// The audio data bytes encoded as specified in the request.
// Note: The output audio is generated based on the values of default platform
// text responses found in the
// [`query_result.response_messages`][google.cloud.dialogflow.cx.v3beta1.QueryResult.response_messages] field. If
// multiple default text responses exist, they will be concatenated when
// generating audio. If no default platform text responses exist, the
// [`query_result.response_messages`][google.cloud.dialogflow.cx.v3beta1.QueryResult.response_messages]
// field. If multiple default text responses exist, they will be concatenated
// when generating audio. If no default platform text responses exist, the
// generated audio content will be empty.
//
// In some scenarios, multiple output audio fields may be present in the

View File

@ -32,7 +32,8 @@ option java_outer_classname = "SessionEntityTypeProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";
// Service for managing [SessionEntityTypes][google.cloud.dialogflow.cx.v3beta1.SessionEntityType].
// Service for managing
// [SessionEntityTypes][google.cloud.dialogflow.cx.v3beta1.SessionEntityType].
service SessionEntityTypes {
option (google.api.default_host) = "dialogflow.googleapis.com";
option (google.api.oauth_scopes) =
@ -40,17 +41,25 @@ service SessionEntityTypes {
"https://www.googleapis.com/auth/dialogflow";
// Returns the list of all session entity types in the specified session.
rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) {
rpc ListSessionEntityTypes(ListSessionEntityTypesRequest)
returns (ListSessionEntityTypesResponse) {
option (google.api.http) = {
get: "/v3beta1/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes"
additional_bindings {
get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*/sessions/*}/entityTypes"
}
};
option (google.api.method_signature) = "parent";
}
// Retrieves the specified session entity type.
rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) {
rpc GetSessionEntityType(GetSessionEntityTypeRequest)
returns (SessionEntityType) {
option (google.api.http) = {
get: "/v3beta1/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}"
additional_bindings {
get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}"
}
};
option (google.api.method_signature) = "name";
}
@ -59,27 +68,41 @@ service SessionEntityTypes {
//
// If the specified session entity type already exists, overrides the
// session entity type.
rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) {
rpc CreateSessionEntityType(CreateSessionEntityTypeRequest)
returns (SessionEntityType) {
option (google.api.http) = {
post: "/v3beta1/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes"
body: "session_entity_type"
additional_bindings {
post: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*/sessions/*}/entityTypes"
body: "session_entity_type"
}
};
option (google.api.method_signature) = "parent,session_entity_type";
}
// Updates the specified session entity type.
rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) {
rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest)
returns (SessionEntityType) {
option (google.api.http) = {
patch: "/v3beta1/{session_entity_type.name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}"
body: "session_entity_type"
additional_bindings {
patch: "/v3beta1/{session_entity_type.name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}"
body: "session_entity_type"
}
};
option (google.api.method_signature) = "session_entity_type,update_mask";
}
// Deletes the specified session entity type.
rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) {
rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}"
additional_bindings {
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}"
}
};
option (google.api.method_signature) = "name";
}
@ -90,9 +113,9 @@ service SessionEntityTypes {
// preferences, playlists, and so on.
//
// You can redefine a session entity type at the session level to extend or
// replace a [custom entity type][google.cloud.dialogflow.cx.v3beta1.EntityType] at the user session level (we
// refer to the entity types defined at the agent level as "custom entity
// types").
// replace a [custom entity type][google.cloud.dialogflow.cx.v3beta1.EntityType]
// at the user session level (we refer to the entity types defined at the agent
// level as "custom entity types").
//
// Note: session entity types apply to all queries, regardless of the language.
//
@ -121,31 +144,41 @@ message SessionEntityType {
// `GetSessionEntityType`, `CreateSessionEntityType` and
// `UpdateSessionEntityType` only return the additional entities added in
// this session entity type. If you want to get the supplemented list,
// please call [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType] on the custom entity type
// and merge.
// please call
// [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3beta1.EntityTypes.GetEntityType]
// on the custom entity type and merge.
ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2;
}
// Required. The unique identifier of the session entity type.
// Format: `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/sessions/<Session ID>/entityTypes/<Entity Type
// ID>`.
// ID>` or `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>/sessions/<Session ID>/entityTypes/<Entity
// Type ID>`. If `Environment ID` is not specified, we assume default 'draft'
// environment.
string name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Indicates whether the additional data should override or supplement the
// custom entity type definition.
EntityOverrideMode entity_override_mode = 3 [(google.api.field_behavior) = REQUIRED];
// Required. Indicates whether the additional data should override or
// supplement the custom entity type definition.
EntityOverrideMode entity_override_mode = 3
[(google.api.field_behavior) = REQUIRED];
// Required. The collection of entities to override or supplement the custom entity
// type.
repeated EntityType.Entity entities = 4 [(google.api.field_behavior) = REQUIRED];
// Required. The collection of entities to override or supplement the custom
// entity type.
repeated EntityType.Entity entities = 4
[(google.api.field_behavior) = REQUIRED];
}
// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.ListSessionEntityTypes].
// The request message for
// [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.ListSessionEntityTypes].
message ListSessionEntityTypesRequest {
// Required. The session to list all session entity types from.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>`.
// ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -161,7 +194,8 @@ message ListSessionEntityTypesRequest {
string page_token = 3;
}
// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.ListSessionEntityTypes].
// The response message for
// [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.ListSessionEntityTypes].
message ListSessionEntityTypesResponse {
// The list of session entity types. There will be a maximum number of items
// returned based on the page_size field in the request.
@ -172,11 +206,16 @@ message ListSessionEntityTypesResponse {
string next_page_token = 2;
}
// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.GetSessionEntityType].
// The request message for
// [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.GetSessionEntityType].
message GetSessionEntityTypeRequest {
// Required. The name of the session entity type.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>`.
// ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>/sessions/<Session ID>/entityTypes/<Entity
// Type ID>`. If `Environment ID` is not specified, we assume default 'draft'
// environment.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -185,11 +224,15 @@ message GetSessionEntityTypeRequest {
];
}
// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.CreateSessionEntityType].
// The request message for
// [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.CreateSessionEntityType].
message CreateSessionEntityTypeRequest {
// Required. The session to create a session entity type for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>`.
// ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -198,25 +241,37 @@ message CreateSessionEntityTypeRequest {
];
// Required. The session entity type to create.
SessionEntityType session_entity_type = 2 [(google.api.field_behavior) = REQUIRED];
SessionEntityType session_entity_type = 2
[(google.api.field_behavior) = REQUIRED];
}
// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.UpdateSessionEntityType].
// The request message for
// [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.UpdateSessionEntityType].
message UpdateSessionEntityTypeRequest {
// Required. The session entity type to update.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>`.
SessionEntityType session_entity_type = 1 [(google.api.field_behavior) = REQUIRED];
// ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>/sessions/<Session ID>/entityTypes/<Entity
// Type ID>`. If `Environment ID` is not specified, we assume default 'draft'
// environment.
SessionEntityType session_entity_type = 1
[(google.api.field_behavior) = REQUIRED];
// The mask to control which fields get updated.
google.protobuf.FieldMask update_mask = 2;
}
// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.DeleteSessionEntityType].
// The request message for
// [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.DeleteSessionEntityType].
message DeleteSessionEntityTypeRequest {
// Required. The name of the session entity type to delete.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>`.
// ID>/sessions/<Session ID>/entityTypes/<Entity Type ID>` or
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/environments/<Environment ID>/sessions/<Session ID>/entityTypes/<Entity
// Type ID>`. If `Environment ID` is not specified, we assume default 'draft'
// environment.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {

View File

@ -96,7 +96,8 @@ message Webhook {
// Represents configuration for a generic web service.
message GenericWebService {
// Required. The webhook URI for receiving POST requests. It must use https protocol.
// Required. The webhook URI for receiving POST requests. It must use https
// protocol.
string uri = 1 [(google.api.field_behavior) = REQUIRED];
// The user name for HTTP Basic authentication.
@ -111,10 +112,12 @@ message Webhook {
}
// The 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/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/webhooks/<Webhook ID>`.
// 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/<Project
// ID>/locations/<Location ID>/agents/<Agent ID>/webhooks/<Webhook ID>`.
string name = 1;
// Required. The human-readable name of the webhook, unique within the agent.
@ -135,7 +138,8 @@ message Webhook {
bool disabled = 5;
}
// The request message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3beta1.Webhooks.ListWebhooks].
// The request message for
// [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3beta1.Webhooks.ListWebhooks].
message ListWebhooksRequest {
// Required. The agent to list all webhooks for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@ -154,7 +158,8 @@ message ListWebhooksRequest {
string page_token = 3;
}
// The response message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3beta1.Webhooks.ListWebhooks].
// The response message for
// [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3beta1.Webhooks.ListWebhooks].
message ListWebhooksResponse {
// The list of webhooks. There will be a maximum number of items returned
// based on the page_size field in the request.
@ -165,7 +170,8 @@ message ListWebhooksResponse {
string next_page_token = 2;
}
// The request message for [Webhooks.GetWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.GetWebhook].
// The request message for
// [Webhooks.GetWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.GetWebhook].
message GetWebhookRequest {
// Required. The name of the webhook.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@ -178,7 +184,8 @@ message GetWebhookRequest {
];
}
// The request message for [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook].
// The request message for
// [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook].
message CreateWebhookRequest {
// Required. The agent to create a webhook for.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
@ -193,7 +200,8 @@ message CreateWebhookRequest {
Webhook webhook = 2 [(google.api.field_behavior) = REQUIRED];
}
// The request message for [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook].
// The request message for
// [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook].
message UpdateWebhookRequest {
// Required. The webhook to update.
Webhook webhook = 1 [(google.api.field_behavior) = REQUIRED];
@ -203,7 +211,8 @@ message UpdateWebhookRequest {
google.protobuf.FieldMask update_mask = 2;
}
// The request message for [Webhooks.DeleteWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.DeleteWebhook].
// The request message for
// [Webhooks.DeleteWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.DeleteWebhook].
message DeleteWebhookRequest {
// Required. The name of the webhook to delete.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
@ -214,6 +223,18 @@ message DeleteWebhookRequest {
type: "dialogflow.googleapis.com/Webhook"
}
];
// This 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).
bool force = 2;
}
// The request message for a webhook call.
@ -238,11 +259,12 @@ message WebhookRequest {
}
// Always present. The unique identifier of the last matched
// [intent][google.cloud.dialogflow.cx.v3beta1.Intent]. Format: `projects/<Project ID>/locations/<Location
// ID>/agents/<Agent ID>/intents/<Intent ID>`.
// [intent][google.cloud.dialogflow.cx.v3beta1.Intent]. Format:
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/intents/<Intent ID>`.
string last_matched_intent = 1 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Intent"
}];
type: "dialogflow.googleapis.com/Intent"
}];
// Parameters identified as a result of intent matching. This is a map of
// the name of the identified parameter to the value of the parameter
@ -251,8 +273,9 @@ message WebhookRequest {
map<string, IntentParameterValue> parameters = 2;
}
// Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that
// will be returned to the API caller.
// Always present. The unique identifier of the
// [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse]
// that will be returned to the API caller.
string detect_intent_response_id = 1;
// Always present. Information about the fulfillment that triggered this
@ -273,7 +296,8 @@ message WebhookRequest {
// [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3beta1.WebhookResponse.fulfillment_response];
repeated ResponseMessage messages = 7;
// Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3beta1.QueryParameters.payload].
// Custom data set in
// [QueryParameters.payload][google.cloud.dialogflow.cx.v3beta1.QueryParameters.payload].
google.protobuf.Struct payload = 8;
}
@ -314,7 +338,8 @@ message WebhookResponse {
// if it does not intend to modify session status.
SessionInfo session_info = 3;
// Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3beta1.QueryResult.webhook_payloads].
// Value to append directly to
// [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3beta1.QueryResult.webhook_payloads].
google.protobuf.Struct payload = 4;
// The target to transition to. This can be set optionally to indicate an
@ -325,15 +350,15 @@ message WebhookResponse {
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/pages/<Page ID>`.
string target_page = 5 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Page"
}];
type: "dialogflow.googleapis.com/Page"
}];
// The target flow to transition to.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>`.
string target_flow = 6 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Flow"
}];
type: "dialogflow.googleapis.com/Flow"
}];
}
}
@ -360,71 +385,98 @@ message PageInfo {
FILLED = 3;
}
// Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Required for
// Always present for
// [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest].
// Required for
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// The human-readable name of the parameter, unique within the form. This
// field cannot be modified by the webhook.
string display_name = 1;
// Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Optional for both
// [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Indicates whether the parameter is required. Optional parameters will
// not trigger prompts; however, they are filled if the user specifies
// them. Required parameters must be filled before form filling concludes.
bool required = 2;
// Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Required for
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse]. The state of the parameter. This field can be set
// to [INVALID][google.cloud.dialogflow.cx.v3beta1.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] by
// the webhook to invalidate the parameter; other values set by the
// Always present for
// [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest].
// Required for
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// The state of the parameter. This field can be set to
// [INVALID][google.cloud.dialogflow.cx.v3beta1.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID]
// by the webhook to invalidate the parameter; other values set by the
// webhook will be ignored.
ParameterState state = 3;
// Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Optional for both
// [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// The value of the parameter. This field can be set by the webhook to
// change the parameter value.
google.protobuf.Value value = 4;
// Optional for [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Optional for
// [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest].
// Ignored for
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Indicates if the parameter value was just collected on the last
// conversation turn.
bool just_collected = 5;
}
// Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Optional for both
// [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// The parameters contained in the form. Note that the webhook cannot add
// or remove any form parameter.
repeated ParameterInfo parameter_info = 2;
}
// Always 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/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/pages/<Page ID>`.
string current_page = 1 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Page"
}];
// Always 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/<Project
// ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page
// ID>`.
string current_page = 1 [
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Page" }
];
// Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Optional for both
// [WebhookRequest][google.cloud.dialogflow.cx.v3beta1.WebhookRequest] and
// [WebhookResponse][google.cloud.dialogflow.cx.v3beta1.WebhookResponse].
// Information about the form.
FormInfo form_info = 3;
}
// Represents session information communicated to and from the webhook.
message SessionInfo {
// Always 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 user.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// Always 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 user. Format:
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/sessions/<Session ID>`.
string session = 1 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Session"
}];
type: "dialogflow.googleapis.com/Session"
}];
// 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.
// 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.
map<string, google.protobuf.Value> parameters = 2;
}