From 1d520eaa7bbd8b40f53942ff03b5496fff887b53 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 22 Apr 2020 10:48:21 -0700 Subject: [PATCH] feat: Publish ListEnvironments for Dialogflow v2/v2beta1 library. docs: Clarify WebhookResponse fields for Dialogflow v2/v2beta1 library. PiperOrigin-RevId: 307849529 --- google/cloud/dialogflow/v2/BUILD.bazel | 4 + .../v2/dialogflow_grpc_service_config.json | 18 +++ google/cloud/dialogflow/v2/dialogflow_v2.yaml | 8 ++ google/cloud/dialogflow/v2/environment.proto | 126 ++++++++++++++++ google/cloud/dialogflow/v2/webhook.proto | 37 +++-- google/cloud/dialogflow/v2beta1/BUILD.bazel | 2 + google/cloud/dialogflow/v2beta1/agent.proto | 1 + .../dialogflow_grpc_service_config.json | 18 +++ .../v2beta1/dialogflow_v2beta1.yaml | 8 ++ .../dialogflow/v2beta1/environment.proto | 135 ++++++++++++++++++ google/cloud/dialogflow/v2beta1/webhook.proto | 37 +++-- 11 files changed, 364 insertions(+), 30 deletions(-) create mode 100644 google/cloud/dialogflow/v2/environment.proto create mode 100644 google/cloud/dialogflow/v2beta1/environment.proto diff --git a/google/cloud/dialogflow/v2/BUILD.bazel b/google/cloud/dialogflow/v2/BUILD.bazel index dddd44e9d..3bdb813b1 100644 --- a/google/cloud/dialogflow/v2/BUILD.bazel +++ b/google/cloud/dialogflow/v2/BUILD.bazel @@ -16,6 +16,7 @@ proto_library( "audio_config.proto", "context.proto", "entity_type.proto", + "environment.proto", "intent.proto", "session.proto", "session_entity_type.proto", @@ -34,6 +35,7 @@ proto_library( "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", ], ) @@ -88,6 +90,7 @@ java_gapic_test( "com.google.cloud.dialogflow.v2.AgentsClientTest", "com.google.cloud.dialogflow.v2.ContextsClientTest", "com.google.cloud.dialogflow.v2.EntityTypesClientTest", + "com.google.cloud.dialogflow.v2.EnvironmentsClientTest", "com.google.cloud.dialogflow.v2.IntentsClientTest", "com.google.cloud.dialogflow.v2.SessionEntityTypesClientTest", "com.google.cloud.dialogflow.v2.SessionsClientTest", @@ -191,6 +194,7 @@ moved_proto_library( "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:struct_proto", + "@com_google_protobuf//:timestamp_proto", ], ) diff --git a/google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json b/google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json index f268bd969..10cc1d83a 100755 --- a/google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json +++ b/google/cloud/dialogflow/v2/dialogflow_grpc_service_config.json @@ -557,6 +557,24 @@ "DEADLINE_EXCEEDED" ] } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2.Environments", + "method": "ListEnvironments" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL" + ] + } } ] } diff --git a/google/cloud/dialogflow/v2/dialogflow_v2.yaml b/google/cloud/dialogflow/v2/dialogflow_v2.yaml index 5357c1522..a8d105e43 100644 --- a/google/cloud/dialogflow/v2/dialogflow_v2.yaml +++ b/google/cloud/dialogflow/v2/dialogflow_v2.yaml @@ -7,6 +7,7 @@ apis: - name: google.cloud.dialogflow.v2.Agents - name: google.cloud.dialogflow.v2.Contexts - name: google.cloud.dialogflow.v2.EntityTypes +- name: google.cloud.dialogflow.v2.Environments - name: google.cloud.dialogflow.v2.Intents - name: google.cloud.dialogflow.v2.SessionEntityTypes - name: google.cloud.dialogflow.v2.Sessions @@ -47,6 +48,8 @@ backend: deadline: 60.0 - selector: 'google.cloud.dialogflow.v2.EntityTypes.*' deadline: 60.0 + - selector: google.cloud.dialogflow.v2.Environments.ListEnvironments + deadline: 60.0 - selector: 'google.cloud.dialogflow.v2.Intents.*' deadline: 60.0 - selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*' @@ -75,6 +78,11 @@ authentication: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2.Environments.ListEnvironments + 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: |- diff --git a/google/cloud/dialogflow/v2/environment.proto b/google/cloud/dialogflow/v2/environment.proto new file mode 100644 index 000000000..8c3b4f170 --- /dev/null +++ b/google/cloud/dialogflow/v2/environment.proto @@ -0,0 +1,126 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.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 = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Manages agent environments. +service Environments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/agent}/environments" + }; + } +} + +// Represents an agent environment. +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + }; + + // Represents an environment state. When a environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: `projects//agent/environments/`. + // For Environment ID, "-" is reserved for 'draft' environment. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} diff --git a/google/cloud/dialogflow/v2/webhook.proto b/google/cloud/dialogflow/v2/webhook.proto index 94a373c75..509649a74 100644 --- a/google/cloud/dialogflow/v2/webhook.proto +++ b/google/cloud/dialogflow/v2/webhook.proto @@ -68,21 +68,27 @@ message WebhookRequest { // [Protocol Buffers Language // Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. string fulfillment_text = 1; - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. repeated Intent.Message fulfillment_messages = 2; - // Optional. This value is passed directly to `QueryResult.webhook_source`. + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. string source = 3; - // Optional. This field can be used to pass custom data from your webhook to the API - // caller. Arbitrary JSON objects are supported. + // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. // When provided, Dialogflow uses this field to populate - // `QueryResult.webhook_payload` sent to the API caller. + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. // This field is also used by the // [Google Assistant // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) @@ -91,21 +97,22 @@ message WebhookResponse { // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) google.protobuf.Struct payload = 4; - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. repeated Context output_contexts = 5; - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. + // Optional. Invokes the supplied events. // When this field is set, Dialogflow ignores the `fulfillment_text`, // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; // 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. Setting the session entity types inside - // webhook overwrites the session entity types that have been set through - // `DetectIntentRequest.query_params.session_entity_types`. + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. repeated SessionEntityType session_entity_types = 10; } diff --git a/google/cloud/dialogflow/v2beta1/BUILD.bazel b/google/cloud/dialogflow/v2beta1/BUILD.bazel index 73586f8b5..424bf53b2 100644 --- a/google/cloud/dialogflow/v2beta1/BUILD.bazel +++ b/google/cloud/dialogflow/v2beta1/BUILD.bazel @@ -17,6 +17,7 @@ proto_library( "context.proto", "document.proto", "entity_type.proto", + "environment.proto", "gcs.proto", "intent.proto", "knowledge_base.proto", @@ -93,6 +94,7 @@ java_gapic_test( "com.google.cloud.dialogflow.v2beta1.ContextsClientTest", "com.google.cloud.dialogflow.v2beta1.DocumentsClientTest", "com.google.cloud.dialogflow.v2beta1.EntityTypesClientTest", + "com.google.cloud.dialogflow.v2beta1.EnvironmentsClientTest", "com.google.cloud.dialogflow.v2beta1.IntentsClientTest", "com.google.cloud.dialogflow.v2beta1.KnowledgeBasesClientTest", "com.google.cloud.dialogflow.v2beta1.SessionEntityTypesClientTest", diff --git a/google/cloud/dialogflow/v2beta1/agent.proto b/google/cloud/dialogflow/v2beta1/agent.proto index 57628f2b8..7bfedab4f 100644 --- a/google/cloud/dialogflow/v2beta1/agent.proto +++ b/google/cloud/dialogflow/v2beta1/agent.proto @@ -19,6 +19,7 @@ package google.cloud.dialogflow.v2beta1; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/environment.proto"; import "google/cloud/dialogflow/v2beta1/validation_result.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; diff --git a/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json b/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json index b0672eac1..dcf6791c0 100755 --- a/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json +++ b/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json @@ -657,6 +657,24 @@ "DEADLINE_EXCEEDED" ] } + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Environments", + "method": "ListEnvironments" + } + ], + "timeout": "60s", + "retryPolicy": { + "initialBackoff": "0.100s", + "maxBackoff": "60s", + "backoffMultiplier": 1.3, + "retryableStatusCodes": [ + "UNAVAILABLE", + "INTERNAL" + ] + } } ] } diff --git a/google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml b/google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml index 5300441f8..64c2b6172 100644 --- a/google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml +++ b/google/cloud/dialogflow/v2beta1/dialogflow_v2beta1.yaml @@ -8,6 +8,7 @@ apis: - name: google.cloud.dialogflow.v2beta1.Contexts - name: google.cloud.dialogflow.v2beta1.Documents - name: google.cloud.dialogflow.v2beta1.EntityTypes +- name: google.cloud.dialogflow.v2beta1.Environments - name: google.cloud.dialogflow.v2beta1.Intents - name: google.cloud.dialogflow.v2beta1.KnowledgeBases - name: google.cloud.dialogflow.v2beta1.SessionEntityTypes @@ -52,6 +53,8 @@ backend: deadline: 60.0 - selector: 'google.cloud.dialogflow.v2beta1.EntityTypes.*' deadline: 60.0 + - selector: google.cloud.dialogflow.v2beta1.Environments.ListEnvironments + deadline: 60.0 - selector: 'google.cloud.dialogflow.v2beta1.Intents.*' deadline: 60.0 - selector: 'google.cloud.dialogflow.v2beta1.KnowledgeBases.*' @@ -102,6 +105,11 @@ authentication: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/dialogflow + - selector: google.cloud.dialogflow.v2beta1.Environments.ListEnvironments + 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: |- diff --git a/google/cloud/dialogflow/v2beta1/environment.proto b/google/cloud/dialogflow/v2beta1/environment.proto new file mode 100644 index 000000000..386c014d6 --- /dev/null +++ b/google/cloud/dialogflow/v2beta1/environment.proto @@ -0,0 +1,135 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.dialogflow.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Manages agent environments. +service Environments { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent}/environments" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/environments" + } + }; + } +} + +// Represents an agent environment. +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + }; + + // Represents an environment state. When a environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: `projects//agent/environments/`. + // For Environment ID, "-" is reserved for 'draft' environment. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + } + ]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 1; + + // Token to retrieve the next page of results, or empty if there are no + // more results in the list. + string next_page_token = 2; +} diff --git a/google/cloud/dialogflow/v2beta1/webhook.proto b/google/cloud/dialogflow/v2beta1/webhook.proto index f1f687bde..9e5d2a4c4 100644 --- a/google/cloud/dialogflow/v2beta1/webhook.proto +++ b/google/cloud/dialogflow/v2beta1/webhook.proto @@ -71,21 +71,27 @@ message WebhookRequest { // [Protocol Buffers Language // Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller. string fulfillment_text = 1; - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller. repeated Intent.Message fulfillment_messages = 2; - // Optional. This value is passed directly to `QueryResult.webhook_source`. + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller. string source = 3; - // Optional. This field can be used to pass custom data from your webhook to the API - // caller. Arbitrary JSON objects are supported. + // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. // When provided, Dialogflow uses this field to populate - // `QueryResult.webhook_payload` sent to the API caller. + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. // This field is also used by the // [Google Assistant // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) @@ -94,12 +100,13 @@ message WebhookResponse { // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) google.protobuf.Struct payload = 4; - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller. repeated Context output_contexts = 5; - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. + // Optional. Invokes the supplied events. // When this field is set, Dialogflow ignores the `fulfillment_text`, // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; @@ -111,9 +118,9 @@ message WebhookResponse { // 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. Setting the session entity types inside - // webhook overwrites the session entity types that have been set through - // `DetectIntentRequest.query_params.session_entity_types`. + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods. repeated SessionEntityType session_entity_types = 10; }