Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / dialogflow / protos / google / cloud / dialogflow / v2beta1 / webhook.proto
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.cloud.dialogflow.v2beta1;
18
19 import "google/api/annotations.proto";
20 import "google/cloud/dialogflow/v2beta1/context.proto";
21 import "google/cloud/dialogflow/v2beta1/intent.proto";
22 import "google/cloud/dialogflow/v2beta1/session.proto";
23 import "google/protobuf/struct.proto";
24
25 option cc_enable_arenas = true;
26 option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
27 option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
28 option java_multiple_files = true;
29 option java_outer_classname = "WebhookProto";
30 option java_package = "com.google.cloud.dialogflow.v2beta1";
31 option objc_class_prefix = "DF";
32
33 // The request message for a webhook call.
34 message WebhookRequest {
35   // The unique identifier of detectIntent request session.
36   // Can be used to identify end-user inside webhook implementation.
37   // Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
38   string session = 4;
39
40   // The unique identifier of the response. Contains the same value as
41   // `[Streaming]DetectIntentResponse.response_id`.
42   string response_id = 1;
43
44   // The result of the conversational query or event processing. Contains the
45   // same value as `[Streaming]DetectIntentResponse.query_result`.
46   QueryResult query_result = 2;
47
48   // Alternative query results from KnowledgeService.
49   repeated QueryResult alternative_query_results = 5;
50
51   // Optional. The contents of the original request that was passed to
52   // `[Streaming]DetectIntent` call.
53   OriginalDetectIntentRequest original_detect_intent_request = 3;
54 }
55
56 // The response message for a webhook call.
57 message WebhookResponse {
58   // Optional. The text to be shown on the screen. This value is passed directly
59   // to `QueryResult.fulfillment_text`.
60   string fulfillment_text = 1;
61
62   // Optional. The collection of rich messages to present to the user. This
63   // value is passed directly to `QueryResult.fulfillment_messages`.
64   repeated Intent.Message fulfillment_messages = 2;
65
66   // Optional. This value is passed directly to `QueryResult.webhook_source`.
67   string source = 3;
68
69   // Optional. This value is passed directly to `QueryResult.webhook_payload`.
70   // See the related `fulfillment_messages[i].payload field`, which may be used
71   // as an alternative to this field.
72   //
73   // This field can be used for Actions on Google responses.
74   // It should have a structure similar to the JSON message shown here. For more
75   // information, see
76   // [Actions on Google Webhook
77   // Format](https://developers.google.com/actions/dialogflow/webhook)
78   // <pre>{
79   //   "google": {
80   //     "expectUserResponse": true,
81   //     "richResponse": {
82   //       "items": [
83   //         {
84   //           "simpleResponse": {
85   //             "textToSpeech": "this is a simple response"
86   //           }
87   //         }
88   //       ]
89   //     }
90   //   }
91   // }</pre>
92   google.protobuf.Struct payload = 4;
93
94   // Optional. The collection of output contexts. This value is passed directly
95   // to `QueryResult.output_contexts`.
96   repeated Context output_contexts = 5;
97
98   // Optional. Makes the platform immediately invoke another `DetectIntent` call
99   // internally with the specified event as input.
100   EventInput followup_event_input = 6;
101
102   // Optional. Indicates that this intent ends an interaction. Some integrations
103   // (e.g., Actions on Google or Dialogflow phone gateway) use this information
104   // to close interaction with an end user. Default is false.
105   bool end_interaction = 8;
106 }
107
108 // Represents the contents of the original request that was passed to
109 // the `[Streaming]DetectIntent` call.
110 message OriginalDetectIntentRequest {
111   // The source of this request, e.g., `google`, `facebook`, `slack`. It is set
112   // by Dialogflow-owned servers.
113   string source = 1;
114
115   // Optional. The version of the protocol used for this request.
116   // This field is AoG-specific.
117   string version = 2;
118
119   // Optional. This field is set to the value of `QueryParameters.payload` field
120   // passed in the request.
121   //
122   // This field is used for the telephony gateway. It should have a
123   // structure similar to this JSON message:
124   // <pre>{
125   //  "telephony": {
126   //    "caller_id": "+18558363987"
127   //  }
128   // }</pre>
129   // Note: The caller ID field (`caller_id`) will be in
130   // [E.164 format](https://en.wikipedia.org/wiki/E.164) and is only supported
131   // for Enterprise Edition and not for Standard Edition agents. When the
132   // telephony gateway is used with a standard tier agent the `caller_id` field
133   // above will have a value of `REDACTED_IN_STANDARD_TIER_AGENT`.
134   google.protobuf.Struct payload = 3;
135 }