feat: Initial API proto for Dialogflow CX client library (GA).
PiperOrigin-RevId: 340364380
This commit is contained in:
committed by
Copybara-Service
parent
da21c56395
commit
1d641ec651
417
google/cloud/dialogflow/cx/v3/BUILD.bazel
Normal file
417
google/cloud/dialogflow/cx/v3/BUILD.bazel
Normal file
@@ -0,0 +1,417 @@
|
|||||||
|
# This file was automatically generated by BuildFileGenerator
|
||||||
|
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
|
||||||
|
|
||||||
|
# Most of the manual changes to this file will be overwritten.
|
||||||
|
# It's **only** allowed to change the following rule attribute values:
|
||||||
|
# - names of *_gapic_assembly_* rules
|
||||||
|
# - certain parameters of *_gapic_library rules, including but not limited to:
|
||||||
|
# * extra_protoc_parameters
|
||||||
|
# * extra_protoc_file_parameters
|
||||||
|
# The complete list of preserved parameters can be found in the source code.
|
||||||
|
|
||||||
|
# This is an API workspace, having public visibility by default makes perfect sense.
|
||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Common
|
||||||
|
##############################################################################
|
||||||
|
load("@rules_proto//proto:defs.bzl", "proto_library")
|
||||||
|
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
|
||||||
|
|
||||||
|
proto_library(
|
||||||
|
name = "cx_proto",
|
||||||
|
srcs = [
|
||||||
|
"agent.proto",
|
||||||
|
"audio_config.proto",
|
||||||
|
"entity_type.proto",
|
||||||
|
"environment.proto",
|
||||||
|
"flow.proto",
|
||||||
|
"fulfillment.proto",
|
||||||
|
"intent.proto",
|
||||||
|
"page.proto",
|
||||||
|
"response_message.proto",
|
||||||
|
"security_settings.proto",
|
||||||
|
"session.proto",
|
||||||
|
"session_entity_type.proto",
|
||||||
|
"transition_route_group.proto",
|
||||||
|
"version.proto",
|
||||||
|
"webhook.proto",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
"//google/api:annotations_proto",
|
||||||
|
"//google/api:client_proto",
|
||||||
|
"//google/api:field_behavior_proto",
|
||||||
|
"//google/api:resource_proto",
|
||||||
|
"//google/longrunning:operations_proto",
|
||||||
|
"//google/rpc:status_proto",
|
||||||
|
"//google/type:latlng_proto",
|
||||||
|
"@com_google_protobuf//:duration_proto",
|
||||||
|
"@com_google_protobuf//:empty_proto",
|
||||||
|
"@com_google_protobuf//:field_mask_proto",
|
||||||
|
"@com_google_protobuf//:struct_proto",
|
||||||
|
"@com_google_protobuf//:timestamp_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
proto_library_with_info(
|
||||||
|
name = "cx_proto_with_info",
|
||||||
|
deps = [
|
||||||
|
":cx_proto",
|
||||||
|
"//google/cloud:common_resources_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Java
|
||||||
|
##############################################################################
|
||||||
|
load(
|
||||||
|
"@com_google_googleapis_imports//:imports.bzl",
|
||||||
|
"java_gapic_assembly_gradle_pkg",
|
||||||
|
"java_gapic_library",
|
||||||
|
"java_gapic_test",
|
||||||
|
"java_grpc_library",
|
||||||
|
"java_proto_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
java_proto_library(
|
||||||
|
name = "cx_java_proto",
|
||||||
|
deps = [":cx_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
java_grpc_library(
|
||||||
|
name = "cx_java_grpc",
|
||||||
|
srcs = [":cx_proto"],
|
||||||
|
deps = [":cx_java_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
java_gapic_library(
|
||||||
|
name = "cx_java_gapic",
|
||||||
|
src = ":cx_proto_with_info",
|
||||||
|
gapic_yaml = "dialogflow_gapic.yaml",
|
||||||
|
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||||
|
package = "google.cloud.dialogflow.cx.v3",
|
||||||
|
service_yaml = "dialogflow_v3.yaml",
|
||||||
|
test_deps = [
|
||||||
|
":cx_java_grpc",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
":cx_java_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
java_gapic_test(
|
||||||
|
name = "cx_java_gapic_test_suite",
|
||||||
|
test_classes = [
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.AgentsClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.EntityTypesClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.EnvironmentsClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.FlowsClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.IntentsClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.PagesClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.SecuritySettingsServiceClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.SessionEntityTypesClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.SessionsClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.TransitionRouteGroupsClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.VersionsClientTest",
|
||||||
|
"com.google.cloud.dialogflow.cx.v3.WebhooksClientTest",
|
||||||
|
],
|
||||||
|
runtime_deps = [":cx_java_gapic_test"],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Open Source Packages
|
||||||
|
java_gapic_assembly_gradle_pkg(
|
||||||
|
name = "google-cloud-dialogflow-cx-v3-java",
|
||||||
|
deps = [
|
||||||
|
":cx_java_gapic",
|
||||||
|
":cx_java_grpc",
|
||||||
|
":cx_java_proto",
|
||||||
|
":cx_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Go
|
||||||
|
##############################################################################
|
||||||
|
load(
|
||||||
|
"@com_google_googleapis_imports//:imports.bzl",
|
||||||
|
"go_gapic_assembly_pkg",
|
||||||
|
"go_gapic_library",
|
||||||
|
"go_proto_library",
|
||||||
|
"go_test",
|
||||||
|
)
|
||||||
|
|
||||||
|
go_proto_library(
|
||||||
|
name = "cx_go_proto",
|
||||||
|
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
|
||||||
|
importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3",
|
||||||
|
protos = [":cx_proto"],
|
||||||
|
deps = [
|
||||||
|
"//google/api:annotations_go_proto",
|
||||||
|
"//google/longrunning:longrunning_go_proto",
|
||||||
|
"//google/rpc:status_go_proto",
|
||||||
|
"//google/type:latlng_go_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_gapic_library(
|
||||||
|
name = "cx_go_gapic",
|
||||||
|
srcs = [":cx_proto_with_info"],
|
||||||
|
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||||
|
importpath = "cloud.google.com/go/dialogflow/cx/apiv3;cx",
|
||||||
|
service_yaml = "dialogflow_v3.yaml",
|
||||||
|
deps = [
|
||||||
|
":cx_go_proto",
|
||||||
|
"//google/longrunning:longrunning_go_proto",
|
||||||
|
"@com_google_cloud_go//longrunning/autogen:go_default_library",
|
||||||
|
"@com_google_cloud_go//longrunning:go_default_library",
|
||||||
|
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
|
||||||
|
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_test(
|
||||||
|
name = "cx_go_gapic_test",
|
||||||
|
srcs = [":cx_go_gapic_srcjar_test"],
|
||||||
|
embed = [":cx_go_gapic"],
|
||||||
|
importpath = "cloud.google.com/go/dialogflow/cx/apiv3",
|
||||||
|
)
|
||||||
|
|
||||||
|
# Open Source Packages
|
||||||
|
go_gapic_assembly_pkg(
|
||||||
|
name = "gapi-cloud-dialogflow-cx-v3-go",
|
||||||
|
deps = [
|
||||||
|
":cx_go_gapic",
|
||||||
|
":cx_go_gapic_srcjar-test.srcjar",
|
||||||
|
":cx_go_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Python
|
||||||
|
##############################################################################
|
||||||
|
load(
|
||||||
|
"@com_google_googleapis_imports//:imports.bzl",
|
||||||
|
"moved_proto_library",
|
||||||
|
"py_gapic_assembly_pkg",
|
||||||
|
"py_gapic_library",
|
||||||
|
"py_grpc_library",
|
||||||
|
"py_proto_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
moved_proto_library(
|
||||||
|
name = "cx_moved_proto",
|
||||||
|
srcs = [":cx_proto"],
|
||||||
|
deps = [
|
||||||
|
"//google/api:annotations_proto",
|
||||||
|
"//google/api:client_proto",
|
||||||
|
"//google/api:field_behavior_proto",
|
||||||
|
"//google/api:resource_proto",
|
||||||
|
"//google/longrunning:operations_proto",
|
||||||
|
"//google/rpc:status_proto",
|
||||||
|
"//google/type:latlng_proto",
|
||||||
|
"@com_google_protobuf//:duration_proto",
|
||||||
|
"@com_google_protobuf//:empty_proto",
|
||||||
|
"@com_google_protobuf//:field_mask_proto",
|
||||||
|
"@com_google_protobuf//:struct_proto",
|
||||||
|
"@com_google_protobuf//:timestamp_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
py_proto_library(
|
||||||
|
name = "cx_py_proto",
|
||||||
|
plugin = "@protoc_docs_plugin//:docs_plugin",
|
||||||
|
deps = [":cx_moved_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
py_grpc_library(
|
||||||
|
name = "cx_py_grpc",
|
||||||
|
srcs = [":cx_moved_proto"],
|
||||||
|
deps = [":cx_py_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
py_gapic_library(
|
||||||
|
name = "cx_py_gapic",
|
||||||
|
src = ":cx_proto_with_info",
|
||||||
|
gapic_yaml = "dialogflow_gapic.yaml",
|
||||||
|
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||||
|
package = "google.cloud.dialogflow.cx.v3",
|
||||||
|
service_yaml = "dialogflow_v3.yaml",
|
||||||
|
deps = [
|
||||||
|
":cx_py_grpc",
|
||||||
|
":cx_py_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Open Source Packages
|
||||||
|
py_gapic_assembly_pkg(
|
||||||
|
name = "dialogflow-cx-v3-py",
|
||||||
|
deps = [
|
||||||
|
":cx_py_gapic",
|
||||||
|
":cx_py_grpc",
|
||||||
|
":cx_py_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# PHP
|
||||||
|
##############################################################################
|
||||||
|
load(
|
||||||
|
"@com_google_googleapis_imports//:imports.bzl",
|
||||||
|
"php_gapic_assembly_pkg",
|
||||||
|
"php_gapic_library",
|
||||||
|
"php_grpc_library",
|
||||||
|
"php_proto_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
php_proto_library(
|
||||||
|
name = "cx_php_proto",
|
||||||
|
deps = [":cx_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
php_grpc_library(
|
||||||
|
name = "cx_php_grpc",
|
||||||
|
srcs = [":cx_proto"],
|
||||||
|
deps = [":cx_php_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
php_gapic_library(
|
||||||
|
name = "cx_php_gapic",
|
||||||
|
src = ":cx_proto_with_info",
|
||||||
|
gapic_yaml = "dialogflow_gapic.yaml",
|
||||||
|
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||||
|
package = "google.cloud.dialogflow.cx.v3",
|
||||||
|
service_yaml = "dialogflow_v3.yaml",
|
||||||
|
deps = [
|
||||||
|
":cx_php_grpc",
|
||||||
|
":cx_php_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Open Source Packages
|
||||||
|
php_gapic_assembly_pkg(
|
||||||
|
name = "google-cloud-dialogflow-cx-v3-php",
|
||||||
|
deps = [
|
||||||
|
":cx_php_gapic",
|
||||||
|
":cx_php_grpc",
|
||||||
|
":cx_php_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Node.js
|
||||||
|
##############################################################################
|
||||||
|
load(
|
||||||
|
"@com_google_googleapis_imports//:imports.bzl",
|
||||||
|
"nodejs_gapic_assembly_pkg",
|
||||||
|
"nodejs_gapic_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
nodejs_gapic_library(
|
||||||
|
name = "cx_nodejs_gapic",
|
||||||
|
src = ":cx_proto_with_info",
|
||||||
|
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||||
|
package = "google.cloud.dialogflow.cx.v3",
|
||||||
|
service_yaml = "dialogflow_v3.yaml",
|
||||||
|
deps = [],
|
||||||
|
)
|
||||||
|
|
||||||
|
nodejs_gapic_assembly_pkg(
|
||||||
|
name = "dialogflow-cx-v3-nodejs",
|
||||||
|
deps = [
|
||||||
|
":cx_nodejs_gapic",
|
||||||
|
":cx_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Ruby
|
||||||
|
##############################################################################
|
||||||
|
load(
|
||||||
|
"@com_google_googleapis_imports//:imports.bzl",
|
||||||
|
"ruby_gapic_assembly_pkg",
|
||||||
|
"ruby_gapic_library",
|
||||||
|
"ruby_grpc_library",
|
||||||
|
"ruby_proto_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
ruby_proto_library(
|
||||||
|
name = "cx_ruby_proto",
|
||||||
|
deps = [":cx_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
ruby_grpc_library(
|
||||||
|
name = "cx_ruby_grpc",
|
||||||
|
srcs = [":cx_proto"],
|
||||||
|
deps = [":cx_ruby_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
ruby_gapic_library(
|
||||||
|
name = "cx_ruby_gapic",
|
||||||
|
src = ":cx_proto_with_info",
|
||||||
|
gapic_yaml = "dialogflow_gapic.yaml",
|
||||||
|
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||||
|
package = "google.cloud.dialogflow.cx.v3",
|
||||||
|
service_yaml = "dialogflow_v3.yaml",
|
||||||
|
deps = [
|
||||||
|
":cx_ruby_grpc",
|
||||||
|
":cx_ruby_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Open Source Packages
|
||||||
|
ruby_gapic_assembly_pkg(
|
||||||
|
name = "google-cloud-dialogflow-cx-v3-ruby",
|
||||||
|
deps = [
|
||||||
|
":cx_ruby_gapic",
|
||||||
|
":cx_ruby_grpc",
|
||||||
|
":cx_ruby_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# C#
|
||||||
|
##############################################################################
|
||||||
|
load(
|
||||||
|
"@com_google_googleapis_imports//:imports.bzl",
|
||||||
|
"csharp_gapic_assembly_pkg",
|
||||||
|
"csharp_gapic_library",
|
||||||
|
"csharp_grpc_library",
|
||||||
|
"csharp_proto_library",
|
||||||
|
)
|
||||||
|
|
||||||
|
csharp_proto_library(
|
||||||
|
name = "cx_csharp_proto",
|
||||||
|
deps = [":cx_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
csharp_grpc_library(
|
||||||
|
name = "cx_csharp_grpc",
|
||||||
|
srcs = [":cx_proto"],
|
||||||
|
deps = [":cx_csharp_proto"],
|
||||||
|
)
|
||||||
|
|
||||||
|
csharp_gapic_library(
|
||||||
|
name = "cx_csharp_gapic",
|
||||||
|
srcs = [":cx_proto_with_info"],
|
||||||
|
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||||
|
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
|
||||||
|
deps = [
|
||||||
|
":cx_csharp_grpc",
|
||||||
|
":cx_csharp_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
# Open Source Packages
|
||||||
|
csharp_gapic_assembly_pkg(
|
||||||
|
name = "google-cloud-dialogflow-cx-v3-csharp",
|
||||||
|
deps = [
|
||||||
|
":cx_csharp_gapic",
|
||||||
|
":cx_csharp_grpc",
|
||||||
|
":cx_csharp_proto",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# C++
|
||||||
|
##############################################################################
|
||||||
|
# Put your C++ rules here
|
||||||
318
google/cloud/dialogflow/cx/v3/agent.proto
Normal file
318
google/cloud/dialogflow/cx/v3/agent.proto
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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/v3/flow.proto";
|
||||||
|
import "google/longrunning/operations.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "AgentProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [Agents][google.cloud.dialogflow.cx.v3.Agent].
|
||||||
|
service Agents {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all agents in the specified location.
|
||||||
|
rpc ListAgents(ListAgentsRequest) returns (ListAgentsResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*}/agents"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified agent.
|
||||||
|
rpc GetAgent(GetAgentRequest) returns (Agent) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates an agent in the specified location.
|
||||||
|
rpc CreateAgent(CreateAgentRequest) returns (Agent) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*}/agents"
|
||||||
|
body: "agent"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,agent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified agent.
|
||||||
|
rpc UpdateAgent(UpdateAgentRequest) returns (Agent) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{agent.name=projects/*/locations/*/agents/*}"
|
||||||
|
body: "agent"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "agent,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified agent.
|
||||||
|
rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exports the specified agent to a binary file.
|
||||||
|
rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{name=projects/*/locations/*/agents/*}:export"
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (google.longrunning.operation_info) = {
|
||||||
|
response_type: "ExportAgentResponse"
|
||||||
|
metadata_type: "google.protobuf.Struct"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restores the specified agent from a binary file.
|
||||||
|
//
|
||||||
|
// Replaces the current agent with a new one. Note that all existing resources
|
||||||
|
// in agent (e.g. intents, entity types, flows) will be removed.
|
||||||
|
rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{name=projects/*/locations/*/agents/*}:restore"
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (google.longrunning.operation_info) = {
|
||||||
|
response_type: "google.protobuf.Empty"
|
||||||
|
metadata_type: "google.protobuf.Struct"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Settings related to speech recognition.
|
||||||
|
message SpeechToTextSettings {
|
||||||
|
// Whether to use speech adaptation for speech recognition.
|
||||||
|
bool enable_speech_adaptation = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Agents are best described as Natural Language Understanding (NLU) modules
|
||||||
|
// that transform user requests into actionable data. You can include agents
|
||||||
|
// in your app, product, or service to determine user intent and respond to the
|
||||||
|
// user in a natural way.
|
||||||
|
//
|
||||||
|
// After you create an agent, you can add [Intents][google.cloud.dialogflow.cx.v3.Intent],
|
||||||
|
// [Entity Types][google.cloud.dialogflow.cx.v3.EntityType], [Flows][google.cloud.dialogflow.cx.v3.Flow], [Fulfillments][google.cloud.dialogflow.cx.v3.Fulfillment],
|
||||||
|
// [Webhooks][google.cloud.dialogflow.cx.v3.Webhook], and so on to manage the conversation flows..
|
||||||
|
message Agent {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/Agent"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// The unique identifier of the agent.
|
||||||
|
// Required for the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] method. [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent]
|
||||||
|
// populates the name automatically.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Required. The human-readable name of the agent, unique within the location.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Immutable. The default language of the agent as a language tag.
|
||||||
|
// See [Language
|
||||||
|
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// for a list of the currently supported language codes.
|
||||||
|
// This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent] method.
|
||||||
|
string default_language_code = 3 [(google.api.field_behavior) = IMMUTABLE];
|
||||||
|
|
||||||
|
// Required. The time zone of the agent from the [time zone
|
||||||
|
// database](https://www.iana.org/time-zones), e.g., America/New_York,
|
||||||
|
// Europe/Paris.
|
||||||
|
string time_zone = 5 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The description of the agent. The maximum length is 500 characters. If
|
||||||
|
// exceeded, the request is rejected.
|
||||||
|
string description = 6;
|
||||||
|
|
||||||
|
// The URI of the agent's avatar. Avatars are used throughout the Dialogflow
|
||||||
|
// console and in the self-hosted [Web
|
||||||
|
// Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo)
|
||||||
|
// integration.
|
||||||
|
string avatar_uri = 7;
|
||||||
|
|
||||||
|
// Speech recognition related settings.
|
||||||
|
SpeechToTextSettings speech_to_text_settings = 13;
|
||||||
|
|
||||||
|
// Immutable. Name of the start flow in this agent. A start flow will be automatically
|
||||||
|
// created when the agent is created, and can only be deleted by deleting the
|
||||||
|
// agent.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string start_flow = 16 [
|
||||||
|
(google.api.field_behavior) = IMMUTABLE,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Flow"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Indicates if stackdriver logging is enabled for the agent.
|
||||||
|
bool enable_stackdriver_logging = 18;
|
||||||
|
|
||||||
|
// Indicates if automatic spell correction is enabled in detect intent
|
||||||
|
// requests.
|
||||||
|
bool enable_spell_correction = 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents].
|
||||||
|
message ListAgentsRequest {
|
||||||
|
// Required. The location to list all agents for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Agent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3.Agents.ListAgents].
|
||||||
|
message ListAgentsResponse {
|
||||||
|
// The list of agents. There will be a maximum number of items returned based
|
||||||
|
// on the page_size field in the request.
|
||||||
|
repeated Agent agents = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Agents.GetAgent][google.cloud.dialogflow.cx.v3.Agents.GetAgent].
|
||||||
|
message GetAgentRequest {
|
||||||
|
// Required. The name of the agent.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Agent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Agents.CreateAgent][google.cloud.dialogflow.cx.v3.Agents.CreateAgent].
|
||||||
|
message CreateAgentRequest {
|
||||||
|
// Required. The location to create a agent for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Agent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The agent to create.
|
||||||
|
Agent agent = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent].
|
||||||
|
message UpdateAgentRequest {
|
||||||
|
// Required. The agent to update.
|
||||||
|
Agent agent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The mask to control which fields get updated. If the mask is not present,
|
||||||
|
// all fields will be updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.cx.v3.Agents.DeleteAgent].
|
||||||
|
message DeleteAgentRequest {
|
||||||
|
// Required. The name of the agent to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Agent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3.Agents.ExportAgent].
|
||||||
|
message ExportAgentRequest {
|
||||||
|
// Required. The name of the agent to export.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Agent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Optional. The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to
|
||||||
|
// export the agent to. The format of this URI must be
|
||||||
|
// `gs://<bucket-name>/<object-name>`.
|
||||||
|
// If left unspecified, the serialized agent is returned inline.
|
||||||
|
string agent_uri = 2 [(google.api.field_behavior) = OPTIONAL];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Agents.ExportAgent][google.cloud.dialogflow.cx.v3.Agents.ExportAgent].
|
||||||
|
message ExportAgentResponse {
|
||||||
|
// The exported agent.
|
||||||
|
oneof agent {
|
||||||
|
// The URI to a file containing the exported agent. This field is populated
|
||||||
|
// only if `agent_uri` is specified in [ExportAgentRequest][google.cloud.dialogflow.cx.v3.ExportAgentRequest].
|
||||||
|
string agent_uri = 1;
|
||||||
|
|
||||||
|
// Uncompressed raw byte content for agent.
|
||||||
|
bytes agent_content = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.cx.v3.Agents.RestoreAgent].
|
||||||
|
message RestoreAgentRequest {
|
||||||
|
// Required. The name of the agent to restore into.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Agent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The agent to restore.
|
||||||
|
oneof agent {
|
||||||
|
// The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
|
||||||
|
// to restore agent from. The format of this URI must be
|
||||||
|
// `gs://<bucket-name>/<object-name>`.
|
||||||
|
string agent_uri = 2;
|
||||||
|
|
||||||
|
// Uncompressed raw byte content for agent.
|
||||||
|
bytes agent_content = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
305
google/cloud/dialogflow/cx/v3/audio_config.proto
Normal file
305
google/cloud/dialogflow/cx/v3/audio_config.proto
Normal file
@@ -0,0 +1,305 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "AudioConfigProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
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
|
||||||
|
// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
|
||||||
|
// details.
|
||||||
|
enum AudioEncoding {
|
||||||
|
// Not specified.
|
||||||
|
AUDIO_ENCODING_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
|
||||||
|
AUDIO_ENCODING_LINEAR_16 = 1;
|
||||||
|
|
||||||
|
// [`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio
|
||||||
|
// Codec) is the recommended encoding because it is lossless (therefore
|
||||||
|
// recognition is not compromised) and requires only about half the
|
||||||
|
// bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and
|
||||||
|
// 24-bit samples, however, not all fields in `STREAMINFO` are supported.
|
||||||
|
AUDIO_ENCODING_FLAC = 2;
|
||||||
|
|
||||||
|
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
|
||||||
|
AUDIO_ENCODING_MULAW = 3;
|
||||||
|
|
||||||
|
// Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.
|
||||||
|
AUDIO_ENCODING_AMR = 4;
|
||||||
|
|
||||||
|
// Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.
|
||||||
|
AUDIO_ENCODING_AMR_WB = 5;
|
||||||
|
|
||||||
|
// Opus encoded audio frames in Ogg container
|
||||||
|
// ([OggOpus](https://wiki.xiph.org/OggOpus)).
|
||||||
|
// `sample_rate_hertz` must be 16000.
|
||||||
|
AUDIO_ENCODING_OGG_OPUS = 6;
|
||||||
|
|
||||||
|
// Although the use of lossy encodings is not recommended, if a very low
|
||||||
|
// bitrate encoding is required, `OGG_OPUS` is highly preferred over
|
||||||
|
// Speex encoding. The [Speex](https://speex.org/) encoding supported by
|
||||||
|
// Dialogflow API has a header byte in each block, as in MIME type
|
||||||
|
// `audio/x-speex-with-header-byte`.
|
||||||
|
// It is a variant of the RTP Speex encoding defined in
|
||||||
|
// [RFC 5574](https://tools.ietf.org/html/rfc5574).
|
||||||
|
// The stream is a sequence of blocks, one block per RTP packet. Each block
|
||||||
|
// starts with a byte containing the length of the block, in bytes, followed
|
||||||
|
// by one or more frames of Speex data, padded to an integral number of
|
||||||
|
// bytes (octets) as specified in RFC 5574. In other words, each RTP header
|
||||||
|
// is replaced with a single byte containing the block length. Only Speex
|
||||||
|
// wideband is supported. `sample_rate_hertz` must be 16000.
|
||||||
|
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instructs the speech recognizer on how to process the audio content.
|
||||||
|
message InputAudioConfig {
|
||||||
|
// Required. Audio encoding of the audio content to process.
|
||||||
|
AudioEncoding audio_encoding = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Sample rate (in Hertz) of the audio content sent in the query.
|
||||||
|
// Refer to
|
||||||
|
// [Cloud Speech API
|
||||||
|
// documentation](https://cloud.google.com/speech-to-text/docs/basics) for
|
||||||
|
// more details.
|
||||||
|
int32 sample_rate_hertz = 2;
|
||||||
|
|
||||||
|
// Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in
|
||||||
|
// [StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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
|
||||||
|
// recognizer should recognize with higher likelihood.
|
||||||
|
//
|
||||||
|
// See [the Cloud Speech
|
||||||
|
// documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
|
||||||
|
// for more details.
|
||||||
|
repeated string phrase_hints = 4;
|
||||||
|
|
||||||
|
// Optional. Which Speech model to select for the given request. Select the
|
||||||
|
// model best suited to your domain to get best results. If a model is not
|
||||||
|
// explicitly specified, then we auto-select a model based on the parameters
|
||||||
|
// in the InputAudioConfig.
|
||||||
|
// If enhanced speech model is enabled for the agent and an enhanced
|
||||||
|
// version of the specified model for the language does not exist, then the
|
||||||
|
// speech is recognized using the standard version of the specified model.
|
||||||
|
// Refer to
|
||||||
|
// [Cloud Speech API
|
||||||
|
// documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
|
||||||
|
// for more details.
|
||||||
|
string model = 7;
|
||||||
|
|
||||||
|
// Optional. Which variant of the [Speech model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use.
|
||||||
|
SpeechModelVariant model_variant = 10;
|
||||||
|
|
||||||
|
// Optional. If `false` (default), recognition does not cease until the
|
||||||
|
// client closes the stream.
|
||||||
|
// If `true`, the recognizer will detect a single spoken utterance in input
|
||||||
|
// audio. Recognition ceases when it detects the audio's voice has
|
||||||
|
// stopped or paused. In this case, once a detected intent is received, the
|
||||||
|
// client should close the stream and start a new request with a new stream as
|
||||||
|
// needed.
|
||||||
|
// Note: This setting is relevant only for streaming methods.
|
||||||
|
bool single_utterance = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Variant of the specified [Speech model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use.
|
||||||
|
//
|
||||||
|
// See the [Cloud Speech
|
||||||
|
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
||||||
|
// for which models have different variants. For example, the "phone_call" model
|
||||||
|
// has both a standard and an enhanced variant. When you use an enhanced model,
|
||||||
|
// you will generally receive higher quality results than for a standard model.
|
||||||
|
enum SpeechModelVariant {
|
||||||
|
// No model variant specified. In this case Dialogflow defaults to
|
||||||
|
// USE_BEST_AVAILABLE.
|
||||||
|
SPEECH_MODEL_VARIANT_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Use the best available variant of the [Speech
|
||||||
|
// model][InputAudioConfig.model] that the caller is eligible for.
|
||||||
|
//
|
||||||
|
// Please see the [Dialogflow
|
||||||
|
// docs](https://cloud.google.com/dialogflow/docs/data-logging) for
|
||||||
|
// how to make your project eligible for enhanced models.
|
||||||
|
USE_BEST_AVAILABLE = 1;
|
||||||
|
|
||||||
|
// Use standard model variant even if an enhanced model is available. See the
|
||||||
|
// [Cloud Speech
|
||||||
|
// documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models)
|
||||||
|
// for details about enhanced models.
|
||||||
|
USE_STANDARD = 2;
|
||||||
|
|
||||||
|
// Use an enhanced model variant:
|
||||||
|
//
|
||||||
|
// * If an enhanced variant does not exist for the given
|
||||||
|
// [model][google.cloud.dialogflow.cx.v3.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)
|
||||||
|
// describes which models have enhanced variants.
|
||||||
|
//
|
||||||
|
// * If the API caller isn't eligible for enhanced models, Dialogflow returns
|
||||||
|
// an error. Please see the [Dialogflow
|
||||||
|
// docs](https://cloud.google.com/dialogflow/docs/data-logging)
|
||||||
|
// for how to make your project eligible.
|
||||||
|
USE_ENHANCED = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Description of which voice to use for speech synthesis.
|
||||||
|
message VoiceSelectionParams {
|
||||||
|
// Optional. The name of the voice. If not set, the service will choose a
|
||||||
|
// voice based on the other parameters such as language_code and
|
||||||
|
// [ssml_gender][google.cloud.dialogflow.cx.v3.VoiceSelectionParams.ssml_gender].
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// 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.v3.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Configuration of how speech should be synthesized.
|
||||||
|
message SynthesizeSpeechConfig {
|
||||||
|
// Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
|
||||||
|
// native speed supported by the specific voice. 2.0 is twice as fast, and
|
||||||
|
// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
|
||||||
|
// other values < 0.25 or > 4.0 will return an error.
|
||||||
|
double speaking_rate = 1;
|
||||||
|
|
||||||
|
// Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
|
||||||
|
// semitones from the original pitch. -20 means decrease 20 semitones from the
|
||||||
|
// original pitch.
|
||||||
|
double pitch = 2;
|
||||||
|
|
||||||
|
// Optional. Volume gain (in dB) of the normal native volume supported by the
|
||||||
|
// specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
|
||||||
|
// 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
|
||||||
|
// will play at approximately half the amplitude of the normal native signal
|
||||||
|
// amplitude. A value of +6.0 (dB) will play at approximately twice the
|
||||||
|
// amplitude of the normal native signal amplitude. We strongly recommend not
|
||||||
|
// to exceed +10 (dB) as there's usually no effective increase in loudness for
|
||||||
|
// any value greater than that.
|
||||||
|
double volume_gain_db = 3;
|
||||||
|
|
||||||
|
// Optional. An identifier which selects 'audio effects' profiles that are
|
||||||
|
// applied on (post synthesized) text to speech. Effects are applied on top of
|
||||||
|
// each other in the order they are given.
|
||||||
|
repeated string effects_profile_id = 5;
|
||||||
|
|
||||||
|
// Optional. The desired voice of the synthesized audio.
|
||||||
|
VoiceSelectionParams voice = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gender of the voice as described in
|
||||||
|
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
|
||||||
|
enum SsmlVoiceGender {
|
||||||
|
// An unspecified gender, which means that the client doesn't care which
|
||||||
|
// gender the selected voice will have.
|
||||||
|
SSML_VOICE_GENDER_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// A male voice.
|
||||||
|
SSML_VOICE_GENDER_MALE = 1;
|
||||||
|
|
||||||
|
// A female voice.
|
||||||
|
SSML_VOICE_GENDER_FEMALE = 2;
|
||||||
|
|
||||||
|
// A gender-neutral voice.
|
||||||
|
SSML_VOICE_GENDER_NEUTRAL = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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];
|
||||||
|
|
||||||
|
// Optional. The synthesis sample rate (in hertz) for this audio. If not
|
||||||
|
// provided, then the synthesizer will use the default sample rate based on
|
||||||
|
// the audio encoding. If this is different from the voice's natural sample
|
||||||
|
// rate, then the synthesizer will honor this request by converting to the
|
||||||
|
// desired sample rate (which might result in worse audio quality).
|
||||||
|
int32 sample_rate_hertz = 2;
|
||||||
|
|
||||||
|
// Optional. Configuration of how speech should be synthesized.
|
||||||
|
SynthesizeSpeechConfig synthesize_speech_config = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Audio encoding of the output audio format in Text-To-Speech.
|
||||||
|
enum OutputAudioEncoding {
|
||||||
|
// Not specified.
|
||||||
|
OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
|
||||||
|
// Audio content returned as LINEAR16 also contains a WAV header.
|
||||||
|
OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1;
|
||||||
|
|
||||||
|
// MP3 audio at 32kbps.
|
||||||
|
OUTPUT_AUDIO_ENCODING_MP3 = 2;
|
||||||
|
|
||||||
|
// MP3 audio at 64kbps.
|
||||||
|
OUTPUT_AUDIO_ENCODING_MP3_64_KBPS = 4;
|
||||||
|
|
||||||
|
// Opus encoded audio wrapped in an ogg container. The result will be a
|
||||||
|
// file which can be played natively on Android, and in browsers (at least
|
||||||
|
// Chrome and Firefox). The quality of the encoding is considerably higher
|
||||||
|
// than MP3 while using approximately the same bitrate.
|
||||||
|
OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3;
|
||||||
|
|
||||||
|
// 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
|
||||||
|
OUTPUT_AUDIO_ENCODING_MULAW = 5;
|
||||||
|
}
|
||||||
20
google/cloud/dialogflow/cx/v3/dialogflow_gapic.yaml
Normal file
20
google/cloud/dialogflow/cx/v3/dialogflow_gapic.yaml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
type: com.google.api.codegen.ConfigProto
|
||||||
|
config_schema_version: 2.0.0
|
||||||
|
# The settings of generated code in a specific language.
|
||||||
|
language_settings:
|
||||||
|
java:
|
||||||
|
package_name: com.google.cloud.dialogflow.cx.v3
|
||||||
|
release_level: GA
|
||||||
|
python:
|
||||||
|
package_name: google.cloud.dialogflowcx_v3.gapic
|
||||||
|
go:
|
||||||
|
package_name: cloud.google.com/go/cloud/dialogflow/cx/apiv3
|
||||||
|
csharp:
|
||||||
|
package_name: Google.Cloud.Dialogflow.Cx.V3
|
||||||
|
ruby:
|
||||||
|
package_name: Google::Cloud::Dialogflow::Cx::V3
|
||||||
|
php:
|
||||||
|
package_name: Google\Cloud\Dialogflow\Cx\V3
|
||||||
|
nodejs:
|
||||||
|
package_name: dialogflowcx.v3
|
||||||
|
domain_layer_location: google-cloud
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"methodConfig": [
|
||||||
|
{
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Agents"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.EntityTypes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Environments"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Flows"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Fulfillments"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Intents"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Pages"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.SecuritySettingsService"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Sessions"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.SessionEntityTypes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.TransitionRouteGroups"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Versions"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Webhooks"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timeout": "60s",
|
||||||
|
"retryPolicy": {
|
||||||
|
"initialBackoff": "0.100s",
|
||||||
|
"maxBackoff": "60s",
|
||||||
|
"backoffMultiplier": 1.3,
|
||||||
|
"retryableStatusCodes": [
|
||||||
|
"UNAVAILABLE"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Sessions",
|
||||||
|
"method": "DetectIntent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timeout": "220s",
|
||||||
|
"retryPolicy": {
|
||||||
|
"initialBackoff": "0.100s",
|
||||||
|
"maxBackoff": "60s",
|
||||||
|
"backoffMultiplier": 1.3,
|
||||||
|
"retryableStatusCodes": [
|
||||||
|
"UNAVAILABLE"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"service": "google.cloud.dialogflow.cx.v3.Sessions",
|
||||||
|
"method": "StreamingDetectIntent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timeout": "220s"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
147
google/cloud/dialogflow/cx/v3/dialogflow_v3.yaml
Normal file
147
google/cloud/dialogflow/cx/v3/dialogflow_v3.yaml
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
type: google.api.Service
|
||||||
|
config_version: 3
|
||||||
|
name: dialogflow.googleapis.com
|
||||||
|
title: Dialogflow API
|
||||||
|
|
||||||
|
apis:
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Agents
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.EntityTypes
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Environments
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Flows
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Intents
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Pages
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.SecuritySettingsService
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.SessionEntityTypes
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Sessions
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.TransitionRouteGroups
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Versions
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.Webhooks
|
||||||
|
|
||||||
|
types:
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.CreateVersionOperationMetadata
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.ExportAgentResponse
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.WebhookRequest
|
||||||
|
- name: google.cloud.dialogflow.cx.v3.WebhookResponse
|
||||||
|
|
||||||
|
documentation:
|
||||||
|
summary: |-
|
||||||
|
Builds conversational interfaces (for example, chatbots, and voice-powered
|
||||||
|
apps and devices).
|
||||||
|
overview: |-
|
||||||
|
<!-- mdformat off(presubmit failing, mdformat is as well) --> Dialogflow is
|
||||||
|
a natural language understanding platform that makes it easy
|
||||||
|
to design and integrate a conversational user interface into your mobile
|
||||||
|
app, web application, device, bot, interactive voice response system, and
|
||||||
|
so on. Using Dialogflow, you can provide new and engaging ways for
|
||||||
|
users to interact with your product.
|
||||||
|
|
||||||
|
Dialogflow can analyze multiple types of input from your customers,
|
||||||
|
including text or audio inputs (like from a phone or voice recording).
|
||||||
|
It can also respond to your customers in a couple of ways, either through
|
||||||
|
text or with synthetic speech.
|
||||||
|
|
||||||
|
For more information, see the
|
||||||
|
[Dialogflow documentation](https://cloud.google.com/dialogflow/docs).
|
||||||
|
|
||||||
|
backend:
|
||||||
|
rules:
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Agents.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.EntityTypes.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Environments.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Flows.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Intents.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Pages.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.SecuritySettingsService.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.SessionEntityTypes.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: google.cloud.dialogflow.cx.v3.Sessions.DetectIntent
|
||||||
|
deadline: 220.0
|
||||||
|
- selector: google.cloud.dialogflow.cx.v3.Sessions.FulfillIntent
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: google.cloud.dialogflow.cx.v3.Sessions.MatchIntent
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent
|
||||||
|
deadline: 220.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Versions.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Webhooks.*'
|
||||||
|
deadline: 60.0
|
||||||
|
- selector: 'google.longrunning.Operations.*'
|
||||||
|
deadline: 60.0
|
||||||
|
|
||||||
|
authentication:
|
||||||
|
rules:
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Agents.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.EntityTypes.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Environments.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Flows.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Intents.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Pages.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.SecuritySettingsService.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.SessionEntityTypes.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Sessions.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.TransitionRouteGroups.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Versions.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.cloud.dialogflow.cx.v3.Webhooks.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
|
- selector: 'google.longrunning.Operations.*'
|
||||||
|
oauth:
|
||||||
|
canonical_scopes: |-
|
||||||
|
https://www.googleapis.com/auth/cloud-platform,
|
||||||
|
https://www.googleapis.com/auth/dialogflow
|
||||||
354
google/cloud/dialogflow/cx/v3/entity_type.proto
Normal file
354
google/cloud/dialogflow/cx/v3/entity_type.proto
Normal file
@@ -0,0 +1,354 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
import "google/api/client.proto";
|
||||||
|
import "google/api/field_behavior.proto";
|
||||||
|
import "google/api/resource.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "EntityTypeProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [EntityTypes][google.cloud.dialogflow.cx.v3.EntityType].
|
||||||
|
service EntityTypes {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all entity types in the specified agent.
|
||||||
|
rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified entity type.
|
||||||
|
rpc GetEntityType(GetEntityTypeRequest) returns (EntityType) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates an entity type in the specified agent.
|
||||||
|
rpc CreateEntityType(CreateEntityTypeRequest) returns (EntityType) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes"
|
||||||
|
body: "entity_type"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,entity_type";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified entity type.
|
||||||
|
rpc UpdateEntityType(UpdateEntityTypeRequest) returns (EntityType) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{entity_type.name=projects/*/locations/*/agents/*/entityTypes/*}"
|
||||||
|
body: "entity_type"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "entity_type,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified entity type.
|
||||||
|
rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/entityTypes/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Entities are extracted from user input and represent parameters that are
|
||||||
|
// meaningful to your application. For example, a date range, a proper name
|
||||||
|
// such as a geographic location or landmark, and so on. Entities represent
|
||||||
|
// actionable data for your application.
|
||||||
|
//
|
||||||
|
// When you define an entity, you can also include synonyms that all map to
|
||||||
|
// that entity. For example, "soft drink", "soda", "pop", and so on.
|
||||||
|
//
|
||||||
|
// There are three types of entities:
|
||||||
|
//
|
||||||
|
// * **System** - entities that are defined by the Dialogflow API for common
|
||||||
|
// data types such as date, time, currency, and so on. A system entity is
|
||||||
|
// represented by the `EntityType` type.
|
||||||
|
//
|
||||||
|
// * **Custom** - entities that are defined by you that represent
|
||||||
|
// actionable data that is meaningful to your application. For example,
|
||||||
|
// you could define a `pizza.sauce` entity for red or white pizza sauce,
|
||||||
|
// a `pizza.cheese` entity for the different types of cheese on a pizza,
|
||||||
|
// a `pizza.topping` entity for different toppings, and so on. A custom
|
||||||
|
// entity is represented by the `EntityType` type.
|
||||||
|
//
|
||||||
|
// * **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.v3.SessionEntityType] type.
|
||||||
|
//
|
||||||
|
// For more information about entity types, see the [Dialogflow
|
||||||
|
// documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
||||||
|
message EntityType {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/EntityType"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/entityTypes/{entity_type}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// An **entity entry** for an associated entity type.
|
||||||
|
// Next Id = 8
|
||||||
|
message Entity {
|
||||||
|
// Required. The primary value associated with this entity entry.
|
||||||
|
// For example, if the entity type is *vegetable*, the value could be
|
||||||
|
// *scallions*.
|
||||||
|
//
|
||||||
|
// For `KIND_MAP` entity types:
|
||||||
|
//
|
||||||
|
// * A canonical value to be used in place of synonyms.
|
||||||
|
//
|
||||||
|
// For `KIND_LIST` entity types:
|
||||||
|
//
|
||||||
|
// * A string that can contain references to other entity types (with or
|
||||||
|
// without aliases).
|
||||||
|
string value = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. A collection of value synonyms. For example, if the entity type
|
||||||
|
// is *vegetable*, and `value` is *scallions*, a synonym could be *green
|
||||||
|
// onions*.
|
||||||
|
//
|
||||||
|
// For `KIND_LIST` entity types:
|
||||||
|
//
|
||||||
|
// * This collection must contain exactly one synonym equal to `value`.
|
||||||
|
repeated string synonyms = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// An excluded entity phrase that should not be matched.
|
||||||
|
message ExcludedPhrase {
|
||||||
|
// Required. The word or phrase to be excluded.
|
||||||
|
string value = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents kinds of entities.
|
||||||
|
enum Kind {
|
||||||
|
// Not specified. This value should be never used.
|
||||||
|
KIND_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Map entity types allow mapping of a group of synonyms to a canonical
|
||||||
|
// value.
|
||||||
|
KIND_MAP = 1;
|
||||||
|
|
||||||
|
// List entity types contain a set of entries that do not map to canonical
|
||||||
|
// values. However, list entity types can contain references to other entity
|
||||||
|
// types (with or without aliases).
|
||||||
|
KIND_LIST = 2;
|
||||||
|
|
||||||
|
// Regexp entity types allow to specify regular expressions in entries
|
||||||
|
// values.
|
||||||
|
KIND_REGEXP = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents different entity type expansion modes. Automated expansion
|
||||||
|
// allows an agent to recognize values that have not been explicitly listed in
|
||||||
|
// the entity (for example, new kinds of shopping list items).
|
||||||
|
enum AutoExpansionMode {
|
||||||
|
// Auto expansion disabled for the entity.
|
||||||
|
AUTO_EXPANSION_MODE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Allows an agent to recognize values that have not been explicitly
|
||||||
|
// listed in the entity.
|
||||||
|
AUTO_EXPANSION_MODE_DEFAULT = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The unique identifier of the entity type.
|
||||||
|
// Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.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.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. Indicates the kind of entity type.
|
||||||
|
Kind kind = 3 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Indicates whether the entity type can be automatically expanded.
|
||||||
|
AutoExpansionMode auto_expansion_mode = 4;
|
||||||
|
|
||||||
|
// The collection of entity entries associated with the entity type.
|
||||||
|
repeated Entity entities = 5;
|
||||||
|
|
||||||
|
// Collection of exceptional words and phrases that shouldn't be matched.
|
||||||
|
// For example, if you have a size entity type with entry `giant`(an
|
||||||
|
// adjective), you might consider adding `giants`(a noun) as an exclusion.
|
||||||
|
// If the kind of entity type is `KIND_MAP`, then the phrases specified by
|
||||||
|
// entities and excluded phrases should be mutually exclusive.
|
||||||
|
repeated ExcludedPhrase excluded_phrases = 6;
|
||||||
|
|
||||||
|
// Enables fuzzy entity extraction during classification.
|
||||||
|
bool enable_fuzzy_extraction = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes].
|
||||||
|
message ListEntityTypesRequest {
|
||||||
|
// Required. The agent to list all entity types for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/EntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to list entity types for. The following fields are language
|
||||||
|
// dependent:
|
||||||
|
//
|
||||||
|
// * `EntityType.entities.value`
|
||||||
|
// * `EntityType.entities.synonyms`
|
||||||
|
// * `EntityType.excluded_phrases.value`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 3;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3.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.
|
||||||
|
repeated EntityType entity_types = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no
|
||||||
|
// more results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.GetEntityType].
|
||||||
|
message GetEntityTypeRequest {
|
||||||
|
// Required. The name of the entity type.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/entityTypes/<Entity Type ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/EntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to retrieve the entity type for. The following fields are
|
||||||
|
// language dependent:
|
||||||
|
//
|
||||||
|
// * `EntityType.entities.value`
|
||||||
|
// * `EntityType.entities.synonyms`
|
||||||
|
// * `EntityType.excluded_phrases.value`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.CreateEntityType].
|
||||||
|
message CreateEntityTypeRequest {
|
||||||
|
// Required. The agent to create a entity type for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/EntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The entity type to create.
|
||||||
|
EntityType entity_type = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language of the following fields in `entity_type`:
|
||||||
|
//
|
||||||
|
// * `EntityType.entities.value`
|
||||||
|
// * `EntityType.entities.synonyms`
|
||||||
|
// * `EntityType.excluded_phrases.value`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.UpdateEntityType].
|
||||||
|
message UpdateEntityTypeRequest {
|
||||||
|
// Required. The entity type to update.
|
||||||
|
EntityType entity_type = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language of the following fields in `entity_type`:
|
||||||
|
//
|
||||||
|
// * `EntityType.entities.value`
|
||||||
|
// * `EntityType.entities.synonyms`
|
||||||
|
// * `EntityType.excluded_phrases.value`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
|
||||||
|
// The mask to control which fields get updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.cx.v3.EntityTypes.DeleteEntityType].
|
||||||
|
message DeleteEntityTypeRequest {
|
||||||
|
// Required. The name of the entity type to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/entityTypes/<Entity Type ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
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.v3.Form.Parameter] of the entity type will be changed to
|
||||||
|
// '@sys.any' and intent [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] of the entity type
|
||||||
|
// will be removed).
|
||||||
|
bool force = 2;
|
||||||
|
}
|
||||||
262
google/cloud/dialogflow/cx/v3/environment.proto
Normal file
262
google/cloud/dialogflow/cx/v3/environment.proto
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
import "google/api/client.proto";
|
||||||
|
import "google/api/field_behavior.proto";
|
||||||
|
import "google/api/resource.proto";
|
||||||
|
import "google/longrunning/operations.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "EnvironmentProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [Environments][google.cloud.dialogflow.cx.v3.Environment].
|
||||||
|
service Environments {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all environments in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
|
||||||
|
rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*}/environments"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
|
||||||
|
rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/environments/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates an [Environment][google.cloud.dialogflow.cx.v3.Environment] in the specified [Agent][google.cloud.dialogflow.cx.v3.Agent].
|
||||||
|
rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*}/environments"
|
||||||
|
body: "environment"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,environment";
|
||||||
|
option (google.longrunning.operation_info) = {
|
||||||
|
response_type: "Environment"
|
||||||
|
metadata_type: "google.protobuf.Struct"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
|
||||||
|
rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{environment.name=projects/*/locations/*/agents/*/environments/*}"
|
||||||
|
body: "environment"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "environment,update_mask";
|
||||||
|
option (google.longrunning.operation_info) = {
|
||||||
|
response_type: "Environment"
|
||||||
|
metadata_type: "google.protobuf.Struct"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
|
||||||
|
rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/environments/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Looks up the history of the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
|
||||||
|
rpc LookupEnvironmentHistory(LookupEnvironmentHistoryRequest) returns (LookupEnvironmentHistoryResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/environments/*}:lookupEnvironmentHistory"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents an environment for an agent. You can create multiple versions
|
||||||
|
// of your agent and publish them to separate environments. When you edit an
|
||||||
|
// agent, you are editing the draft agent. At any point, you can save the draft
|
||||||
|
// agent as an agent version, which is an immutable snapshot of your agent. When
|
||||||
|
// you save the draft agent, it is published to the default environment. When
|
||||||
|
// you create agent versions, you can publish them to custom environments. You
|
||||||
|
// can create a variety of custom environments for testing, development,
|
||||||
|
// production, etc.
|
||||||
|
message Environment {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/Environment"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Configuration for the version.
|
||||||
|
message VersionConfig {
|
||||||
|
// Required. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/versions/<Version ID>.
|
||||||
|
string version = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Version"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The name of the environment.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/environments/<Environment ID>`.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Required. The human-readable name of the environment (unique in an agent). Limit of
|
||||||
|
// 64 characters.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The human-readable description of the environment. The maximum length is
|
||||||
|
// 500 characters. If exceeded, the request is rejected.
|
||||||
|
string description = 3;
|
||||||
|
|
||||||
|
// Required. A list of configurations for flow versions. You should include version
|
||||||
|
// configs for all flows that are reachable from [`Start
|
||||||
|
// Flow`][Agent.start_flow] in the agent. Otherwise, an error will be
|
||||||
|
// returned.
|
||||||
|
repeated VersionConfig version_configs = 6 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Output only. Update time of this environment.
|
||||||
|
google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3.Environments.ListEnvironments].
|
||||||
|
message ListEnvironmentsRequest {
|
||||||
|
// Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to list all environments for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Environment"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 20 and
|
||||||
|
// at most 100.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.cx.v3.Environments.ListEnvironments].
|
||||||
|
message ListEnvironmentsResponse {
|
||||||
|
// The list of environments. There will be a maximum number of items
|
||||||
|
// returned based on the page_size field in the request. The list may in some
|
||||||
|
// cases be empty or contain fewer entries than page_size even if this isn't
|
||||||
|
// the last page.
|
||||||
|
repeated Environment environments = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Environments.GetEnvironment][google.cloud.dialogflow.cx.v3.Environments.GetEnvironment].
|
||||||
|
message GetEnvironmentRequest {
|
||||||
|
// Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment].
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/environments/<Environment ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Environment"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Environments.CreateEnvironment][google.cloud.dialogflow.cx.v3.Environments.CreateEnvironment].
|
||||||
|
message CreateEnvironmentRequest {
|
||||||
|
// Required. The [Agent][google.cloud.dialogflow.cx.v3.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3.Environment] for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Environment"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The environment to create.
|
||||||
|
Environment environment = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Environments.UpdateEnvironment][google.cloud.dialogflow.cx.v3.Environments.UpdateEnvironment].
|
||||||
|
message UpdateEnvironmentRequest {
|
||||||
|
// Required. The environment to update.
|
||||||
|
Environment environment = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. The mask to control which fields get updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.cx.v3.Environments.DeleteEnvironment].
|
||||||
|
message DeleteEnvironmentRequest {
|
||||||
|
// Required. The name of the [Environment][google.cloud.dialogflow.cx.v3.Environment] to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/environments/<Environment ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Environment"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistory].
|
||||||
|
message LookupEnvironmentHistoryRequest {
|
||||||
|
// Required. Resource name of the environment to look up the history for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/environments/<Environment ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Environment"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Environments.LookupEnvironmentHistory][google.cloud.dialogflow.cx.v3.Environments.LookupEnvironmentHistory].
|
||||||
|
message LookupEnvironmentHistoryResponse {
|
||||||
|
// Represents a list of snapshots for an environment. Time of the snapshots is
|
||||||
|
// stored in [`update_time`][google.cloud.dialogflow.cx.v3.Environment.update_time].
|
||||||
|
repeated Environment environments = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
366
google/cloud/dialogflow/cx/v3/flow.proto
Normal file
366
google/cloud/dialogflow/cx/v3/flow.proto
Normal file
@@ -0,0 +1,366 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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/v3/page.proto";
|
||||||
|
import "google/longrunning/operations.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "FlowProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [Flows][google.cloud.dialogflow.cx.v3.Flow].
|
||||||
|
service Flows {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Creates a flow in the specified agent.
|
||||||
|
rpc CreateFlow(CreateFlowRequest) returns (Flow) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*}/flows"
|
||||||
|
body: "flow"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,flow";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes a specified flow.
|
||||||
|
rpc DeleteFlow(DeleteFlowRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the list of all flows in the specified agent.
|
||||||
|
rpc ListFlows(ListFlowsRequest) returns (ListFlowsResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*}/flows"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified flow.
|
||||||
|
rpc GetFlow(GetFlowRequest) returns (Flow) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/flows/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified flow.
|
||||||
|
rpc UpdateFlow(UpdateFlowRequest) returns (Flow) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{flow.name=projects/*/locations/*/agents/*/flows/*}"
|
||||||
|
body: "flow"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "flow,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Trains the specified flow. Note that only the flow in 'draft' environment
|
||||||
|
// is trained.
|
||||||
|
rpc TrainFlow(TrainFlowRequest) returns (google.longrunning.Operation) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{name=projects/*/locations/*/agents/*/flows/*}:train"
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
option (google.longrunning.operation_info) = {
|
||||||
|
response_type: "google.protobuf.Empty"
|
||||||
|
metadata_type: "google.protobuf.Struct"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Settings related to NLU.
|
||||||
|
message NluSettings {
|
||||||
|
// NLU model type.
|
||||||
|
enum ModelType {
|
||||||
|
// Not specified. `MODEL_TYPE_STANDARD` will be used.
|
||||||
|
MODEL_TYPE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Use standard NLU model.
|
||||||
|
MODEL_TYPE_STANDARD = 1;
|
||||||
|
|
||||||
|
// Use advanced NLU model.
|
||||||
|
MODEL_TYPE_ADVANCED = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// NLU model training mode.
|
||||||
|
enum ModelTrainingMode {
|
||||||
|
// Not specified. `MODEL_TRAINING_MODE_AUTOMATIC` will be used.
|
||||||
|
MODEL_TRAINING_MODE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// NLU model training is automatically triggered when a flow gets modified.
|
||||||
|
// User can also manually trigger model training in this mode.
|
||||||
|
MODEL_TRAINING_MODE_AUTOMATIC = 1;
|
||||||
|
|
||||||
|
// User needs to manually trigger NLU model training. Best for large flows
|
||||||
|
// whose models take long time to train.
|
||||||
|
MODEL_TRAINING_MODE_MANUAL = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Indicates the type of NLU model.
|
||||||
|
ModelType model_type = 1;
|
||||||
|
|
||||||
|
// To filter out false positive results and still get variety in matched
|
||||||
|
// natural language inputs for your agent, you can tune the machine learning
|
||||||
|
// classification threshold. If the returned score value is less than the
|
||||||
|
// threshold value, then a no-match event will be triggered. The score values
|
||||||
|
// range from 0.0 (completely uncertain) to 1.0 (completely certain). If set
|
||||||
|
// to 0.0, the default of 0.3 is used.
|
||||||
|
float classification_threshold = 3;
|
||||||
|
|
||||||
|
// Indicates NLU model training mode.
|
||||||
|
ModelTrainingMode model_training_mode = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Flows represents the conversation flows when you build your chatbot agent.
|
||||||
|
//
|
||||||
|
// A flow consists of many pages connected by the transition routes.
|
||||||
|
// Conversations always start with the built-in Start Flow (with an all-0 ID).
|
||||||
|
// Transition routes can direct the conversation session from the current flow
|
||||||
|
// (parent flow) to another flow (sub flow). When the sub flow is finished,
|
||||||
|
// Dialogflow will bring the session back to the parent flow, where the sub flow
|
||||||
|
// is started.
|
||||||
|
//
|
||||||
|
// Usually, when a transition route is followed by a matched intent, the intent
|
||||||
|
// will be "consumed". This means the intent won't activate more transition
|
||||||
|
// routes. However, when the followed transition route moves the conversation
|
||||||
|
// session into a different flow, the matched intent can be carried over and to
|
||||||
|
// be consumed in the target flow.
|
||||||
|
message Flow {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/Flow"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// The unique identifier of the flow.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Required. The human-readable name of the flow.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The description of the flow. The maximum length is 500 characters. If
|
||||||
|
// exceeded, the request is rejected.
|
||||||
|
string description = 3;
|
||||||
|
|
||||||
|
// A flow's transition routes serve two purposes:
|
||||||
|
//
|
||||||
|
// * They are responsible for matching the user's first utterances in the
|
||||||
|
// flow.
|
||||||
|
// * They are inherited by every page's [transition
|
||||||
|
// routes][Page.transition_routes] and can support use cases such as the user
|
||||||
|
// saying "help" or "can I talk to a human?", which can be handled in a common
|
||||||
|
// way regardless of the current page. Transition routes defined in the page
|
||||||
|
// have higher priority than those defined in the flow.
|
||||||
|
//
|
||||||
|
// TransitionRoutes are evalauted in the following order:
|
||||||
|
//
|
||||||
|
// * TransitionRoutes with intent specified..
|
||||||
|
// * TransitionRoutes with only condition specified.
|
||||||
|
//
|
||||||
|
// TransitionRoutes with intent specified are inherited by pages in the flow.
|
||||||
|
repeated TransitionRoute transition_routes = 4;
|
||||||
|
|
||||||
|
// A flow's event handlers serve two purposes:
|
||||||
|
//
|
||||||
|
// * They are responsible for handling events (e.g. no match,
|
||||||
|
// webhook errors) in the flow.
|
||||||
|
// * They are inherited by every page's [event
|
||||||
|
// handlers][Page.event_handlers], which can be used to handle common events
|
||||||
|
// 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.v3.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.v3.Flows.CreateFlow].
|
||||||
|
message CreateFlowRequest {
|
||||||
|
// Required. The agent to create a flow for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Flow"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The flow to create.
|
||||||
|
Flow flow = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language of the following fields in `flow`:
|
||||||
|
//
|
||||||
|
// * `Flow.event_handlers.trigger_fulfillment.messages`
|
||||||
|
// * `Flow.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Flows.DeleteFlow][google.cloud.dialogflow.cx.v3.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"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// This field has no effect for flows with no incoming transitions.
|
||||||
|
// For flows with incoming transitions:
|
||||||
|
//
|
||||||
|
// * 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 (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.v3.Flows.ListFlows].
|
||||||
|
message ListFlowsRequest {
|
||||||
|
// Required. The agent containing the flows.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Flow"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
|
||||||
|
// The language to list flows for. The following fields are language
|
||||||
|
// dependent:
|
||||||
|
//
|
||||||
|
// * `Flow.event_handlers.trigger_fulfillment.messages`
|
||||||
|
// * `Flow.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Flows.ListFlows][google.cloud.dialogflow.cx.v3.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.
|
||||||
|
repeated Flow flows = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Flows.GetFlow][google.cloud.dialogflow.cx.v3.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"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to retrieve the flow for. The following fields are language
|
||||||
|
// dependent:
|
||||||
|
//
|
||||||
|
// * `Flow.event_handlers.trigger_fulfillment.messages`
|
||||||
|
// * `Flow.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Flows.UpdateFlow][google.cloud.dialogflow.cx.v3.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];
|
||||||
|
|
||||||
|
// The language of the following fields in `flow`:
|
||||||
|
//
|
||||||
|
// * `Flow.event_handlers.trigger_fulfillment.messages`
|
||||||
|
// * `Flow.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Flows.TrainFlow][google.cloud.dialogflow.cx.v3.Flows.TrainFlow].
|
||||||
|
message TrainFlowRequest {
|
||||||
|
// Required. The flow to train.
|
||||||
|
// 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"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
107
google/cloud/dialogflow/cx/v3/fulfillment.proto
Normal file
107
google/cloud/dialogflow/cx/v3/fulfillment.proto
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
import "google/api/resource.proto";
|
||||||
|
import "google/cloud/dialogflow/cx/v3/response_message.proto";
|
||||||
|
import "google/protobuf/struct.proto";
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "FulfillmentProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// A fulfillment can do one or more of the following actions at the same time:
|
||||||
|
//
|
||||||
|
// * Generate rich message responses.
|
||||||
|
// * Set parameter values.
|
||||||
|
// * Call the webhook.
|
||||||
|
//
|
||||||
|
// Fulfillments can be called at various stages in the [Page][google.cloud.dialogflow.cx.v3.Page] or
|
||||||
|
// [Form][google.cloud.dialogflow.cx.v3.Form] lifecycle. For example, when a [DetectIntentRequest][google.cloud.dialogflow.cx.v3.DetectIntentRequest] drives a
|
||||||
|
// session to enter a new page, the page's entry fulfillment can add a static
|
||||||
|
// response to the [QueryResult][google.cloud.dialogflow.cx.v3.QueryResult] in the returning [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse],
|
||||||
|
// call the webhook (for example, to load user data from a database), or both.
|
||||||
|
message Fulfillment {
|
||||||
|
// Setting a parameter value.
|
||||||
|
message SetParameterAction {
|
||||||
|
// Display name of the parameter.
|
||||||
|
string parameter = 1;
|
||||||
|
|
||||||
|
// The new value of the parameter. A null value clears the parameter.
|
||||||
|
google.protobuf.Value value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A list of cascading if-else conditions. Cases are mutually exclusive.
|
||||||
|
// The first one with a matching condition is selected, all the rest ignored.
|
||||||
|
message ConditionalCases {
|
||||||
|
// Each case has a Boolean condition. When it is evaluated to be True, the
|
||||||
|
// corresponding messages will be selected and evaluated recursively.
|
||||||
|
message Case {
|
||||||
|
// The list of messages or conditional cases to activate for this case.
|
||||||
|
message CaseContent {
|
||||||
|
// Either a message is returned or additional cases to be evaluated.
|
||||||
|
oneof cases_or_message {
|
||||||
|
// Returned message.
|
||||||
|
ResponseMessage message = 1;
|
||||||
|
|
||||||
|
// Additional cases to be evaluated.
|
||||||
|
ConditionalCases additional_cases = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The condition to activate and select this case. Empty means the
|
||||||
|
// condition is always true. The condition is evaluated against [form
|
||||||
|
// parameters][Form.parameters] or [session
|
||||||
|
// parameters][SessionInfo.parameters].
|
||||||
|
//
|
||||||
|
// See the [conditions
|
||||||
|
// reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
|
||||||
|
string condition = 1;
|
||||||
|
|
||||||
|
// A list of case content.
|
||||||
|
repeated CaseContent case_content = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A list of cascading if-else conditions.
|
||||||
|
repeated Case cases = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The list of rich message responses to present to the user.
|
||||||
|
repeated ResponseMessage messages = 1;
|
||||||
|
|
||||||
|
// The webhook to call.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/webhooks/<Webhook ID>`.
|
||||||
|
string webhook = 2 [(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Webhook"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// The tag used by the webhook to identify which fulfillment is being called.
|
||||||
|
// This field is required if `webhook` is specified.
|
||||||
|
string tag = 3;
|
||||||
|
|
||||||
|
// Set parameter values before executing the webhook.
|
||||||
|
repeated SetParameterAction set_parameter_actions = 4;
|
||||||
|
|
||||||
|
// Conditional cases for this fulfillment.
|
||||||
|
repeated ConditionalCases conditional_cases = 5;
|
||||||
|
}
|
||||||
360
google/cloud/dialogflow/cx/v3/intent.proto
Normal file
360
google/cloud/dialogflow/cx/v3/intent.proto
Normal file
@@ -0,0 +1,360 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
import "google/api/client.proto";
|
||||||
|
import "google/api/field_behavior.proto";
|
||||||
|
import "google/api/resource.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "IntentProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent].
|
||||||
|
service Intents {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all intents in the specified agent.
|
||||||
|
rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*}/intents"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified intent.
|
||||||
|
rpc GetIntent(GetIntentRequest) returns (Intent) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/intents/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates an intent in the specified agent.
|
||||||
|
rpc CreateIntent(CreateIntentRequest) returns (Intent) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*}/intents"
|
||||||
|
body: "intent"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,intent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified intent.
|
||||||
|
rpc UpdateIntent(UpdateIntentRequest) returns (Intent) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{intent.name=projects/*/locations/*/agents/*/intents/*}"
|
||||||
|
body: "intent"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "intent,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified intent.
|
||||||
|
rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/intents/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// An intent represents a user's intent to interact with a conversational agent.
|
||||||
|
//
|
||||||
|
// You can provide information for the Dialogflow API to use to match user input
|
||||||
|
// to an intent by adding training phrases (i.e., examples of user input) to
|
||||||
|
// your intent.
|
||||||
|
message Intent {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/Intent"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/intents/{intent}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Represents an example that the agent is trained on to identify the intent.
|
||||||
|
message TrainingPhrase {
|
||||||
|
// Represents a part of a training phrase.
|
||||||
|
message Part {
|
||||||
|
// Required. The text for this part.
|
||||||
|
string text = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The [parameter][google.cloud.dialogflow.cx.v3.Intent.Parameter] used to annotate this part of the
|
||||||
|
// training phrase. This field is required for annotated parts of the
|
||||||
|
// training phrase.
|
||||||
|
string parameter_id = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Output only. The unique identifier of the training phrase.
|
||||||
|
string id = 1;
|
||||||
|
|
||||||
|
// Required. The ordered list of training phrase parts.
|
||||||
|
// The parts are concatenated in order to form the training phrase.
|
||||||
|
//
|
||||||
|
// Note: The API does not automatically annotate training phrases like the
|
||||||
|
// Dialogflow Console does.
|
||||||
|
//
|
||||||
|
// Note: Do not forget to include whitespace at part boundaries, so the
|
||||||
|
// training phrase is well formatted when the parts are concatenated.
|
||||||
|
//
|
||||||
|
// If the training phrase does not need to be annotated with parameters,
|
||||||
|
// you just need a single part with only the [Part.text][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part.text] field set.
|
||||||
|
//
|
||||||
|
// If you want to annotate the training phrase, you must create multiple
|
||||||
|
// parts, where the fields of each part are populated in one of two ways:
|
||||||
|
//
|
||||||
|
// - `Part.text` is set to a part of the phrase that has no parameters.
|
||||||
|
// - `Part.text` is set to a part of the phrase that you want to annotate,
|
||||||
|
// and the `parameter_id` field is set.
|
||||||
|
repeated Part parts = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Indicates how many times this example was added to the intent.
|
||||||
|
int32 repeat_count = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents an intent parameter.
|
||||||
|
message Parameter {
|
||||||
|
// Required. The unique identifier of the parameter. This field
|
||||||
|
// is used by [training phrases][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase] to annotate their
|
||||||
|
// [parts][google.cloud.dialogflow.cx.v3.Intent.TrainingPhrase.Part].
|
||||||
|
string id = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. The entity type of the parameter.
|
||||||
|
// Format: `projects/-/locations/-/agents/-/entityTypes/<System Entity Type
|
||||||
|
// ID>` for system entity types (for example,
|
||||||
|
// `projects/-/locations/-/agents/-/entityTypes/sys.date`), or
|
||||||
|
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/entityTypes/<Entity Type ID>` for developer entity types.
|
||||||
|
string entity_type = 2 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/EntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Indicates whether the parameter represents a list of values.
|
||||||
|
bool is_list = 3;
|
||||||
|
|
||||||
|
// Indicates whether the parameter content is logged in text and audio. If
|
||||||
|
// it is set to true, the parameter content will be replaced to parameter
|
||||||
|
// id in both request and response. The default value is false.
|
||||||
|
bool redact = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The unique identifier of the intent.
|
||||||
|
// Required for the [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent] method. [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent]
|
||||||
|
// populates the name automatically.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/intents/<Intent ID>`.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Required. The human-readable name of the intent, unique within the agent.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The collection of training phrases the agent is trained on to identify the
|
||||||
|
// intent.
|
||||||
|
repeated TrainingPhrase training_phrases = 3;
|
||||||
|
|
||||||
|
// The collection of parameters associated with the intent.
|
||||||
|
repeated Parameter parameters = 4;
|
||||||
|
|
||||||
|
// The priority of this intent. Higher numbers represent higher
|
||||||
|
// priorities.
|
||||||
|
//
|
||||||
|
// - If the supplied value is unspecified or 0, the service
|
||||||
|
// translates the value to 500,000, which corresponds to the
|
||||||
|
// `Normal` priority in the console.
|
||||||
|
// - If the supplied value is negative, the intent is ignored
|
||||||
|
// in runtime detect intent requests.
|
||||||
|
int32 priority = 5;
|
||||||
|
|
||||||
|
// Indicates whether this is a fallback intent. Currently only default
|
||||||
|
// fallback intent is allowed in the agent, which is added upon agent
|
||||||
|
// creation.
|
||||||
|
// Adding training phrases to fallback intent is useful in the case of
|
||||||
|
// requests that are mistakenly matched, since training phrases assigned to
|
||||||
|
// 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
|
||||||
|
// 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
|
||||||
|
// and no more than 128 bytes.
|
||||||
|
//
|
||||||
|
// Prefix "sys." is reserved for Dialogflow defined labels. Currently allowed
|
||||||
|
// Dialogflow defined labels include:
|
||||||
|
// * sys.head
|
||||||
|
// * 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];
|
||||||
|
|
||||||
|
// Optional. 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];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3.Intents.ListIntents].
|
||||||
|
message ListIntentsRequest {
|
||||||
|
// Required. The agent to list all intents for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Intent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to list intents for. The following fields are language
|
||||||
|
// dependent:
|
||||||
|
//
|
||||||
|
// * `Intent.training_phrases.parts.text`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
|
||||||
|
// The resource view to apply to the returned intent.
|
||||||
|
IntentView intent_view = 5;
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 3;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Intents.ListIntents][google.cloud.dialogflow.cx.v3.Intents.ListIntents].
|
||||||
|
message ListIntentsResponse {
|
||||||
|
// The list of intents. There will be a maximum number of items returned based
|
||||||
|
// on the page_size field in the request.
|
||||||
|
repeated Intent intents = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Intents.GetIntent][google.cloud.dialogflow.cx.v3.Intents.GetIntent].
|
||||||
|
message GetIntentRequest {
|
||||||
|
// Required. The name of the intent.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/intents/<Intent ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Intent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to retrieve the intent for. The following fields are language
|
||||||
|
// dependent:
|
||||||
|
//
|
||||||
|
// * `Intent.training_phrases.parts.text`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Intents.CreateIntent][google.cloud.dialogflow.cx.v3.Intents.CreateIntent].
|
||||||
|
message CreateIntentRequest {
|
||||||
|
// Required. The agent to create an intent for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Intent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The intent to create.
|
||||||
|
Intent intent = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language of the following fields in `intent`:
|
||||||
|
//
|
||||||
|
// * `Intent.training_phrases.parts.text`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.cx.v3.Intents.UpdateIntent].
|
||||||
|
message UpdateIntentRequest {
|
||||||
|
// Required. The intent to update.
|
||||||
|
Intent intent = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language of the following fields in `intent`:
|
||||||
|
//
|
||||||
|
// * `Intent.training_phrases.parts.text`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
|
||||||
|
// The mask to control which fields get updated. If the mask is not present,
|
||||||
|
// all fields will be updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.cx.v3.Intents.DeleteIntent].
|
||||||
|
message DeleteIntentRequest {
|
||||||
|
// Required. The name of the intent to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/intents/<Intent ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Intent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the options for views of an intent.
|
||||||
|
// An intent can be a sizable object. Therefore, we provide a resource view that
|
||||||
|
// does not return training phrases in the response.
|
||||||
|
enum IntentView {
|
||||||
|
// Not specified. Treated as INTENT_VIEW_FULL.
|
||||||
|
INTENT_VIEW_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Training phrases field is not populated in the response.
|
||||||
|
INTENT_VIEW_PARTIAL = 1;
|
||||||
|
|
||||||
|
// All fields are populated.
|
||||||
|
INTENT_VIEW_FULL = 2;
|
||||||
|
}
|
||||||
514
google/cloud/dialogflow/cx/v3/page.proto
Normal file
514
google/cloud/dialogflow/cx/v3/page.proto
Normal file
@@ -0,0 +1,514 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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/v3/fulfillment.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
import "google/protobuf/struct.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "PageProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [Pages][google.cloud.dialogflow.cx.v3.Page].
|
||||||
|
service Pages {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all pages in the specified flow.
|
||||||
|
rpc ListPages(ListPagesRequest) returns (ListPagesResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified page.
|
||||||
|
rpc GetPage(GetPageRequest) returns (Page) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a page in the specified flow.
|
||||||
|
rpc CreatePage(CreatePageRequest) returns (Page) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/pages"
|
||||||
|
body: "page"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,page";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified page.
|
||||||
|
rpc UpdatePage(UpdatePageRequest) returns (Page) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{page.name=projects/*/locations/*/agents/*/flows/*/pages/*}"
|
||||||
|
body: "page"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "page,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified page.
|
||||||
|
rpc DeletePage(DeletePageRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*/pages/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// A Dialogflow CX conversation (session) can be described and visualized as a
|
||||||
|
// state machine. The states of a CX session are represented by pages.
|
||||||
|
//
|
||||||
|
// For each flow, you define many pages, where your combined pages can handle a
|
||||||
|
// complete conversation on the topics the flow is designed for. At any given
|
||||||
|
// moment, exactly one page is the current page, the current page is considered
|
||||||
|
// active, and the flow associated with that page is considered active. Every
|
||||||
|
// flow has a special start page. When a flow initially becomes active, the
|
||||||
|
// start page page becomes the current page. For each conversational turn, the
|
||||||
|
// current page will either stay the same or transition to another page.
|
||||||
|
//
|
||||||
|
// You configure each page to collect information from the end-user that is
|
||||||
|
// relevant for the conversational state represented by the page.
|
||||||
|
//
|
||||||
|
// For more information, see the
|
||||||
|
// [Page guide](https://cloud.google.com/dialogflow/cx/docs/concept/page).
|
||||||
|
message Page {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/Page"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/pages/{page}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// The unique identifier of the page.
|
||||||
|
// Required for the [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage] method. [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage]
|
||||||
|
// populates the name automatically.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/pages/<Page ID>`.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Required. The human-readable name of the page, unique within the agent.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The fulfillment to call when the session is entering the page.
|
||||||
|
Fulfillment entry_fulfillment = 7;
|
||||||
|
|
||||||
|
// The form associated with the page, used for collecting parameters
|
||||||
|
// relevant to the page.
|
||||||
|
Form form = 4;
|
||||||
|
|
||||||
|
// Ordered list of [`TransitionRouteGroups`][google.cloud.dialogflow.cx.v3.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
|
||||||
|
// transition route group -> flow's transition routes.
|
||||||
|
//
|
||||||
|
// * If multiple transition route groups within a page contain the same
|
||||||
|
// intent, then the first group in the ordered list takes precedence.
|
||||||
|
//
|
||||||
|
// 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"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// A list of transitions for the transition rules of this page.
|
||||||
|
// They route the conversation to another page in the same flow, or another
|
||||||
|
// flow.
|
||||||
|
//
|
||||||
|
// When we are in a certain page, the TransitionRoutes are evalauted in the
|
||||||
|
// following order:
|
||||||
|
//
|
||||||
|
// * TransitionRoutes defined in the page with intent specified.
|
||||||
|
// * TransitionRoutes defined in the
|
||||||
|
// [transition route groups][google.cloud.dialogflow.cx.v3.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;
|
||||||
|
|
||||||
|
// Handlers associated with the page to handle events such as webhook errors,
|
||||||
|
// no match or no input.
|
||||||
|
repeated EventHandler event_handlers = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.v3.Page]. When form filling is done, the filled parameters will be
|
||||||
|
// written to the [session][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
|
||||||
|
message Form {
|
||||||
|
// Represents a form parameter.
|
||||||
|
message Parameter {
|
||||||
|
// Configuration for how the filling of a parameter should be handled.
|
||||||
|
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];
|
||||||
|
|
||||||
|
// The handlers for parameter-level events, used to provide reprompt for
|
||||||
|
// the parameter or transition to a different page/flow. The supported
|
||||||
|
// events are:
|
||||||
|
// * `sys.no-match-<N>`, where N can be from 1 to 6
|
||||||
|
// * `sys.no-match-default`
|
||||||
|
// * `sys.no-input-<N>`, where N can be from 1 to 6
|
||||||
|
// * `sys.no-input-default`
|
||||||
|
// * `sys.invalid-parameter`
|
||||||
|
//
|
||||||
|
// `initial_prompt_fulfillment` provides the first prompt for the
|
||||||
|
// parameter.
|
||||||
|
//
|
||||||
|
// If the user's response does not fill the parameter, a
|
||||||
|
// no-match/no-input event will be triggered, and the fulfillment
|
||||||
|
// associated with the `sys.no-match-1`/`sys.no-input-1` handler (if
|
||||||
|
// defined) will be called to provide a prompt. The
|
||||||
|
// `sys.no-match-2`/`sys.no-input-2` handler (if defined) will respond to
|
||||||
|
// the next no-match/no-input event, and so on.
|
||||||
|
//
|
||||||
|
// A `sys.no-match-default` or `sys.no-input-default` handler will be used
|
||||||
|
// to handle all following no-match/no-input events after all numbered
|
||||||
|
// no-match/no-input handlers for the parameter are consumed.
|
||||||
|
//
|
||||||
|
// A `sys.invalid-parameter` handler can be defined to handle the case
|
||||||
|
// where the parameter values have been `invalidated` by webhook. For
|
||||||
|
// example, if the user's response fill the parameter, however the
|
||||||
|
// parameter was invalidated by webhook, the fulfillment associated with
|
||||||
|
// the `sys.invalid-parameter` handler (if defined) will be called to
|
||||||
|
// provide a prompt.
|
||||||
|
//
|
||||||
|
// If the event handler for the corresponding event can't be found on the
|
||||||
|
// parameter, `initial_prompt_fulfillment` will be re-prompted.
|
||||||
|
repeated EventHandler reprompt_event_handlers = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Required. The human-readable name of the parameter, unique within the
|
||||||
|
// form.
|
||||||
|
string display_name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
// Required. The entity type of the parameter.
|
||||||
|
// Format: `projects/-/locations/-/agents/-/entityTypes/<System Entity Type
|
||||||
|
// ID>` for system entity types (for example,
|
||||||
|
// `projects/-/locations/-/agents/-/entityTypes/sys.date`), or
|
||||||
|
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/entityTypes/<Entity Type ID>` for developer entity types.
|
||||||
|
string entity_type = 3 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/EntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Indicates whether the parameter represents a list of values.
|
||||||
|
bool is_list = 4;
|
||||||
|
|
||||||
|
// Required. Defines fill behavior for the parameter.
|
||||||
|
FillBehavior fill_behavior = 7 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The default value of an optional parameter. If the parameter is required,
|
||||||
|
// the default value will be ignored.
|
||||||
|
google.protobuf.Value default_value = 9;
|
||||||
|
|
||||||
|
// Indicates whether the parameter content is logged in text and audio. If
|
||||||
|
// it is set to true, the parameter content will be replaced to parameter
|
||||||
|
// name in both request and response. The default value is false.
|
||||||
|
bool redact = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parameters to collect from the user.
|
||||||
|
repeated Parameter parameters = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// An event handler specifies an [event][google.cloud.dialogflow.cx.v3.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.v3.EventHandler.trigger_fulfillment] associated with
|
||||||
|
// the event, it will be called.
|
||||||
|
// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3.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.v3.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];
|
||||||
|
|
||||||
|
// Required. The name of the event to handle.
|
||||||
|
string event = 4 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The fulfillment to call when the event occurs.
|
||||||
|
// Handling webhook errors with a fulfillment enabled with webhook could
|
||||||
|
// cause infinite loop. It is invalid to specify such fulfillment for a
|
||||||
|
// handler handling webhooks.
|
||||||
|
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.v3.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"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// A transition route specifies a [intent][google.cloud.dialogflow.cx.v3.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.v3.TransitionRoute.trigger_fulfillment] associated with
|
||||||
|
// the transition, it will be called.
|
||||||
|
// * If there is a [`target_page`][google.cloud.dialogflow.cx.v3.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.v3.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.v3.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.
|
||||||
|
// At least one of `intent` or `condition` must be specified. When both
|
||||||
|
// `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"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// The condition to evaluate against [form parameters][google.cloud.dialogflow.cx.v3.Form.parameters] or
|
||||||
|
// [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
|
||||||
|
//
|
||||||
|
// See the [conditions
|
||||||
|
// reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
|
||||||
|
// At least one of `intent` or `condition` must be specified. When both
|
||||||
|
// `intent` and `condition` are specified, the transition can only happen
|
||||||
|
// when both are fulfilled.
|
||||||
|
string condition = 2;
|
||||||
|
|
||||||
|
// The fulfillment to call when the condition is satisfied. At least one of
|
||||||
|
// `trigger_fulfillment` and `target` must be specified. When both are
|
||||||
|
// defined, `trigger_fulfillment` is executed first.
|
||||||
|
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.v3.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"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// 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"
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Pages.ListPages][google.cloud.dialogflow.cx.v3.Pages.ListPages].
|
||||||
|
message ListPagesRequest {
|
||||||
|
// Required. The flow to list all pages for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Page"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to list pages for. The following fields are language
|
||||||
|
// dependent:
|
||||||
|
//
|
||||||
|
// * `Page.entry_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
|
||||||
|
// * `Page.transition_routes.trigger_fulfillment.messages`
|
||||||
|
// *
|
||||||
|
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 3;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Pages.ListPages][google.cloud.dialogflow.cx.v3.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.
|
||||||
|
repeated Page pages = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Pages.GetPage][google.cloud.dialogflow.cx.v3.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"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to retrieve the page for. The following fields are language
|
||||||
|
// dependent:
|
||||||
|
//
|
||||||
|
// * `Page.entry_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
|
||||||
|
// * `Page.transition_routes.trigger_fulfillment.messages`
|
||||||
|
// *
|
||||||
|
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Pages.CreatePage][google.cloud.dialogflow.cx.v3.Pages.CreatePage].
|
||||||
|
message CreatePageRequest {
|
||||||
|
// Required. The flow to create a page for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Page"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The page to create.
|
||||||
|
Page page = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language of the following fields in `page`:
|
||||||
|
//
|
||||||
|
// * `Page.entry_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
|
||||||
|
// * `Page.transition_routes.trigger_fulfillment.messages`
|
||||||
|
// *
|
||||||
|
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Pages.UpdatePage][google.cloud.dialogflow.cx.v3.Pages.UpdatePage].
|
||||||
|
message UpdatePageRequest {
|
||||||
|
// Required. The page to update.
|
||||||
|
Page page = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language of the following fields in `page`:
|
||||||
|
//
|
||||||
|
// * `Page.entry_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.initial_prompt_fulfillment.messages`
|
||||||
|
// * `Page.form.parameters.fill_behavior.reprompt_event_handlers.messages`
|
||||||
|
// * `Page.transition_routes.trigger_fulfillment.messages`
|
||||||
|
// *
|
||||||
|
// `Page.transition_route_groups.transition_routes.trigger_fulfillment.messages`
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
|
||||||
|
// The mask to control which fields get updated. If the mask is not present,
|
||||||
|
// all fields will be updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Pages.DeletePage][google.cloud.dialogflow.cx.v3.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"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// This field has no effect for pages with no incoming transitions.
|
||||||
|
// For pages with incoming transitions:
|
||||||
|
//
|
||||||
|
// * 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 (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;
|
||||||
|
}
|
||||||
205
google/cloud/dialogflow/cx/v3/response_message.proto
Normal file
205
google/cloud/dialogflow/cx/v3/response_message.proto
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "ResponseMessageProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Represents a response message that can be returned by a conversational agent.
|
||||||
|
//
|
||||||
|
// Response messages are also used for output audio synthesis. The approach is
|
||||||
|
// as follows:
|
||||||
|
//
|
||||||
|
// * If at least one OutputAudioText response is present, then all
|
||||||
|
// OutputAudioText responses are linearly concatenated, and the result is used
|
||||||
|
// for output audio synthesis.
|
||||||
|
// * If the OutputAudioText responses are a mixture of text and SSML, then the
|
||||||
|
// concatenated result is treated as SSML; otherwise, the result is treated as
|
||||||
|
// either text or SSML as appropriate. The agent designer should ideally use
|
||||||
|
// either text or SSML consistently throughout the bot design.
|
||||||
|
// * Otherwise, all Text responses are linearly concatenated, and the result is
|
||||||
|
// used for output audio synthesis.
|
||||||
|
//
|
||||||
|
// This approach allows for more sophisticated user experience scenarios, where
|
||||||
|
// the text displayed to the user may differ from what is heard.
|
||||||
|
message ResponseMessage {
|
||||||
|
// The text response message.
|
||||||
|
message Text {
|
||||||
|
// Required. A collection of text responses.
|
||||||
|
repeated string text = 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];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Indicates that the conversation should be handed off to a live 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.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.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 LiveAgentHandoff {
|
||||||
|
// Custom metadata for your handoff procedure. Dialogflow doesn't impose
|
||||||
|
// any structure on this.
|
||||||
|
google.protobuf.Struct metadata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Indicates that the conversation succeeded, i.e., the bot handled the issue
|
||||||
|
// that the customer talked to it about.
|
||||||
|
//
|
||||||
|
// Dialogflow only uses this to determine which conversations should be
|
||||||
|
// counted as successful and doesn't process the metadata in this message in
|
||||||
|
// any way. Note that Dialogflow also considers conversations that get to the
|
||||||
|
// conversation end page as successful even if they don't return
|
||||||
|
// [ConversationSuccess][google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess].
|
||||||
|
//
|
||||||
|
// You may set this, for example:
|
||||||
|
// * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.Page] if
|
||||||
|
// entering the page indicates that the conversation succeeded.
|
||||||
|
// * In a webhook response when you determine that you handled the customer
|
||||||
|
// issue.
|
||||||
|
message ConversationSuccess {
|
||||||
|
// Custom metadata. Dialogflow doesn't impose any structure on this.
|
||||||
|
google.protobuf.Struct metadata = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
// The source, which is either plain text or SSML.
|
||||||
|
oneof source {
|
||||||
|
// The raw text to be synthesized.
|
||||||
|
string text = 1;
|
||||||
|
|
||||||
|
// The SSML text to be synthesized. For more information, see
|
||||||
|
// [SSML](/speech/text-to-speech/docs/ssml).
|
||||||
|
string ssml = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents an audio message that is composed of both segments
|
||||||
|
// synthesized from the Dialogflow agent prompts and ones hosted externally
|
||||||
|
// at the specified URIs.
|
||||||
|
// The external URIs are specified via
|
||||||
|
// [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
|
||||||
|
// This message is generated by Dialogflow only and not supposed to be
|
||||||
|
// defined by the user.
|
||||||
|
message MixedAudio {
|
||||||
|
// Represents one segment of audio.
|
||||||
|
message Segment {
|
||||||
|
// Content of the segment.
|
||||||
|
oneof content {
|
||||||
|
// Raw audio synthesized from the Dialogflow agent's response using
|
||||||
|
// the output config specified in the request.
|
||||||
|
bytes audio = 1;
|
||||||
|
|
||||||
|
// Client-specific URI that points to an audio clip accessible to the
|
||||||
|
// client. Dialogflow does not impose any validation on it.
|
||||||
|
string uri = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Required. The rich response message.
|
||||||
|
oneof message {
|
||||||
|
// Returns a text response.
|
||||||
|
Text text = 1;
|
||||||
|
|
||||||
|
// Returns a response containing a custom, platform-specific payload.
|
||||||
|
google.protobuf.Struct payload = 2;
|
||||||
|
|
||||||
|
// Indicates that the conversation succeeded.
|
||||||
|
ConversationSuccess conversation_success = 9;
|
||||||
|
|
||||||
|
// A text or ssml response that is preferentially used for TTS output audio
|
||||||
|
// synthesis, as described in the comment on the ResponseMessage message.
|
||||||
|
OutputAudioText output_audio_text = 8;
|
||||||
|
|
||||||
|
// 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];
|
||||||
|
|
||||||
|
// 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.v3.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
|
||||||
|
// [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
|
||||||
|
// This message is generated by Dialogflow only and not supposed to be
|
||||||
|
// defined by the user.
|
||||||
|
MixedAudio mixed_audio = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
}
|
||||||
|
}
|
||||||
246
google/cloud/dialogflow/cx/v3/security_settings.proto
Normal file
246
google/cloud/dialogflow/cx/v3/security_settings.proto
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
import "google/api/client.proto";
|
||||||
|
import "google/api/field_behavior.proto";
|
||||||
|
import "google/api/resource.proto";
|
||||||
|
import "google/longrunning/operations.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "SecuritySettingsProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing security settings for Dialogflow.
|
||||||
|
service SecuritySettingsService {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Create security settings in the specified location.
|
||||||
|
rpc CreateSecuritySettings(CreateSecuritySettingsRequest) returns (SecuritySettings) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*}/securitySettings"
|
||||||
|
body: "security_settings"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,security_settings";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
||||||
|
// The returned settings may be stale by up to 1 minute.
|
||||||
|
rpc GetSecuritySettings(GetSecuritySettingsRequest) returns (SecuritySettings) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/securitySettings/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
||||||
|
rpc UpdateSecuritySettings(UpdateSecuritySettingsRequest) returns (SecuritySettings) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{security_settings.name=projects/*/locations/*/securitySettings/*}"
|
||||||
|
body: "security_settings"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "security_settings,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the list of all security settings in the specified location.
|
||||||
|
rpc ListSecuritySettings(ListSecuritySettingsRequest) returns (ListSecuritySettingsResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*}/securitySettings"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
||||||
|
rpc DeleteSecuritySettings(DeleteSecuritySettingsRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/securitySettings/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SecuritySettingsService.GetSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.GetSecuritySettings].
|
||||||
|
message GetSecuritySettingsRequest {
|
||||||
|
// Required. Resource name of the settings.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location
|
||||||
|
// ID>/securitySettings/<security settings ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/SecuritySettings"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SecuritySettingsService.UpdateSecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettingsService.UpdateSecuritySettings].
|
||||||
|
message UpdateSecuritySettingsRequest {
|
||||||
|
// Required. [SecuritySettings] object that contains values for each of the
|
||||||
|
// fields to update.
|
||||||
|
SecuritySettings security_settings = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. The mask to control which fields get updated. If the mask is not present,
|
||||||
|
// all fields will be updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SecuritySettings.ListSecuritySettings][].
|
||||||
|
message ListSecuritySettingsRequest {
|
||||||
|
// Required. The location to list all security settings for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/SecuritySettings"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 20 and
|
||||||
|
// at most 100.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [SecuritySettings.ListSecuritySettings][].
|
||||||
|
message ListSecuritySettingsResponse {
|
||||||
|
// The list of security settings.
|
||||||
|
repeated SecuritySettings security_settings = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SecuritySettings.CreateSecuritySettings][].
|
||||||
|
message CreateSecuritySettingsRequest {
|
||||||
|
// Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/SecuritySettings"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The security settings to create.
|
||||||
|
SecuritySettings security_settings = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SecuritySettings.DeleteSecuritySettings][].
|
||||||
|
message DeleteSecuritySettingsRequest {
|
||||||
|
// Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location
|
||||||
|
// ID>/securitySettings/<Security Settings ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/SecuritySettings"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the settings related to security issues, such as data redaction
|
||||||
|
// and data retention. It may take hours for updates on the settings to
|
||||||
|
// propagate to all the related components and take effect.
|
||||||
|
message SecuritySettings {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/SecuritySettings"
|
||||||
|
pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines how we redact data.
|
||||||
|
enum RedactionStrategy {
|
||||||
|
// Do not redact.
|
||||||
|
REDACTION_STRATEGY_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Call redaction service to clean up the data to be persisted.
|
||||||
|
REDACT_WITH_SERVICE = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defines what types of data to redact.
|
||||||
|
enum RedactionScope {
|
||||||
|
// Don't redact any kind of data.
|
||||||
|
REDACTION_SCOPE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// On data to be written to disk or similar devices that are capable of
|
||||||
|
// holding data even if power is disconnected. This includes data that are
|
||||||
|
// temporarily saved on disk.
|
||||||
|
REDACT_DISK_STORAGE = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of data we purge after retention settings triggers purge.
|
||||||
|
enum PurgeDataType {
|
||||||
|
// Unspecified. Do not use.
|
||||||
|
PURGE_DATA_TYPE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Dialogflow history. This does not include Stackdriver log, which is
|
||||||
|
// owned by the user not Dialogflow.
|
||||||
|
DIALOGFLOW_HISTORY = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Required. Resource name of the settings.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location
|
||||||
|
// ID>/securitySettings/<Security Settings ID>`.
|
||||||
|
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. The human-readable name of the security settings, unique within the
|
||||||
|
// location.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Strategy that defines how we do redaction.
|
||||||
|
RedactionStrategy redaction_strategy = 3;
|
||||||
|
|
||||||
|
// Defines on what data we apply redaction. Note that we don't
|
||||||
|
// redact data to which we don't have access, e.g., Stackdriver logs.
|
||||||
|
RedactionScope redaction_scope = 4;
|
||||||
|
|
||||||
|
// DLP inspect template name. Use this template to define inspect base
|
||||||
|
// settings.
|
||||||
|
//
|
||||||
|
// If empty, we use the default DLP inspect config.
|
||||||
|
//
|
||||||
|
// The template name will have one of the following formats:
|
||||||
|
// `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
|
||||||
|
// `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
|
||||||
|
string inspect_template = 9;
|
||||||
|
|
||||||
|
// Specifies how data is retained. Note that even if the data is
|
||||||
|
// purged due to retention policy, we may still hold it in backup storage for
|
||||||
|
// a few days without allowing direct readings.
|
||||||
|
oneof data_retention {
|
||||||
|
// Retains the data for the specified number of days.
|
||||||
|
// User must Set a value lower than Dialogflow's default 30d TTL. Setting a
|
||||||
|
// value higher than that has no effect.
|
||||||
|
// A missing value or setting to 0 also means we use Dialogflow's default
|
||||||
|
// TTL.
|
||||||
|
int32 retention_window_days = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// List of types of data to remove when retention settings triggers purge.
|
||||||
|
repeated PurgeDataType purge_data_types = 8;
|
||||||
|
}
|
||||||
735
google/cloud/dialogflow/cx/v3/session.proto
Normal file
735
google/cloud/dialogflow/cx/v3/session.proto
Normal file
@@ -0,0 +1,735 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
import "google/api/annotations.proto";
|
||||||
|
import "google/api/field_behavior.proto";
|
||||||
|
import "google/api/resource.proto";
|
||||||
|
import "google/cloud/dialogflow/cx/v3/audio_config.proto";
|
||||||
|
import "google/cloud/dialogflow/cx/v3/flow.proto";
|
||||||
|
import "google/cloud/dialogflow/cx/v3/intent.proto";
|
||||||
|
import "google/cloud/dialogflow/cx/v3/page.proto";
|
||||||
|
import "google/cloud/dialogflow/cx/v3/response_message.proto";
|
||||||
|
import "google/cloud/dialogflow/cx/v3/session_entity_type.proto";
|
||||||
|
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.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "SessionProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
option (google.api.resource_definition) = {
|
||||||
|
type: "dialogflow.googleapis.com/Session"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/sessions/{session}"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// A session represents an interaction with a user. You retrieve user input
|
||||||
|
// and pass it to the [DetectIntent][google.cloud.dialogflow.cx.v3.Sessions.DetectIntent] method to determine
|
||||||
|
// user intent and respond.
|
||||||
|
service Sessions {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Processes a natural language query and returns structured, actionable data
|
||||||
|
// as a result. This method is not idempotent, because it may cause session
|
||||||
|
// entity types to be updated, which in turn might affect results of future
|
||||||
|
// queries.
|
||||||
|
rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:detectIntent"
|
||||||
|
body: "*"
|
||||||
|
additional_bindings {
|
||||||
|
post: "/v3/{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) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns preliminary intent match results, doesn't change the session
|
||||||
|
// status.
|
||||||
|
rpc MatchIntent(MatchIntentRequest) returns (MatchIntentResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:matchIntent"
|
||||||
|
body: "*"
|
||||||
|
additional_bindings {
|
||||||
|
post: "/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:matchIntent"
|
||||||
|
body: "*"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fulfills a matched intent returned by [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent].
|
||||||
|
// Must be called after [MatchIntent][google.cloud.dialogflow.cx.v3.Sessions.MatchIntent], with input from
|
||||||
|
// [MatchIntentResponse][google.cloud.dialogflow.cx.v3.MatchIntentResponse]. Otherwise, the behavior is undefined.
|
||||||
|
rpc FulfillIntent(FulfillIntentRequest) returns (FulfillIntentResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{match_intent_request.session=projects/*/locations/*/agents/*/sessions/*}:fulfillIntent"
|
||||||
|
body: "*"
|
||||||
|
additional_bindings {
|
||||||
|
post: "/v3/{match_intent_request.session=projects/*/locations/*/agents/*/environments/*/sessions/*}:fulfillIntent"
|
||||||
|
body: "*"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request to detect user's intent.
|
||||||
|
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>` 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.
|
||||||
|
//
|
||||||
|
// For more information, see the [sessions
|
||||||
|
// guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
|
||||||
|
string session = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Session"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The parameters of this query.
|
||||||
|
QueryParameters query_params = 2;
|
||||||
|
|
||||||
|
// Required. The input specification.
|
||||||
|
QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Instructs the speech synthesizer how to generate the output audio.
|
||||||
|
OutputAudioConfig output_audio_config = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The message returned from the DetectIntent method.
|
||||||
|
message DetectIntentResponse {
|
||||||
|
// Output only. The unique identifier of the response. It can be used to
|
||||||
|
// locate a response in the training example set or for reporting issues.
|
||||||
|
string response_id = 1;
|
||||||
|
|
||||||
|
// The result of the conversational query.
|
||||||
|
QueryResult query_result = 2;
|
||||||
|
|
||||||
|
// 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.v3.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
|
||||||
|
// response structure. In these cases, only the top-most-level audio output
|
||||||
|
// has content.
|
||||||
|
bytes output_audio = 4;
|
||||||
|
|
||||||
|
// The config used by the speech synthesizer to generate the output audio.
|
||||||
|
OutputAudioConfig output_audio_config = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The top-level message sent by the client to the
|
||||||
|
// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent] method.
|
||||||
|
//
|
||||||
|
// Multiple request messages should be sent in order:
|
||||||
|
//
|
||||||
|
// 1. The first message must contain
|
||||||
|
// [session][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.session],
|
||||||
|
// [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] plus optionally
|
||||||
|
// [query_params][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_params]. If the client
|
||||||
|
// wants to receive an audio response, it should also contain
|
||||||
|
// [output_audio_config][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.output_audio_config].
|
||||||
|
//
|
||||||
|
// 2. If [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] was set to
|
||||||
|
// [query_input.audio.config][google.cloud.dialogflow.cx.v3.AudioInput.config], all subsequent messages
|
||||||
|
// must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3.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.v3.QueryInput.text].
|
||||||
|
//
|
||||||
|
// However, note that:
|
||||||
|
//
|
||||||
|
// * Dialogflow will bill you for the audio duration so far.
|
||||||
|
// * Dialogflow discards all Speech recognition results in favor of the
|
||||||
|
// input text.
|
||||||
|
// * Dialogflow will use the language code from the first message.
|
||||||
|
//
|
||||||
|
// After you sent all input, you must half-close or abort the request stream.
|
||||||
|
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>` 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.
|
||||||
|
//
|
||||||
|
// For more information, see the [sessions
|
||||||
|
// guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
|
||||||
|
string session = 1 [(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Session"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// The parameters of this query.
|
||||||
|
QueryParameters query_params = 2;
|
||||||
|
|
||||||
|
// Required. The input specification.
|
||||||
|
QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Instructs the speech synthesizer how to generate the output audio.
|
||||||
|
OutputAudioConfig output_audio_config = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The top-level message returned from the `StreamingDetectIntent` method.
|
||||||
|
//
|
||||||
|
// Multiple response messages can be returned in order:
|
||||||
|
//
|
||||||
|
// 1. If the input was set to streaming audio, the first one or more messages
|
||||||
|
// contain `recognition_result`. Each `recognition_result` represents a more
|
||||||
|
// complete transcript of what the user said. The last `recognition_result`
|
||||||
|
// has `is_final` set to `true`.
|
||||||
|
//
|
||||||
|
// 2. The last message contains `detect_intent_response`.
|
||||||
|
message StreamingDetectIntentResponse {
|
||||||
|
// The output response.
|
||||||
|
oneof response {
|
||||||
|
// The result of speech recognition.
|
||||||
|
StreamingRecognitionResult recognition_result = 1;
|
||||||
|
|
||||||
|
// The response from detect intent.
|
||||||
|
DetectIntentResponse detect_intent_response = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contains a speech recognition result corresponding to a portion of the audio
|
||||||
|
// that is currently being processed or an indication that this is the end
|
||||||
|
// of the single requested utterance.
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
//
|
||||||
|
// 1. transcript: "tube"
|
||||||
|
//
|
||||||
|
// 2. transcript: "to be a"
|
||||||
|
//
|
||||||
|
// 3. transcript: "to be"
|
||||||
|
//
|
||||||
|
// 4. transcript: "to be or not to be"
|
||||||
|
// is_final: true
|
||||||
|
//
|
||||||
|
// 5. transcript: " that's"
|
||||||
|
//
|
||||||
|
// 6. transcript: " that is"
|
||||||
|
//
|
||||||
|
// 7. message_type: `END_OF_SINGLE_UTTERANCE`
|
||||||
|
//
|
||||||
|
// 8. transcript: " that is the question"
|
||||||
|
// is_final: true
|
||||||
|
//
|
||||||
|
// Only two of the responses contain final results (#4 and #8 indicated by
|
||||||
|
// `is_final: true`). Concatenating these generates the full transcript: "to be
|
||||||
|
// or not to be that is the question".
|
||||||
|
//
|
||||||
|
// In each response we populate:
|
||||||
|
//
|
||||||
|
// * for `TRANSCRIPT`: `transcript` and possibly `is_final`.
|
||||||
|
//
|
||||||
|
// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`.
|
||||||
|
message StreamingRecognitionResult {
|
||||||
|
// Type of the response message.
|
||||||
|
enum MessageType {
|
||||||
|
// Not specified. Should never be used.
|
||||||
|
MESSAGE_TYPE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Message contains a (possibly partial) transcript.
|
||||||
|
TRANSCRIPT = 1;
|
||||||
|
|
||||||
|
// Event indicates that the server has detected the end of the user's speech
|
||||||
|
// utterance and expects no additional speech. Therefore, the server will
|
||||||
|
// not process additional audio (although it may subsequently return
|
||||||
|
// 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.v3.InputAudioConfig.single_utterance] was set to
|
||||||
|
// `true`, and is not used otherwise.
|
||||||
|
END_OF_SINGLE_UTTERANCE = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type of the result message.
|
||||||
|
MessageType message_type = 1;
|
||||||
|
|
||||||
|
// Transcript text representing the words that the user spoke.
|
||||||
|
// Populated if and only if `message_type` = `TRANSCRIPT`.
|
||||||
|
string transcript = 2;
|
||||||
|
|
||||||
|
// If `false`, the `StreamingRecognitionResult` represents an
|
||||||
|
// interim result that may change. If `true`, the recognizer will not return
|
||||||
|
// any further hypotheses about this piece of the audio. May only be populated
|
||||||
|
// for `message_type` = `TRANSCRIPT`.
|
||||||
|
bool is_final = 3;
|
||||||
|
|
||||||
|
// The Speech confidence between 0.0 and 1.0 for the current portion of audio.
|
||||||
|
// A higher number indicates an estimated greater likelihood that the
|
||||||
|
// recognized words are correct. The default of 0.0 is a sentinel value
|
||||||
|
// indicating that confidence was not set.
|
||||||
|
//
|
||||||
|
// This field is typically only provided if `is_final` is true and you should
|
||||||
|
// not rely on it being accurate or even set.
|
||||||
|
float confidence = 4;
|
||||||
|
|
||||||
|
// An estimate of the likelihood that the speech recognizer will
|
||||||
|
// not change its guess about this interim recognition result:
|
||||||
|
// * If the value is unspecified or 0.0, Dialogflow didn't compute the
|
||||||
|
// stability. In particular, Dialogflow will only provide stability for
|
||||||
|
// `TRANSCRIPT` results with `is_final = false`.
|
||||||
|
// * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely
|
||||||
|
// unstable and 1.0 means completely stable.
|
||||||
|
float stability = 6;
|
||||||
|
|
||||||
|
// Word-specific information for the words recognized by Speech in
|
||||||
|
// [transcript][google.cloud.dialogflow.cx.v3.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and
|
||||||
|
// [InputAudioConfig.enable_word_info] is set.
|
||||||
|
repeated SpeechWordInfo speech_word_info = 7;
|
||||||
|
|
||||||
|
// Time offset of the end of this Speech recognition result relative to the
|
||||||
|
// beginning of the audio. Only populated for `message_type` =
|
||||||
|
// `TRANSCRIPT`.
|
||||||
|
google.protobuf.Duration speech_end_offset = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the parameters of a conversational query.
|
||||||
|
message QueryParameters {
|
||||||
|
// The time zone of this conversational query from the [time zone
|
||||||
|
// database](https://www.iana.org/time-zones), e.g., America/New_York,
|
||||||
|
// Europe/Paris. If not provided, the time zone specified in the agent is
|
||||||
|
// used.
|
||||||
|
string time_zone = 1;
|
||||||
|
|
||||||
|
// The geo location of this conversational query.
|
||||||
|
google.type.LatLng geo_location = 2;
|
||||||
|
|
||||||
|
// Additional session entity types to replace or extend developer entity types
|
||||||
|
// with. The entity synonyms apply to all languages and persist for the
|
||||||
|
// session of this query.
|
||||||
|
repeated SessionEntityType session_entity_types = 3;
|
||||||
|
|
||||||
|
// This field can be used to pass custom data into the webhook associated with
|
||||||
|
// the agent. Arbitrary JSON objects are supported.
|
||||||
|
google.protobuf.Struct payload = 4;
|
||||||
|
|
||||||
|
// Additional parameters to be put into [session
|
||||||
|
// parameters][SessionInfo.parameters]. To remove a
|
||||||
|
// parameter from the session, clients should explicitly set the parameter
|
||||||
|
// value to null.
|
||||||
|
//
|
||||||
|
// Depending on your protocol or client library language, this is a
|
||||||
|
// map, associative array, symbol table, dictionary, or JSON object
|
||||||
|
// composed of a collection of (MapKey, MapValue) pairs:
|
||||||
|
//
|
||||||
|
// - MapKey type: string
|
||||||
|
// - MapKey value: parameter name
|
||||||
|
// - MapValue type:
|
||||||
|
// - If parameter's entity type is a composite entity: map
|
||||||
|
// - Else: string or number, depending on parameter value type
|
||||||
|
// - MapValue value:
|
||||||
|
// - If parameter's entity type is a composite entity:
|
||||||
|
// map from composite entity property names to property values
|
||||||
|
// - Else: parameter value
|
||||||
|
google.protobuf.Struct parameters = 5;
|
||||||
|
|
||||||
|
// Configures whether sentiment analysis should be performed. If not
|
||||||
|
// provided, sentiment analysis is not performed.
|
||||||
|
bool analyze_query_text_sentiment = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the query input. It can contain one of:
|
||||||
|
//
|
||||||
|
// 1. A conversational query in the form of text.
|
||||||
|
//
|
||||||
|
// 2. An intent query that specifies which intent to trigger.
|
||||||
|
//
|
||||||
|
// 3. Natural language speech audio to be processed.
|
||||||
|
//
|
||||||
|
// 4. An event to be triggered.
|
||||||
|
//
|
||||||
|
message QueryInput {
|
||||||
|
// Required. The input specification.
|
||||||
|
oneof input {
|
||||||
|
// The natural language text to be processed.
|
||||||
|
TextInput text = 2;
|
||||||
|
|
||||||
|
// The intent to be triggered.
|
||||||
|
IntentInput intent = 3;
|
||||||
|
|
||||||
|
// The natural language speech audio to be processed.
|
||||||
|
AudioInput audio = 5;
|
||||||
|
|
||||||
|
// The event to be triggered.
|
||||||
|
EventInput event = 6;
|
||||||
|
|
||||||
|
// The DTMF event to be handled.
|
||||||
|
DtmfInput dtmf = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Required. The language of the input. See [Language
|
||||||
|
// Support](https://cloud.google.com/dialogflow/docs/reference/language) for a
|
||||||
|
// list of the currently supported language codes. Note that queries in the
|
||||||
|
// same session do not necessarily need to specify the same language.
|
||||||
|
string language_code = 4 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the result of a conversational query.
|
||||||
|
message QueryResult {
|
||||||
|
// The original conversational query.
|
||||||
|
oneof query {
|
||||||
|
// If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was provided as input, this field
|
||||||
|
// will contain a copy of the text.
|
||||||
|
string text = 1;
|
||||||
|
|
||||||
|
// If an [intent][google.cloud.dialogflow.cx.v3.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.v3.AudioInput] was provided as input,
|
||||||
|
// this field will contain the trascript for the audio.
|
||||||
|
string transcript = 12;
|
||||||
|
|
||||||
|
// If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as input, this field will contain
|
||||||
|
// the name of the event.
|
||||||
|
string trigger_event = 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The language that was triggered during intent detection.
|
||||||
|
// See [Language
|
||||||
|
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// for a list of the currently supported language codes.
|
||||||
|
string language_code = 2;
|
||||||
|
|
||||||
|
// The collected [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].
|
||||||
|
//
|
||||||
|
// Depending on your protocol or client library language, this is a
|
||||||
|
// map, associative array, symbol table, dictionary, or JSON object
|
||||||
|
// composed of a collection of (MapKey, MapValue) pairs:
|
||||||
|
//
|
||||||
|
// - MapKey type: string
|
||||||
|
// - MapKey value: parameter name
|
||||||
|
// - MapValue type:
|
||||||
|
// - If parameter's entity type is a composite entity: map
|
||||||
|
// - Else: string or number, depending on parameter value type
|
||||||
|
// - MapValue value:
|
||||||
|
// - If parameter's entity type is a composite entity:
|
||||||
|
// map from composite entity property names to property values
|
||||||
|
// - Else: parameter value
|
||||||
|
google.protobuf.Struct parameters = 3;
|
||||||
|
|
||||||
|
// The list of rich messages returned to the client. Responses vary from
|
||||||
|
// simple text messages to more sophisticated, structured payloads used
|
||||||
|
// to drive complex logic.
|
||||||
|
repeated ResponseMessage response_messages = 4;
|
||||||
|
|
||||||
|
// 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.v3.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.v3.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.v3.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.v3.QueryResult.match] instead.
|
||||||
|
Intent intent = 8 [deprecated = true];
|
||||||
|
|
||||||
|
// The intent detection confidence. Values range from 0.0 (completely
|
||||||
|
// uncertain) to 1.0 (completely certain).
|
||||||
|
// This value is for informational purpose only and is only used to
|
||||||
|
// 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.v3.QueryResult.match] instead.
|
||||||
|
float intent_detection_confidence = 9 [deprecated = true];
|
||||||
|
|
||||||
|
// Intent match result, could be an intent or an event.
|
||||||
|
Match match = 15;
|
||||||
|
|
||||||
|
// The free-form diagnostic info. For example, this field could contain
|
||||||
|
// webhook call latency. The string keys of the Struct's fields map can change
|
||||||
|
// without notice.
|
||||||
|
google.protobuf.Struct diagnostic_info = 10;
|
||||||
|
|
||||||
|
// The sentiment analyss result, which depends on
|
||||||
|
// [`analyze_query_text_sentiment`]
|
||||||
|
// [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], specified in the request.
|
||||||
|
SentimentAnalysisResult sentiment_analysis_result = 17;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
string text = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the intent to trigger programmatically rather than as a result of
|
||||||
|
// natural language processing.
|
||||||
|
message IntentInput {
|
||||||
|
// Required. The unique identifier of the intent.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/intents/<Intent ID>`.
|
||||||
|
string intent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Intent"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the natural speech audio to be processed.
|
||||||
|
message AudioInput {
|
||||||
|
// Required. Instructs the speech recognizer how to process the speech audio.
|
||||||
|
InputAudioConfig config = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// 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.v3.QueryResult.transcript] cannot contain more than 256
|
||||||
|
// bytes.
|
||||||
|
//
|
||||||
|
// For non-streaming audio detect intent, both `config` and `audio` must be
|
||||||
|
// provided.
|
||||||
|
// For streaming audio detect intent, `config` must be provided in
|
||||||
|
// the first request and `audio` must be provided in all following requests.
|
||||||
|
bytes audio = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the event to trigger.
|
||||||
|
message EventInput {
|
||||||
|
// Name of the event.
|
||||||
|
string event = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents the input for dtmf event.
|
||||||
|
message DtmfInput {
|
||||||
|
// The dtmf digits.
|
||||||
|
string digits = 1;
|
||||||
|
|
||||||
|
// The finish digit (if any).
|
||||||
|
string finish_digit = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents one match result of [MatchIntent][].
|
||||||
|
message Match {
|
||||||
|
// Type of a Match.
|
||||||
|
enum MatchType {
|
||||||
|
// Not specified. Should never be used.
|
||||||
|
MATCH_TYPE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// The query was matched to an intent.
|
||||||
|
INTENT = 1;
|
||||||
|
|
||||||
|
// The query directly triggered an intent.
|
||||||
|
DIRECT_INTENT = 2;
|
||||||
|
|
||||||
|
// The query was used for parameter filling.
|
||||||
|
PARAMETER_FILLING = 3;
|
||||||
|
|
||||||
|
// No match was found for the query.
|
||||||
|
NO_MATCH = 4;
|
||||||
|
|
||||||
|
// Indicates an empty query.
|
||||||
|
NO_INPUT = 5;
|
||||||
|
|
||||||
|
// The query directly triggered an event.
|
||||||
|
EVENT = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The [Intent][google.cloud.dialogflow.cx.v3.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.v3.Match.MatchType] match type.
|
||||||
|
Intent intent = 1;
|
||||||
|
|
||||||
|
// The event that matched the query. Only filled for
|
||||||
|
// [`EVENT`][google.cloud.dialogflow.cx.v3.Match.MatchType] match type.
|
||||||
|
string event = 6;
|
||||||
|
|
||||||
|
// The collection of parameters extracted from the query.
|
||||||
|
//
|
||||||
|
// Depending on your protocol or client library language, this is a
|
||||||
|
// map, associative array, symbol table, dictionary, or JSON object
|
||||||
|
// composed of a collection of (MapKey, MapValue) pairs:
|
||||||
|
//
|
||||||
|
// - MapKey type: string
|
||||||
|
// - MapKey value: parameter name
|
||||||
|
// - MapValue type:
|
||||||
|
// - If parameter's entity type is a composite entity: map
|
||||||
|
// - Else: string or number, depending on parameter value type
|
||||||
|
// - MapValue value:
|
||||||
|
// - If parameter's entity type is a composite entity:
|
||||||
|
// map from composite entity property names to property values
|
||||||
|
// - Else: parameter value
|
||||||
|
google.protobuf.Struct parameters = 2;
|
||||||
|
|
||||||
|
// Final text input which was matched during MatchIntent. This value can be
|
||||||
|
// different from original input sent in request because of spelling
|
||||||
|
// correction or other processing.
|
||||||
|
string resolved_input = 3;
|
||||||
|
|
||||||
|
// Type of this [Match][google.cloud.dialogflow.cx.v3.Match].
|
||||||
|
MatchType match_type = 4;
|
||||||
|
|
||||||
|
// The confidence of this match. Values range from 0.0 (completely uncertain)
|
||||||
|
// to 1.0 (completely certain).
|
||||||
|
// This value is for informational purpose only and is only used to 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.
|
||||||
|
float confidence = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request of [MatchIntent][].
|
||||||
|
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>` 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.
|
||||||
|
//
|
||||||
|
// For more information, see the [sessions
|
||||||
|
// guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
|
||||||
|
string session = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Session"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The parameters of this query.
|
||||||
|
QueryParameters query_params = 2;
|
||||||
|
|
||||||
|
// Required. The input specification.
|
||||||
|
QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Response of [MatchIntent][].
|
||||||
|
message MatchIntentResponse {
|
||||||
|
// The original conversational query.
|
||||||
|
oneof query {
|
||||||
|
// If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was provided as input, this field
|
||||||
|
// will contain a copy of the text.
|
||||||
|
string text = 1;
|
||||||
|
|
||||||
|
// If an [intent][google.cloud.dialogflow.cx.v3.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.v3.AudioInput] was provided as input,
|
||||||
|
// this field will contain the trascript for the audio.
|
||||||
|
string transcript = 3;
|
||||||
|
|
||||||
|
// If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as input, this field will
|
||||||
|
// contain a copy of the event name.
|
||||||
|
string trigger_event = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Match results, if more than one, ordered descendingly by the confidence
|
||||||
|
// we have that the particular intent matches the query.
|
||||||
|
repeated Match matches = 4;
|
||||||
|
|
||||||
|
// The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all fields are filled in this message,
|
||||||
|
// including but not limited to `name` and `display_name`.
|
||||||
|
Page current_page = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Request of [FulfillIntent][]
|
||||||
|
message FulfillIntentRequest {
|
||||||
|
// Must be same as the corresponding MatchIntent request, otherwise the
|
||||||
|
// behavior is undefined.
|
||||||
|
MatchIntentRequest match_intent_request = 1;
|
||||||
|
|
||||||
|
// The matched intent/event to fulfill.
|
||||||
|
Match match = 2;
|
||||||
|
|
||||||
|
// Instructs the speech synthesizer how to generate output audio.
|
||||||
|
OutputAudioConfig output_audio_config = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Response of [FulfillIntent][]
|
||||||
|
message FulfillIntentResponse {
|
||||||
|
// Output only. The unique identifier of the response. It can be used to
|
||||||
|
// locate a response in the training example set or for reporting issues.
|
||||||
|
string response_id = 1;
|
||||||
|
|
||||||
|
// The result of the conversational query.
|
||||||
|
QueryResult query_result = 2;
|
||||||
|
|
||||||
|
// 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.v3.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
|
||||||
|
// response structure. In these cases, only the top-most-level audio output
|
||||||
|
// has content.
|
||||||
|
bytes output_audio = 3;
|
||||||
|
|
||||||
|
// The config used by the speech synthesizer to generate the output audio.
|
||||||
|
OutputAudioConfig output_audio_config = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The result of sentiment analysis. Sentiment analysis inspects user input
|
||||||
|
// and identifies the prevailing subjective opinion, especially to determine a
|
||||||
|
// user's attitude as positive, negative, or neutral.
|
||||||
|
message SentimentAnalysisResult {
|
||||||
|
// Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
|
||||||
|
// sentiment).
|
||||||
|
float score = 1;
|
||||||
|
|
||||||
|
// A non-negative number in the [0, +inf) range, which represents the absolute
|
||||||
|
// magnitude of sentiment, regardless of score (positive or negative).
|
||||||
|
float magnitude = 2;
|
||||||
|
}
|
||||||
264
google/cloud/dialogflow/cx/v3/session_entity_type.proto
Normal file
264
google/cloud/dialogflow/cx/v3/session_entity_type.proto
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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/v3/entity_type.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "SessionEntityTypeProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [SessionEntityTypes][google.cloud.dialogflow.cx.v3.SessionEntityType].
|
||||||
|
service SessionEntityTypes {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all session entity types in the specified session.
|
||||||
|
rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes"
|
||||||
|
additional_bindings {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*/environments/*/sessions/*}/entityTypes"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified session entity type.
|
||||||
|
rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}"
|
||||||
|
additional_bindings {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a session entity type.
|
||||||
|
//
|
||||||
|
// If the specified session entity type already exists, overrides the
|
||||||
|
// session entity type.
|
||||||
|
rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes"
|
||||||
|
body: "session_entity_type"
|
||||||
|
additional_bindings {
|
||||||
|
post: "/v3/{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) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{session_entity_type.name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}"
|
||||||
|
body: "session_entity_type"
|
||||||
|
additional_bindings {
|
||||||
|
patch: "/v3/{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) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/sessions/*/entityTypes/*}"
|
||||||
|
additional_bindings {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/environments/*/sessions/*/entityTypes/*}"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Session entity types are referred to as **User** entity types and are
|
||||||
|
// entities that are built for an individual user such as favorites,
|
||||||
|
// 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.v3.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.
|
||||||
|
//
|
||||||
|
// For more information about entity types, see the [Dialogflow
|
||||||
|
// documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
||||||
|
message SessionEntityType {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/SessionEntityType"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/sessions/{session}/entityTypes/{entity_type}"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/sessions/{session}/entityTypes/{entity_type}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// The types of modifications for the session entity type.
|
||||||
|
enum EntityOverrideMode {
|
||||||
|
// Not specified. This value should be never used.
|
||||||
|
ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// The collection of session entities overrides the collection of entities
|
||||||
|
// in the corresponding custom entity type.
|
||||||
|
ENTITY_OVERRIDE_MODE_OVERRIDE = 1;
|
||||||
|
|
||||||
|
// The collection of session entities extends the collection of entities in
|
||||||
|
// the corresponding custom entity type.
|
||||||
|
//
|
||||||
|
// Note: Even in this override mode calls to `ListSessionEntityTypes`,
|
||||||
|
// `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.v3.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>` 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. 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.v3.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>` 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) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/SessionEntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.cx.v3.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.
|
||||||
|
repeated SessionEntityType session_entity_types = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no
|
||||||
|
// more results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.cx.v3.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>` 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) = {
|
||||||
|
type: "dialogflow.googleapis.com/SessionEntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.cx.v3.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>` 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) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/SessionEntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The session entity type to create.
|
||||||
|
SessionEntityType session_entity_type = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.cx.v3.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>` 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.v3.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>` 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) = {
|
||||||
|
type: "dialogflow.googleapis.com/SessionEntityType"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
248
google/cloud/dialogflow/cx/v3/transition_route_group.proto
Normal file
248
google/cloud/dialogflow/cx/v3/transition_route_group.proto
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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/v3/page.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "TransitionRouteGroupProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [TransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
||||||
|
service TransitionRouteGroups {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all transition route groups in the specified flow.
|
||||||
|
rpc ListTransitionRouteGroups(ListTransitionRouteGroupsRequest) returns (ListTransitionRouteGroupsResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
||||||
|
rpc GetTransitionRouteGroup(GetTransitionRouteGroupRequest) returns (TransitionRouteGroup) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] in the specified flow.
|
||||||
|
rpc CreateTransitionRouteGroup(CreateTransitionRouteGroupRequest) returns (TransitionRouteGroup) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/transitionRouteGroups"
|
||||||
|
body: "transition_route_group"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,transition_route_group";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
||||||
|
rpc UpdateTransitionRouteGroup(UpdateTransitionRouteGroupRequest) returns (TransitionRouteGroup) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{transition_route_group.name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
|
||||||
|
body: "transition_route_group"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "transition_route_group,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
||||||
|
rpc DeleteTransitionRouteGroup(DeleteTransitionRouteGroupRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*/transitionRouteGroups/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// An TransitionRouteGroup represents a group of
|
||||||
|
// [`TransitionRoutes`][google.cloud.dialogflow.cx.v3.TransitionRoute] to be used by a [Page][google.cloud.dialogflow.cx.v3.Page].
|
||||||
|
message TransitionRouteGroup {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/TransitionRouteGroup"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/transitionRouteGroups/{transition_route_group}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// The unique identifier of the transition route group.
|
||||||
|
// [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup] populates the name
|
||||||
|
// automatically.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Required. The human-readable name of the transition route group, unique within
|
||||||
|
// the [Agent][google.cloud.dialogflow.cx.v3.Agent]. The display name can be no longer than 30 characters.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Transition routes associated with the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
||||||
|
// Duplicate transition routes (i.e. using the same
|
||||||
|
// [`intent`][google.cloud.dialogflow.cx.v3.TransitionRoute.intent]) are not allowed.
|
||||||
|
//
|
||||||
|
// Note that the [`name`][google.cloud.dialogflow.cx.v3.TransitionRoute.name] field is not used in the
|
||||||
|
// transition route group scope.
|
||||||
|
repeated TransitionRoute transition_routes = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroups].
|
||||||
|
message ListTransitionRouteGroupsRequest {
|
||||||
|
// Required. The flow to list all transition route groups for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/TransitionRouteGroup"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
|
||||||
|
// The language to list transition route groups for. The field
|
||||||
|
// [`messages`][TransitionRoute.trigger_fulfillment.messages] in
|
||||||
|
// [TransitionRoute][google.cloud.dialogflow.cx.v3.TransitionRoute] is language dependent.
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [TransitionRouteGroups.ListTransitionRouteGroups][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.ListTransitionRouteGroups].
|
||||||
|
message ListTransitionRouteGroupsResponse {
|
||||||
|
// The list of transition route groups. There will be a maximum number of
|
||||||
|
// items returned based on the page_size field in the request. The list may in
|
||||||
|
// some cases be empty or contain fewer entries than page_size even if this
|
||||||
|
// isn't the last page.
|
||||||
|
repeated TransitionRouteGroup transition_route_groups = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [TransitionRouteGroups.GetTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.GetTransitionRouteGroup].
|
||||||
|
message GetTransitionRouteGroupRequest {
|
||||||
|
// Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup].
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/TransitionRouteGroup"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The language to list transition route groups for. The field
|
||||||
|
// [`messages`][TransitionRoute.trigger_fulfillment.messages] in
|
||||||
|
// [TransitionRoute][google.cloud.dialogflow.cx.v3.TransitionRoute] is language dependent.
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [TransitionRouteGroups.CreateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.CreateTransitionRouteGroup].
|
||||||
|
message CreateTransitionRouteGroupRequest {
|
||||||
|
// Required. The flow to create an [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/TransitionRouteGroup"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The transition route group to create.
|
||||||
|
TransitionRouteGroup transition_route_group = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The language to list transition route groups for. The field
|
||||||
|
// [`messages`][TransitionRoute.trigger_fulfillment.messages] in
|
||||||
|
// [TransitionRoute][google.cloud.dialogflow.cx.v3.TransitionRoute] is language dependent.
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [TransitionRouteGroups.UpdateTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.UpdateTransitionRouteGroup].
|
||||||
|
message UpdateTransitionRouteGroupRequest {
|
||||||
|
// Required. The transition route group to update.
|
||||||
|
TransitionRouteGroup transition_route_group = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The mask to control which fields get updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 2;
|
||||||
|
|
||||||
|
// The language to list transition route groups for. The field
|
||||||
|
// [`messages`][TransitionRoute.trigger_fulfillment.messages] in
|
||||||
|
// [TransitionRoute][google.cloud.dialogflow.cx.v3.TransitionRoute] is language dependent.
|
||||||
|
//
|
||||||
|
// If not specified, the agent's default language is used.
|
||||||
|
// [Many
|
||||||
|
// languages](https://cloud.google.com/dialogflow/docs/reference/language)
|
||||||
|
// are supported.
|
||||||
|
// Note: languages must be enabled in the agent before they can be used.
|
||||||
|
string language_code = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [TransitionRouteGroups.DeleteTransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroups.DeleteTransitionRouteGroup].
|
||||||
|
message DeleteTransitionRouteGroupRequest {
|
||||||
|
// Required. The name of the [TransitionRouteGroup][google.cloud.dialogflow.cx.v3.TransitionRouteGroup] to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/transitionRouteGroups/<Transition Route Group ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/TransitionRouteGroup"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// This field has no effect for transition route group that no page is using.
|
||||||
|
// If the transition route group is referenced by any page:
|
||||||
|
//
|
||||||
|
// * If `force` is set to false, an error will be returned with message
|
||||||
|
// indicating pages that reference the transition route group.
|
||||||
|
// * If `force` is set to true, Dialogflow will remove the transition route
|
||||||
|
// group, as well as any reference to it.
|
||||||
|
bool force = 2;
|
||||||
|
}
|
||||||
261
google/cloud/dialogflow/cx/v3/version.proto
Normal file
261
google/cloud/dialogflow/cx/v3/version.proto
Normal file
@@ -0,0 +1,261 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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/v3/flow.proto";
|
||||||
|
import "google/longrunning/operations.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "VersionProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [Versions][google.cloud.dialogflow.cx.v3.Version].
|
||||||
|
service Versions {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all versions in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow].
|
||||||
|
rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified [Version][google.cloud.dialogflow.cx.v3.Version].
|
||||||
|
rpc GetVersion(GetVersionRequest) returns (Version) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a [Version][google.cloud.dialogflow.cx.v3.Version] in the specified [Flow][google.cloud.dialogflow.cx.v3.Flow].
|
||||||
|
rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*/flows/*}/versions"
|
||||||
|
body: "version"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,version";
|
||||||
|
option (google.longrunning.operation_info) = {
|
||||||
|
response_type: "Version"
|
||||||
|
metadata_type: "CreateVersionOperationMetadata"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified [Version][google.cloud.dialogflow.cx.v3.Version].
|
||||||
|
rpc UpdateVersion(UpdateVersionRequest) returns (Version) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{version.name=projects/*/locations/*/agents/*/flows/*/versions/*}"
|
||||||
|
body: "version"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "version,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified [Version][google.cloud.dialogflow.cx.v3.Version].
|
||||||
|
rpc DeleteVersion(DeleteVersionRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loads a specified version to draft version.
|
||||||
|
rpc LoadVersion(LoadVersionRequest) returns (google.longrunning.Operation) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{name=projects/*/locations/*/agents/*/flows/*/versions/*}:load"
|
||||||
|
body: "*"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
option (google.longrunning.operation_info) = {
|
||||||
|
response_type: "google.protobuf.Empty"
|
||||||
|
metadata_type: "google.protobuf.Struct"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Metadata associated with the long running operation for
|
||||||
|
// [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
|
||||||
|
message CreateVersionOperationMetadata {
|
||||||
|
// Name of the created version.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/versions/<Version ID>`.
|
||||||
|
string version = 1 [(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Version"
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents a version of a flow.
|
||||||
|
message Version {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/Version"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}/versions/{version}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// The state of the version.
|
||||||
|
enum State {
|
||||||
|
// Not specified. This value is not used.
|
||||||
|
STATE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Version is not ready to serve (e.g. training is running).
|
||||||
|
RUNNING = 1;
|
||||||
|
|
||||||
|
// Training has succeeded and this version is ready to serve.
|
||||||
|
SUCCEEDED = 2;
|
||||||
|
|
||||||
|
// Version training failed.
|
||||||
|
FAILED = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/versions/<Version ID>. Version ID is a self-increasing
|
||||||
|
// number generated by Dialogflow upon version creation.
|
||||||
|
string name = 1;
|
||||||
|
|
||||||
|
// Required. The human-readable name of the version. Limit of 64 characters.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The description of the version. The maximum length is 500 characters. If
|
||||||
|
// exceeded, the request is rejected.
|
||||||
|
string description = 3;
|
||||||
|
|
||||||
|
// Output only. The NLU settings of the flow at version creation.
|
||||||
|
NluSettings nlu_settings = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
|
||||||
|
// Output only. Create time of the version.
|
||||||
|
google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
|
||||||
|
// Output only. The state of this version. This field is read-only and cannot be set by
|
||||||
|
// create and update methods.
|
||||||
|
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
|
||||||
|
message ListVersionsRequest {
|
||||||
|
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Version"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 20 and
|
||||||
|
// at most 100.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions].
|
||||||
|
message ListVersionsResponse {
|
||||||
|
// A list of versions. There will be a maximum number of items returned based
|
||||||
|
// on the page_size field in the request. The list may in some cases be empty
|
||||||
|
// or contain fewer entries than page_size even if this isn't the last page.
|
||||||
|
repeated Version versions = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Versions.GetVersion][google.cloud.dialogflow.cx.v3.Versions.GetVersion].
|
||||||
|
message GetVersionRequest {
|
||||||
|
// Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version].
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/versions/<Version ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Version"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Versions.CreateVersion][google.cloud.dialogflow.cx.v3.Versions.CreateVersion].
|
||||||
|
message CreateVersionRequest {
|
||||||
|
// Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an [Version][google.cloud.dialogflow.cx.v3.Version] for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Version"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The version to create.
|
||||||
|
Version version = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Versions.UpdateVersion][google.cloud.dialogflow.cx.v3.Versions.UpdateVersion].
|
||||||
|
message UpdateVersionRequest {
|
||||||
|
// Required. The version to update.
|
||||||
|
Version version = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. The mask to control which fields get updated. Currently only `description`
|
||||||
|
// and `display_name` can be updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Versions.DeleteVersion][google.cloud.dialogflow.cx.v3.Versions.DeleteVersion].
|
||||||
|
message DeleteVersionRequest {
|
||||||
|
// Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/versions/<Version ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Version"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Versions.LoadVersion][google.cloud.dialogflow.cx.v3.Versions.LoadVersion].
|
||||||
|
message LoadVersionRequest {
|
||||||
|
// Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft version.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/flows/<Flow ID>/versions/<Version ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Version"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// This field is used to prevent accidental overwrite of other agent resources
|
||||||
|
// in the draft version, which can potentially impact other flow's behavior.
|
||||||
|
// If `allow_override_agent_resources` is false, conflicted agent-level
|
||||||
|
// resources will not be overridden (i.e. intents, entities, webhooks).
|
||||||
|
bool allow_override_agent_resources = 2;
|
||||||
|
}
|
||||||
441
google/cloud/dialogflow/cx/v3/webhook.proto
Normal file
441
google/cloud/dialogflow/cx/v3/webhook.proto
Normal file
@@ -0,0 +1,441 @@
|
|||||||
|
// Copyright 2020 Google LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.cloud.dialogflow.cx.v3;
|
||||||
|
|
||||||
|
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/v3/response_message.proto";
|
||||||
|
import "google/protobuf/duration.proto";
|
||||||
|
import "google/protobuf/empty.proto";
|
||||||
|
import "google/protobuf/field_mask.proto";
|
||||||
|
import "google/protobuf/struct.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
|
||||||
|
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "WebhookProto";
|
||||||
|
option java_package = "com.google.cloud.dialogflow.cx.v3";
|
||||||
|
option objc_class_prefix = "DF";
|
||||||
|
|
||||||
|
// Service for managing [Webhooks][google.cloud.dialogflow.cx.v3.Webhook].
|
||||||
|
service Webhooks {
|
||||||
|
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||||
|
option (google.api.oauth_scopes) =
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform,"
|
||||||
|
"https://www.googleapis.com/auth/dialogflow";
|
||||||
|
|
||||||
|
// Returns the list of all webhooks in the specified agent.
|
||||||
|
rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{parent=projects/*/locations/*/agents/*}/webhooks"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieves the specified webhook.
|
||||||
|
rpc GetWebhook(GetWebhookRequest) returns (Webhook) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
get: "/v3/{name=projects/*/locations/*/agents/*/webhooks/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a webhook in the specified agent.
|
||||||
|
rpc CreateWebhook(CreateWebhookRequest) returns (Webhook) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
post: "/v3/{parent=projects/*/locations/*/agents/*}/webhooks"
|
||||||
|
body: "webhook"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "parent,webhook";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the specified webhook.
|
||||||
|
rpc UpdateWebhook(UpdateWebhookRequest) returns (Webhook) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
patch: "/v3/{webhook.name=projects/*/locations/*/agents/*/webhooks/*}"
|
||||||
|
body: "webhook"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "webhook,update_mask";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deletes the specified webhook.
|
||||||
|
rpc DeleteWebhook(DeleteWebhookRequest) returns (google.protobuf.Empty) {
|
||||||
|
option (google.api.http) = {
|
||||||
|
delete: "/v3/{name=projects/*/locations/*/agents/*/webhooks/*}"
|
||||||
|
};
|
||||||
|
option (google.api.method_signature) = "name";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Webhooks host the developer's business logic. During a session, webhooks
|
||||||
|
// allow the developer to use the data extracted by Dialogflow's natural
|
||||||
|
// language processing to generate dynamic responses, validate collected data,
|
||||||
|
// or trigger actions on the backend.
|
||||||
|
message Webhook {
|
||||||
|
option (google.api.resource) = {
|
||||||
|
type: "dialogflow.googleapis.com/Webhook"
|
||||||
|
pattern: "projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}"
|
||||||
|
};
|
||||||
|
|
||||||
|
// Represents configuration for a generic web service.
|
||||||
|
message GenericWebService {
|
||||||
|
// 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.
|
||||||
|
string username = 2 [deprecated = true];
|
||||||
|
|
||||||
|
// The password for HTTP Basic authentication.
|
||||||
|
string password = 3 [deprecated = true];
|
||||||
|
|
||||||
|
// The HTTP request headers to send together with webhook
|
||||||
|
// requests.
|
||||||
|
map<string, string> request_headers = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The unique identifier of the webhook.
|
||||||
|
// Required for the [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] method.
|
||||||
|
// [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.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.
|
||||||
|
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// Required. The webhook configuration.
|
||||||
|
oneof webhook {
|
||||||
|
// Configuration for a generic web service.
|
||||||
|
GenericWebService generic_web_service = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Webhook execution timeout. Execution is considered failed if Dialogflow
|
||||||
|
// doesn't receive a response from webhook at the end of the timeout period.
|
||||||
|
// Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
|
||||||
|
google.protobuf.Duration timeout = 6;
|
||||||
|
|
||||||
|
// Indicates whether the webhook is disabled.
|
||||||
|
bool disabled = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks].
|
||||||
|
message ListWebhooksRequest {
|
||||||
|
// Required. The agent to list all webhooks for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Webhook"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// The maximum number of items to return in a single page. By default 100 and
|
||||||
|
// at most 1000.
|
||||||
|
int32 page_size = 2;
|
||||||
|
|
||||||
|
// The next_page_token value returned from a previous list request.
|
||||||
|
string page_token = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.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.
|
||||||
|
repeated Webhook webhooks = 1;
|
||||||
|
|
||||||
|
// Token to retrieve the next page of results, or empty if there are no more
|
||||||
|
// results in the list.
|
||||||
|
string next_page_token = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Webhooks.GetWebhook][google.cloud.dialogflow.cx.v3.Webhooks.GetWebhook].
|
||||||
|
message GetWebhookRequest {
|
||||||
|
// Required. The name of the webhook.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/webhooks/<Webhook ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
type: "dialogflow.googleapis.com/Webhook"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook].
|
||||||
|
message CreateWebhookRequest {
|
||||||
|
// Required. The agent to create a webhook for.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
|
||||||
|
string parent = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
child_type: "dialogflow.googleapis.com/Webhook"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
// Required. The webhook to create.
|
||||||
|
Webhook webhook = 2 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook].
|
||||||
|
message UpdateWebhookRequest {
|
||||||
|
// Required. The webhook to update.
|
||||||
|
Webhook webhook = 1 [(google.api.field_behavior) = REQUIRED];
|
||||||
|
|
||||||
|
// The mask to control which fields get updated. If the mask is not present,
|
||||||
|
// all fields will be updated.
|
||||||
|
google.protobuf.FieldMask update_mask = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for [Webhooks.DeleteWebhook][google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhook].
|
||||||
|
message DeleteWebhookRequest {
|
||||||
|
// Required. The name of the webhook to delete.
|
||||||
|
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||||
|
// ID>/webhooks/<Webhook ID>`.
|
||||||
|
string name = 1 [
|
||||||
|
(google.api.field_behavior) = REQUIRED,
|
||||||
|
(google.api.resource_reference) = {
|
||||||
|
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.v3.Fulfillment.webhook]
|
||||||
|
// and [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that point to this webhook
|
||||||
|
// will be removed).
|
||||||
|
bool force = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The request message for a webhook call.
|
||||||
|
message WebhookRequest {
|
||||||
|
// Represents fulfillment information communicated to the webhook.
|
||||||
|
message FulfillmentInfo {
|
||||||
|
// Always present. The tag used to identify which fulfillment is being
|
||||||
|
// called.
|
||||||
|
string tag = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents intent information communicated to the webhook.
|
||||||
|
message IntentInfo {
|
||||||
|
// Represents a value for an intent parameter.
|
||||||
|
message IntentParameterValue {
|
||||||
|
// Always present. Original text value extracted from user utterance.
|
||||||
|
string original_value = 1;
|
||||||
|
|
||||||
|
// Always present. Structured value for the parameter extracted from user
|
||||||
|
// utterance.
|
||||||
|
google.protobuf.Value resolved_value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always present. The unique identifier of the last matched
|
||||||
|
// [intent][google.cloud.dialogflow.cx.v3.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"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// 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
|
||||||
|
// identified from the user's utterance. All parameters defined in the
|
||||||
|
// matched intent that are identified will be surfaced here.
|
||||||
|
map<string, IntentParameterValue> parameters = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that
|
||||||
|
// will be returned to the API caller.
|
||||||
|
string detect_intent_response_id = 1;
|
||||||
|
|
||||||
|
// Always present. Information about the fulfillment that triggered this
|
||||||
|
// webhook call.
|
||||||
|
FulfillmentInfo fulfillment_info = 6;
|
||||||
|
|
||||||
|
// Information about the last matched intent.
|
||||||
|
IntentInfo intent_info = 3;
|
||||||
|
|
||||||
|
// Information about page status.
|
||||||
|
PageInfo page_info = 4;
|
||||||
|
|
||||||
|
// Information about session status.
|
||||||
|
SessionInfo session_info = 5;
|
||||||
|
|
||||||
|
// The list of rich message responses to present to the user. Webhook can
|
||||||
|
// choose to append or replace this list in
|
||||||
|
// [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response];
|
||||||
|
repeated ResponseMessage messages = 7;
|
||||||
|
|
||||||
|
// Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload].
|
||||||
|
google.protobuf.Struct payload = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The response message for a webhook call.
|
||||||
|
message WebhookResponse {
|
||||||
|
// Represents a fulfillment response to the user.
|
||||||
|
message FulfillmentResponse {
|
||||||
|
// Defines merge behavior for `messages`.
|
||||||
|
enum MergeBehavior {
|
||||||
|
// Not specified. `APPEND` will be used.
|
||||||
|
MERGE_BEHAVIOR_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// `messages` will be appended to the list of messages waiting to be sent
|
||||||
|
// to the user.
|
||||||
|
APPEND = 1;
|
||||||
|
|
||||||
|
// `messages` will replace the list of messages waiting to be sent to the
|
||||||
|
// user.
|
||||||
|
REPLACE = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The list of rich message responses to present to the user.
|
||||||
|
repeated ResponseMessage messages = 1;
|
||||||
|
|
||||||
|
// Merge behavior for `messages`.
|
||||||
|
MergeBehavior merge_behavior = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The fulfillment response to send to the user. This field can be omitted by
|
||||||
|
// the webhook if it does not intend to send any response to the user.
|
||||||
|
FulfillmentResponse fulfillment_response = 1;
|
||||||
|
|
||||||
|
// Information about page status. This field can be omitted by the webhook if
|
||||||
|
// it does not intend to modify page status.
|
||||||
|
PageInfo page_info = 2;
|
||||||
|
|
||||||
|
// Information about session status. This field can be omitted by the webhook
|
||||||
|
// 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.v3.QueryResult.webhook_payloads].
|
||||||
|
google.protobuf.Struct payload = 4;
|
||||||
|
|
||||||
|
// The target to transition to. This can be set optionally to indicate an
|
||||||
|
// immediate transition to a different page in the same host flow, or a
|
||||||
|
// different flow in the same agent.
|
||||||
|
oneof transition {
|
||||||
|
// 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 = 5 [(google.api.resource_reference) = {
|
||||||
|
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"
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Represents page information communicated to and from the webhook.
|
||||||
|
message PageInfo {
|
||||||
|
// Represents form information.
|
||||||
|
message FormInfo {
|
||||||
|
// Represents parameter information.
|
||||||
|
message ParameterInfo {
|
||||||
|
// Represents the state of a parameter.
|
||||||
|
enum ParameterState {
|
||||||
|
// Not specified. This value should be never used.
|
||||||
|
PARAMETER_STATE_UNSPECIFIED = 0;
|
||||||
|
|
||||||
|
// Indicates that the parameter does not have a value.
|
||||||
|
EMPTY = 1;
|
||||||
|
|
||||||
|
// Indicates that the parameter value is invalid. This field can be used
|
||||||
|
// by the webhook to invalidate the parameter and ask the server to
|
||||||
|
// collect it from the user again.
|
||||||
|
INVALID = 2;
|
||||||
|
|
||||||
|
// Indicates that the parameter has a value.
|
||||||
|
FILLED = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Required for
|
||||||
|
// [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest]. Required for
|
||||||
|
// [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The state of the parameter. This field can be set
|
||||||
|
// to [INVALID][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
|
||||||
|
// The unique identifier of the [session][google.cloud.dialogflow.cx.v3.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"
|
||||||
|
}];
|
||||||
|
|
||||||
|
// Optional for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional for [WebhookResponse][google.cloud.dialogflow.cx.v3.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.v3.WebhookResponse]. The map is keyed by parameters'
|
||||||
|
// display names.
|
||||||
|
map<string, google.protobuf.Value> parameters = 2;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user