Skip to content

Commit

Permalink
feat: support setting current_page to resume sessions; expose transit…
Browse files Browse the repository at this point in the history
…ion_route_groups in flows and language_code in webhook

PiperOrigin-RevId: 367052612
  • Loading branch information
Google APIs authored and copybara-github committed Apr 6, 2021
1 parent 5238e64 commit 9a386bc
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 17 deletions.
24 changes: 11 additions & 13 deletions google/cloud/dialogflow/cx/v3beta1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ py_gapic_assembly_pkg(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
"php_gapic_library",
"php_grpc_library",
"php_proto_library",
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
php_gapic_library = "php_gapic_library2",
php_grpc_library = "php_grpc_library2",
php_proto_library = "php_proto_library2",
)

php_proto_library(
Expand All @@ -241,10 +241,8 @@ php_grpc_library(

php_gapic_library(
name = "cx_php_gapic",
src = ":cx_proto_with_info",
gapic_yaml = "dialogflow_gapic.yaml",
srcs = [":cx_proto_with_info"],
grpc_service_config = "dialogflow_grpc_service_config.json",
package = "google.cloud.dialogflow.cx.v3beta1",
service_yaml = "dialogflow_v3beta1.yaml",
deps = [
":cx_php_grpc",
Expand Down Expand Up @@ -295,8 +293,8 @@ nodejs_gapic_assembly_pkg(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_gapic_library",
"ruby_grpc_library",
"ruby_proto_library",
)
Expand All @@ -312,13 +310,13 @@ ruby_grpc_library(
deps = [":cx_ruby_proto"],
)

ruby_gapic_library(
ruby_cloud_gapic_library(
name = "cx_ruby_gapic",
src = ":cx_proto_with_info",
gapic_yaml = "dialogflow_gapic.yaml",
srcs = [":cx_proto_with_info"],
extra_protoc_parameters = [
"ruby-cloud-gem-name=google-cloud-dialogflow-cx-v3beta1",
],
grpc_service_config = "dialogflow_grpc_service_config.json",
package = "google.cloud.dialogflow.cx.v3beta1",
service_yaml = "dialogflow_v3beta1.yaml",
deps = [
":cx_ruby_grpc",
":cx_ruby_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{
"service": "google.cloud.dialogflow.cx.v3beta1.Changelogs"
},
{
"service": "google.cloud.dialogflow.cx.v3beta1.Deployments"
},
{
"service": "google.cloud.dialogflow.cx.v3beta1.EntityTypes"
},
Expand Down
14 changes: 14 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/flow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,20 @@ message Flow {
// get executed, with the rest being ignored.
repeated EventHandler event_handlers = 10;

// A flow's transition route group serve two purposes:
//
// * They are responsible for matching the user's first utterances in the
// flow.
// * They are inherited by every page's [transition
// route groups][Page.transition_route_groups]. Transition route groups
// defined in the page have higher priority than those defined in the flow.
//
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
repeated string transition_route_groups = 15 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/TransitionRouteGroup"
}];

// NLU related settings of the flow.
NluSettings nlu_settings = 11;
}
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/dialogflow/cx/v3beta1/intent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ message Intent {
// fallback intents act as negative examples that triggers no-match event.
bool is_fallback = 6;

// Optional. The key/value metadata to label an intent. Labels can contain
// The key/value metadata to label an intent. Labels can contain
// lowercase letters, digits and the symbols '-' and '_'. International
// characters are allowed, including letters from unicase alphabets. Keys must
// start with a letter. Keys and values can be no longer than 63 characters
Expand All @@ -211,11 +211,11 @@ message Intent {
// * sys-contextual
// The above labels do not require value. "sys-head" means the intent is a
// head intent. "sys-contextual" means the intent is a contextual intent.
map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL];
map<string, string> labels = 7;

// Optional. Human readable description for better understanding an intent like its
// Human readable description for better understanding an intent like its
// scope, content, result etc. Maximum character limit: 140 characters.
string description = 8 [(google.api.field_behavior) = OPTIONAL];
string description = 8;
}

// The request message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ListIntents].
Expand Down
15 changes: 15 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,21 @@ message QueryParameters {
// - Else: parameter value
google.protobuf.Struct parameters = 5;

// The unique identifier of the [page][google.cloud.dialogflow.cx.v3beta1.Page] to override the [current
// page][QueryResult.current_page] in the session. Format: `projects/<Project
// ID>/locations/<Location ID>/agents/<Agent ID>/pages/<page ID>`.
//
// If `current_page` is specified, the previous state of the session will be
// ignored by Dialogflow, including the [previous
// page][QueryResult.current_page] and the [previous session
// parameters][QueryResult.parameters].
// In most cases, [current_page][google.cloud.dialogflow.cx.v3beta1.QueryParameters.current_page] and
// [parameters][google.cloud.dialogflow.cx.v3beta1.QueryParameters.parameters] should be configured together to
// direct a session to a specific state.
string current_page = 6 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Page"
}];

// Whether to disable webhook calls for this request.
bool disable_webhook = 7;

Expand Down
4 changes: 4 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/webhook.proto
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ message WebhookRequest {
string trigger_event = 14;
}

// The language code specified in the [original
// request][QueryInput.language_code].
string language_code = 15;

// Always present. Information about the fulfillment that triggered this
// webhook call.
FulfillmentInfo fulfillment_info = 6;
Expand Down

0 comments on commit 9a386bc

Please sign in to comment.