Skip to content

Commit 9a386bc

Browse files
Google APIscopybara-github
authored andcommitted
feat: support setting current_page to resume sessions; expose transition_route_groups in flows and language_code in webhook
PiperOrigin-RevId: 367052612
1 parent 5238e64 commit 9a386bc

6 files changed

Lines changed: 51 additions & 17 deletions

File tree

google/cloud/dialogflow/cx/v3beta1/BUILD.bazel

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ py_gapic_assembly_pkg(
222222
##############################################################################
223223
load(
224224
"@com_google_googleapis_imports//:imports.bzl",
225-
"php_gapic_assembly_pkg",
226-
"php_gapic_library",
227-
"php_grpc_library",
228-
"php_proto_library",
225+
php_gapic_assembly_pkg = "php_gapic_assembly_pkg2",
226+
php_gapic_library = "php_gapic_library2",
227+
php_grpc_library = "php_grpc_library2",
228+
php_proto_library = "php_proto_library2",
229229
)
230230

231231
php_proto_library(
@@ -241,10 +241,8 @@ php_grpc_library(
241241

242242
php_gapic_library(
243243
name = "cx_php_gapic",
244-
src = ":cx_proto_with_info",
245-
gapic_yaml = "dialogflow_gapic.yaml",
244+
srcs = [":cx_proto_with_info"],
246245
grpc_service_config = "dialogflow_grpc_service_config.json",
247-
package = "google.cloud.dialogflow.cx.v3beta1",
248246
service_yaml = "dialogflow_v3beta1.yaml",
249247
deps = [
250248
":cx_php_grpc",
@@ -295,8 +293,8 @@ nodejs_gapic_assembly_pkg(
295293
##############################################################################
296294
load(
297295
"@com_google_googleapis_imports//:imports.bzl",
296+
"ruby_cloud_gapic_library",
298297
"ruby_gapic_assembly_pkg",
299-
"ruby_gapic_library",
300298
"ruby_grpc_library",
301299
"ruby_proto_library",
302300
)
@@ -312,13 +310,13 @@ ruby_grpc_library(
312310
deps = [":cx_ruby_proto"],
313311
)
314312

315-
ruby_gapic_library(
313+
ruby_cloud_gapic_library(
316314
name = "cx_ruby_gapic",
317-
src = ":cx_proto_with_info",
318-
gapic_yaml = "dialogflow_gapic.yaml",
315+
srcs = [":cx_proto_with_info"],
316+
extra_protoc_parameters = [
317+
"ruby-cloud-gem-name=google-cloud-dialogflow-cx-v3beta1",
318+
],
319319
grpc_service_config = "dialogflow_grpc_service_config.json",
320-
package = "google.cloud.dialogflow.cx.v3beta1",
321-
service_yaml = "dialogflow_v3beta1.yaml",
322320
deps = [
323321
":cx_ruby_grpc",
324322
":cx_ruby_proto",

google/cloud/dialogflow/cx/v3beta1/dialogflow_grpc_service_config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
{
99
"service": "google.cloud.dialogflow.cx.v3beta1.Changelogs"
1010
},
11+
{
12+
"service": "google.cloud.dialogflow.cx.v3beta1.Deployments"
13+
},
1114
{
1215
"service": "google.cloud.dialogflow.cx.v3beta1.EntityTypes"
1316
},

google/cloud/dialogflow/cx/v3beta1/flow.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,20 @@ message Flow {
225225
// get executed, with the rest being ignored.
226226
repeated EventHandler event_handlers = 10;
227227

228+
// A flow's transition route group serve two purposes:
229+
//
230+
// * They are responsible for matching the user's first utterances in the
231+
// flow.
232+
// * They are inherited by every page's [transition
233+
// route groups][Page.transition_route_groups]. Transition route groups
234+
// defined in the page have higher priority than those defined in the flow.
235+
//
236+
// Format:`projects/<Project ID>/locations/<Location ID>/agents/<Agent
237+
// ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>`.
238+
repeated string transition_route_groups = 15 [(google.api.resource_reference) = {
239+
type: "dialogflow.googleapis.com/TransitionRouteGroup"
240+
}];
241+
228242
// NLU related settings of the flow.
229243
NluSettings nlu_settings = 11;
230244
}

google/cloud/dialogflow/cx/v3beta1/intent.proto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ message Intent {
199199
// fallback intents act as negative examples that triggers no-match event.
200200
bool is_fallback = 6;
201201

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

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

221221
// The request message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3beta1.Intents.ListIntents].

google/cloud/dialogflow/cx/v3beta1/session.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,21 @@ message QueryParameters {
388388
// - Else: parameter value
389389
google.protobuf.Struct parameters = 5;
390390

391+
// The unique identifier of the [page][google.cloud.dialogflow.cx.v3beta1.Page] to override the [current
392+
// page][QueryResult.current_page] in the session. Format: `projects/<Project
393+
// ID>/locations/<Location ID>/agents/<Agent ID>/pages/<page ID>`.
394+
//
395+
// If `current_page` is specified, the previous state of the session will be
396+
// ignored by Dialogflow, including the [previous
397+
// page][QueryResult.current_page] and the [previous session
398+
// parameters][QueryResult.parameters].
399+
// In most cases, [current_page][google.cloud.dialogflow.cx.v3beta1.QueryParameters.current_page] and
400+
// [parameters][google.cloud.dialogflow.cx.v3beta1.QueryParameters.parameters] should be configured together to
401+
// direct a session to a specific state.
402+
string current_page = 6 [(google.api.resource_reference) = {
403+
type: "dialogflow.googleapis.com/Page"
404+
}];
405+
391406
// Whether to disable webhook calls for this request.
392407
bool disable_webhook = 7;
393408

google/cloud/dialogflow/cx/v3beta1/webhook.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@ message WebhookRequest {
314314
string trigger_event = 14;
315315
}
316316

317+
// The language code specified in the [original
318+
// request][QueryInput.language_code].
319+
string language_code = 15;
320+
317321
// Always present. Information about the fulfillment that triggered this
318322
// webhook call.
319323
FulfillmentInfo fulfillment_info = 6;

0 commit comments

Comments
 (0)