webhook.proto 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.dialogflow.cx.v3;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/dialogflow/cx/v3/response_message.proto";
  21. import "google/protobuf/duration.proto";
  22. import "google/protobuf/empty.proto";
  23. import "google/protobuf/field_mask.proto";
  24. import "google/protobuf/struct.proto";
  25. option cc_enable_arenas = true;
  26. option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
  27. option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
  28. option java_multiple_files = true;
  29. option java_outer_classname = "WebhookProto";
  30. option java_package = "com.google.cloud.dialogflow.cx.v3";
  31. option objc_class_prefix = "DF";
  32. option ruby_package = "Google::Cloud::Dialogflow::CX::V3";
  33. option (google.api.resource_definition) = {
  34. type: "servicedirectory.googleapis.com/Service"
  35. pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}"
  36. };
  37. // Service for managing [Webhooks][google.cloud.dialogflow.cx.v3.Webhook].
  38. service Webhooks {
  39. option (google.api.default_host) = "dialogflow.googleapis.com";
  40. option (google.api.oauth_scopes) =
  41. "https://www.googleapis.com/auth/cloud-platform,"
  42. "https://www.googleapis.com/auth/dialogflow";
  43. // Returns the list of all webhooks in the specified agent.
  44. rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) {
  45. option (google.api.http) = {
  46. get: "/v3/{parent=projects/*/locations/*/agents/*}/webhooks"
  47. };
  48. option (google.api.method_signature) = "parent";
  49. }
  50. // Retrieves the specified webhook.
  51. rpc GetWebhook(GetWebhookRequest) returns (Webhook) {
  52. option (google.api.http) = {
  53. get: "/v3/{name=projects/*/locations/*/agents/*/webhooks/*}"
  54. };
  55. option (google.api.method_signature) = "name";
  56. }
  57. // Creates a webhook in the specified agent.
  58. rpc CreateWebhook(CreateWebhookRequest) returns (Webhook) {
  59. option (google.api.http) = {
  60. post: "/v3/{parent=projects/*/locations/*/agents/*}/webhooks"
  61. body: "webhook"
  62. };
  63. option (google.api.method_signature) = "parent,webhook";
  64. }
  65. // Updates the specified webhook.
  66. rpc UpdateWebhook(UpdateWebhookRequest) returns (Webhook) {
  67. option (google.api.http) = {
  68. patch: "/v3/{webhook.name=projects/*/locations/*/agents/*/webhooks/*}"
  69. body: "webhook"
  70. };
  71. option (google.api.method_signature) = "webhook,update_mask";
  72. }
  73. // Deletes the specified webhook.
  74. rpc DeleteWebhook(DeleteWebhookRequest) returns (google.protobuf.Empty) {
  75. option (google.api.http) = {
  76. delete: "/v3/{name=projects/*/locations/*/agents/*/webhooks/*}"
  77. };
  78. option (google.api.method_signature) = "name";
  79. }
  80. }
  81. // Webhooks host the developer's business logic. During a session, webhooks
  82. // allow the developer to use the data extracted by Dialogflow's natural
  83. // language processing to generate dynamic responses, validate collected data,
  84. // or trigger actions on the backend.
  85. message Webhook {
  86. option (google.api.resource) = {
  87. type: "dialogflow.googleapis.com/Webhook"
  88. pattern: "projects/{project}/locations/{location}/agents/{agent}/webhooks/{webhook}"
  89. };
  90. // Represents configuration for a generic web service.
  91. message GenericWebService {
  92. // Required. The webhook URI for receiving POST requests. It must use https protocol.
  93. string uri = 1 [(google.api.field_behavior) = REQUIRED];
  94. // The user name for HTTP Basic authentication.
  95. string username = 2 [deprecated = true];
  96. // The password for HTTP Basic authentication.
  97. string password = 3 [deprecated = true];
  98. // The HTTP request headers to send together with webhook
  99. // requests.
  100. map<string, string> request_headers = 4;
  101. // Optional. Specifies a list of allowed custom CA certificates (in DER format) for
  102. // HTTPS verification. This overrides the default SSL trust store. If this
  103. // is empty or unspecified, Dialogflow will use Google's default trust store
  104. // to verify certificates.
  105. // N.B. Make sure the HTTPS server certificates are signed with "subject alt
  106. // name". For instance a certificate can be self-signed using the following
  107. // command,
  108. // ```
  109. // openssl x509 -req -days 200 -in example.com.csr \
  110. // -signkey example.com.key \
  111. // -out example.com.crt \
  112. // -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
  113. // ```
  114. repeated bytes allowed_ca_certs = 5 [(google.api.field_behavior) = OPTIONAL];
  115. }
  116. // Represents configuration for a [Service
  117. // Directory](https://cloud.google.com/service-directory) service.
  118. message ServiceDirectoryConfig {
  119. // Required. The name of [Service
  120. // Directory](https://cloud.google.com/service-directory) service.
  121. // Format: `projects/<Project ID>/locations/<Location
  122. // ID>/namespaces/<Namespace ID>/services/<Service ID>`.
  123. // `Location ID` of the service directory must be the same as the location
  124. // of the agent.
  125. string service = 1 [
  126. (google.api.field_behavior) = REQUIRED,
  127. (google.api.resource_reference) = {
  128. type: "servicedirectory.googleapis.com/Service"
  129. }
  130. ];
  131. // Generic Service configuration of this webhook.
  132. GenericWebService generic_web_service = 2;
  133. }
  134. // The unique identifier of the webhook.
  135. // Required for the [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook] method.
  136. // [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook] populates the name automatically.
  137. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  138. // ID>/webhooks/<Webhook ID>`.
  139. string name = 1;
  140. // Required. The human-readable name of the webhook, unique within the agent.
  141. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  142. // Required. The webhook configuration.
  143. oneof webhook {
  144. // Configuration for a generic web service.
  145. GenericWebService generic_web_service = 4;
  146. // Configuration for a [Service
  147. // Directory](https://cloud.google.com/service-directory) service.
  148. ServiceDirectoryConfig service_directory = 7;
  149. }
  150. // Webhook execution timeout. Execution is considered failed if Dialogflow
  151. // doesn't receive a response from webhook at the end of the timeout period.
  152. // Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
  153. google.protobuf.Duration timeout = 6;
  154. // Indicates whether the webhook is disabled.
  155. bool disabled = 5;
  156. }
  157. // The request message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks].
  158. message ListWebhooksRequest {
  159. // Required. The agent to list all webhooks for.
  160. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
  161. string parent = 1 [
  162. (google.api.field_behavior) = REQUIRED,
  163. (google.api.resource_reference) = {
  164. child_type: "dialogflow.googleapis.com/Webhook"
  165. }
  166. ];
  167. // The maximum number of items to return in a single page. By default 100 and
  168. // at most 1000.
  169. int32 page_size = 2;
  170. // The next_page_token value returned from a previous list request.
  171. string page_token = 3;
  172. }
  173. // The response message for [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks].
  174. message ListWebhooksResponse {
  175. // The list of webhooks. There will be a maximum number of items returned
  176. // based on the page_size field in the request.
  177. repeated Webhook webhooks = 1;
  178. // Token to retrieve the next page of results, or empty if there are no more
  179. // results in the list.
  180. string next_page_token = 2;
  181. }
  182. // The request message for [Webhooks.GetWebhook][google.cloud.dialogflow.cx.v3.Webhooks.GetWebhook].
  183. message GetWebhookRequest {
  184. // Required. The name of the webhook.
  185. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  186. // ID>/webhooks/<Webhook ID>`.
  187. string name = 1 [
  188. (google.api.field_behavior) = REQUIRED,
  189. (google.api.resource_reference) = {
  190. type: "dialogflow.googleapis.com/Webhook"
  191. }
  192. ];
  193. }
  194. // The request message for [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.CreateWebhook].
  195. message CreateWebhookRequest {
  196. // Required. The agent to create a webhook for.
  197. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
  198. string parent = 1 [
  199. (google.api.field_behavior) = REQUIRED,
  200. (google.api.resource_reference) = {
  201. child_type: "dialogflow.googleapis.com/Webhook"
  202. }
  203. ];
  204. // Required. The webhook to create.
  205. Webhook webhook = 2 [(google.api.field_behavior) = REQUIRED];
  206. }
  207. // The request message for [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3.Webhooks.UpdateWebhook].
  208. message UpdateWebhookRequest {
  209. // Required. The webhook to update.
  210. Webhook webhook = 1 [(google.api.field_behavior) = REQUIRED];
  211. // The mask to control which fields get updated. If the mask is not present,
  212. // all fields will be updated.
  213. google.protobuf.FieldMask update_mask = 2;
  214. }
  215. // The request message for [Webhooks.DeleteWebhook][google.cloud.dialogflow.cx.v3.Webhooks.DeleteWebhook].
  216. message DeleteWebhookRequest {
  217. // Required. The name of the webhook to delete.
  218. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  219. // ID>/webhooks/<Webhook ID>`.
  220. string name = 1 [
  221. (google.api.field_behavior) = REQUIRED,
  222. (google.api.resource_reference) = {
  223. type: "dialogflow.googleapis.com/Webhook"
  224. }
  225. ];
  226. // This field has no effect for webhook not being used.
  227. // For webhooks that are used by pages/flows/transition route groups:
  228. //
  229. // * If `force` is set to false, an error will be returned with message
  230. // indicating the referenced resources.
  231. // * If `force` is set to true, Dialogflow will remove the webhook, as well
  232. // as any references to the webhook (i.e. [Webhook][google.cloud.dialogflow.cx.v3.Fulfillment.webhook]
  233. // and [tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag]in fulfillments that point to this webhook
  234. // will be removed).
  235. bool force = 2;
  236. }
  237. // The request message for a webhook call. The request is sent as a JSON object
  238. // and the field names will be presented in camel cases.
  239. //
  240. // You may see undocumented fields in an actual request. These fields are used
  241. // internally by Dialogflow and should be ignored.
  242. message WebhookRequest {
  243. // Represents fulfillment information communicated to the webhook.
  244. message FulfillmentInfo {
  245. // Always present.
  246. // The value of the [Fulfillment.tag][google.cloud.dialogflow.cx.v3.Fulfillment.tag] field will be populated in this
  247. // field by Dialogflow when the associated webhook is called.
  248. // The tag is typically used by the webhook service to identify which
  249. // fulfillment is being called, but it could be used for other purposes.
  250. string tag = 1;
  251. }
  252. // Represents intent information communicated to the webhook.
  253. message IntentInfo {
  254. // Represents a value for an intent parameter.
  255. message IntentParameterValue {
  256. // Always present. Original text value extracted from user utterance.
  257. string original_value = 1;
  258. // Always present. Structured value for the parameter extracted from user
  259. // utterance.
  260. google.protobuf.Value resolved_value = 2;
  261. }
  262. // Always present. The unique identifier of the last matched
  263. // [intent][google.cloud.dialogflow.cx.v3.Intent].
  264. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  265. // ID>/intents/<Intent ID>`.
  266. string last_matched_intent = 1 [(google.api.resource_reference) = {
  267. type: "dialogflow.googleapis.com/Intent"
  268. }];
  269. // Always present. The display name of the last matched [intent][google.cloud.dialogflow.cx.v3.Intent].
  270. string display_name = 3;
  271. // Parameters identified as a result of intent matching. This is a map of
  272. // the name of the identified parameter to the value of the parameter
  273. // identified from the user's utterance. All parameters defined in the
  274. // matched intent that are identified will be surfaced here.
  275. map<string, IntentParameterValue> parameters = 2;
  276. // The confidence of the matched intent. Values range from 0.0 (completely
  277. // uncertain) to 1.0 (completely certain).
  278. float confidence = 4;
  279. }
  280. // Represents the result of sentiment analysis.
  281. message SentimentAnalysisResult {
  282. // Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
  283. // sentiment).
  284. float score = 1;
  285. // A non-negative number in the [0, +inf) range, which represents the
  286. // absolute magnitude of sentiment, regardless of score (positive or
  287. // negative).
  288. float magnitude = 2;
  289. }
  290. // Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3.DetectIntentResponse] that
  291. // will be returned to the API caller.
  292. string detect_intent_response_id = 1;
  293. // The original conversational query.
  294. oneof query {
  295. // If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was provided as input, this field
  296. // will contain a copy of the text.
  297. string text = 10;
  298. // If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as input, this field will
  299. // contain a copy of the intent identifier.
  300. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  301. // ID>/intents/<Intent ID>`.
  302. string trigger_intent = 11 [(google.api.resource_reference) = {
  303. type: "dialogflow.googleapis.com/Intent"
  304. }];
  305. // If [natural language speech audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input,
  306. // this field will contain the transcript for the audio.
  307. string transcript = 12;
  308. // If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as input, this field will contain
  309. // the name of the event.
  310. string trigger_event = 14;
  311. }
  312. // The language code specified in the [original
  313. // request][QueryInput.language_code].
  314. string language_code = 15;
  315. // Always present. Information about the fulfillment that triggered this
  316. // webhook call.
  317. FulfillmentInfo fulfillment_info = 6;
  318. // Information about the last matched intent.
  319. IntentInfo intent_info = 3;
  320. // Information about page status.
  321. PageInfo page_info = 4;
  322. // Information about session status.
  323. SessionInfo session_info = 5;
  324. // The list of rich message responses to present to the user. Webhook can
  325. // choose to append or replace this list in
  326. // [WebhookResponse.fulfillment_response][google.cloud.dialogflow.cx.v3.WebhookResponse.fulfillment_response];
  327. repeated ResponseMessage messages = 7;
  328. // Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3.QueryParameters.payload].
  329. google.protobuf.Struct payload = 8;
  330. // The sentiment analysis result of the current user request. The field is
  331. // filled when sentiment analysis is configured to be enabled for the request.
  332. SentimentAnalysisResult sentiment_analysis_result = 9;
  333. }
  334. // The response message for a webhook call.
  335. message WebhookResponse {
  336. // Represents a fulfillment response to the user.
  337. message FulfillmentResponse {
  338. // Defines merge behavior for `messages`.
  339. enum MergeBehavior {
  340. // Not specified. `APPEND` will be used.
  341. MERGE_BEHAVIOR_UNSPECIFIED = 0;
  342. // `messages` will be appended to the list of messages waiting to be sent
  343. // to the user.
  344. APPEND = 1;
  345. // `messages` will replace the list of messages waiting to be sent to the
  346. // user.
  347. REPLACE = 2;
  348. }
  349. // The list of rich message responses to present to the user.
  350. repeated ResponseMessage messages = 1;
  351. // Merge behavior for `messages`.
  352. MergeBehavior merge_behavior = 2;
  353. }
  354. // The fulfillment response to send to the user. This field can be omitted by
  355. // the webhook if it does not intend to send any response to the user.
  356. FulfillmentResponse fulfillment_response = 1;
  357. // Information about page status. This field can be omitted by the webhook if
  358. // it does not intend to modify page status.
  359. PageInfo page_info = 2;
  360. // Information about session status. This field can be omitted by the webhook
  361. // if it does not intend to modify session status.
  362. SessionInfo session_info = 3;
  363. // Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
  364. google.protobuf.Struct payload = 4;
  365. // The target to transition to. This can be set optionally to indicate an
  366. // immediate transition to a different page in the same host flow, or a
  367. // different flow in the same agent.
  368. oneof transition {
  369. // The target page to transition to.
  370. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  371. // ID>/flows/<Flow ID>/pages/<Page ID>`.
  372. string target_page = 5 [(google.api.resource_reference) = {
  373. type: "dialogflow.googleapis.com/Page"
  374. }];
  375. // The target flow to transition to.
  376. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  377. // ID>/flows/<Flow ID>`.
  378. string target_flow = 6 [(google.api.resource_reference) = {
  379. type: "dialogflow.googleapis.com/Flow"
  380. }];
  381. }
  382. }
  383. // Represents page information communicated to and from the webhook.
  384. message PageInfo {
  385. // Represents form information.
  386. message FormInfo {
  387. // Represents parameter information.
  388. message ParameterInfo {
  389. // Represents the state of a parameter.
  390. enum ParameterState {
  391. // Not specified. This value should be never used.
  392. PARAMETER_STATE_UNSPECIFIED = 0;
  393. // Indicates that the parameter does not have a value.
  394. EMPTY = 1;
  395. // Indicates that the parameter value is invalid. This field can be used
  396. // by the webhook to invalidate the parameter and ask the server to
  397. // collect it from the user again.
  398. INVALID = 2;
  399. // Indicates that the parameter has a value.
  400. FILLED = 3;
  401. }
  402. // Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Required for
  403. // [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  404. // The human-readable name of the parameter, unique within the form. This
  405. // field cannot be modified by the webhook.
  406. string display_name = 1;
  407. // Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  408. // Indicates whether the parameter is required. Optional parameters will
  409. // not trigger prompts; however, they are filled if the user specifies
  410. // them. Required parameters must be filled before form filling concludes.
  411. bool required = 2;
  412. // Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Required for
  413. // [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The state of the parameter. This field can be set
  414. // to [INVALID][google.cloud.dialogflow.cx.v3.PageInfo.FormInfo.ParameterInfo.ParameterState.INVALID] by
  415. // the webhook to invalidate the parameter; other values set by the
  416. // webhook will be ignored.
  417. ParameterState state = 3;
  418. // Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  419. // The value of the parameter. This field can be set by the webhook to
  420. // change the parameter value.
  421. google.protobuf.Value value = 4;
  422. // Optional for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  423. // Indicates if the parameter value was just collected on the last
  424. // conversation turn.
  425. bool just_collected = 5;
  426. }
  427. // Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  428. // The parameters contained in the form. Note that the webhook cannot add
  429. // or remove any form parameter.
  430. repeated ParameterInfo parameter_info = 2;
  431. }
  432. // Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  433. // The unique identifier of the current page.
  434. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  435. // ID>/flows/<Flow ID>/pages/<Page ID>`.
  436. string current_page = 1 [(google.api.resource_reference) = {
  437. type: "dialogflow.googleapis.com/Page"
  438. }];
  439. // Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  440. // The display name of the current page.
  441. string display_name = 4;
  442. // Optional for both [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest] and [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  443. // Information about the form.
  444. FormInfo form_info = 3;
  445. }
  446. // Represents session information communicated to and from the webhook.
  447. message SessionInfo {
  448. // Always present for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Ignored for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  449. // The unique identifier of the [session][google.cloud.dialogflow.cx.v3.DetectIntentRequest.session]. This
  450. // field can be used by the webhook to identify a session.
  451. // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
  452. // ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
  453. // ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`
  454. // if environment is specified.
  455. string session = 1 [(google.api.resource_reference) = {
  456. type: "dialogflow.googleapis.com/Session"
  457. }];
  458. // Optional for [WebhookRequest][google.cloud.dialogflow.cx.v3.WebhookRequest]. Optional for [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse].
  459. // All parameters collected from forms and intents during the session.
  460. // Parameters can be created, updated, or removed by the webhook. To remove a
  461. // parameter from the session, the webhook should explicitly set the parameter
  462. // value to null in [WebhookResponse][google.cloud.dialogflow.cx.v3.WebhookResponse]. The map is keyed by parameters'
  463. // display names.
  464. map<string, google.protobuf.Value> parameters = 2;
  465. }