intent.proto 51 KB

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