Synchronize new proto/yaml changes.

PiperOrigin-RevId: 264715099
pull/571/head
Google APIs 6 years ago committed by Copybara-Service
parent 77e5e0eeab
commit 2a928b017f
  1. 4
      google/cloud/dialogflow/dialogflow_v2beta1.yaml
  2. 245
      google/cloud/dialogflow/v2beta1/BUILD.bazel
  3. 30
      google/cloud/dialogflow/v2beta1/session.proto

@ -95,8 +95,12 @@ http:
rules:
- selector: google.longrunning.Operations.GetOperation
get: '/v2beta1/{name=projects/*/operations/*}'
additional_bindings:
- get: '/v2beta1/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.ListOperations
get: '/v2beta1/{name=projects/*}/operations'
additional_bindings:
- get: '/v2beta1/{name=projects/*/locations/*}/operations'
authentication:
rules:

@ -1,178 +1,153 @@
# This file was automatically generated.
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
################################################################################
# Common
##############################################################################
################################################################################
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "dialogflow_proto",
srcs = [
"agent.proto",
"audio_config.proto",
"context.proto",
"document.proto",
"entity_type.proto",
"intent.proto",
"knowledge_base.proto",
"session.proto",
"session_entity_type.proto",
"webhook.proto",
],
name = "agent_proto",
srcs = ["agent.proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/rpc:status_proto",
"//google/type:latlng_proto",
"//google/api:field_behavior_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 = "dialogflow_proto_with_info",
deps = [":dialogflow_proto"],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_grpc_library",
"java_gapic_library",
"java_gapic_assembly_gradle_pkg",
"java_proto_library",
"java_resource_name_proto_library",
"java_test",
)
_JAVA_GRPC_DEPS = [
"@com_google_api_grpc_proto_google_common_protos//jar",
]
java_proto_library(
name = "dialogflow_java_proto",
deps = [":dialogflow_proto"],
proto_library(
name = "audio_config_proto",
srcs = ["audio_config.proto"],
deps = [
"@com_google_protobuf//:duration_proto",
],
)
java_grpc_library(
name = "dialogflow_java_grpc",
srcs = [":dialogflow_proto"],
deps = [":dialogflow_java_proto"] + _JAVA_GRPC_DEPS,
proto_library(
name = "context_proto",
srcs = ["context.proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:struct_proto",
],
)
java_resource_name_proto_library(
name = "dialogflow_resource_name_java_proto",
gapic_yaml = "dialogflow_gapic.yaml",
deps = [":dialogflow_proto"],
proto_library(
name = "document_proto",
srcs = ["document.proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/longrunning:operations_proto",
"//google/rpc:status_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
java_gapic_library(
name = "dialogflow_java_gapic",
src = ":dialogflow_proto_with_info",
gapic_yaml = "dialogflow_gapic.yaml",
service_yaml = "//google/cloud/dialogflow:dialogflow_v2beta1.yaml",
test_deps = [":dialogflow_java_grpc"],
proto_library(
name = "entity_type_proto",
srcs = ["entity_type.proto"],
deps = [
":dialogflow_java_proto",
":dialogflow_resource_name_java_proto",
] + _JAVA_GRPC_DEPS,
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/longrunning:operations_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:struct_proto",
],
)
[java_test(
name = test_name,
test_class = test_name,
runtime_deps = [
":dialogflow_java_gapic_test",
proto_library(
name = "intent_proto",
srcs = ["intent.proto"],
deps = [
":audio_config_proto",
":context_proto",
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/longrunning:operations_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:struct_proto",
],
) for test_name in [
"com.google.cloud.dialogflow.v2beta1.AgentsClientTest",
"com.google.cloud.dialogflow.v2beta1.ContextsClientTest",
"com.google.cloud.dialogflow.v2beta1.EntityTypesClientTest",
"com.google.cloud.dialogflow.v2beta1.DocumentsClientTest",
"com.google.cloud.dialogflow.v2beta1.IntentsClientTest",
"com.google.cloud.dialogflow.v2beta1.SessionEntityTypesClientTest",
"com.google.cloud.dialogflow.v2beta1.SessionsClientTest",
"com.google.cloud.dialogflow.v2beta1.KnowledgeBasesClientTest",
]]
# Opensource Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-dialogflow-v2beta1-java",
client_deps = [":dialogflow_java_gapic"],
client_group = "com.google.cloud",
client_test_deps = [":dialogflow_java_gapic_test"],
grpc_deps = [":dialogflow_java_grpc"],
grpc_group = "com.google.api.grpc",
proto_deps = [
":dialogflow_java_proto",
":dialogflow_proto",
":dialogflow_resource_name_java_proto",
] + _JAVA_GRPC_DEPS,
version = "0.0.0-SNAPSHOT",
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_proto_library",
"go_test",
"go_gapic_library",
"go_gapic_assembly_pkg",
proto_library(
name = "knowledge_base_proto",
srcs = ["knowledge_base.proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
],
)
go_proto_library(
name = "dialogflow_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1",
protos = [":dialogflow_proto"],
proto_library(
name = "session_proto",
srcs = ["session.proto"],
deps = [
"//google/api:annotations_go_proto",
"//google/longrunning:longrunning_go_proto",
"//google/rpc:status_go_proto",
"//google/type:latlng_go_proto",
":agent_proto",
":audio_config_proto",
":context_proto",
":intent_proto",
":session_entity_type_proto",
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/rpc:status_proto",
"//google/type:latlng_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:struct_proto",
],
)
go_gapic_library(
name = "dialogflow_go_gapic",
src = ":dialogflow_proto_with_info",
gapic_yaml = "dialogflow_gapic.yaml",
importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1",
service_yaml = "//google/cloud/dialogflow:dialogflow_v2beta1.yaml",
proto_library(
name = "session_entity_type_proto",
srcs = ["session_entity_type.proto"],
deps = [
":dialogflow_go_proto",
"//google/longrunning:longrunning_go_gapic",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
":entity_type_proto",
"//google/api:annotations_proto",
"//google/api:client_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
],
)
go_test(
name = "dialogflow_go_gapic_test",
srcs = [":dialogflow_go_gapic_srcjar_test"],
embed = [":dialogflow_go_gapic"],
importpath = "cloud.google.com/go/cloud/dialogflow/apiv2beta1",
proto_library(
name = "webhook_proto",
srcs = ["webhook.proto"],
deps = [
":context_proto",
":intent_proto",
":session_entity_type_proto",
":session_proto",
"@com_google_protobuf//:struct_proto",
],
)
# Opensource Packages
go_gapic_assembly_pkg(
name = "gapi-cloud-dialogflow-v2beta1-go",
proto_library_with_info(
name = "dialogflow_proto_with_info",
deps = [
":dialogflow_go_gapic",
":dialogflow_go_gapic_srcjar-smoke-test.srcjar",
":dialogflow_go_gapic_srcjar-test.srcjar",
":dialogflow_go_proto",
":agent_proto",
":audio_config_proto",
":context_proto",
":document_proto",
":entity_type_proto",
":intent_proto",
":knowledge_base_proto",
":session_proto",
":session_entity_type_proto",
":webhook_proto",
],
)

@ -363,16 +363,32 @@ message KnowledgeAnswers {
}
// The top-level message sent by the client to the
// `StreamingDetectIntent` method.
// [StreamingDetectIntent][] method.
//
// Multiple request messages should be sent in order:
//
// 1. The first message must contain `session`, `query_input` plus optionally
// `query_params`. If the client wants to receive an audio response, it
// should also contain `output_audio_config`. The message must not contain
// `input_audio`.
// 2. If `query_input` was set to a streaming input audio config,
// all subsequent messages must contain `input_audio`. Otherwise, finish the request stream.
// 1. The first message must contain [StreamingDetectIntentRequest.session][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.session],
// [StreamingDetectIntentRequest.query_input] plus optionally
// [StreamingDetectIntentRequest.query_params]. If the client wants to
// receive an audio response, it should also contain
// [StreamingDetectIntentRequest.output_audio_config][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.output_audio_config]. The message
// must not contain [StreamingDetectIntentRequest.input_audio][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.input_audio].
// 2. If [StreamingDetectIntentRequest.query_input][google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest.query_input] was set to
// [StreamingDetectIntentRequest.query_input.audio_config][], all subsequent
// messages must contain [StreamingDetectIntentRequest.input_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
// [StreamingDetectIntentRequest.query_input.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 {
// Required. The name of the session the query is sent to.
// Format of the session name:

Loading…
Cancel
Save