intent.proto 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453
  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.v2beta1;
  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/v2beta1/context.proto";
  21. import "google/longrunning/operations.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.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 = "IntentProto";
  30. option java_package = "com.google.cloud.dialogflow.v2beta1";
  31. option objc_class_prefix = "DF";
  32. // Service for managing [Intents][google.cloud.dialogflow.v2beta1.Intent].
  33. service Intents {
  34. option (google.api.default_host) = "dialogflow.googleapis.com";
  35. option (google.api.oauth_scopes) =
  36. "https://www.googleapis.com/auth/cloud-platform,"
  37. "https://www.googleapis.com/auth/dialogflow";
  38. // Returns the list of all intents in the specified agent.
  39. rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) {
  40. option (google.api.http) = {
  41. get: "/v2beta1/{parent=projects/*/agent}/intents"
  42. additional_bindings {
  43. get: "/v2beta1/{parent=projects/*/locations/*/agent}/intents"
  44. }
  45. additional_bindings {
  46. get: "/v2beta1/{parent=projects/*/agent/environments/*}/intents"
  47. }
  48. additional_bindings {
  49. get: "/v2beta1/{parent=projects/*/locations/*/agent/environments/*}/intents"
  50. }
  51. };
  52. option (google.api.method_signature) = "parent";
  53. option (google.api.method_signature) = "parent,language_code";
  54. }
  55. // Retrieves the specified intent.
  56. rpc GetIntent(GetIntentRequest) returns (Intent) {
  57. option (google.api.http) = {
  58. get: "/v2beta1/{name=projects/*/agent/intents/*}"
  59. additional_bindings {
  60. get: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}"
  61. }
  62. };
  63. option (google.api.method_signature) = "name";
  64. option (google.api.method_signature) = "name,language_code";
  65. }
  66. // Creates an intent in the specified agent.
  67. //
  68. // Note: You should always train an agent prior to sending it queries. See the
  69. // [training
  70. // documentation](https://cloud.google.com/dialogflow/es/docs/training).
  71. rpc CreateIntent(CreateIntentRequest) returns (Intent) {
  72. option (google.api.http) = {
  73. post: "/v2beta1/{parent=projects/*/agent}/intents"
  74. body: "intent"
  75. additional_bindings {
  76. post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents"
  77. body: "intent"
  78. }
  79. };
  80. option (google.api.method_signature) = "parent,intent";
  81. option (google.api.method_signature) = "parent,intent,language_code";
  82. }
  83. // Updates the specified intent.
  84. //
  85. // Note: You should always train an agent prior to sending it queries. See the
  86. // [training
  87. // documentation](https://cloud.google.com/dialogflow/es/docs/training).
  88. rpc UpdateIntent(UpdateIntentRequest) returns (Intent) {
  89. option (google.api.http) = {
  90. patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}"
  91. body: "intent"
  92. additional_bindings {
  93. patch: "/v2beta1/{intent.name=projects/*/locations/*/agent/intents/*}"
  94. body: "intent"
  95. }
  96. };
  97. option (google.api.method_signature) = "intent,update_mask";
  98. option (google.api.method_signature) = "intent";
  99. option (google.api.method_signature) = "intent,language_code";
  100. option (google.api.method_signature) = "intent,language_code,update_mask";
  101. }
  102. // Deletes the specified intent and its direct or indirect followup intents.
  103. //
  104. // Note: You should always train an agent prior to sending it queries. See the
  105. // [training
  106. // documentation](https://cloud.google.com/dialogflow/es/docs/training).
  107. rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
  108. option (google.api.http) = {
  109. delete: "/v2beta1/{name=projects/*/agent/intents/*}"
  110. additional_bindings {
  111. delete: "/v2beta1/{name=projects/*/locations/*/agent/intents/*}"
  112. }
  113. };
  114. option (google.api.method_signature) = "name";
  115. }
  116. // Updates/Creates multiple intents in the specified agent.
  117. //
  118. // This method is a [long-running
  119. // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
  120. // The returned `Operation` type has the following method-specific fields:
  121. //
  122. // - `metadata`: An empty [Struct
  123. // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
  124. // - `response`: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse]
  125. //
  126. // Note: You should always train an agent prior to sending it queries. See the
  127. // [training
  128. // documentation](https://cloud.google.com/dialogflow/es/docs/training).
  129. rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) {
  130. option (google.api.http) = {
  131. post: "/v2beta1/{parent=projects/*/agent}/intents:batchUpdate"
  132. body: "*"
  133. additional_bindings {
  134. post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchUpdate"
  135. body: "*"
  136. }
  137. };
  138. option (google.api.method_signature) = "parent,intent_batch_uri";
  139. option (google.api.method_signature) = "parent,intent_batch_inline";
  140. option (google.longrunning.operation_info) = {
  141. response_type: "google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse"
  142. metadata_type: "google.protobuf.Struct"
  143. };
  144. }
  145. // Deletes intents in the specified agent.
  146. //
  147. // This method is a [long-running
  148. // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
  149. // The returned `Operation` type has the following method-specific fields:
  150. //
  151. // - `metadata`: An empty [Struct
  152. // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
  153. // - `response`: An [Empty
  154. // message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
  155. //
  156. // Note: You should always train an agent prior to sending it queries. See the
  157. // [training
  158. // documentation](https://cloud.google.com/dialogflow/es/docs/training).
  159. rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) {
  160. option (google.api.http) = {
  161. post: "/v2beta1/{parent=projects/*/agent}/intents:batchDelete"
  162. body: "*"
  163. additional_bindings {
  164. post: "/v2beta1/{parent=projects/*/locations/*/agent}/intents:batchDelete"
  165. body: "*"
  166. }
  167. };
  168. option (google.api.method_signature) = "parent,intents";
  169. option (google.longrunning.operation_info) = {
  170. response_type: "google.protobuf.Empty"
  171. metadata_type: "google.protobuf.Struct"
  172. };
  173. }
  174. }
  175. // An intent categorizes an end-user's intention for one conversation turn. For
  176. // each agent, you define many intents, where your combined intents can handle a
  177. // complete conversation. When an end-user writes or says something, referred to
  178. // as an end-user expression or end-user input, Dialogflow matches the end-user
  179. // input to the best intent in your agent. Matching an intent is also known as
  180. // intent classification.
  181. //
  182. // For more information, see the [intent
  183. // guide](https://cloud.google.com/dialogflow/docs/intents-overview).
  184. message Intent {
  185. option (google.api.resource) = {
  186. type: "dialogflow.googleapis.com/Intent"
  187. pattern: "projects/{project}/agent/intents/{intent}"
  188. pattern: "projects/{project}/locations/{location}/agent/intents/{intent}"
  189. };
  190. // Represents the different states that webhooks can be in.
  191. enum WebhookState {
  192. // Webhook is disabled in the agent and in the intent.
  193. WEBHOOK_STATE_UNSPECIFIED = 0;
  194. // Webhook is enabled in the agent and in the intent.
  195. WEBHOOK_STATE_ENABLED = 1;
  196. // Webhook is enabled in the agent and in the intent. Also, each slot
  197. // filling prompt is forwarded to the webhook.
  198. WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
  199. }
  200. // Represents an example that the agent is trained on.
  201. message TrainingPhrase {
  202. // Represents different types of training phrases.
  203. enum Type {
  204. // Not specified. This value should never be used.
  205. TYPE_UNSPECIFIED = 0;
  206. // Examples do not contain @-prefixed entity type names, but example parts
  207. // can be annotated with entity types.
  208. EXAMPLE = 1;
  209. // Templates are not annotated with entity types, but they can contain
  210. // @-prefixed entity type names as substrings.
  211. // Note: Template mode has been deprecated. Example mode is the only
  212. // supported way to create new training phrases. If you have existing
  213. // training phrases in template mode, they will be removed during training
  214. // and it can cause a drop in agent performance.
  215. TEMPLATE = 2 [deprecated = true];
  216. }
  217. // Represents a part of a training phrase.
  218. message Part {
  219. // Required. The text for this part.
  220. string text = 1;
  221. // Optional. The entity type name prefixed with `@`.
  222. // This field is required for annotated parts of the training phrase.
  223. string entity_type = 2;
  224. // Optional. The parameter name for the value extracted from the
  225. // annotated part of the example.
  226. // This field is required for annotated parts of the training phrase.
  227. string alias = 3;
  228. // Optional. Indicates whether the text was manually annotated.
  229. // This field is set to true when the Dialogflow Console is used to
  230. // manually annotate the part. When creating an annotated part with the
  231. // API, you must set this to true.
  232. bool user_defined = 4;
  233. }
  234. // Output only. The unique identifier of this training phrase.
  235. string name = 1;
  236. // Required. The type of the training phrase.
  237. Type type = 2 [(google.api.field_behavior) = REQUIRED];
  238. // Required. The ordered list of training phrase parts.
  239. // The parts are concatenated in order to form the training phrase.
  240. //
  241. // Note: The API does not automatically annotate training phrases like the
  242. // Dialogflow Console does.
  243. //
  244. // Note: Do not forget to include whitespace at part boundaries,
  245. // so the training phrase is well formatted when the parts are concatenated.
  246. //
  247. // If the training phrase does not need to be annotated with parameters,
  248. // you just need a single part with only the [Part.text][google.cloud.dialogflow.v2beta1.Intent.TrainingPhrase.Part.text] field set.
  249. //
  250. // If you want to annotate the training phrase, you must create multiple
  251. // parts, where the fields of each part are populated in one of two ways:
  252. //
  253. // - `Part.text` is set to a part of the phrase that has no parameters.
  254. // - `Part.text` is set to a part of the phrase that you want to annotate,
  255. // and the `entity_type`, `alias`, and `user_defined` fields are all
  256. // set.
  257. repeated Part parts = 3 [(google.api.field_behavior) = REQUIRED];
  258. // Optional. Indicates how many times this example was added to
  259. // the intent. Each time a developer adds an existing sample by editing an
  260. // intent or training, this counter is increased.
  261. int32 times_added_count = 4 [(google.api.field_behavior) = OPTIONAL];
  262. }
  263. // Represents intent parameters.
  264. message Parameter {
  265. // The unique identifier of this parameter.
  266. string name = 1;
  267. // Required. The name of the parameter.
  268. string display_name = 2;
  269. // Optional. The definition of the parameter value. It can be:
  270. //
  271. // - a constant string,
  272. // - a parameter value defined as `$parameter_name`,
  273. // - an original parameter value defined as `$parameter_name.original`,
  274. // - a parameter value from some context defined as
  275. // `#context_name.parameter_name`.
  276. string value = 3;
  277. // Optional. The default value to use when the `value` yields an empty
  278. // result.
  279. // Default values can be extracted from contexts by using the following
  280. // syntax: `#context_name.parameter_name`.
  281. string default_value = 4;
  282. // Optional. The name of the entity type, prefixed with `@`, that
  283. // describes values of the parameter. If the parameter is
  284. // required, this must be provided.
  285. string entity_type_display_name = 5;
  286. // Optional. Indicates whether the parameter is required. That is,
  287. // whether the intent cannot be completed without collecting the parameter
  288. // value.
  289. bool mandatory = 6;
  290. // Optional. The collection of prompts that the agent can present to the
  291. // user in order to collect a value for the parameter.
  292. repeated string prompts = 7;
  293. // Optional. Indicates whether the parameter represents a list of values.
  294. bool is_list = 8;
  295. }
  296. // Corresponds to the `Response` field in the Dialogflow console.
  297. message Message {
  298. // Represents different platforms that a rich message can be intended for.
  299. enum Platform {
  300. // Not specified.
  301. PLATFORM_UNSPECIFIED = 0;
  302. // Facebook.
  303. FACEBOOK = 1;
  304. // Slack.
  305. SLACK = 2;
  306. // Telegram.
  307. TELEGRAM = 3;
  308. // Kik.
  309. KIK = 4;
  310. // Skype.
  311. SKYPE = 5;
  312. // Line.
  313. LINE = 6;
  314. // Viber.
  315. VIBER = 7;
  316. // Google Assistant
  317. // See [Dialogflow webhook
  318. // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
  319. ACTIONS_ON_GOOGLE = 8;
  320. // Telephony Gateway.
  321. TELEPHONY = 10;
  322. // Google Hangouts.
  323. GOOGLE_HANGOUTS = 11;
  324. }
  325. // The text response message.
  326. message Text {
  327. // Optional. The collection of the agent's responses.
  328. repeated string text = 1;
  329. }
  330. // The image response message.
  331. message Image {
  332. // Optional. The public URI to an image file.
  333. string image_uri = 1;
  334. // A text description of the image to be used for accessibility,
  335. // e.g., screen readers. Required if image_uri is set for CarouselSelect.
  336. string accessibility_text = 2;
  337. }
  338. // The quick replies response message.
  339. message QuickReplies {
  340. // Optional. The title of the collection of quick replies.
  341. string title = 1;
  342. // Optional. The collection of quick replies.
  343. repeated string quick_replies = 2;
  344. }
  345. // The card response message.
  346. message Card {
  347. // Optional. Contains information about a button.
  348. message Button {
  349. // Optional. The text to show on the button.
  350. string text = 1;
  351. // Optional. The text to send back to the Dialogflow API or a URI to
  352. // open.
  353. string postback = 2;
  354. }
  355. // Optional. The title of the card.
  356. string title = 1;
  357. // Optional. The subtitle of the card.
  358. string subtitle = 2;
  359. // Optional. The public URI to an image file for the card.
  360. string image_uri = 3;
  361. // Optional. The collection of card buttons.
  362. repeated Button buttons = 4;
  363. }
  364. // The simple response message containing speech or text.
  365. message SimpleResponse {
  366. // One of text_to_speech or ssml must be provided. The plain text of the
  367. // speech output. Mutually exclusive with ssml.
  368. string text_to_speech = 1;
  369. // One of text_to_speech or ssml must be provided. Structured spoken
  370. // response to the user in the SSML format. Mutually exclusive with
  371. // text_to_speech.
  372. string ssml = 2;
  373. // Optional. The text to display.
  374. string display_text = 3;
  375. }
  376. // The collection of simple response candidates.
  377. // This message in `QueryResult.fulfillment_messages` and
  378. // `WebhookResponse.fulfillment_messages` should contain only one
  379. // `SimpleResponse`.
  380. message SimpleResponses {
  381. // Required. The list of simple responses.
  382. repeated SimpleResponse simple_responses = 1;
  383. }
  384. // The basic card message. Useful for displaying information.
  385. message BasicCard {
  386. // The button object that appears at the bottom of a card.
  387. message Button {
  388. // Opens the given URI.
  389. message OpenUriAction {
  390. // Required. The HTTP or HTTPS scheme URI.
  391. string uri = 1;
  392. }
  393. // Required. The title of the button.
  394. string title = 1;
  395. // Required. Action to take when a user taps on the button.
  396. OpenUriAction open_uri_action = 2;
  397. }
  398. // Optional. The title of the card.
  399. string title = 1;
  400. // Optional. The subtitle of the card.
  401. string subtitle = 2;
  402. // Required, unless image is present. The body text of the card.
  403. string formatted_text = 3;
  404. // Optional. The image for the card.
  405. Image image = 4;
  406. // Optional. The collection of card buttons.
  407. repeated Button buttons = 5;
  408. }
  409. // The suggestion chip message that the user can tap to quickly post a reply
  410. // to the conversation.
  411. message Suggestion {
  412. // Required. The text shown the in the suggestion chip.
  413. string title = 1;
  414. }
  415. // The collection of suggestions.
  416. message Suggestions {
  417. // Required. The list of suggested replies.
  418. repeated Suggestion suggestions = 1;
  419. }
  420. // The suggestion chip message that allows the user to jump out to the app
  421. // or website associated with this agent.
  422. message LinkOutSuggestion {
  423. // Required. The name of the app or site this chip is linking to.
  424. string destination_name = 1;
  425. // Required. The URI of the app or site to open when the user taps the
  426. // suggestion chip.
  427. string uri = 2;
  428. }
  429. // The card for presenting a list of options to select from.
  430. message ListSelect {
  431. // An item in the list.
  432. message Item {
  433. // Required. Additional information about this option.
  434. SelectItemInfo info = 1;
  435. // Required. The title of the list item.
  436. string title = 2;
  437. // Optional. The main text describing the item.
  438. string description = 3;
  439. // Optional. The image to display.
  440. Image image = 4;
  441. }
  442. // Optional. The overall title of the list.
  443. string title = 1;
  444. // Required. List items.
  445. repeated Item items = 2;
  446. // Optional. Subtitle of the list.
  447. string subtitle = 3 [(google.api.field_behavior) = OPTIONAL];
  448. }
  449. // The card for presenting a carousel of options to select from.
  450. message CarouselSelect {
  451. // An item in the carousel.
  452. message Item {
  453. // Required. Additional info about the option item.
  454. SelectItemInfo info = 1;
  455. // Required. Title of the carousel item.
  456. string title = 2;
  457. // Optional. The body text of the card.
  458. string description = 3;
  459. // Optional. The image to display.
  460. Image image = 4;
  461. }
  462. // Required. Carousel items.
  463. repeated Item items = 1;
  464. }
  465. // Additional info about the select item for when it is triggered in a
  466. // dialog.
  467. message SelectItemInfo {
  468. // Required. A unique key that will be sent back to the agent if this
  469. // response is given.
  470. string key = 1;
  471. // Optional. A list of synonyms that can also be used to trigger this
  472. // item in dialog.
  473. repeated string synonyms = 2;
  474. }
  475. // Plays audio from a file in Telephony Gateway.
  476. message TelephonyPlayAudio {
  477. // Required. URI to a Google Cloud Storage object containing the audio to
  478. // play, e.g., "gs://bucket/object". The object must contain a single
  479. // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz.
  480. //
  481. // This object must be readable by the `service-<Project
  482. // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service account
  483. // where <Project Number> is the number of the Telephony Gateway project
  484. // (usually the same as the Dialogflow agent project). If the Google Cloud
  485. // Storage bucket is in the Telephony Gateway project, this permission is
  486. // added by default when enabling the Dialogflow V2 API.
  487. //
  488. // For audio from other sources, consider using the
  489. // `TelephonySynthesizeSpeech` message with SSML.
  490. string audio_uri = 1;
  491. }
  492. // Synthesizes speech and plays back the synthesized audio to the caller in
  493. // Telephony Gateway.
  494. //
  495. // Telephony Gateway takes the synthesizer settings from
  496. // `DetectIntentResponse.output_audio_config` which can either be set
  497. // at request-level or can come from the agent-level synthesizer config.
  498. message TelephonySynthesizeSpeech {
  499. // Required. The source to be synthesized.
  500. oneof source {
  501. // The raw text to be synthesized.
  502. string text = 1;
  503. // The SSML to be synthesized. For more information, see
  504. // [SSML](https://developers.google.com/actions/reference/ssml).
  505. string ssml = 2;
  506. }
  507. }
  508. // Transfers the call in Telephony Gateway.
  509. message TelephonyTransferCall {
  510. // Required. The phone number to transfer the call to
  511. // in [E.164 format](https://en.wikipedia.org/wiki/E.164).
  512. //
  513. // We currently only allow transferring to US numbers (+1xxxyyyzzzz).
  514. string phone_number = 1;
  515. }
  516. // Rich Business Messaging (RBM) text response with suggestions.
  517. message RbmText {
  518. // Required. Text sent and displayed to the user.
  519. string text = 1;
  520. // Optional. One or more suggestions to show to the user.
  521. repeated RbmSuggestion rbm_suggestion = 2;
  522. }
  523. // Carousel Rich Business Messaging (RBM) rich card.
  524. //
  525. // Rich cards allow you to respond to users with more vivid content, e.g.
  526. // with media and suggestions.
  527. //
  528. // If you want to show a single card with more control over the layout,
  529. // please use [RbmStandaloneCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmStandaloneCard] instead.
  530. message RbmCarouselCard {
  531. // The width of the cards in the carousel.
  532. enum CardWidth {
  533. // Not specified.
  534. CARD_WIDTH_UNSPECIFIED = 0;
  535. // 120 DP. Note that tall media cannot be used.
  536. SMALL = 1;
  537. // 232 DP.
  538. MEDIUM = 2;
  539. }
  540. // Required. The width of the cards in the carousel.
  541. CardWidth card_width = 1;
  542. // Required. The cards in the carousel. A carousel must have at least
  543. // 2 cards and at most 10.
  544. repeated RbmCardContent card_contents = 2;
  545. }
  546. // Standalone Rich Business Messaging (RBM) rich card.
  547. //
  548. // Rich cards allow you to respond to users with more vivid content, e.g.
  549. // with media and suggestions.
  550. //
  551. // You can group multiple rich cards into one using [RbmCarouselCard][google.cloud.dialogflow.v2beta1.Intent.Message.RbmCarouselCard] but
  552. // carousel cards will give you less control over the card layout.
  553. message RbmStandaloneCard {
  554. // Orientation of the card.
  555. enum CardOrientation {
  556. // Not specified.
  557. CARD_ORIENTATION_UNSPECIFIED = 0;
  558. // Horizontal layout.
  559. HORIZONTAL = 1;
  560. // Vertical layout.
  561. VERTICAL = 2;
  562. }
  563. // Thumbnail preview alignment for standalone cards with horizontal
  564. // layout.
  565. enum ThumbnailImageAlignment {
  566. // Not specified.
  567. THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0;
  568. // Thumbnail preview is left-aligned.
  569. LEFT = 1;
  570. // Thumbnail preview is right-aligned.
  571. RIGHT = 2;
  572. }
  573. // Required. Orientation of the card.
  574. CardOrientation card_orientation = 1;
  575. // Required if orientation is horizontal.
  576. // Image preview alignment for standalone cards with horizontal layout.
  577. ThumbnailImageAlignment thumbnail_image_alignment = 2;
  578. // Required. Card content.
  579. RbmCardContent card_content = 3;
  580. }
  581. // Rich Business Messaging (RBM) Card content
  582. message RbmCardContent {
  583. // Rich Business Messaging (RBM) Media displayed in Cards
  584. // The following media-types are currently supported:
  585. //
  586. // Image Types
  587. //
  588. // * image/jpeg
  589. // * image/jpg'
  590. // * image/gif
  591. // * image/png
  592. //
  593. // Video Types
  594. //
  595. // * video/h263
  596. // * video/m4v
  597. // * video/mp4
  598. // * video/mpeg
  599. // * video/mpeg4
  600. // * video/webm
  601. message RbmMedia {
  602. // Media height
  603. enum Height {
  604. // Not specified.
  605. HEIGHT_UNSPECIFIED = 0;
  606. // 112 DP.
  607. SHORT = 1;
  608. // 168 DP.
  609. MEDIUM = 2;
  610. // 264 DP. Not available for rich card carousels when the card width
  611. // is set to small.
  612. TALL = 3;
  613. }
  614. // Required. Publicly reachable URI of the file. The RBM platform
  615. // determines the MIME type of the file from the content-type field in
  616. // the HTTP headers when the platform fetches the file. The content-type
  617. // field must be present and accurate in the HTTP response from the URL.
  618. string file_uri = 1;
  619. // Optional. Publicly reachable URI of the thumbnail.If you don't
  620. // provide a thumbnail URI, the RBM platform displays a blank
  621. // placeholder thumbnail until the user's device downloads the file.
  622. // Depending on the user's setting, the file may not download
  623. // automatically and may require the user to tap a download button.
  624. string thumbnail_uri = 2;
  625. // Required for cards with vertical orientation. The height of the media
  626. // within a rich card with a vertical layout.
  627. // For a standalone card with horizontal layout, height is not
  628. // customizable, and this field is ignored.
  629. Height height = 3;
  630. }
  631. // Optional. Title of the card (at most 200 bytes).
  632. //
  633. // At least one of the title, description or media must be set.
  634. string title = 1;
  635. // Optional. Description of the card (at most 2000 bytes).
  636. //
  637. // At least one of the title, description or media must be set.
  638. string description = 2;
  639. // Optional. However at least one of the title, description or media must
  640. // be set. Media (image, GIF or a video) to include in the card.
  641. RbmMedia media = 3;
  642. // Optional. List of suggestions to include in the card.
  643. repeated RbmSuggestion suggestions = 4;
  644. }
  645. // Rich Business Messaging (RBM) suggestion. Suggestions allow user to
  646. // easily select/click a predefined response or perform an action (like
  647. // opening a web uri).
  648. message RbmSuggestion {
  649. // Predefined suggested response or action for user to choose
  650. oneof suggestion {
  651. // Predefined replies for user to select instead of typing
  652. RbmSuggestedReply reply = 1;
  653. // Predefined client side actions that user can choose
  654. RbmSuggestedAction action = 2;
  655. }
  656. }
  657. // Rich Business Messaging (RBM) suggested reply that the user can click
  658. // instead of typing in their own response.
  659. message RbmSuggestedReply {
  660. // Suggested reply text.
  661. string text = 1;
  662. // Opaque payload that the Dialogflow receives in a user event
  663. // when the user taps the suggested reply. This data will be also
  664. // forwarded to webhook to allow performing custom business logic.
  665. string postback_data = 2;
  666. }
  667. // Rich Business Messaging (RBM) suggested client-side action that the user
  668. // can choose from the card.
  669. message RbmSuggestedAction {
  670. // Opens the user's default dialer app with the specified phone number
  671. // but does not dial automatically.
  672. message RbmSuggestedActionDial {
  673. // Required. The phone number to fill in the default dialer app.
  674. // This field should be in [E.164](https://en.wikipedia.org/wiki/E.164)
  675. // format. An example of a correctly formatted phone number:
  676. // +15556767888.
  677. string phone_number = 1;
  678. }
  679. // Opens the user's default web browser app to the specified uri
  680. // If the user has an app installed that is
  681. // registered as the default handler for the URL, then this app will be
  682. // opened instead, and its icon will be used in the suggested action UI.
  683. message RbmSuggestedActionOpenUri {
  684. // Required. The uri to open on the user device
  685. string uri = 1;
  686. }
  687. // Opens the device's location chooser so the user can pick a location
  688. // to send back to the agent.
  689. message RbmSuggestedActionShareLocation {
  690. }
  691. // Text to display alongside the action.
  692. string text = 1;
  693. // Opaque payload that the Dialogflow receives in a user event
  694. // when the user taps the suggested action. This data will be also
  695. // forwarded to webhook to allow performing custom business logic.
  696. string postback_data = 2;
  697. // Action that needs to be triggered.
  698. oneof action {
  699. // Suggested client side action: Dial a phone number
  700. RbmSuggestedActionDial dial = 3;
  701. // Suggested client side action: Open a URI on device
  702. RbmSuggestedActionOpenUri open_url = 4;
  703. // Suggested client side action: Share user location
  704. RbmSuggestedActionShareLocation share_location = 5;
  705. }
  706. }
  707. // The media content card for Actions on Google.
  708. message MediaContent {
  709. // Format of response media type.
  710. enum ResponseMediaType {
  711. // Unspecified.
  712. RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0;
  713. // Response media type is audio.
  714. AUDIO = 1;
  715. }
  716. // Response media object for media content card.
  717. message ResponseMediaObject {
  718. // Required. Name of media card.
  719. string name = 1;
  720. // Optional. Description of media card.
  721. string description = 2;
  722. // Image to show with the media card.
  723. oneof image {
  724. // Optional. Image to display above media content.
  725. Image large_image = 3;
  726. // Optional. Icon to display above media content.
  727. Image icon = 4;
  728. }
  729. // Required. Url where the media is stored.
  730. string content_url = 5;
  731. }
  732. // Optional. What type of media is the content (ie "audio").
  733. ResponseMediaType media_type = 1;
  734. // Required. List of media objects.
  735. repeated ResponseMediaObject media_objects = 2;
  736. }
  737. // Browse Carousel Card for Actions on Google.
  738. // https://developers.google.com/actions/assistant/responses#browsing_carousel
  739. message BrowseCarouselCard {
  740. // Browsing carousel tile
  741. message BrowseCarouselCardItem {
  742. // Actions on Google action to open a given url.
  743. message OpenUrlAction {
  744. // Type of the URI.
  745. enum UrlTypeHint {
  746. // Unspecified
  747. URL_TYPE_HINT_UNSPECIFIED = 0;
  748. // Url would be an amp action
  749. AMP_ACTION = 1;
  750. // URL that points directly to AMP content, or to a canonical URL
  751. // which refers to AMP content via <link rel="amphtml">.
  752. AMP_CONTENT = 2;
  753. }
  754. // Required. URL
  755. string url = 1;
  756. // Optional. Specifies the type of viewer that is used when opening
  757. // the URL. Defaults to opening via web browser.
  758. UrlTypeHint url_type_hint = 3;
  759. }
  760. // Required. Action to present to the user.
  761. OpenUrlAction open_uri_action = 1;
  762. // Required. Title of the carousel item. Maximum of two lines of text.
  763. string title = 2;
  764. // Optional. Description of the carousel item. Maximum of four lines of
  765. // text.
  766. string description = 3;
  767. // Optional. Hero image for the carousel item.
  768. Image image = 4;
  769. // Optional. Text that appears at the bottom of the Browse Carousel
  770. // Card. Maximum of one line of text.
  771. string footer = 5;
  772. }
  773. // Image display options for Actions on Google. This should be used for
  774. // when the image's aspect ratio does not match the image container's
  775. // aspect ratio.
  776. enum ImageDisplayOptions {
  777. // Fill the gaps between the image and the image container with gray
  778. // bars.
  779. IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0;
  780. // Fill the gaps between the image and the image container with gray
  781. // bars.
  782. GRAY = 1;
  783. // Fill the gaps between the image and the image container with white
  784. // bars.
  785. WHITE = 2;
  786. // Image is scaled such that the image width and height match or exceed
  787. // the container dimensions. This may crop the top and bottom of the
  788. // image if the scaled image height is greater than the container
  789. // height, or crop the left and right of the image if the scaled image
  790. // width is greater than the container width. This is similar to "Zoom
  791. // Mode" on a widescreen TV when playing a 4:3 video.
  792. CROPPED = 3;
  793. // Pad the gaps between image and image frame with a blurred copy of the
  794. // same image.
  795. BLURRED_BACKGROUND = 4;
  796. }
  797. // Required. List of items in the Browse Carousel Card. Minimum of two
  798. // items, maximum of ten.
  799. repeated BrowseCarouselCardItem items = 1;
  800. // Optional. Settings for displaying the image. Applies to every image in
  801. // [items][google.cloud.dialogflow.v2beta1.Intent.Message.BrowseCarouselCard.items].
  802. ImageDisplayOptions image_display_options = 2;
  803. }
  804. // Table card for Actions on Google.
  805. message TableCard {
  806. // Required. Title of the card.
  807. string title = 1;
  808. // Optional. Subtitle to the title.
  809. string subtitle = 2;
  810. // Optional. Image which should be displayed on the card.
  811. Image image = 3;
  812. // Optional. Display properties for the columns in this table.
  813. repeated ColumnProperties column_properties = 4;
  814. // Optional. Rows in this table of data.
  815. repeated TableCardRow rows = 5;
  816. // Optional. List of buttons for the card.
  817. repeated BasicCard.Button buttons = 6;
  818. }
  819. // Column properties for [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard].
  820. message ColumnProperties {
  821. // Text alignments within a cell.
  822. enum HorizontalAlignment {
  823. // Text is aligned to the leading edge of the column.
  824. HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0;
  825. // Text is aligned to the leading edge of the column.
  826. LEADING = 1;
  827. // Text is centered in the column.
  828. CENTER = 2;
  829. // Text is aligned to the trailing edge of the column.
  830. TRAILING = 3;
  831. }
  832. // Required. Column heading.
  833. string header = 1;
  834. // Optional. Defines text alignment for all cells in this column.
  835. HorizontalAlignment horizontal_alignment = 2;
  836. }
  837. // Row of [TableCard][google.cloud.dialogflow.v2beta1.Intent.Message.TableCard].
  838. message TableCardRow {
  839. // Optional. List of cells that make up this row.
  840. repeated TableCardCell cells = 1;
  841. // Optional. Whether to add a visual divider after this row.
  842. bool divider_after = 2;
  843. }
  844. // Cell of [TableCardRow][google.cloud.dialogflow.v2beta1.Intent.Message.TableCardRow].
  845. message TableCardCell {
  846. // Required. Text in this cell.
  847. string text = 1;
  848. }
  849. // Required. The rich response message.
  850. oneof message {
  851. // Returns a text response.
  852. Text text = 1;
  853. // Displays an image.
  854. Image image = 2;
  855. // Displays quick replies.
  856. QuickReplies quick_replies = 3;
  857. // Displays a card.
  858. Card card = 4;
  859. // A custom platform-specific response.
  860. google.protobuf.Struct payload = 5;
  861. // Returns a voice or text-only response for Actions on Google.
  862. SimpleResponses simple_responses = 7;
  863. // Displays a basic card for Actions on Google.
  864. BasicCard basic_card = 8;
  865. // Displays suggestion chips for Actions on Google.
  866. Suggestions suggestions = 9;
  867. // Displays a link out suggestion chip for Actions on Google.
  868. LinkOutSuggestion link_out_suggestion = 10;
  869. // Displays a list card for Actions on Google.
  870. ListSelect list_select = 11;
  871. // Displays a carousel card for Actions on Google.
  872. CarouselSelect carousel_select = 12;
  873. // Plays audio from a file in Telephony Gateway.
  874. TelephonyPlayAudio telephony_play_audio = 13;
  875. // Synthesizes speech in Telephony Gateway.
  876. TelephonySynthesizeSpeech telephony_synthesize_speech = 14;
  877. // Transfers the call in Telephony Gateway.
  878. TelephonyTransferCall telephony_transfer_call = 15;
  879. // Rich Business Messaging (RBM) text response.
  880. //
  881. // RBM allows businesses to send enriched and branded versions of SMS. See
  882. // https://jibe.google.com/business-messaging.
  883. RbmText rbm_text = 18;
  884. // Standalone Rich Business Messaging (RBM) rich card response.
  885. RbmStandaloneCard rbm_standalone_rich_card = 19;
  886. // Rich Business Messaging (RBM) carousel rich card response.
  887. RbmCarouselCard rbm_carousel_rich_card = 20;
  888. // Browse carousel card for Actions on Google.
  889. BrowseCarouselCard browse_carousel_card = 22;
  890. // Table card for Actions on Google.
  891. TableCard table_card = 23;
  892. // The media content card for Actions on Google.
  893. MediaContent media_content = 24;
  894. }
  895. // Optional. The platform that this message is intended for.
  896. Platform platform = 6 [(google.api.field_behavior) = OPTIONAL];
  897. }
  898. // Represents a single followup intent in the chain.
  899. message FollowupIntentInfo {
  900. // The unique identifier of the followup intent.
  901. // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
  902. string followup_intent_name = 1;
  903. // The unique identifier of the followup intent's parent.
  904. // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
  905. string parent_followup_intent_name = 2;
  906. }
  907. // Optional. The unique identifier of this intent.
  908. // Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents]
  909. // methods.
  910. // Supported formats:
  911. //
  912. // - `projects/<Project ID>/agent/intents/<Intent ID>`
  913. // - `projects/<Project ID>/locations/<Location ID>/agent/intents/<Intent ID>`
  914. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  915. // Required. The name of this intent.
  916. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  917. // Optional. Indicates whether webhooks are enabled for the intent.
  918. WebhookState webhook_state = 6 [(google.api.field_behavior) = OPTIONAL];
  919. // Optional. The priority of this intent. Higher numbers represent higher
  920. // priorities.
  921. //
  922. // - If the supplied value is unspecified or 0, the service
  923. // translates the value to 500,000, which corresponds to the
  924. // `Normal` priority in the console.
  925. // - If the supplied value is negative, the intent is ignored
  926. // in runtime detect intent requests.
  927. int32 priority = 3 [(google.api.field_behavior) = OPTIONAL];
  928. // Optional. Indicates whether this is a fallback intent.
  929. bool is_fallback = 4 [(google.api.field_behavior) = OPTIONAL];
  930. // Optional. Indicates whether Machine Learning is enabled for the intent.
  931. // Note: If `ml_enabled` setting is set to false, then this intent is not
  932. // taken into account during inference in `ML ONLY` match mode. Also,
  933. // auto-markup in the UI is turned off.
  934. // DEPRECATED! Please use `ml_disabled` field instead.
  935. // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false,
  936. // then the default value is determined as follows:
  937. //
  938. // - Before April 15th, 2018 the default is:
  939. // ml_enabled = false / ml_disabled = true.
  940. // - After April 15th, 2018 the default is:
  941. // ml_enabled = true / ml_disabled = false.
  942. bool ml_enabled = 5 [
  943. deprecated = true,
  944. (google.api.field_behavior) = OPTIONAL
  945. ];
  946. // Optional. Indicates whether Machine Learning is disabled for the intent.
  947. // Note: If `ml_disabled` setting is set to true, then this intent is not
  948. // taken into account during inference in `ML ONLY` match mode. Also,
  949. // auto-markup in the UI is turned off.
  950. bool ml_disabled = 19 [(google.api.field_behavior) = OPTIONAL];
  951. // Optional. Indicates that a live agent should be brought in to handle the
  952. // interaction with the user. In most cases, when you set this flag to true,
  953. // you would also want to set end_interaction to true as well. Default is
  954. // false.
  955. bool live_agent_handoff = 20 [(google.api.field_behavior) = OPTIONAL];
  956. // Optional. Indicates that this intent ends an interaction. Some integrations
  957. // (e.g., Actions on Google or Dialogflow phone gateway) use this information
  958. // to close interaction with an end user. Default is false.
  959. bool end_interaction = 21 [(google.api.field_behavior) = OPTIONAL];
  960. // Optional. The list of context names required for this intent to be
  961. // triggered.
  962. // Formats:
  963. //
  964. // - `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`
  965. // - `projects/<Project ID>/locations/<Location
  966. // ID>/agent/sessions/-/contexts/<Context ID>`
  967. repeated string input_context_names = 7 [(google.api.field_behavior) = OPTIONAL];
  968. // Optional. The collection of event names that trigger the intent.
  969. // If the collection of input contexts is not empty, all of the contexts must
  970. // be present in the active user session for an event to trigger this intent.
  971. // Event names are limited to 150 characters.
  972. repeated string events = 8 [(google.api.field_behavior) = OPTIONAL];
  973. // Optional. The collection of examples that the agent is
  974. // trained on.
  975. repeated TrainingPhrase training_phrases = 9 [(google.api.field_behavior) = OPTIONAL];
  976. // Optional. The name of the action associated with the intent.
  977. // Note: The action name must not contain whitespaces.
  978. string action = 10 [(google.api.field_behavior) = OPTIONAL];
  979. // Optional. The collection of contexts that are activated when the intent
  980. // is matched. Context messages in this collection should not set the
  981. // parameters field. Setting the `lifespan_count` to 0 will reset the context
  982. // when the intent is matched.
  983. // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
  984. repeated Context output_contexts = 11 [(google.api.field_behavior) = OPTIONAL];
  985. // Optional. Indicates whether to delete all contexts in the current
  986. // session when this intent is matched.
  987. bool reset_contexts = 12 [(google.api.field_behavior) = OPTIONAL];
  988. // Optional. The collection of parameters associated with the intent.
  989. repeated Parameter parameters = 13 [(google.api.field_behavior) = OPTIONAL];
  990. // Optional. The collection of rich messages corresponding to the
  991. // `Response` field in the Dialogflow console.
  992. repeated Message messages = 14;
  993. // Optional. The list of platforms for which the first responses will be
  994. // copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
  995. repeated Message.Platform default_response_platforms = 15 [(google.api.field_behavior) = OPTIONAL];
  996. // Output only. The unique identifier of the root intent in the chain of
  997. // followup intents. It identifies the correct followup intents chain for
  998. // this intent.
  999. //
  1000. // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
  1001. string root_followup_intent_name = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  1002. // Optional. The unique identifier of the parent intent in the
  1003. // chain of followup intents. You can set this field when creating an intent,
  1004. // for example with [CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent] or
  1005. // [BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents], in order to make this
  1006. // intent a followup intent.
  1007. //
  1008. // It identifies the parent followup intent.
  1009. // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
  1010. string parent_followup_intent_name = 17 [(google.api.field_behavior) = OPTIONAL];
  1011. // Output only. Information about all followup intents that have this intent as
  1012. // a direct or indirect parent. We populate this field only in the output.
  1013. repeated FollowupIntentInfo followup_intent_info = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
  1014. }
  1015. // The request message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents].
  1016. message ListIntentsRequest {
  1017. // Required. The agent to list all intents from.
  1018. // Format: `projects/<Project ID>/agent` or `projects/<Project
  1019. // ID>/locations/<Location ID>/agent`.
  1020. //
  1021. // Alternatively, you can specify the environment to list intents for.
  1022. // Format: `projects/<Project ID>/agent/environments/<Environment ID>`
  1023. // or `projects/<Project ID>/locations/<Location
  1024. // ID>/agent/environments/<Environment ID>`.
  1025. // Note: training phrases of the intents will not be returned for non-draft
  1026. // environment.
  1027. string parent = 1 [
  1028. (google.api.field_behavior) = REQUIRED,
  1029. (google.api.resource_reference) = {
  1030. child_type: "dialogflow.googleapis.com/Intent"
  1031. }
  1032. ];
  1033. // Optional. The language used to access language-specific data.
  1034. // If not specified, the agent's default language is used.
  1035. // For more information, see
  1036. // [Multilingual intent and entity
  1037. // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
  1038. string language_code = 2 [(google.api.field_behavior) = OPTIONAL];
  1039. // Optional. The resource view to apply to the returned intent.
  1040. IntentView intent_view = 3;
  1041. // Optional. The maximum number of items to return in a single page. By
  1042. // default 100 and at most 1000.
  1043. int32 page_size = 4;
  1044. // Optional. The next_page_token value returned from a previous list request.
  1045. string page_token = 5;
  1046. }
  1047. // The response message for [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents].
  1048. message ListIntentsResponse {
  1049. // The list of agent intents. There will be a maximum number of items
  1050. // returned based on the page_size field in the request.
  1051. repeated Intent intents = 1;
  1052. // Token to retrieve the next page of results, or empty if there are no
  1053. // more results in the list.
  1054. string next_page_token = 2;
  1055. }
  1056. // The request message for [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent].
  1057. message GetIntentRequest {
  1058. // Required. The name of the intent.
  1059. // Supported formats:
  1060. //
  1061. // - `projects/<Project ID>/agent/intents/<Intent ID>`
  1062. // - `projects/<Project ID>/locations/<Location ID>/agent/intents/<Intent ID>`
  1063. string name = 1 [
  1064. (google.api.field_behavior) = REQUIRED,
  1065. (google.api.resource_reference) = {
  1066. type: "dialogflow.googleapis.com/Intent"
  1067. }
  1068. ];
  1069. // Optional. The language used to access language-specific data.
  1070. // If not specified, the agent's default language is used.
  1071. // For more information, see
  1072. // [Multilingual intent and entity
  1073. // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
  1074. string language_code = 2 [(google.api.field_behavior) = OPTIONAL];
  1075. // Optional. The resource view to apply to the returned intent.
  1076. IntentView intent_view = 3;
  1077. }
  1078. // The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent].
  1079. message CreateIntentRequest {
  1080. // Required. The agent to create a intent for.
  1081. // Supported formats:
  1082. //
  1083. // - `projects/<Project ID>/agent`
  1084. // - `projects/<Project ID>/locations/<Location ID>/agent`
  1085. string parent = 1 [
  1086. (google.api.field_behavior) = REQUIRED,
  1087. (google.api.resource_reference) = {
  1088. child_type: "dialogflow.googleapis.com/Intent"
  1089. }
  1090. ];
  1091. // Required. The intent to create.
  1092. Intent intent = 2 [(google.api.field_behavior) = REQUIRED];
  1093. // Optional. The language used to access language-specific data.
  1094. // If not specified, the agent's default language is used.
  1095. // For more information, see
  1096. // [Multilingual intent and entity
  1097. // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
  1098. string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
  1099. // Optional. The resource view to apply to the returned intent.
  1100. IntentView intent_view = 4;
  1101. }
  1102. // The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent].
  1103. message UpdateIntentRequest {
  1104. // Required. The intent to update.
  1105. Intent intent = 1 [(google.api.field_behavior) = REQUIRED];
  1106. // Optional. The language used to access language-specific data.
  1107. // If not specified, the agent's default language is used.
  1108. // For more information, see
  1109. // [Multilingual intent and entity
  1110. // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
  1111. string language_code = 2 [(google.api.field_behavior) = OPTIONAL];
  1112. // Optional. The mask to control which fields get updated.
  1113. google.protobuf.FieldMask update_mask = 3;
  1114. // Optional. The resource view to apply to the returned intent.
  1115. IntentView intent_view = 4;
  1116. }
  1117. // The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent].
  1118. message DeleteIntentRequest {
  1119. // Required. The name of the intent to delete. If this intent has direct or
  1120. // indirect followup intents, we also delete them.
  1121. //
  1122. // Supported formats:
  1123. //
  1124. // - `projects/<Project ID>/agent/intents/<Intent ID>`
  1125. // - `projects/<Project ID>/locations/<Location ID>/agent/intents/<Intent ID>`
  1126. string name = 1 [
  1127. (google.api.field_behavior) = REQUIRED,
  1128. (google.api.resource_reference) = {
  1129. type: "dialogflow.googleapis.com/Intent"
  1130. }
  1131. ];
  1132. }
  1133. // The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents].
  1134. message BatchUpdateIntentsRequest {
  1135. // Required. The name of the agent to update or create intents in.
  1136. // Supported formats:
  1137. //
  1138. // - `projects/<Project ID>/agent`
  1139. // - `projects/<Project ID>/locations/<Location ID>/agent`
  1140. string parent = 1 [
  1141. (google.api.field_behavior) = REQUIRED,
  1142. (google.api.resource_reference) = {
  1143. child_type: "dialogflow.googleapis.com/Intent"
  1144. }
  1145. ];
  1146. // Required. The source of the intent batch.
  1147. //
  1148. // For each intent in the batch:
  1149. //
  1150. // * If `name` is specified, we update an existing intent.
  1151. // * If `name` is not specified, we create a new intent.
  1152. oneof intent_batch {
  1153. // The URI to a Google Cloud Storage file containing intents to update or
  1154. // create. The file format can either be a serialized proto (of IntentBatch
  1155. // type) or JSON object. Note: The URI must start with "gs://".
  1156. string intent_batch_uri = 2;
  1157. // The collection of intents to update or create.
  1158. IntentBatch intent_batch_inline = 3;
  1159. }
  1160. // Optional. The language used to access language-specific data.
  1161. // If not specified, the agent's default language is used.
  1162. // For more information, see
  1163. // [Multilingual intent and entity
  1164. // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
  1165. string language_code = 4 [(google.api.field_behavior) = OPTIONAL];
  1166. // Optional. The mask to control which fields get updated.
  1167. google.protobuf.FieldMask update_mask = 5;
  1168. // Optional. The resource view to apply to the returned intent.
  1169. IntentView intent_view = 6;
  1170. }
  1171. // The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents].
  1172. message BatchUpdateIntentsResponse {
  1173. // The collection of updated or created intents.
  1174. repeated Intent intents = 1;
  1175. }
  1176. // The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents].
  1177. message BatchDeleteIntentsRequest {
  1178. // Required. The name of the agent to delete all entities types for.
  1179. // Supported formats:
  1180. //
  1181. // - `projects/<Project ID>/agent`
  1182. // - `projects/<Project ID>/locations/<Location ID>/agent`
  1183. string parent = 1 [
  1184. (google.api.field_behavior) = REQUIRED,
  1185. (google.api.resource_reference) = {
  1186. child_type: "dialogflow.googleapis.com/Intent"
  1187. }
  1188. ];
  1189. // Required. The collection of intents to delete. Only intent `name` must be
  1190. // filled in.
  1191. repeated Intent intents = 2 [(google.api.field_behavior) = REQUIRED];
  1192. }
  1193. // Represents the options for views of an intent.
  1194. // An intent can be a sizable object. Therefore, we provide a resource view that
  1195. // does not return training phrases in the response by default.
  1196. enum IntentView {
  1197. // Training phrases field is not populated in the response.
  1198. INTENT_VIEW_UNSPECIFIED = 0;
  1199. // All fields are populated.
  1200. INTENT_VIEW_FULL = 1;
  1201. }
  1202. // This message is a wrapper around a collection of intents.
  1203. message IntentBatch {
  1204. // A collection of intents.
  1205. repeated Intent intents = 1;
  1206. }