properties = 2;
+
+ // The set of optional components to activate on the cluster.
+ repeated Component optional_components = 3;
}
// Contains cluster daemon metrics, such as HDFS and YARN stats.
@@ -547,9 +691,10 @@ message UpdateClusterRequest {
// }
// }
//
- // Similarly, to change the number of preemptible workers in a cluster to 5, the
- // `update_mask` parameter would be `config.secondary_worker_config.num_instances`,
- // and the `PATCH` request body would be set as follows:
+ // Similarly, to change the number of preemptible workers in a cluster to 5,
+ // the `update_mask` parameter would be
+ // `config.secondary_worker_config.num_instances`, and the `PATCH` request
+ // body would be set as follows:
//
// {
// "config":{
@@ -568,19 +713,28 @@ message UpdateClusterRequest {
// | labels | Updates labels |
//
//
- // | config.worker_config.num_instances | Resize primary worker group |
+ // config.worker_config.num_instances | Resize primary worker
+ // group |
+ //
+ //
+ // | config.secondary_worker_config.num_instances | Resize secondary
+ // worker group |
//
//
- // | config.secondary_worker_config.num_instances | Resize secondary worker group |
+ // config.lifecycle_config.auto_delete_ttl | Reset MAX TTL
+ // duration |
//
//
- // | config.lifecycle_config.auto_delete_ttl | Reset MAX TTL duration |
+ // config.lifecycle_config.auto_delete_time | Update MAX TTL
+ // deletion timestamp |
//
//
- // | config.lifecycle_config.auto_delete_time | Update MAX TTL deletion timestamp |
+ // config.lifecycle_config.idle_delete_ttl | Update Idle TTL
+ // duration |
//
//
- // | config.lifecycle_config.idle_delete_ttl | Update Idle TTL duration |
+ // config.autoscaling_config.policy_uri | Use, stop using, or change
+ // autoscaling policies |
//
//
google.protobuf.FieldMask update_mask = 4;
@@ -710,3 +864,30 @@ message DiagnoseClusterResults {
// diagnostics.
string output_uri = 1;
}
+
+// Reservation Affinity for consuming Zonal reservation.
+message ReservationAffinity {
+ // Indicates whether to consume capacity from an reservation or not.
+ enum Type {
+ TYPE_UNSPECIFIED = 0;
+
+ // Do not consume from any allocated capacity.
+ NO_RESERVATION = 1;
+
+ // Consume any reservation available.
+ ANY_RESERVATION = 2;
+
+ // Must consume from a specific reservation. Must specify key value fields
+ // for specifying the reservations.
+ SPECIFIC_RESERVATION = 3;
+ }
+
+ // Optional. Type of reservation to consume
+ Type consume_reservation_type = 1;
+
+ // Optional. Corresponds to the label key of reservation resource.
+ string key = 2;
+
+ // Optional. Corresponds to the label values of reservation resource.
+ repeated string values = 3;
+}
diff --git a/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc.yaml b/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc.yaml
index 67a40809a..af68853d5 100644
--- a/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc.yaml
+++ b/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc.yaml
@@ -4,6 +4,7 @@ name: dataproc.googleapis.com
title: Google Cloud Dataproc API
apis:
+- name: google.cloud.dataproc.v1beta2.AutoscalingPolicyService
- name: google.cloud.dataproc.v1beta2.ClusterController
- name: google.cloud.dataproc.v1beta2.JobController
- name: google.cloud.dataproc.v1beta2.WorkflowTemplateService
diff --git a/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml b/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml
index 2aecbd8c0..576bfc8e2 100644
--- a/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml
+++ b/third_party/googleapis/google/cloud/dataproc/v1beta2/dataproc_gapic.yaml
@@ -17,15 +17,159 @@ language_settings:
nodejs:
package_name: dataproc.v1beta2
domain_layer_location: google-cloud
-# The configuration for the license header to put on generated files.
-license_header:
- # The file containing the copyright line(s).
- copyright_file: copyright-google.txt
- # The file containing the raw license header without any copyright line(s).
- license_file: license-header-apache-2.0.txt
# A list of API interface configurations.
interfaces:
- # The fully qualified name of the API interface.
+# The fully qualified name of the API interface.
+- name: google.cloud.dataproc.v1beta2.AutoscalingPolicyService
+ # A list of resource collection configurations.
+ # Consists of a name_pattern and an entity_name.
+ # The name_pattern is a pattern to describe the names of the resources of this
+ # collection, using the platform's conventions for URI patterns. A generator
+ # may use this to generate methods to compose and decompose such names. The
+ # pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
+ # those will be taken as hints for the parameter names of the generated
+ # methods. If empty, no name methods are generated.
+ # The entity_name is the name to be used as a basis for generated methods and
+ # classes.
+ collections:
+ - name_pattern: projects/{project}/regions/{region}
+ entity_name: region
+ - name_pattern: projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}
+ entity_name: autoscaling_policy
+ # Definition for retryable codes.
+ retry_codes_def:
+ - name: idempotent
+ retry_codes:
+ - DEADLINE_EXCEEDED
+ - UNAVAILABLE
+ - name: non_idempotent
+ retry_codes: []
+ # Definition for retry/backoff parameters.
+ retry_params_def:
+ - name: default
+ initial_retry_delay_millis: 100
+ retry_delay_multiplier: 1.3
+ max_retry_delay_millis: 60000
+ initial_rpc_timeout_millis: 20000
+ rpc_timeout_multiplier: 1
+ max_rpc_timeout_millis: 20000
+ total_timeout_millis: 600000
+ # A list of method configurations.
+ # Common properties:
+ #
+ # name - The simple name of the method.
+ #
+ # flattening - Specifies the configuration for parameter flattening.
+ # Describes the parameter groups for which a generator should produce method
+ # overloads which allow a client to directly pass request message fields as
+ # method parameters. This information may or may not be used, depending on
+ # the target language.
+ # Consists of groups, which each represent a list of parameters to be
+ # flattened. Each parameter listed must be a field of the request message.
+ #
+ # required_fields - Fields that are always required for a request to be
+ # valid.
+ #
+ # page_streaming - Specifies the configuration for paging.
+ # Describes information for generating a method which transforms a paging
+ # list RPC into a stream of resources.
+ # Consists of a request and a response.
+ # The request specifies request information of the list method. It defines
+ # which fields match the paging pattern in the request. The request consists
+ # of a page_size_field and a token_field. The page_size_field is the name of
+ # the optional field specifying the maximum number of elements to be
+ # returned in the response. The token_field is the name of the field in the
+ # request containing the page token.
+ # The response specifies response information of the list method. It defines
+ # which fields match the paging pattern in the response. The response
+ # consists of a token_field and a resources_field. The token_field is the
+ # name of the field in the response containing the next page token. The
+ # resources_field is the name of the field in the response containing the
+ # list of resources belonging to the page.
+ #
+ # retry_codes_name - Specifies the configuration for retryable codes. The
+ # name must be defined in interfaces.retry_codes_def.
+ #
+ # retry_params_name - Specifies the configuration for retry/backoff
+ # parameters. The name must be defined in interfaces.retry_params_def.
+ #
+ # field_name_patterns - Maps the field name of the request type to
+ # entity_name of interfaces.collections.
+ # Specifies the string pattern that the field must follow.
+ #
+ # timeout_millis - Specifies the default timeout for a non-retrying call. If
+ # the call is retrying, refer to retry_params_name instead.
+ methods:
+ - name: CreateAutoscalingPolicy
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - policy
+ required_fields:
+ - parent
+ - policy
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: region
+ timeout_millis: 60000
+ - name: UpdateAutoscalingPolicy
+ flattening:
+ groups:
+ - parameters:
+ - policy
+ required_fields:
+ - policy
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ policy.name: autoscaling_policy
+ timeout_millis: 60000
+ - name: GetAutoscalingPolicy
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: autoscaling_policy
+ timeout_millis: 60000
+ - name: ListAutoscalingPolicies
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ page_streaming:
+ request:
+ page_size_field: page_size
+ token_field: page_token
+ response:
+ token_field: next_page_token
+ resources_field: policies
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: region
+ timeout_millis: 60000
+ - name: DeleteAutoscalingPolicy
+ flattening:
+ groups:
+ - parameters:
+ - name
+ required_fields:
+ - name
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ name: autoscaling_policy
+ timeout_millis: 60000
+# The fully qualified name of the API interface.
- name: google.cloud.dataproc.v1beta2.ClusterController
# A list of resource collection configurations.
# Consists of a name_pattern and an entity_name.
@@ -48,10 +192,12 @@ interfaces:
retry_codes_def:
- name: idempotent
retry_codes:
- - UNAVAILABLE
+ - INTERNAL
- DEADLINE_EXCEEDED
+ - UNAVAILABLE
- name: non_idempotent
- retry_codes: []
+ retry_codes:
+ - UNAVAILABLE
# Definition for retry/backoff parameters.
retry_params_def:
- name: default
@@ -78,19 +224,6 @@ interfaces:
# required_fields - Fields that are always required for a request to be
# valid.
#
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate this
- # method.
- #
- # resource_name_treatment - An enum that specifies how to treat the resource
- # name formats defined in the field_name_patterns and
- # response_field_name_patterns fields.
- # UNSET: default value
- # NONE: the collection configs will not be used by the generated code.
- # VALIDATE: string fields will be validated by the client against the
- # specified resource name formats.
- # STATIC_TYPES: the client will use generated types for resource names.
- #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a paging
# list RPC into a stream of resources.
@@ -132,39 +265,45 @@ interfaces:
- project_id
- region
- cluster
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
timeout_millis: 30000
long_running:
return_type: google.cloud.dataproc.v1beta2.Cluster
metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
- implements_delete: true
+ implements_delete: false
implements_cancel: false
initial_poll_delay_millis: 1000
poll_delay_multiplier: 2
max_poll_delay_millis: 10000
- total_poll_timeout_millis: 300000
+ total_poll_timeout_millis: 900000
- name: UpdateCluster
+ flattening:
+ groups:
+ - parameters:
+ - project_id
+ - region
+ - cluster_name
+ - cluster
+ - update_mask
required_fields:
- project_id
- region
- cluster_name
- cluster
- update_mask
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
timeout_millis: 30000
long_running:
return_type: google.cloud.dataproc.v1beta2.Cluster
metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
- implements_delete: true
+ implements_delete: false
implements_cancel: false
initial_poll_delay_millis: 1000
poll_delay_multiplier: 2
max_poll_delay_millis: 10000
- total_poll_timeout_millis: 300000
+ total_poll_timeout_millis: 900000
- name: DeleteCluster
flattening:
groups:
@@ -176,19 +315,18 @@ interfaces:
- project_id
- region
- cluster_name
- request_object_method: true
- retry_codes_name: idempotent
+ retry_codes_name: non_idempotent
retry_params_name: default
- timeout_millis: 60000
+ timeout_millis: 30000
long_running:
return_type: google.protobuf.Empty
metadata_type: google.cloud.dataproc.v1beta2.ClusterOperationMetadata
- implements_delete: true
+ implements_delete: false
implements_cancel: false
initial_poll_delay_millis: 1000
poll_delay_multiplier: 2
max_poll_delay_millis: 10000
- total_poll_timeout_millis: 300000
+ total_poll_timeout_millis: 900000
- name: GetCluster
flattening:
groups:
@@ -200,7 +338,6 @@ interfaces:
- project_id
- region
- cluster_name
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
timeout_millis: 60000
@@ -210,10 +347,13 @@ interfaces:
- parameters:
- project_id
- region
+ - parameters:
+ - project_id
+ - region
+ - filter
required_fields:
- project_id
- region
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -235,14 +375,13 @@ interfaces:
- project_id
- region
- cluster_name
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
timeout_millis: 60000
long_running:
return_type: google.protobuf.Empty
metadata_type: google.cloud.dataproc.v1beta2.DiagnoseClusterResults
- implements_delete: true
+ implements_delete: false
implements_cancel: false
initial_poll_delay_millis: 1000
poll_delay_multiplier: 2
@@ -265,10 +404,12 @@ interfaces:
retry_codes_def:
- name: idempotent
retry_codes:
- - UNAVAILABLE
- DEADLINE_EXCEEDED
+ - INTERNAL
+ - UNAVAILABLE
- name: non_idempotent
- retry_codes: []
+ retry_codes:
+ - UNAVAILABLE
# Definition for retry/backoff parameters.
retry_params_def:
- name: default
@@ -295,19 +436,6 @@ interfaces:
# required_fields - Fields that are always required for a request to be
# valid.
#
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate this
- # method.
- #
- # resource_name_treatment - An enum that specifies how to treat the resource
- # name formats defined in the field_name_patterns and
- # response_field_name_patterns fields.
- # UNSET: default value
- # NONE: the collection configs will not be used by the generated code.
- # VALIDATE: string fields will be validated by the client against the
- # specified resource name formats.
- # STATIC_TYPES: the client will use generated types for resource names.
- #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a paging
# list RPC into a stream of resources.
@@ -349,7 +477,6 @@ interfaces:
- project_id
- region
- job
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
timeout_millis: 30000
@@ -364,20 +491,22 @@ interfaces:
- project_id
- region
- job_id
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
- timeout_millis: 10000
+ timeout_millis: 30000
- name: ListJobs
flattening:
groups:
- parameters:
- project_id
- region
+ - parameters:
+ - project_id
+ - region
+ - filter
required_fields:
- project_id
- region
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -395,7 +524,6 @@ interfaces:
- job_id
- job
- update_mask
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
timeout_millis: 30000
@@ -410,8 +538,7 @@ interfaces:
- project_id
- region
- job_id
- request_object_method: true
- retry_codes_name: non_idempotent
+ retry_codes_name: idempotent
retry_params_name: default
timeout_millis: 30000
- name: DeleteJob
@@ -425,8 +552,7 @@ interfaces:
- project_id
- region
- job_id
- request_object_method: true
- retry_codes_name: idempotent
+ retry_codes_name: non_idempotent
retry_params_name: default
timeout_millis: 30000
# The fully qualified name of the API interface.
@@ -450,10 +576,12 @@ interfaces:
retry_codes_def:
- name: idempotent
retry_codes:
- - UNAVAILABLE
- DEADLINE_EXCEEDED
+ - INTERNAL
+ - UNAVAILABLE
- name: non_idempotent
- retry_codes: []
+ retry_codes:
+ - UNAVAILABLE
# Definition for retry/backoff parameters.
retry_params_def:
- name: default
@@ -480,19 +608,6 @@ interfaces:
# required_fields - Fields that are always required for a request to be
# valid.
#
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate this
- # method.
- #
- # resource_name_treatment - An enum that specifies how to treat the resource
- # name formats defined in the field_name_patterns and
- # response_field_name_patterns fields.
- # UNSET: default value
- # NONE: the collection configs will not be used by the generated code.
- # VALIDATE: string fields will be validated by the client against the
- # specified resource name formats.
- # STATIC_TYPES: the client will use generated types for resource names.
- #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a paging
# list RPC into a stream of resources.
@@ -532,13 +647,11 @@ interfaces:
required_fields:
- parent
- template
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
- resource_name_treatment: STATIC_TYPES
field_name_patterns:
parent: region
- timeout_millis: 60000
+ timeout_millis: 30000
- name: GetWorkflowTemplate
flattening:
groups:
@@ -546,10 +659,8 @@ interfaces:
- name
required_fields:
- name
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
- resource_name_treatment: STATIC_TYPES
field_name_patterns:
name: workflow_template
timeout_millis: 60000
@@ -558,21 +669,44 @@ interfaces:
groups:
- parameters:
- name
- - instance_id
+ - parameters:
+ - name
+ - parameters
required_fields:
- name
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
- resource_name_treatment: STATIC_TYPES
field_name_patterns:
name: workflow_template
timeout_millis: 60000
long_running:
return_type: google.protobuf.Empty
metadata_type: google.cloud.dataproc.v1beta2.WorkflowMetadata
- implements_delete: true
- implements_cancel: true
+ implements_delete: false
+ implements_cancel: false
+ initial_poll_delay_millis: 1000
+ poll_delay_multiplier: 2
+ max_poll_delay_millis: 10000
+ total_poll_timeout_millis: 43200000
+ - name: InstantiateInlineWorkflowTemplate
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ - template
+ required_fields:
+ - parent
+ - template
+ retry_codes_name: non_idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: region
+ timeout_millis: 60000
+ long_running:
+ return_type: google.protobuf.Empty
+ metadata_type: google.cloud.dataproc.v1beta2.WorkflowMetadata
+ implements_delete: false
+ implements_cancel: false
initial_poll_delay_millis: 1000
poll_delay_multiplier: 2
max_poll_delay_millis: 10000
@@ -584,9 +718,10 @@ interfaces:
- template
required_fields:
- template
- request_object_method: false
- retry_codes_name: idempotent
+ retry_codes_name: non_idempotent
retry_params_name: default
+ field_name_patterns:
+ template.name: workflow_template
timeout_millis: 60000
- name: ListWorkflowTemplates
flattening:
@@ -595,7 +730,6 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -605,7 +739,6 @@ interfaces:
resources_field: templates
retry_codes_name: idempotent
retry_params_name: default
- resource_name_treatment: STATIC_TYPES
field_name_patterns:
parent: region
timeout_millis: 60000
@@ -616,14 +749,27 @@ interfaces:
- name
required_fields:
- name
- request_object_method: true
- retry_codes_name: idempotent
+ retry_codes_name: non_idempotent
retry_params_name: default
- resource_name_treatment: STATIC_TYPES
field_name_patterns:
name: workflow_template
timeout_millis: 60000
resource_name_generation:
+- message_name: AutoscalingPolicy
+ field_entity_map:
+ name: autoscaling_policy
+- message_name: CreateAutoscalingPolicyRequest
+ field_entity_map:
+ parent: region
+- message_name: GetAutoscalingPolicyRequest
+ field_entity_map:
+ name: autoscaling_policy
+- message_name: ListAutoscalingPoliciesRequest
+ field_entity_map:
+ parent: region
+- message_name: DeleteAutoscalingPolicyRequest
+ field_entity_map:
+ name: autoscaling_policy
- message_name: WorkflowTemplate
field_entity_map:
name: workflow_template
@@ -636,6 +782,9 @@ resource_name_generation:
- message_name: InstantiateWorkflowTemplateRequest
field_entity_map:
name: workflow_template
+- message_name: InstantiateInlineWorkflowTemplateRequest
+ field_entity_map:
+ parent: region
- message_name: ListWorkflowTemplatesRequest
field_entity_map:
parent: region
diff --git a/third_party/googleapis/google/cloud/dataproc/v1beta2/jobs.proto b/third_party/googleapis/google/cloud/dataproc/v1beta2/jobs.proto
index d5635583e..4d888dafc 100644
--- a/third_party/googleapis/google/cloud/dataproc/v1beta2/jobs.proto
+++ b/third_party/googleapis/google/cloud/dataproc/v1beta2/jobs.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -26,7 +27,6 @@ option java_multiple_files = true;
option java_outer_classname = "JobsProto";
option java_package = "com.google.cloud.dataproc.v1beta2";
-
// The JobController provides methods to manage jobs.
service JobController {
// Submits a job to a cluster.
@@ -61,7 +61,8 @@ service JobController {
// Starts a job cancellation request. To access the job resource
// after cancellation, call
- // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list) or
+ // [regions/{region}/jobs.list](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list)
+ // or
// [regions/{region}/jobs.get](/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
rpc CancelJob(CancelJobRequest) returns (Job) {
option (google.api.http) = {
@@ -121,8 +122,10 @@ message LoggingConfig {
}
// A Cloud Dataproc job for running
-// [Apache Hadoop MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
-// jobs on [Apache Hadoop YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
+// [Apache Hadoop
+// MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
+// jobs on [Apache Hadoop
+// YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
message HadoopJob {
// Required. Indicates the location of the driver's main class. Specify
// either the jar file that contains the main class or the main class name.
@@ -142,8 +145,8 @@ message HadoopJob {
}
// Optional. The arguments to pass to the driver. Do not
- // include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
- // properties, since a collision may occur that causes an incorrect job
+ // include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as
+ // job properties, since a collision may occur that causes an incorrect job
// submission.
repeated string args = 3;
@@ -177,7 +180,8 @@ message SparkJob {
// Required. The specification of the main method to call to drive the job.
// Specify either the jar file that contains the main class or the main class
// name. To pass both a main jar and a main class in that jar, add the jar to
- // `CommonJob.jar_file_uris`, and then specify the main class name in `main_class`.
+ // `CommonJob.jar_file_uris`, and then specify the main class name in
+ // `main_class`.
oneof driver {
// The HCFS URI of the jar file that contains the main class.
string main_jar_file_uri = 1;
@@ -216,7 +220,8 @@ message SparkJob {
}
// A Cloud Dataproc job for running
-// [Apache PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
+// [Apache
+// PySpark](https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
// applications on YARN.
message PySparkJob {
// Required. The HCFS URI of the main Python file to use as the driver. Must
@@ -287,8 +292,8 @@ message HiveJob {
}
// Optional. Whether to continue executing queries if a query fails.
- // The default value is `false`. Setting to `true` can be useful when executing
- // independent parallel queries.
+ // The default value is `false`. Setting to `true` can be useful when
+ // executing independent parallel queries.
bool continue_on_failure = 3;
// Optional. Mapping of query variable names to values (equivalent to the
@@ -307,8 +312,8 @@ message HiveJob {
repeated string jar_file_uris = 6;
}
-// A Cloud Dataproc job for running [Apache Spark SQL](http://spark.apache.org/sql/)
-// queries.
+// A Cloud Dataproc job for running [Apache Spark
+// SQL](http://spark.apache.org/sql/) queries.
message SparkSqlJob {
// Required. The sequence of Spark SQL queries to execute, specified as
// either an HCFS file URI or as a list of queries.
@@ -350,8 +355,8 @@ message PigJob {
}
// Optional. Whether to continue executing queries if a query fails.
- // The default value is `false`. Setting to `true` can be useful when executing
- // independent parallel queries.
+ // The default value is `false`. Setting to `true` can be useful when
+ // executing independent parallel queries.
bool continue_on_failure = 3;
// Optional. Mapping of query variable names to values (equivalent to the Pig
@@ -372,6 +377,38 @@ message PigJob {
LoggingConfig logging_config = 7;
}
+// A Cloud Dataproc job for running
+// [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
+// applications on YARN.
+message SparkRJob {
+ // Required. The HCFS URI of the main R file to use as the driver.
+ // Must be a .R file.
+ string main_r_file_uri = 1;
+
+ // Optional. The arguments to pass to the driver. Do not include arguments,
+ // such as `--conf`, that can be set as job properties, since a collision may
+ // occur that causes an incorrect job submission.
+ repeated string args = 2;
+
+ // Optional. HCFS URIs of files to be copied to the working directory of
+ // R drivers and distributed tasks. Useful for naively parallel tasks.
+ repeated string file_uris = 3;
+
+ // Optional. HCFS URIs of archives to be extracted in the working directory of
+ // Spark drivers and tasks. Supported file types:
+ // .jar, .tar, .tar.gz, .tgz, and .zip.
+ repeated string archive_uris = 4;
+
+ // Optional. A mapping of property names to values, used to configure SparkR.
+ // Properties that conflict with values set by the Cloud Dataproc API may be
+ // overwritten. Can include properties set in
+ // /etc/spark/conf/spark-defaults.conf and classes in user code.
+ map properties = 5;
+
+ // Optional. The runtime log config for job execution.
+ LoggingConfig logging_config = 6;
+}
+
// Cloud Dataproc job config.
message JobPlacement {
// Required. The name of the cluster where the job will be submitted.
@@ -468,11 +505,12 @@ message JobReference {
// belongs to.
string project_id = 1;
- // Optional. The job ID, which must be unique within the project. The job ID
- // is generated by the server upon job submission or provided by the user as a
- // means to perform retries without creating duplicate jobs. The ID must
- // contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or
- // hyphens (-). The maximum length is 100 characters.
+ // Optional. The job ID, which must be unique within the project.
+ //
+ // The ID must contain only letters (a-z, A-Z), numbers (0-9),
+ // underscores (_), or hyphens (-). The maximum length is 100 characters.
+ //
+ // If not specified by the caller, the job ID will be provided by the server.
string job_id = 2;
}
@@ -558,6 +596,9 @@ message Job {
// Job is a Pig job.
PigJob pig_job = 7;
+ // Job is a SparkR job.
+ SparkRJob spark_r_job = 21;
+
// Job is a SparkSql job.
SparkSqlJob spark_sql_job = 12;
}
@@ -572,10 +613,14 @@ message Job {
// Output only. The collection of YARN applications spun up by this job.
//
- // **Beta** Feature: This report is available for testing purposes only. It may
- // be changed before final release.
+ // **Beta** Feature: This report is available for testing purposes only. It
+ // may be changed before final release.
repeated YarnApplication yarn_applications = 9;
+ // Output only. The email address of the user submitting the job. For jobs
+ // submitted on the cluster, the address is username@hostname.
+ string submitted_by = 10;
+
// Output only. A URI pointing to the location of the stdout of the job's
// driver program.
string driver_output_resource_uri = 17;
@@ -589,12 +634,18 @@ message Job {
// Label **keys** must contain 1 to 63 characters, and must conform to
// [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
// Label **values** may be empty, but, if present, must contain 1 to 63
- // characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
- // No more than 32 labels can be associated with a job.
+ // characters, and must conform to [RFC
+ // 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be
+ // associated with a job.
map labels = 18;
// Optional. Job scheduling configuration.
JobScheduling scheduling = 20;
+
+ // Output only. A UUID that uniquely identifies a job within the project
+ // over time. This is in contrast to a user-settable reference.job_id that
+ // may be reused over time.
+ string job_uuid = 22;
}
// Job scheduling options.
diff --git a/third_party/googleapis/google/cloud/dataproc/v1beta2/operations.proto b/third_party/googleapis/google/cloud/dataproc/v1beta2/operations.proto
index 8c428dae2..8f9252a46 100644
--- a/third_party/googleapis/google/cloud/dataproc/v1beta2/operations.proto
+++ b/third_party/googleapis/google/cloud/dataproc/v1beta2/operations.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -24,7 +25,6 @@ option java_multiple_files = true;
option java_outer_classname = "OperationsProto";
option java_package = "com.google.cloud.dataproc.v1beta2";
-
// The status of the operation.
message ClusterOperationStatus {
// The operation state.
diff --git a/third_party/googleapis/google/cloud/dataproc/v1beta2/shared.proto b/third_party/googleapis/google/cloud/dataproc/v1beta2/shared.proto
index 801708a52..de1130d9c 100644
--- a/third_party/googleapis/google/cloud/dataproc/v1beta2/shared.proto
+++ b/third_party/googleapis/google/cloud/dataproc/v1beta2/shared.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -23,3 +24,32 @@ option java_multiple_files = true;
option java_outer_classname = "SharedProto";
option java_package = "com.google.cloud.dataproc.v1beta2";
+// Cluster components that can be activated.
+enum Component {
+ // Unspecified component.
+ COMPONENT_UNSPECIFIED = 0;
+
+ // The Anaconda python distribution.
+ ANACONDA = 5;
+
+ // The Druid query engine.
+ DRUID = 9;
+
+ // The Hive Web HCatalog (the REST service for accessing HCatalog).
+ HIVE_WEBHCAT = 3;
+
+ // The Jupyter Notebook.
+ JUPYTER = 1;
+
+ // The Kerberos security feature.
+ KERBEROS = 7;
+
+ // The Presto query engine.
+ PRESTO = 6;
+
+ // The Zeppelin notebook.
+ ZEPPELIN = 4;
+
+ // The Zookeeper service.
+ ZOOKEEPER = 8;
+}
diff --git a/third_party/googleapis/google/cloud/dataproc/v1beta2/workflow_templates.proto b/third_party/googleapis/google/cloud/dataproc/v1beta2/workflow_templates.proto
index 4db43168c..edaf357cc 100644
--- a/third_party/googleapis/google/cloud/dataproc/v1beta2/workflow_templates.proto
+++ b/third_party/googleapis/google/cloud/dataproc/v1beta2/workflow_templates.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -28,7 +29,6 @@ option java_multiple_files = true;
option java_outer_classname = "WorkflowTemplatesProto";
option java_package = "com.google.cloud.dataproc.v1beta2";
-
// The API interface for managing Workflow Templates in the
// Cloud Dataproc API.
service WorkflowTemplateService {
@@ -110,10 +110,10 @@ service WorkflowTemplateService {
// [Empty][google.protobuf.Empty].
rpc InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
- post: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline"
+ post: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline"
body: "template"
additional_bindings {
- post: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline"
+ post: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates:instantiateInline"
body: "template"
}
};
@@ -160,6 +160,8 @@ message WorkflowTemplate {
// The id must contain only letters (a-z, A-Z), numbers (0-9),
// underscores (_), and hyphens (-). Cannot begin or end with underscore
// or hyphen. Must consist of between 3 and 50 characters.
+ //
+ // .
string id = 2;
// Output only. The "resource name" of the template, as described
@@ -203,6 +205,11 @@ message WorkflowTemplate {
// Required. The Directed Acyclic Graph of Jobs to submit.
repeated OrderedJob jobs = 8;
+
+ // Optional. Template parameters whose values are substituted into the
+ // template. Values for parameters must be provided when the template is
+ // instantiated.
+ repeated TemplateParameter parameters = 9;
}
// Specifies workflow execution target.
@@ -319,6 +326,105 @@ message OrderedJob {
repeated string prerequisite_step_ids = 10;
}
+// A configurable parameter that replaces one or more fields in the template.
+// Parameterizable fields:
+// - Labels
+// - File uris
+// - Job properties
+// - Job arguments
+// - Script variables
+// - Main class (in HadoopJob and SparkJob)
+// - Zone (in ClusterSelector)
+message TemplateParameter {
+ // Required. Parameter name.
+ // The parameter name is used as the key, and paired with the
+ // parameter value, which are passed to the template when the template
+ // is instantiated.
+ // The name must contain only capital letters (A-Z), numbers (0-9), and
+ // underscores (_), and must not start with a number. The maximum length is
+ // 40 characters.
+ string name = 1;
+
+ // Required. Paths to all fields that the parameter replaces.
+ // A field is allowed to appear in at most one parameter's list of field
+ // paths.
+ //
+ // A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask].
+ // For example, a field path that references the zone field of a workflow
+ // template's cluster selector would be specified as
+ // `placement.clusterSelector.zone`.
+ //
+ // Also, field paths can reference fields using the following syntax:
+ //
+ // * Values in maps can be referenced by key:
+ // * labels['key']
+ // * placement.clusterSelector.clusterLabels['key']
+ // * placement.managedCluster.labels['key']
+ // * placement.clusterSelector.clusterLabels['key']
+ // * jobs['step-id'].labels['key']
+ //
+ // * Jobs in the jobs list can be referenced by step-id:
+ // * jobs['step-id'].hadoopJob.mainJarFileUri
+ // * jobs['step-id'].hiveJob.queryFileUri
+ // * jobs['step-id'].pySparkJob.mainPythonFileUri
+ // * jobs['step-id'].hadoopJob.jarFileUris[0]
+ // * jobs['step-id'].hadoopJob.archiveUris[0]
+ // * jobs['step-id'].hadoopJob.fileUris[0]
+ // * jobs['step-id'].pySparkJob.pythonFileUris[0]
+ //
+ // * Items in repeated fields can be referenced by a zero-based index:
+ // * jobs['step-id'].sparkJob.args[0]
+ //
+ // * Other examples:
+ // * jobs['step-id'].hadoopJob.properties['key']
+ // * jobs['step-id'].hadoopJob.args[0]
+ // * jobs['step-id'].hiveJob.scriptVariables['key']
+ // * jobs['step-id'].hadoopJob.mainJarFileUri
+ // * placement.clusterSelector.zone
+ //
+ // It may not be possible to parameterize maps and repeated fields in their
+ // entirety since only individual map values and individual items in repeated
+ // fields can be referenced. For example, the following field paths are
+ // invalid:
+ //
+ // - placement.clusterSelector.clusterLabels
+ // - jobs['step-id'].sparkJob.args
+ repeated string fields = 2;
+
+ // Optional. Brief description of the parameter.
+ // Must not exceed 1024 characters.
+ string description = 3;
+
+ // Optional. Validation rules to be applied to this parameter's value.
+ ParameterValidation validation = 4;
+}
+
+// Configuration for parameter validation.
+message ParameterValidation {
+ // Required. The type of validation to be performed.
+ oneof validation_type {
+ // Validation based on regular expressions.
+ RegexValidation regex = 1;
+
+ // Validation based on a list of allowed values.
+ ValueValidation values = 2;
+ }
+}
+
+// Validation based on regular expressions.
+message RegexValidation {
+ // Required. RE2 regular expressions used to validate the parameter's value.
+ // The value must match the regex in its entirety (substring
+ // matches are not sufficient).
+ repeated string regexes = 1;
+}
+
+// Validation based on a list of allowed values.
+message ValueValidation {
+ // Required. List of allowed values for the parameter.
+ repeated string values = 1;
+}
+
// A Cloud Dataproc workflow template resource.
message WorkflowMetadata {
// The operation state.
@@ -355,11 +461,20 @@ message WorkflowMetadata {
// Output only. The workflow state.
State state = 6;
- // Output only. The name of the managed cluster.
+ // Output only. The name of the target cluster.
string cluster_name = 7;
// Map from parameter names to values that were used for those parameters.
map parameters = 8;
+
+ // Output only. Workflow start time.
+ google.protobuf.Timestamp start_time = 9;
+
+ // Output only. Workflow end time.
+ google.protobuf.Timestamp end_time = 10;
+
+ // Output only. The UUID of target cluster.
+ string cluster_uuid = 11;
}
// The cluster operation triggered by a workflow.
@@ -460,6 +575,9 @@ message InstantiateWorkflowTemplateRequest {
// workflow template.
int32 version = 2;
+ // Deprecated. Please use `request_id` field instead.
+ string instance_id = 3 [deprecated = true];
+
// Optional. A tag that prevents multiple concurrent workflow
// instances with the same tag from running. This mitigates risk of
// concurrent instances started due to retries.
@@ -469,7 +587,11 @@ message InstantiateWorkflowTemplateRequest {
//
// The tag must contain only letters (a-z, A-Z), numbers (0-9),
// underscores (_), and hyphens (-). The maximum length is 40 characters.
- string instance_id = 3;
+ string request_id = 5;
+
+ // Optional. Map from parameter names to values that should be used for those
+ // parameters. Values may not exceed 100 characters.
+ map parameters = 4;
}
// A request to instantiate an inline workflow template.
@@ -482,6 +604,9 @@ message InstantiateInlineWorkflowTemplateRequest {
// Required. The workflow template to instantiate.
WorkflowTemplate template = 2;
+ // Deprecated. Please use `request_id` field instead.
+ string instance_id = 3;
+
// Optional. A tag that prevents multiple concurrent workflow
// instances with the same tag from running. This mitigates risk of
// concurrent instances started due to retries.
@@ -491,7 +616,7 @@ message InstantiateInlineWorkflowTemplateRequest {
//
// The tag must contain only letters (a-z, A-Z), numbers (0-9),
// underscores (_), and hyphens (-). The maximum length is 40 characters.
- string instance_id = 3;
+ string request_id = 4;
}
// A request to update a workflow template.
@@ -522,8 +647,8 @@ message ListWorkflowTemplatesResponse {
// Output only. WorkflowTemplates list.
repeated WorkflowTemplate templates = 1;
- // Output only. This token is included in the response if there are more results
- // to fetch. To fetch additional results, provide this value as the
+ // Output only. This token is included in the response if there are more
+ // results to fetch. To fetch additional results, provide this value as the
// page_token in a subsequent ListWorkflowTemplatesRequest.
string next_page_token = 2;
}
diff --git a/third_party/googleapis/google/cloud/dialogflow/BUILD.bazel b/third_party/googleapis/google/cloud/dialogflow/BUILD.bazel
new file mode 100644
index 000000000..1e5b8c2af
--- /dev/null
+++ b/third_party/googleapis/google/cloud/dialogflow/BUILD.bazel
@@ -0,0 +1 @@
+exports_files(glob(["*.yaml"]))
\ No newline at end of file
diff --git a/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2.yaml b/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2.yaml
index edc57fd3a..c3c4c92c1 100644
--- a/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2.yaml
+++ b/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2.yaml
@@ -14,21 +14,6 @@ artifacts:
- name: java_gapic
type: GAPIC
language: JAVA
- publish_targets:
- - name: staging
- type: GITHUB
- location: git@github.com:googleapis/api-client-staging.git
- directory_mappings:
- - dest: generated/java/gapic-google-cloud-dialogflow-v2
- - name: grpc
- dest: generated/java/grpc-google-cloud-dialogflow-v2
- - name: proto
- dest: generated/java/proto-google-cloud-dialogflow-v2
- - name: java
- type: GITHUB
- location: git@github.com:GoogleCloudPlatform/google-cloud-java.git
- directory_mappings:
- - dest: google-cloud-dialogflow
- name: python_gapic
type: GAPIC
language: PYTHON
@@ -38,12 +23,6 @@ artifacts:
- name: php_gapic
type: GAPIC
language: PHP
- publish_targets:
- - name: staging
- type: GITHUB
- location: git@github.com:googleapis/api-client-staging.git
- directory_mappings:
- - dest: generated/php/google-cloud-dialogflow-v2
- name: go_gapic
type: GAPIC
language: GO
diff --git a/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml b/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml
index 455d68a98..9f13a0416 100644
--- a/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml
+++ b/third_party/googleapis/google/cloud/dialogflow/artman_dialogflow_v2beta1_java.yaml
@@ -13,18 +13,3 @@ artifacts:
type: GAPIC
language: JAVA
release_level: BETA
- publish_targets:
- - name: java
- type: GITHUB
- location: git@github.com:GoogleCloudPlatform/google-cloud-java.git
- directory_mappings:
- - dest: google-cloud-dialogflow
- - name: staging
- type: GITHUB
- location: git@github.com:googleapis/api-client-staging.git
- directory_mappings:
- - dest: generated/java/gapic-google-cloud-dialogflow-v2beta1
- - name: grpc
- dest: generated/java/grpc-google-cloud-dialogflow-v2beta1
- - name: proto
- dest: generated/java/proto-google-cloud-dialogflow-v2beta1
diff --git a/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2.yaml b/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2.yaml
index a89267709..2efbd3fef 100644
--- a/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2.yaml
+++ b/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2.yaml
@@ -12,26 +12,28 @@ apis:
- name: google.cloud.dialogflow.v2.Sessions
types:
-- name: google.cloud.dialogflow.v2.ExportAgentResponse
- name: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse
- name: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse
+- name: google.cloud.dialogflow.v2.ExportAgentResponse
- name: google.cloud.dialogflow.v2.OriginalDetectIntentRequest
- name: google.cloud.dialogflow.v2.WebhookRequest
- name: google.cloud.dialogflow.v2.WebhookResponse
documentation:
summary: |-
- An end-to-end development suite for conversational interfaces (e.g.,
- chatbots, voice-powered apps and devices).
+ Builds conversational interfaces (for example, chatbots, and voice-powered
+ apps and devices).
overview: |-
- [Dialogflow](http://dialogflow.com/) is a natural language understanding
- platform that makes it easy for you to design and integrate a conversational
- user interface into your mobile app, web application, device, bot, and so
- on. Using Dialogflow you can provide users new and engaging ways to interact
- with your product using both voice recognition and text input.
+ [Dialogflow](http://dialogflow.com/) is a natural language
+ understanding platform that makes it easy for you to design and integrate
+ a conversational user interface into your mobile app, web application,
+ device, bot, and so on. Using Dialogflow you can provide users new and
+ engaging ways to interact with your product using both voice recognition
+ and text input.
- For information on how Dialogflow agents, intents, entities, and so on work,
- see the [Dialogflow getting started
+ For information on how Dialogflow agents, intents, entities, and so on
+ work, see the [Dialogflow getting
+ started
guide](https://dialogflow.com/docs/getting-started/basics) in the
dialogflow.com documentation.
@@ -47,110 +49,80 @@ documentation:
incorporate the Dialogflow into your product. After you have created a
Google Cloud project and a Dialogflow agent, you can use the API to create
intents, entities, and so on, and then pass user input to your Dialogflow
- agent to determine user intent using the
- [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent)
- REST API, or the
- [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest)
- gRPC API.
+ agent to determine user intent using
+ the
+ [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent) REST
+ API, or the
+ [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) gRPC
+ API.
## Getting Started
* For information on setting up a Google Cloud Platform project and
- creating an agent using the Dialogflow Enterprise Edition, see
- [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart).
-
- * For information on creating an agent using the Dialogflow Standard
- Edition, see [Building Your First
+ creating an agent using the Dialogflow Enterprise Edition, see
+ [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart). *
+ For information on creating an agent using the Dialogflow Standard
+ Edition, see [Building Your First
Agent](https://dialogflow.com/docs/getting-started/building-your-first-agent)
backend:
rules:
- - selector: google.longrunning.Operations.GetOperation
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Agents.GetAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Agents.SearchAgents
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Agents.TrainAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Agents.ExportAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Agents.ImportAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Agents.RestoreAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Contexts.ListContexts
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Contexts.GetContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Contexts.CreateContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Contexts.UpdateContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Contexts.DeleteContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Contexts.DeleteAllContexts
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.GetEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.CreateEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Intents.ListIntents
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Intents.GetIntent
+ - selector: 'google.cloud.dialogflow.v2.Agents.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Intents.CreateIntent
+ - selector: 'google.cloud.dialogflow.v2.Contexts.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Intents.UpdateIntent
+ - selector: 'google.cloud.dialogflow.v2.EntityTypes.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Intents.DeleteIntent
+ - selector: 'google.cloud.dialogflow.v2.Intents.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Intents.BatchUpdateIntents
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.Intents.BatchDeleteIntents
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType
+ - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*'
deadline: 60.0
- selector: google.cloud.dialogflow.v2.Sessions.DetectIntent
deadline: 230.0
- selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent
deadline: 230.0
-
-http:
- rules:
- - selector: google.longrunning.Operations.GetOperation
- get: '/v2beta1/{name=projects/*/operations/*}'
- additional_bindings:
- - get: '/v2/{name=projects/*/operations/*}'
-
+ - selector: 'google.longrunning.Operations.*'
+ deadline: 60.0
authentication:
rules:
- - selector: '*'
+ - selector: 'google.cloud.dialogflow.v2.Agents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.Contexts.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.EntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.Intents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2.Sessions.DetectIntent
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent
+ 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/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
diff --git a/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2beta1.yaml b/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2beta1.yaml
index 7bc65b931..c526f7614 100644
--- a/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2beta1.yaml
+++ b/third_party/googleapis/google/cloud/dialogflow/dialogflow_v2beta1.yaml
@@ -6,32 +6,37 @@ title: Dialogflow API
apis:
- name: google.cloud.dialogflow.v2beta1.Agents
- name: google.cloud.dialogflow.v2beta1.Contexts
+- name: google.cloud.dialogflow.v2beta1.Documents
- name: google.cloud.dialogflow.v2beta1.EntityTypes
- name: google.cloud.dialogflow.v2beta1.Intents
+- name: google.cloud.dialogflow.v2beta1.KnowledgeBases
- name: google.cloud.dialogflow.v2beta1.SessionEntityTypes
- name: google.cloud.dialogflow.v2beta1.Sessions
types:
-- name: google.cloud.dialogflow.v2beta1.ExportAgentResponse
- name: google.cloud.dialogflow.v2beta1.BatchUpdateEntityTypesResponse
- name: google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse
+- name: google.cloud.dialogflow.v2beta1.ExportAgentResponse
+- name: google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata
- name: google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest
- name: google.cloud.dialogflow.v2beta1.WebhookRequest
- name: google.cloud.dialogflow.v2beta1.WebhookResponse
documentation:
summary: |-
- An end-to-end development suite for conversational interfaces (e.g.,
- chatbots, voice-powered apps and devices).
+ Builds conversational interfaces (for example, chatbots, and voice-powered
+ apps and devices).
overview: |-
- [Dialogflow](http://dialogflow.com/) is a natural language understanding
- platform that makes it easy for you to design and integrate a conversational
- user interface into your mobile app, web application, device, bot, and so
- on. Using Dialogflow you can provide users new and engaging ways to interact
- with your product using both voice recognition and text input.
+ [Dialogflow](http://dialogflow.com/) is a natural language
+ understanding platform that makes it easy for you to design and integrate
+ a conversational user interface into your mobile app, web application,
+ device, bot, and so on. Using Dialogflow you can provide users new and
+ engaging ways to interact with your product using both voice recognition
+ and text input.
- For information on how Dialogflow agents, intents, entities, and so on work,
- see the [Dialogflow getting started
+ For information on how Dialogflow agents, intents, entities, and so on
+ work, see the [Dialogflow getting
+ started
guide](https://dialogflow.com/docs/getting-started/basics) in the
dialogflow.com documentation.
@@ -47,110 +52,101 @@ documentation:
incorporate the Dialogflow into your product. After you have created a
Google Cloud project and a Dialogflow agent, you can use the API to create
intents, entities, and so on, and then pass user input to your Dialogflow
- agent to determine user intent using the
- [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent)
- REST API, or the
- [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest)
- gRPC API.
+ agent to determine user intent using
+ the
+ [detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent) REST
+ API, or the
+ [StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) gRPC
+ API.
## Getting Started
* For information on setting up a Google Cloud Platform project and
- creating an agent using the Dialogflow Enterprise Edition, see
- [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart).
-
- * For information on creating an agent using the Dialogflow Standard
- Edition, see [Building Your First
+ creating an agent using the Dialogflow Enterprise Edition, see
+ [Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart). *
+ For information on creating an agent using the Dialogflow Standard
+ Edition, see [Building Your First
Agent](https://dialogflow.com/docs/getting-started/building-your-first-agent)
backend:
rules:
- - selector: google.longrunning.Operations.GetOperation
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Agents.GetAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Agents.SearchAgents
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Agents.TrainAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Agents.ExportAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Agents.ImportAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Agents.RestoreAgent
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Contexts.ListContexts
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Contexts.GetContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Contexts.CreateContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Contexts.UpdateContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Contexts.DeleteContext
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.ListEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.DeleteEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchCreateEntities
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.EntityTypes.BatchDeleteEntities
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Intents.ListIntents
+ - selector: 'google.cloud.dialogflow.v2beta1.Agents.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Intents.GetIntent
+ - selector: 'google.cloud.dialogflow.v2beta1.Contexts.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Intents.CreateIntent
+ - selector: 'google.cloud.dialogflow.v2beta1.Documents.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Intents.UpdateIntent
+ - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Intents.DeleteIntent
+ - selector: 'google.cloud.dialogflow.v2beta1.Intents.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents
+ - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*'
deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType
- deadline: 60.0
- - selector: google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType
+ - selector: 'google.cloud.dialogflow.v2beta1.SessionEntityTypes.*'
deadline: 60.0
- selector: google.cloud.dialogflow.v2beta1.Sessions.DetectIntent
deadline: 230.0
- selector: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent
deadline: 230.0
+ - selector: 'google.longrunning.Operations.*'
+ deadline: 60.0
http:
rules:
- selector: google.longrunning.Operations.GetOperation
get: '/v2beta1/{name=projects/*/operations/*}'
- additional_bindings:
- - get: '/v2/{name=projects/*/operations/*}'
-
+ - selector: google.longrunning.Operations.ListOperations
+ get: '/v2beta1/{name=projects/*}/operations'
authentication:
rules:
- - selector: '*'
+ - selector: 'google.cloud.dialogflow.v2beta1.Agents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.Contexts.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.Documents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.Intents.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: 'google.cloud.dialogflow.v2beta1.SessionEntityTypes.*'
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2beta1.Sessions.DetectIntent
+ oauth:
+ canonical_scopes: |-
+ https://www.googleapis.com/auth/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
+ - selector: google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent
+ 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/cloud-platform,
+ https://www.googleapis.com/auth/dialogflow
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/BUILD.bazel b/third_party/googleapis/google/cloud/dialogflow/v2/BUILD.bazel
new file mode 100644
index 000000000..dffd1c7b1
--- /dev/null
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/BUILD.bazel
@@ -0,0 +1,241 @@
+# 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",
+ "entity_type.proto",
+ "intent.proto",
+ "session.proto",
+ "session_entity_type.proto",
+ "webhook.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",
+ "@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"],
+)
+
+java_grpc_library(
+ name = "dialogflow_java_grpc",
+ srcs = [":dialogflow_proto"],
+ deps = [":dialogflow_java_proto"] + _JAVA_GRPC_DEPS,
+)
+
+java_resource_name_proto_library(
+ name = "dialogflow_resource_name_java_proto",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ deps = [":dialogflow_proto"],
+)
+
+java_gapic_library(
+ name = "dialogflow_java_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml",
+ test_deps = [":dialogflow_java_grpc"],
+ deps = [
+ ":dialogflow_java_proto",
+ ":dialogflow_resource_name_java_proto",
+ ] + _JAVA_GRPC_DEPS,
+)
+
+[java_test(
+ name = test_name,
+ test_class = test_name,
+ runtime_deps = [
+ ":dialogflow_java_gapic_test",
+ ],
+) for test_name in [
+ "com.google.cloud.dialogflow.v2.AgentsClientTest",
+ "com.google.cloud.dialogflow.v2.ContextsClientTest",
+ "com.google.cloud.dialogflow.v2.EntityTypesClientTest",
+ "com.google.cloud.dialogflow.v2.IntentsClientTest",
+ "com.google.cloud.dialogflow.v2.SessionEntityTypesClientTest",
+ "com.google.cloud.dialogflow.v2.SessionsClientTest",
+]]
+
+# Opensource Packages
+java_gapic_assembly_gradle_pkg(
+ name = "google-cloud-dialogflow-v2-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",
+)
+
+go_proto_library(
+ name = "dialogflow_go_proto",
+ compilers = ["@io_bazel_rules_go//proto:go_grpc"],
+ importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2",
+ protos = [":dialogflow_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 = "dialogflow_go_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ importpath = "cloud.google.com/go/dialogflow/apiv2",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml",
+ 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",
+ ],
+)
+
+go_test(
+ name = "dialogflow_go_gapic_test",
+ srcs = [":dialogflow_go_gapic_srcjar_test"],
+ embed = [":dialogflow_go_gapic"],
+ importpath = "cloud.google.com/go/dialogflow/apiv2",
+)
+
+# Opensource Packages
+go_gapic_assembly_pkg(
+ name = "gapi-cloud-dialogflow-v2-go",
+ deps = [
+ ":dialogflow_go_gapic",
+ ":dialogflow_go_gapic_srcjar-smoke-test.srcjar",
+ ":dialogflow_go_gapic_srcjar-test.srcjar",
+ ":dialogflow_go_proto",
+ ],
+)
+
+##############################################################################
+# PHP
+##############################################################################
+load(
+ "@com_google_googleapis_imports//:imports.bzl",
+ "php_proto_library",
+ "php_grpc_library",
+ "php_gapic_library",
+ "php_gapic_assembly_pkg",
+)
+
+php_proto_library(
+ name = "dialogflow_php_proto",
+ deps = [":dialogflow_proto"],
+)
+
+php_grpc_library(
+ name = "dialogflow_php_grpc",
+ srcs = [":dialogflow_proto"],
+ deps = [":dialogflow_php_proto"],
+)
+
+php_gapic_library(
+ name = "dialogflow_php_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml",
+ deps = [
+ ":dialogflow_php_grpc",
+ ":dialogflow_php_proto",
+ ],
+)
+
+# Opensource Packages
+php_gapic_assembly_pkg(
+ name = "google-cloud-dialogflow-v2-php",
+ deps = [
+ ":dialogflow_php_gapic",
+ ":dialogflow_php_grpc",
+ ":dialogflow_php_proto",
+ ],
+)
+
+##############################################################################
+# Node.js
+##############################################################################
+load(
+ "@com_google_googleapis_imports//:imports.bzl",
+ "nodejs_gapic_library",
+ "nodejs_gapic_assembly_pkg",
+)
+
+nodejs_gapic_library(
+ name = "dialogflow_nodejs_gapic",
+ src = ":dialogflow_proto_with_info",
+ gapic_yaml = "dialogflow_gapic.yaml",
+ service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml",
+ deps = [],
+)
+
+nodejs_gapic_assembly_pkg(
+ name = "dialogflow-v2-nodejs",
+ deps = [
+ ":dialogflow_nodejs_gapic",
+ ":dialogflow_proto",
+ ],
+)
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/agent.proto b/third_party/googleapis/google/cloud/dialogflow/v2/agent.proto
index ec2ed6dab..0ec81e436 100644
--- a/third_party/googleapis/google/cloud/dialogflow/v2/agent.proto
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/agent.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -20,7 +21,7 @@ import "google/api/annotations.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-import "google/protobuf/struct.proto";
+import "google/api/client.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
@@ -30,7 +31,6 @@ option java_outer_classname = "AgentProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";
-
// 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
@@ -43,20 +43,28 @@ option objc_class_prefix = "DF";
//
// You can create an agent using both Dialogflow Standard Edition and
// Dialogflow Enterprise Edition. For details, see
-// [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
+// [Dialogflow
+// Editions](https://cloud.google.com/dialogflow/docs/editions).
//
// You can save your agent for backup or versioning by exporting the agent by
// using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
// agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
//
// Dialogflow provides several
-// [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
-// conversation scenarios such as determining a date and time, converting
-// currency, and so on.
+// [prebuilt
+// agents](https://cloud.google.com/dialogflow/docs/agents-prebuilt)
+// for common conversation scenarios such as determining a date and time,
+// converting currency, and so on.
//
// For more information about agents, see the
-// [Dialogflow documentation](https://dialogflow.com/docs/agents).
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow/docs/agents-overview).
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";
+
// Retrieves the specified agent.
rpc GetAgent(GetAgentRequest) returns (Agent) {
option (google.api.http) = {
@@ -64,6 +72,21 @@ service Agents {
};
}
+ // Creates/updates the specified agent.
+ rpc SetAgent(SetAgentRequest) returns (Agent) {
+ option (google.api.http) = {
+ post: "/v2/{agent.parent=projects/*}/agent"
+ body: "agent"
+ };
+ }
+
+ // Deletes the specified agent.
+ rpc DeleteAgent(DeleteAgentRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {
+ delete: "/v2/{parent=projects/*}/agent"
+ };
+ }
+
// Returns the list of agents.
//
// Since there is at most one conversational agent per project, this method is
@@ -79,8 +102,7 @@ service Agents {
// Trains the specified agent.
//
- // Operation
+ // Operation
rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*}/agent:train"
@@ -90,8 +112,7 @@ service Agents {
// Exports the specified agent to a ZIP file.
//
- // Operation
+ // Operation
rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*}/agent:export"
@@ -105,8 +126,7 @@ service Agents {
// Intents and entity types with the same name are replaced with the new
// versions from ImportAgentRequest.
//
- // Operation
+ // Operation
rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*}/agent:import"
@@ -119,8 +139,7 @@ service Agents {
// Replaces the current agent version with a new one. All the intents and
// entity types in the older version are deleted.
//
- // Operation
+ // Operation
rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*}/agent:restore"
@@ -145,6 +164,36 @@ message Agent {
MATCH_MODE_ML_ONLY = 2;
}
+ // API version for the agent.
+ enum ApiVersion {
+ // Not specified.
+ API_VERSION_UNSPECIFIED = 0;
+
+ // Legacy V1 API.
+ API_VERSION_V1 = 1;
+
+ // V2 API.
+ API_VERSION_V2 = 2;
+
+ // V2beta1 API.
+ API_VERSION_V2_BETA_1 = 3;
+ }
+
+ // Represents the agent tier.
+ enum Tier {
+ // Not specified. This value should never be used.
+ TIER_UNSPECIFIED = 0;
+
+ // Standard tier.
+ TIER_STANDARD = 1;
+
+ // Enterprise tier (Essentials).
+ TIER_ENTERPRISE = 2;
+
+ // Enterprise tier (Plus).
+ TIER_ENTERPRISE_PLUS = 3;
+ }
+
// Required. The project of this agent.
// Format: `projects/`.
string parent = 1;
@@ -153,9 +202,10 @@ message Agent {
string display_name = 2;
// Required. The default language of the agent as a language tag. See
- // [Language Support](https://dialogflow.com/docs/reference/language) for a
- // list of the currently supported language codes.
- // This field cannot be set by the `Update` method.
+ // [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 `Update` method.
string default_language_code = 3;
// Optional. The list of all languages supported by this agent (except for the
@@ -173,7 +223,9 @@ message Agent {
// Optional. The URI of the agent's avatar.
// Avatars are used throughout the Dialogflow console and in the self-hosted
- // [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
+ // [Web
+ // Demo](https://cloud.google.com/dialogflow/docs/integrations/web-demo)
+ // integration.
string avatar_uri = 7;
// Optional. Determines whether this agent should log conversation queries.
@@ -185,11 +237,20 @@ message Agent {
// Optional. 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 fallback intent is be triggered or, if there
+ // the threshold value, then a fallback intent will be triggered or, if there
// are no fallback intents defined, no intent 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 = 10;
+
+ // Optional. API version displayed in Dialogflow console. If not specified,
+ // V2 API is assumed. Clients are free to query different service endpoints
+ // for different API versions. However, bots connectors and webhook calls will
+ // follow the specified API version.
+ ApiVersion api_version = 14;
+
+ // Optional. The agent tier. If not specified, TIER_STANDARD is assumed.
+ Tier tier = 15;
}
// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
@@ -199,6 +260,22 @@ message GetAgentRequest {
string parent = 1;
}
+// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent].
+message SetAgentRequest {
+ // Required. The agent to update.
+ Agent agent = 1;
+
+ // Optional. The mask to control which fields get updated.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent].
+message DeleteAgentRequest {
+ // Required. The project that the agent to delete is associated with.
+ // Format: `projects/`.
+ string parent = 1;
+}
+
// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
message SearchAgentsRequest {
// Required. The project to list agents from.
@@ -237,9 +314,11 @@ message ExportAgentRequest {
// Format: `projects/`.
string parent = 1;
- // Optional. The Google Cloud Storage URI to export the agent to.
- // Note: The URI must start with
- // "gs://". If left unspecified, the serialized agent is returned inline.
+ // 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:///`.
+ // If left unspecified, the serialized agent is returned inline.
string agent_uri = 2;
}
@@ -254,17 +333,17 @@ message ExportAgentResponse {
// The exported agent.
//
// Example for how to export an agent to a zip file via a command line:
- //
- // curl \
- // 'https://dialogflow.googleapis.com/v2/projects//agent:export'\
+ // curl \
+ // 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
// -X POST \
- // -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
// -H 'Accept: application/json' \
// -H 'Content-Type: application/json' \
// --compressed \
// --data-binary '{}' \
// | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
- // | base64 --decode >
+ // | base64 --decode > <agent zip file>
bytes agent_content = 2;
}
}
@@ -284,17 +363,17 @@ message ImportAgentRequest {
// The agent to import.
//
// Example for how to import an agent via the command line:
- //
- // curl \
- // 'https://dialogflow.googleapis.com/v2/projects//agent:import\
+ // curl \
+ // 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\
// -X POST \
- // -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
// -H 'Accept: application/json' \
// -H 'Content-Type: application/json' \
// --compressed \
// --data-binary "{
- // 'agentContent': '$(cat | base64 -w 0)'
- // }"
+ // 'agentContent': '$(cat <agent zip file> | base64 -w 0)'
+ // }"
bytes agent_content = 3;
}
}
@@ -314,17 +393,17 @@ message RestoreAgentRequest {
// The agent to restore.
//
// Example for how to restore an agent via the command line:
- //
- // curl \
- // 'https://dialogflow.googleapis.com/v2/projects//agent:restore\
+ // curl \
+ // 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\
// -X POST \
- // -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
+ // -H 'Authorization: Bearer '$(gcloud auth application-default
+ // print-access-token) \
// -H 'Accept: application/json' \
// -H 'Content-Type: application/json' \
// --compressed \
// --data-binary "{
- // 'agentContent': '$(cat | base64 -w 0)'
- // }" \
+ // 'agentContent': '$(cat <agent zip file> | base64 -w 0)'
+ // }"
bytes agent_content = 3;
}
}
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/audio_config.proto b/third_party/googleapis/google/cloud/dialogflow/v2/audio_config.proto
new file mode 100644
index 000000000..3a1c600c5
--- /dev/null
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/audio_config.proto
@@ -0,0 +1,262 @@
+// Copyright 2019 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.v2;
+
+import "google/protobuf/duration.proto";
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Dialogflow.V2";
+option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
+option java_multiple_files = true;
+option java_outer_classname = "AudioConfigProto";
+option java_package = "com.google.cloud.dialogflow.v2";
+option objc_class_prefix = "DF";
+
+// 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 how to process the audio content.
+message InputAudioConfig {
+ // Required. Audio encoding of the audio content to process.
+ AudioEncoding audio_encoding = 1;
+
+ // 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;
+
+ // Required. The language of the supplied audio. Dialogflow does not do
+ // translations. 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 = 3;
+
+ // 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 variant of the [Speech model][google.cloud.dialogflow.v2.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.
+ // Note: When specified, InputAudioConfig.single_utterance takes precedence
+ // over StreamingDetectIntentRequest.single_utterance.
+ bool single_utterance = 8;
+}
+
+// Variant of the specified [Speech model][google.cloud.dialogflow.v2.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.v2.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 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. 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 on how to generate the output audio content.
+message OutputAudioConfig {
+ // Required. Audio encoding of the synthesized audio content.
+ OutputAudioEncoding audio_encoding = 1;
+
+ // 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.
+ OUTPUT_AUDIO_ENCODING_MP3 = 2;
+
+ // 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;
+}
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/context.proto b/third_party/googleapis/google/cloud/dialogflow/v2/context.proto
index 2d1798e02..1df6f7695 100644
--- a/third_party/googleapis/google/cloud/dialogflow/v2/context.proto
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/context.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -20,6 +21,7 @@ import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
+import "google/api/client.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
@@ -29,7 +31,6 @@ option java_outer_classname = "ContextProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";
-
// A context represents additional information included with user input or with
// an intent returned by the Dialogflow API. Contexts are helpful for
// differentiating user input which may be vague or have a different meaning
@@ -42,12 +43,18 @@ option objc_class_prefix = "DF";
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request,
// or as output contexts included in the returned intent.
// Contexts expire when an intent is matched, after the number of `DetectIntent`
-// requests specified by the `lifespan_count` parameter, or after 10 minutes
+// requests specified by the `lifespan_count` parameter, or after 20 minutes
// if no intents are matched for a `DetectIntent` request.
//
// For more information about contexts, see the
-// [Dialogflow documentation](https://dialogflow.com/docs/contexts).
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow/docs/contexts-overview).
service Contexts {
+ 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 contexts in the specified session.
rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) {
option (google.api.http) = {
@@ -63,6 +70,8 @@ service Contexts {
}
// Creates a context.
+ //
+ // If the specified context already exists, overrides the context.
rpc CreateContext(CreateContextRequest) returns (Context) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/agent/sessions/*}/contexts"
@@ -97,17 +106,21 @@ service Contexts {
message Context {
// Required. The unique identifier of the context. Format:
// `projects//agent/sessions//contexts/`.
+ //
+ // The `Context ID` is always converted to lowercase, may only contain
+ // characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
string name = 1;
// Optional. The number of conversational query requests after which the
// context expires. If set to `0` (the default) the context expires
- // immediately. Contexts expire automatically after 10 minutes even if there
+ // immediately. Contexts expire automatically after 20 minutes if there
// are no matching queries.
int32 lifespan_count = 2;
// Optional. The collection of parameters associated with this context.
- // Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for
- // syntax.
+ // Refer to [this
+ // doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
+ // for syntax.
google.protobuf.Struct parameters = 3;
}
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/dialogflow_gapic.yaml b/third_party/googleapis/google/cloud/dialogflow/v2/dialogflow_gapic.yaml
index 6fbfe4873..0c9077039 100644
--- a/third_party/googleapis/google/cloud/dialogflow/v2/dialogflow_gapic.yaml
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/dialogflow_gapic.yaml
@@ -16,12 +16,7 @@ language_settings:
package_name: Google\Cloud\Dialogflow\V2
nodejs:
package_name: dialogflow.v2
-# The configuration for the license header to put on generated files.
-license_header:
- # The file containing the copyright line(s).
- copyright_file: copyright-google.txt
- # The file containing the raw license header without any copyright line(s).
- license_file: license-header-apache-2.0.txt
+ domain_layer_location: google-cloud
# A list of API interface configurations.
interfaces:
# The fully qualified name of the API interface.
@@ -73,9 +68,7 @@ interfaces:
# message.
# required_fields - Fields that are always required for a request to be
# valid.
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate
- # this method.
+ #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a
# paging list RPC into a stream of resources.
@@ -103,6 +96,32 @@ interfaces:
# timeout_millis - Specifies the default timeout for a non-retrying call. If
# the call is retrying, refer to retry_params_name instead.
methods:
+ - name: SetAgent
+ flattening:
+ groups:
+ - parameters:
+ - agent
+ required_fields:
+ - agent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ agent.parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
+ - name: DeleteAgent
+ flattening:
+ groups:
+ - parameters:
+ - parent
+ required_fields:
+ - parent
+ retry_codes_name: idempotent
+ retry_params_name: default
+ field_name_patterns:
+ parent: project
+ timeout_millis: 60000
+ resource_name_treatment: STATIC_TYPES
- name: GetAgent
flattening:
groups:
@@ -110,7 +129,6 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -124,7 +142,6 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -145,15 +162,16 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: project
timeout_millis: 60000
long_running:
+ # LINT.IfChange(train_agent_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -166,15 +184,16 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: project
timeout_millis: 60000
long_running:
+ # LINT.IfChange(export_agent_long_running_operation)
return_type: google.cloud.dialogflow.v2.ExportAgentResponse
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -183,15 +202,16 @@ interfaces:
- name: ImportAgent
required_fields:
- parent
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: project
timeout_millis: 60000
long_running:
+ # LINT.IfChange(import_agent_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -201,15 +221,16 @@ interfaces:
required_fields:
- parent
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: project
timeout_millis: 60000
long_running:
+ # LINT.IfChange(restore_agent_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -263,9 +284,7 @@ interfaces:
# message.
# required_fields - Fields that are always required for a request to be
# valid.
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate
- # this method.
+ #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a
# paging list RPC into a stream of resources.
@@ -300,7 +319,6 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -321,7 +339,6 @@ interfaces:
- name
required_fields:
- name
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -337,7 +354,6 @@ interfaces:
required_fields:
- parent
- context
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -351,7 +367,6 @@ interfaces:
- context
required_fields:
- context
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -365,7 +380,6 @@ interfaces:
- name
required_fields:
- name
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -379,7 +393,6 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -434,9 +447,7 @@ interfaces:
# message.
# required_fields - Fields that are always required for a request to be
# valid.
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate
- # this method.
+ #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a
# paging list RPC into a stream of resources.
@@ -474,7 +485,6 @@ interfaces:
- language_code
required_fields:
- parent
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -498,7 +508,6 @@ interfaces:
- language_code
required_fields:
- name
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -518,7 +527,6 @@ interfaces:
required_fields:
- parent
- entity_type
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -535,7 +543,6 @@ interfaces:
- language_code
required_fields:
- entity_type
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -549,7 +556,6 @@ interfaces:
- name
required_fields:
- name
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -559,15 +565,16 @@ interfaces:
- name: BatchUpdateEntityTypes
required_fields:
- parent
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: project_agent
timeout_millis: 60000
long_running:
+ # LINT.IfChange(batch_update_entity_types_long_running_operation)
return_type: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -582,15 +589,16 @@ interfaces:
required_fields:
- parent
- entity_type_names
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: project_agent
timeout_millis: 60000
long_running:
+ # LINT.IfChange(batch_delete_entity_types_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -609,15 +617,16 @@ interfaces:
required_fields:
- parent
- entities
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: entity_type
timeout_millis: 60000
long_running:
+ # LINT.IfChange(batch_create_entities_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -636,15 +645,16 @@ interfaces:
required_fields:
- parent
- entities
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: entity_type
timeout_millis: 60000
long_running:
+ # LINT.IfChange(batch_update_entities_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -663,15 +673,16 @@ interfaces:
required_fields:
- parent
- entity_values
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: entity_type
timeout_millis: 60000
long_running:
+ # LINT.IfChange(batch_delete_entities_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -727,9 +738,7 @@ interfaces:
# message.
# required_fields - Fields that are always required for a request to be
# valid.
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate
- # this method.
+ #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a
# paging list RPC into a stream of resources.
@@ -767,7 +776,6 @@ interfaces:
- language_code
required_fields:
- parent
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -791,7 +799,6 @@ interfaces:
- language_code
required_fields:
- name
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -811,7 +818,6 @@ interfaces:
required_fields:
- parent
- intent
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -831,7 +837,6 @@ interfaces:
required_fields:
- intent
- language_code
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -845,7 +850,6 @@ interfaces:
- name
required_fields:
- name
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -856,15 +860,16 @@ interfaces:
required_fields:
- parent
- language_code
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: project_agent
timeout_millis: 60000
long_running:
+ # LINT.IfChange(batch_update_intents_long_running_operation)
return_type: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -879,15 +884,16 @@ interfaces:
required_fields:
- parent
- intents
- request_object_method: true
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: project_agent
timeout_millis: 60000
long_running:
+ # LINT.IfChange(batch_delete_intents_long_running_operation)
return_type: google.protobuf.Empty
metadata_type: google.protobuf.Struct
+ # LINT.ThenChange()
initial_poll_delay_millis: 500
poll_delay_multiplier: 1.5
max_poll_delay_millis: 5000
@@ -941,9 +947,7 @@ interfaces:
# message.
# required_fields - Fields that are always required for a request to be
# valid.
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate
- # this method.
+ #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a
# paging list RPC into a stream of resources.
@@ -978,7 +982,6 @@ interfaces:
- parent
required_fields:
- parent
- request_object_method: true
page_streaming:
request:
page_size_field: page_size
@@ -999,7 +1002,6 @@ interfaces:
- name
required_fields:
- name
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -1015,7 +1017,6 @@ interfaces:
required_fields:
- parent
- session_entity_type
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -1029,7 +1030,6 @@ interfaces:
- session_entity_type
required_fields:
- session_entity_type
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -1043,7 +1043,6 @@ interfaces:
- name
required_fields:
- name
- request_object_method: false
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
@@ -1096,9 +1095,7 @@ interfaces:
# message.
# required_fields - Fields that are always required for a request to be
# valid.
- # request_object_method - Turns on or off the generation of a method whose
- # sole parameter is a request object. Not all languages will generate
- # this method.
+ #
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a
# paging list RPC into a stream of resources.
@@ -1135,7 +1132,6 @@ interfaces:
required_fields:
- session
- query_input
- request_object_method: true
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
@@ -1146,11 +1142,16 @@ interfaces:
required_fields:
- session
- query_input
- request_object_method: false
retry_codes_name: non_idempotent
retry_params_name: default
timeout_millis: 220000
resource_name_generation:
+- message_name: SetAgentRequest
+ field_entity_map:
+ agent.parent: project
+- message_name: DeleteAgentRequest
+ field_entity_map:
+ parent: project
- message_name: GetAgentRequest
field_entity_map:
parent: project
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/entity_type.proto b/third_party/googleapis/google/cloud/dialogflow/v2/entity_type.proto
index ce36c716b..c694a0c2a 100644
--- a/third_party/googleapis/google/cloud/dialogflow/v2/entity_type.proto
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/entity_type.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -20,7 +21,7 @@ import "google/api/annotations.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
-import "google/protobuf/struct.proto";
+import "google/api/client.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
@@ -30,7 +31,6 @@ option java_outer_classname = "EntityTypeProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";
-
// 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
@@ -57,8 +57,14 @@ option objc_class_prefix = "DF";
// represented by the [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type.
//
// For more information about entity types, see the
-// [Dialogflow documentation](https://dialogflow.com/docs/entities).
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
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) = {
@@ -98,8 +104,7 @@ service EntityTypes {
// Updates/Creates multiple entity types in the specified agent.
//
- // Operation
+ // Operation
rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/agent}/entityTypes:batchUpdate"
@@ -109,8 +114,7 @@ service EntityTypes {
// Deletes entity types in the specified agent.
//
- // Operation
+ // Operation
rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/agent}/entityTypes:batchDelete"
@@ -118,8 +122,7 @@ service EntityTypes {
};
}
- // Creates multiple new entities in the specified entity type (extends the
- // existing collection of entries).
+ // Creates multiple new entities in the specified entity type.
//
// Operation
rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) {
@@ -129,11 +132,11 @@ service EntityTypes {
};
}
- // Updates entities in the specified entity type (replaces the existing
- // collection of entries).
+ // Updates or creates multiple entities in the specified entity type. This
+ // method does not affect entities in the entity type that aren't explicitly
+ // specified in the request.
//
- // Operation
+ // Operation
rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate"
@@ -143,8 +146,7 @@ service EntityTypes {
// Deletes entities in the specified entity type.
//
- // Operation
+ // Operation
rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete"
@@ -157,18 +159,29 @@ service EntityTypes {
// Entity types serve as a tool for extracting parameter values from natural
// language queries.
message EntityType {
- // Optional. Represents an entity.
+ // An **entity entry** for an associated entity type.
message Entity {
- // Required.
+ // 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 name to be used in place of synonyms.
+ //
+ // * 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).
+ //
+ // * A string that can contain references to other entity types (with or
+ // without aliases).
string value = 1;
- // Required. A collection of synonyms. For `KIND_LIST` entity types this
- // must contain exactly one synonym equal to `value`.
+ // 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;
}
@@ -199,13 +212,13 @@ message EntityType {
AUTO_EXPANSION_MODE_DEFAULT = 1;
}
- // Required for all methods except `create` (`create` populates the name
- // automatically.
- // The unique identifier of the entity type. Format:
- // `projects//agent/entityTypes/`.
+ // The unique identifier of the entity type.
+ // Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and
+ // [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods.
+ // Format: `projects//agent/entityTypes/`.
string name = 1;
- // Required. The name of the entity.
+ // Required. The name of the entity type.
string display_name = 2;
// Required. Indicates the kind of entity type.
@@ -215,7 +228,7 @@ message EntityType {
// expanded.
AutoExpansionMode auto_expansion_mode = 4;
- // Optional. The collection of entities associated with the entity type.
+ // Optional. The collection of entity entries associated with the entity type.
repeated Entity entities = 6;
}
@@ -227,9 +240,10 @@ message ListEntityTypesRequest {
// Optional. The language to list entity synonyms for. If not specified,
// the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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;
// Optional. The maximum number of items to return in a single page. By
@@ -259,9 +273,10 @@ message GetEntityTypeRequest {
// Optional. The language to retrieve entity synonyms for. If not specified,
// the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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;
}
@@ -276,23 +291,24 @@ message CreateEntityTypeRequest {
// Optional. The language of entity synonyms defined in `entity_type`. If not
// specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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.v2.EntityTypes.UpdateEntityType].
message UpdateEntityTypeRequest {
// Required. The entity type to update.
- // Format: `projects//agent/entityTypes/`.
EntityType entity_type = 1;
// Optional. The language of entity synonyms defined in `entity_type`. If not
// specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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;
// Optional. The mask to control which fields get updated.
@@ -315,8 +331,9 @@ message BatchUpdateEntityTypesRequest {
// Required. The source of the entity type batch.
//
// For each entity type in the batch:
- // * If `name` is specified, we update an existing entity type.
- // * If `name` is not specified, we create a new entity type.
+ //
+ // * If `name` is specified, we update an existing entity type.
+ // * If `name` is not specified, we create a new entity type.
oneof entity_type_batch {
// The URI to a Google Cloud Storage file containing entity types to update
// or create. The file format can either be a serialized proto (of
@@ -324,15 +341,16 @@ message BatchUpdateEntityTypesRequest {
// "gs://".
string entity_type_batch_uri = 2;
- // The collection of entity type to update or create.
+ // The collection of entity types to update or create.
EntityTypeBatch entity_type_batch_inline = 3;
}
// Optional. The language of entity synonyms defined in `entity_types`. If not
// specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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;
// Optional. The mask to control which fields get updated.
@@ -362,31 +380,33 @@ message BatchCreateEntitiesRequest {
// `projects//agent/entityTypes/`.
string parent = 1;
- // Required. The collection of entities to create.
+ // Required. The entities to create.
repeated EntityType.Entity entities = 2;
// Optional. The language of entity synonyms defined in `entities`. If not
// specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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 response message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities].
+// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities].
message BatchUpdateEntitiesRequest {
- // Required. The name of the entity type to update the entities in. Format:
- // `projects//agent/entityTypes/`.
+ // Required. The name of the entity type to update or create entities in.
+ // Format: `projects//agent/entityTypes/`.
string parent = 1;
- // Required. The collection of new entities to replace the existing entities.
+ // Required. The entities to update or create.
repeated EntityType.Entity entities = 2;
// Optional. The language of entity synonyms defined in `entities`. If not
// specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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;
// Optional. The mask to control which fields get updated.
@@ -406,9 +426,10 @@ message BatchDeleteEntitiesRequest {
// Optional. The language of entity synonyms defined in `entities`. If not
// specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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;
}
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/intent.proto b/third_party/googleapis/google/cloud/dialogflow/v2/intent.proto
index 7d22280f0..6cdcd73ec 100644
--- a/third_party/googleapis/google/cloud/dialogflow/v2/intent.proto
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/intent.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,17 +11,21 @@
// 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.v2;
import "google/api/annotations.proto";
+import "google/cloud/dialogflow/v2/audio_config.proto";
import "google/cloud/dialogflow/v2/context.proto";
import "google/longrunning/operations.proto";
+import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/struct.proto";
+import "google/api/client.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
@@ -31,7 +35,6 @@ option java_outer_classname = "IntentProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";
-
// An intent represents a mapping between input from a user and an action to
// be taken by your application. When you pass user input to the
// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
@@ -46,7 +49,7 @@ option objc_class_prefix = "DF";
// * **Contexts** - provide additional context for intent analysis. For
// example, if an intent is related to an object in your application that
// plays music, you can provide a context to determine when to match the
-// intent if the user input is “turn it off”. You can include a context
+// intent if the user input is "turn it off". You can include a context
// that matches the intent when there is previous user input of
// "play music", and not when there is previous user input of
// "turn on the light".
@@ -62,8 +65,14 @@ option objc_class_prefix = "DF";
// Dialogflow API agent to better match intents.
//
// For more information about intents, see the
-// [Dialogflow documentation](https://dialogflow.com/docs/intents).
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow/docs/intents-overview).
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) = {
@@ -94,7 +103,7 @@ service Intents {
};
}
- // Deletes the specified intent.
+ // Deletes the specified intent and its direct or indirect followup intents.
rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v2/{name=projects/*/agent/intents/*}"
@@ -126,26 +135,26 @@ service Intents {
// Intents convert a number of user expressions or patterns into an action. An
// action is an extraction of a user command or sentence semantics.
message Intent {
- // Represents an example or template that the agent is trained on.
+ // Represents an example that the agent is trained on.
message TrainingPhrase {
// Represents a part of a training phrase.
message Part {
- // Required. The text corresponding to the example or template,
- // if there are no annotations. For
- // annotated examples, it is the text for one of the example's parts.
+ // Required. The text for this part.
string text = 1;
- // Optional. The entity type name prefixed with `@`. This field is
- // required for the annotated part of the text and applies only to
- // examples.
+ // Optional. The entity type name prefixed with `@`.
+ // This field is required for annotated parts of the training phrase.
string entity_type = 2;
// Optional. The parameter name for the value extracted from the
// annotated part of the example.
+ // This field is required for annotated parts of the training phrase.
string alias = 3;
- // Optional. Indicates whether the text was manually annotated by the
- // developer.
+ // Optional. Indicates whether the text was manually annotated.
+ // This field is set to true when the Dialogflow Console is used to
+ // manually annotate the part. When creating an annotated part with the
+ // API, you must set this to true.
bool user_defined = 4;
}
@@ -160,21 +169,41 @@ message Intent {
// Templates are not annotated with entity types, but they can contain
// @-prefixed entity type names as substrings.
- TEMPLATE = 2;
+ // Template mode has been deprecated. Example mode is the only supported
+ // way to create new training phrases. If you have existing training
+ // phrases that you've created in template mode, those will continue to
+ // work.
+ TEMPLATE = 2 [deprecated = true];
}
- // Required. The unique identifier of this training phrase.
+ // Output only. The unique identifier of this training phrase.
string name = 1;
// Required. The type of the training phrase.
Type type = 2;
- // Required. The collection of training phrase parts (can be annotated).
- // Fields: `entity_type`, `alias` and `user_defined` should be populated
- // only for the annotated parts of the training phrase.
+ // 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.v2.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 `entity_type`, `alias`, and `user_defined` fields are all
+ // set.
repeated Part parts = 3;
- // Optional. Indicates how many times this example or template was added to
+ // Optional. Indicates how many times this example was added to
// the intent. Each time a developer adds an existing sample by editing an
// intent or training, this counter is increased.
int32 times_added_count = 4;
@@ -213,7 +242,7 @@ message Intent {
bool mandatory = 6;
// Optional. The collection of prompts that the agent can present to the
- // user in order to collect value for the parameter.
+ // user in order to collect a value for the parameter.
repeated string prompts = 7;
// Optional. Indicates whether the parameter represents a list of values.
@@ -498,6 +527,9 @@ message Intent {
// }
// }
ACTIONS_ON_GOOGLE = 8;
+
+ // Google Hangouts.
+ GOOGLE_HANGOUTS = 11;
}
// Required. The rich response message.
@@ -548,7 +580,7 @@ message Intent {
// Format: `projects//agent/intents/`.
string followup_intent_name = 1;
- // The unique identifier of the followup intent parent.
+ // The unique identifier of the followup intent's parent.
// Format: `projects//agent/intents/`.
string parent_followup_intent_name = 2;
}
@@ -566,20 +598,23 @@ message Intent {
WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
}
- // Required for all methods except `create` (`create` populates the name
- // automatically.
// The unique identifier of this intent.
+ // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]
+ // methods.
// Format: `projects//agent/intents/`.
string name = 1;
// Required. The name of this intent.
string display_name = 2;
- // Required. Indicates whether webhooks are enabled for the intent.
+ // Optional. Indicates whether webhooks are enabled for the intent.
WebhookState webhook_state = 6;
// Optional. The priority of this intent. Higher numbers represent higher
- // priorities. Zero or negative numbers mean that the intent is disabled.
+ // priorities. If this is zero or unspecified, we use the default
+ // priority 500000.
+ //
+ // Negative numbers mean that the intent is disabled.
int32 priority = 3;
// Optional. Indicates whether this is a fallback intent.
@@ -601,11 +636,12 @@ message Intent {
// be present in the active user session for an event to trigger this intent.
repeated string events = 8;
- // Optional. The collection of examples/templates that the agent is
+ // Optional. The collection of examples that the agent is
// trained on.
repeated TrainingPhrase training_phrases = 9;
// Optional. The name of the action associated with the intent.
+ // Note: The action name must not contain whitespaces.
string action = 10;
// Optional. The collection of contexts that are activated when the intent
@@ -626,23 +662,28 @@ message Intent {
// `Response` field in the Dialogflow console.
repeated Message messages = 14;
- // Optional. The list of platforms for which the first response will be
- // taken from among the messages assigned to the DEFAULT_PLATFORM.
+ // Optional. The list of platforms for which the first responses will be
+ // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
repeated Message.Platform default_response_platforms = 15;
- // The unique identifier of the root intent in the chain of followup intents.
- // It identifies the correct followup intents chain for this intent.
+ // Read-only. The unique identifier of the root intent in the chain of
+ // followup intents. It identifies the correct followup intents chain for
+ // this intent. We populate this field only in the output.
+ //
// Format: `projects//agent/intents/`.
string root_followup_intent_name = 16;
- // The unique identifier of the parent intent in the chain of followup
- // intents.
+ // Read-only after creation. The unique identifier of the parent intent in the
+ // chain of followup intents. You can set this field when creating an intent,
+ // for example with [CreateIntent][] or [BatchUpdateIntents][], in order to
+ // make this intent a followup intent.
+ //
// It identifies the parent followup intent.
// Format: `projects//agent/intents/`.
string parent_followup_intent_name = 17;
- // Optional. Collection of information about all followup intents that have
- // name of this intent as a root_name.
+ // Read-only. Information about all followup intents that have this intent as
+ // a direct or indirect parent. We populate this field only in the output.
repeated FollowupIntentInfo followup_intent_info = 18;
}
@@ -654,9 +695,10 @@ message ListIntentsRequest {
// Optional. The language to list training phrases, parameters and rich
// messages for. If not specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent before they can be 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;
// Optional. The resource view to apply to the returned intent.
@@ -689,9 +731,10 @@ message GetIntentRequest {
// Optional. The language to retrieve training phrases, parameters and rich
// messages for. If not specified, the agent's default language is used.
- // [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be 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;
// Optional. The resource view to apply to the returned intent.
@@ -709,9 +752,10 @@ message CreateIntentRequest {
// Optional. The language of training phrases, parameters and rich messages
// defined in `intent`. If not specified, the agent's default language is
- // used. [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be used.
+ // 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;
// Optional. The resource view to apply to the returned intent.
@@ -721,14 +765,14 @@ message CreateIntentRequest {
// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent].
message UpdateIntentRequest {
// Required. The intent to update.
- // Format: `projects//agent/intents/`.
Intent intent = 1;
// Optional. The language of training phrases, parameters and rich messages
// defined in `intent`. If not specified, the agent's default language is
- // used. [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be used.
+ // 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;
// Optional. The mask to control which fields get updated.
@@ -740,7 +784,8 @@ message UpdateIntentRequest {
// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent].
message DeleteIntentRequest {
- // Required. The name of the intent to delete.
+ // Required. The name of the intent to delete. If this intent has direct or
+ // indirect followup intents, we also delete them.
// Format: `projects//agent/intents/`.
string name = 1;
}
@@ -764,9 +809,10 @@ message BatchUpdateIntentsRequest {
// Optional. The language of training phrases, parameters and rich messages
// defined in `intents`. If not specified, the agent's default language is
- // used. [More than a dozen
- // languages](https://dialogflow.com/docs/reference/language) are supported.
- // Note: languages must be enabled in the agent, before they can be used.
+ // 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;
// Optional. The mask to control which fields get updated.
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/session.proto b/third_party/googleapis/google/cloud/dialogflow/v2/session.proto
index 085e3504d..815b40878 100644
--- a/third_party/googleapis/google/cloud/dialogflow/v2/session.proto
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/session.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,18 +11,22 @@
// 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.v2;
import "google/api/annotations.proto";
+import "google/cloud/dialogflow/v2/audio_config.proto";
import "google/cloud/dialogflow/v2/context.proto";
import "google/cloud/dialogflow/v2/intent.proto";
import "google/cloud/dialogflow/v2/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.V2";
@@ -32,12 +36,16 @@ option java_outer_classname = "SessionProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";
-
// A session represents an interaction with a user. You retrieve user input
// and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) 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 contexts
// and session entity types to be updated, which in turn might affect
@@ -52,7 +60,8 @@ service Sessions {
// Processes a natural language query in audio format in a streaming fashion
// and returns structured, actionable data as a result. This method is only
// available via the gRPC API (not REST).
- rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse);
+ rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
+ }
}
// The request to detect user's intent.
@@ -77,6 +86,11 @@ message DetectIntentRequest {
// 3. an event that specifies which intent to trigger.
QueryInput query_input = 3;
+ // Optional. Instructs the speech synthesizer how to generate the output
+ // audio. If this field is not set and agent-level speech synthesizer is not
+ // configured, no output audio is generated.
+ OutputAudioConfig output_audio_config = 4;
+
// Optional. The natural language speech audio to be processed. This field
// should be populated iff `query_input` is set to an input audio config.
// A single request can contain up to 1 minute of speech audio data.
@@ -89,12 +103,23 @@ message DetectIntentResponse {
// locate a response in the training example set or for reporting issues.
string response_id = 1;
- // The results of the conversational query or event processing.
+ // The selected results of the conversational query or event processing.
+ // See `alternative_query_results` for additional potential results.
QueryResult query_result = 2;
- // Specifies the status of the webhook request. `webhook_status`
- // is never populated in webhook requests.
+ // Specifies the status of the webhook request.
google.rpc.Status webhook_status = 3;
+
+ // 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.fulfillment_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.
+ bytes output_audio = 4;
+
+ // The config used by the speech synthesizer to generate the output audio.
+ OutputAudioConfig output_audio_config = 6;
}
// Represents the parameters of the conversational query.
@@ -116,14 +141,18 @@ message QueryParameters {
// before the new ones are activated.
bool reset_contexts = 4;
- // Optional. The collection of session entity types to replace or extend
- // developer entities with for this query only. The entity synonyms apply
- // to all languages.
+ // Optional. 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 = 5;
// Optional. 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 = 6;
+
+ // Optional. Configures the type of sentiment analysis to perform. If not
+ // provided, sentiment analysis is not performed.
+ SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10;
}
// Represents the query input. It can contain either:
@@ -151,16 +180,19 @@ message QueryInput {
// Represents the result of conversational query or event processing.
message QueryResult {
// The original conversational query text:
+ //
// - If natural language text was provided as input, `query_text` contains
// a copy of the input.
// - If natural language speech audio was provided as input, `query_text`
// contains the speech recognition result. If speech recognizer produced
// multiple alternatives, a particular one is picked.
- // - If an event was provided as input, `query_text` is not set.
+ // - If automatic spell correction is enabled, `query_text` will contain the
+ // corrected user input.
string query_text = 1;
// The language that was triggered during intent detection.
- // See [Language Support](https://dialogflow.com/docs/reference/language)
+ // See [Language
+ // Support](https://cloud.google.com/dialogflow/docs/reference/language)
// for a list of the currently supported language codes.
string language_code = 15;
@@ -169,10 +201,10 @@ message QueryResult {
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
- // You should not rely on this field as it isn't guaranteed to be accurate, or
- // even set. In particular this field isn't set in Webhook calls and for
- // StreamingDetectIntent since the streaming endpoint has separate confidence
- // estimates per portion of the audio in StreamingRecognitionResult.
+ // This field is not guaranteed to be accurate or set. In particular this
+ // field isn't set for StreamingDetectIntent since the streaming endpoint has
+ // separate confidence estimates per portion of the audio in
+ // StreamingRecognitionResult.
float speech_recognition_confidence = 2;
// The action name from the matched intent.
@@ -182,6 +214,7 @@ message QueryResult {
google.protobuf.Struct parameters = 4;
// This field is set to:
+ //
// - `false` if the matched intent has required parameters and not all of
// the required parameter values have been collected.
// - `true` if all required parameter values have been collected, or if the
@@ -189,6 +222,7 @@ message QueryResult {
bool all_required_params_present = 5;
// The text to be pronounced to the user or shown on the screen.
+ // Note: This is a legacy field, `fulfillment_messages` should be preferred.
string fulfillment_text = 6;
// The collection of rich messages to present to the user.
@@ -215,11 +249,22 @@ message QueryResult {
// 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.
+ // If there are `multiple knowledge_answers` messages, this value is set to
+ // the greatest `knowledgeAnswers.match_confidence` value in the list.
float intent_detection_confidence = 12;
- // The free-form diagnostic info. For example, this field
- // could contain webhook call latency.
+ // 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 = 14;
+
+ // The sentiment analysis result, which depends on the
+ // `sentiment_analysis_request_config` specified in the request.
+ SentimentAnalysisResult sentiment_analysis_result = 17;
}
// The top-level message sent by the client to the
@@ -228,7 +273,7 @@ message QueryResult {
// Multiple request messages should be sent in order:
//
// 1. The first message must contain `session`, `query_input` plus optionally
-// `query_params` and/or `single_utterance`. The message must not contain `input_audio`.
+// `query_params`. The message must not contain `input_audio`.
//
// 2. If `query_input` was set to a streaming input audio config,
// all subsequent messages must contain only `input_audio`.
@@ -236,8 +281,8 @@ message QueryResult {
message StreamingDetectIntentRequest {
// Required. The name of the session the query is sent to.
// Format of the session name:
- // `projects//agent/sessions/`. It’s up to the API
- // caller to choose an appropriate . It can be a random number or
+ // `projects//agent/sessions/`. It's up to the API
+ // caller to choose an appropriate `Session ID`. It can be a random number or
// some type of user identifier (preferably hashed). The length of the session
// ID must not exceed 36 characters.
string session = 1;
@@ -255,15 +300,20 @@ message StreamingDetectIntentRequest {
// 3. an event that specifies which intent to trigger.
QueryInput query_input = 3;
- // 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.
+ // DEPRECATED. Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead.
+ // 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.
// This setting is ignored when `query_input` is a piece of text or an event.
- bool single_utterance = 4;
+ bool single_utterance = 4 [deprecated = true];
+
+ // Optional. Instructs the speech synthesizer how to generate the output
+ // audio. If this field is not set and agent-level speech synthesizer is not
+ // configured, no output audio is generated.
+ OutputAudioConfig output_audio_config = 5;
// Optional. The input audio content to be recognized. Must be sent if
// `query_input` was set to a streaming input audio config. The complete audio
@@ -296,6 +346,17 @@ message StreamingDetectIntentResponse {
// Specifies the status of the webhook request.
google.rpc.Status webhook_status = 4;
+
+ // 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.fulfillment_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.
+ bytes output_audio = 5;
+
+ // The config used by the speech synthesizer to generate the output audio.
+ OutputAudioConfig output_audio_config = 6;
}
// Contains a speech recognition result corresponding to a portion of the audio
@@ -317,7 +378,7 @@ message StreamingDetectIntentResponse {
//
// 6. transcript: " that is"
//
-// 7. recognition_event_type: `RECOGNITION_EVENT_END_OF_SINGLE_UTTERANCE`
+// 7. message_type: `END_OF_SINGLE_UTTERANCE`
//
// 8. transcript: " that is the question"
// is_final: true
@@ -328,9 +389,9 @@ message StreamingDetectIntentResponse {
//
// In each response we populate:
//
-// * for `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`.
+// * for `TRANSCRIPT`: `transcript` and possibly `is_final`.
//
-// * for `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `event_type`.
+// * for `END_OF_SINGLE_UTTERANCE`: only `message_type`.
message StreamingRecognitionResult {
// Type of the response message.
enum MessageType {
@@ -341,12 +402,12 @@ message StreamingRecognitionResult {
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` was set to `true`, and is not used otherwise.
+ // utterance and expects no additional inputs.
+ // 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` was
+ // set to `true`, and is not used otherwise.
END_OF_SINGLE_UTTERANCE = 2;
}
@@ -354,14 +415,13 @@ message StreamingRecognitionResult {
MessageType message_type = 1;
// Transcript text representing the words that the user spoke.
- // Populated if and only if `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`.
+ // Populated if and only if `message_type` = `TRANSCRIPT`.
string transcript = 2;
- // The default of 0.0 is a sentinel value indicating `confidence` was not set.
// 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 `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`.
+ // for `message_type` = `TRANSCRIPT`.
bool is_final = 3;
// The Speech confidence between 0.0 and 1.0 for the current portion of audio.
@@ -374,48 +434,24 @@ message StreamingRecognitionResult {
float confidence = 4;
}
-// Instructs the speech recognizer how to process the audio content.
-message InputAudioConfig {
- // Required. Audio encoding of the audio content to process.
- AudioEncoding audio_encoding = 1;
-
- // Required. Sample rate (in Hertz) of the audio content sent in the query.
- // Refer to [Cloud Speech API documentation](/speech/docs/basics) for more
- // details.
- int32 sample_rate_hertz = 2;
-
- // Required. The language of the supplied audio. Dialogflow does not do
- // translations. See [Language
- // Support](https://dialogflow.com/docs/languages) 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 = 3;
-
- // Optional. The collection of phrase hints which are used to boost accuracy
- // of speech recognition.
- // Refer to [Cloud Speech API documentation](/speech/docs/basics#phrase-hints)
- // for more details.
- repeated string phrase_hints = 4;
-}
-
// 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 bytes.
+ // Text length must not exceed 256 characters.
string text = 1;
// Required. The language of this conversational query. See [Language
- // Support](https://dialogflow.com/docs/languages) 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.
+ // 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 = 2;
}
// Events allow for matching intents by event name instead of the natural
-// language input. For instance, input `` can trigger a personalized welcome response.
+// language input. For instance, input `` can trigger a personalized welcome response.
// The parameter `name` may be used by the agent in the response:
-// `“Hello #welcome_event.name! What can I do for you today?”`.
+// `"Hello #welcome_event.name! What can I do for you today?"`.
message EventInput {
// Required. The unique identifier of the event.
string name = 1;
@@ -424,55 +460,35 @@ message EventInput {
google.protobuf.Struct parameters = 2;
// Required. The language of this query. See [Language
- // Support](https://dialogflow.com/docs/languages) 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.
+ // 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 = 3;
}
-// Audio encoding of the audio content sent in the conversational query request.
-// Refer to the [Cloud Speech API documentation](/speech/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;
+// Configures the types of sentiment analysis to perform.
+message SentimentAnalysisRequestConfig {
+ // Optional. Instructs the service to perform sentiment analysis on
+ // `query_text`. If not provided, sentiment analysis is not performed on
+ // `query_text`.
+ bool analyze_query_text_sentiment = 1;
+}
+
+// The result of sentiment analysis as configured by
+// `sentiment_analysis_request_config`.
+message SentimentAnalysisResult {
+ // The sentiment analysis result for `query_text`.
+ Sentiment query_text_sentiment = 1;
+}
+
+// The sentiment, such as positive/negative feeling or association, for a unit
+// of analysis, such as the query text.
+message Sentiment {
+ // 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;
}
diff --git a/third_party/googleapis/google/cloud/dialogflow/v2/session_entity_type.proto b/third_party/googleapis/google/cloud/dialogflow/v2/session_entity_type.proto
index 89408df6d..8714152aa 100644
--- a/third_party/googleapis/google/cloud/dialogflow/v2/session_entity_type.proto
+++ b/third_party/googleapis/google/cloud/dialogflow/v2/session_entity_type.proto
@@ -1,4 +1,4 @@
-// Copyright 2018 Google Inc.
+// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,6 +11,7 @@
// 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";
@@ -20,6 +21,7 @@ import "google/api/annotations.proto";
import "google/cloud/dialogflow/v2/entity_type.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
+import "google/api/client.proto";
option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
@@ -29,7 +31,6 @@ option java_outer_classname = "SessionEntityTypeProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";
-
// 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
@@ -41,8 +42,14 @@ option objc_class_prefix = "DF";
// entity type at the session level.
//
// For more information about entity types, see the
-// [Dialogflow documentation](https://dialogflow.com/docs/entities).
+// [Dialogflow
+// documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
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) = {
@@ -58,6 +65,9 @@ service SessionEntityTypes {
}
// 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: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes"
@@ -100,16 +110,22 @@ message SessionEntityType {
// The collection of session entities extends the collection of entities in
// the corresponding developer entity type.
- // Calls to `ListSessionEntityTypes`, `GetSessionEntityType`,
- // `CreateSessionEntityType` and `UpdateSessionEntityType` return the full
- // collection of entities from the developer entity type in the agent's
- // default language and the session 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.v2.EntityTypes.GetEntityType] on the developer entity type
+ // and merge.
ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2;
}
// Required. The unique identifier of this session entity type. Format:
// `projects//agent/sessions//entityTypes/`.
+ //
+ // `