Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / dialogflow / protos / google / cloud / dialogflow / v2beta1 / intent.proto
1 // Copyright 2018 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 syntax = "proto3";
16
17 package google.cloud.dialogflow.v2beta1;
18
19 import "google/api/annotations.proto";
20 import "google/cloud/dialogflow/v2beta1/context.proto";
21 import "google/longrunning/operations.proto";
22 import "google/protobuf/empty.proto";
23 import "google/protobuf/field_mask.proto";
24 import "google/protobuf/struct.proto";
25
26 option cc_enable_arenas = true;
27 option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
28 option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
29 option java_multiple_files = true;
30 option java_outer_classname = "IntentProto";
31 option java_package = "com.google.cloud.dialogflow.v2beta1";
32 option objc_class_prefix = "DF";
33
34 // An intent represents a mapping between input from a user and an action to
35 // be taken by your application. When you pass user input to the
36 // [DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] (or
37 // [StreamingDetectIntent][google.cloud.dialogflow.v2beta1.Sessions.StreamingDetectIntent])
38 // method, the Dialogflow API analyzes the input and searches for a matching
39 // intent. If no match is found, the Dialogflow API returns a fallback intent
40 // (`is_fallback` = true).
41 //
42 // You can provide additional information for the Dialogflow API to use to
43 // match user input to an intent by adding the following to your intent.
44 //
45 // *   **Contexts** - provide additional context for intent analysis. For
46 //     example, if an intent is related to an object in your application that
47 //     plays music, you can provide a context to determine when to match the
48 //     intent if the user input is “turn it off”.  You can include a context
49 //     that matches the intent when there is previous user input of
50 //     "play music", and not when there is previous user input of
51 //     "turn on the light".
52 //
53 // *   **Events** - allow for matching an intent by using an event name
54 //     instead of user input. Your application can provide an event name and
55 //     related parameters to the Dialogflow API to match an intent. For
56 //     example, when your application starts, you can send a welcome event
57 //     with a user name parameter to the Dialogflow API to match an intent with
58 //     a personalized welcome message for the user.
59 //
60 // *   **Training phrases** - provide examples of user input to train the
61 //     Dialogflow API agent to better match intents.
62 //
63 // For more information about intents, see the
64 // [Dialogflow documentation](https://dialogflow.com/docs/intents).
65 service Intents {
66   // Returns the list of all intents in the specified agent.
67   rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) {
68     option (google.api.http) = {
69       get: "/v2beta1/{parent=projects/*/agent}/intents"
70     };
71   }
72
73   // Retrieves the specified intent.
74   rpc GetIntent(GetIntentRequest) returns (Intent) {
75     option (google.api.http) = {
76       get: "/v2beta1/{name=projects/*/agent/intents/*}"
77     };
78   }
79
80   // Creates an intent in the specified agent.
81   rpc CreateIntent(CreateIntentRequest) returns (Intent) {
82     option (google.api.http) = {
83       post: "/v2beta1/{parent=projects/*/agent}/intents"
84       body: "intent"
85     };
86   }
87
88   // Updates the specified intent.
89   rpc UpdateIntent(UpdateIntentRequest) returns (Intent) {
90     option (google.api.http) = {
91       patch: "/v2beta1/{intent.name=projects/*/agent/intents/*}"
92       body: "intent"
93     };
94   }
95
96   // Deletes the specified intent.
97   rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
98     option (google.api.http) = {
99       delete: "/v2beta1/{name=projects/*/agent/intents/*}"
100     };
101   }
102
103   // Updates/Creates multiple intents in the specified agent.
104   //
105   // Operation <response:
106   // [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2beta1.BatchUpdateIntentsResponse]>
107   rpc BatchUpdateIntents(BatchUpdateIntentsRequest)
108       returns (google.longrunning.Operation) {
109     option (google.api.http) = {
110       post: "/v2beta1/{parent=projects/*/agent}/intents:batchUpdate"
111       body: "*"
112     };
113   }
114
115   // Deletes intents in the specified agent.
116   //
117   // Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
118   rpc BatchDeleteIntents(BatchDeleteIntentsRequest)
119       returns (google.longrunning.Operation) {
120     option (google.api.http) = {
121       post: "/v2beta1/{parent=projects/*/agent}/intents:batchDelete"
122       body: "*"
123     };
124   }
125 }
126
127 // Represents an intent.
128 // Intents convert a number of user expressions or patterns into an action. An
129 // action is an extraction of a user command or sentence semantics.
130 message Intent {
131   // Represents an example or template that the agent is trained on.
132   message TrainingPhrase {
133     // Represents a part of a training phrase.
134     message Part {
135       // Required. The text corresponding to the example or template,
136       // if there are no annotations. For
137       // annotated examples, it is the text for one of the example's parts.
138       string text = 1;
139
140       // Optional. The entity type name prefixed with `@`. This field is
141       // required for the annotated part of the text and applies only to
142       // examples.
143       string entity_type = 2;
144
145       // Optional. The parameter name for the value extracted from the
146       // annotated part of the example.
147       string alias = 3;
148
149       // Optional. Indicates whether the text was manually annotated by the
150       // developer.
151       bool user_defined = 4;
152     }
153
154     // Represents different types of training phrases.
155     enum Type {
156       // Not specified. This value should never be used.
157       TYPE_UNSPECIFIED = 0;
158
159       // Examples do not contain @-prefixed entity type names, but example parts
160       // can be annotated with entity types.
161       EXAMPLE = 1;
162
163       // Templates are not annotated with entity types, but they can contain
164       // @-prefixed entity type names as substrings.
165       TEMPLATE = 2;
166     }
167
168     // Required. The unique identifier of this training phrase.
169     string name = 1;
170
171     // Required. The type of the training phrase.
172     Type type = 2;
173
174     // Required. The collection of training phrase parts (can be annotated).
175     // Fields: `entity_type`, `alias` and `user_defined` should be populated
176     // only for the annotated parts of the training phrase.
177     repeated Part parts = 3;
178
179     // Optional. Indicates how many times this example or template was added to
180     // the intent. Each time a developer adds an existing sample by editing an
181     // intent or training, this counter is increased.
182     int32 times_added_count = 4;
183   }
184
185   // Represents intent parameters.
186   message Parameter {
187     // The unique identifier of this parameter.
188     string name = 1;
189
190     // Required. The name of the parameter.
191     string display_name = 2;
192
193     // Optional. The definition of the parameter value. It can be:
194     // - a constant string,
195     // - a parameter value defined as `$parameter_name`,
196     // - an original parameter value defined as `$parameter_name.original`,
197     // - a parameter value from some context defined as
198     //   `#context_name.parameter_name`.
199     string value = 3;
200
201     // Optional. The default value to use when the `value` yields an empty
202     // result.
203     // Default values can be extracted from contexts by using the following
204     // syntax: `#context_name.parameter_name`.
205     string default_value = 4;
206
207     // Optional. The name of the entity type, prefixed with `@`, that
208     // describes values of the parameter. If the parameter is
209     // required, this must be provided.
210     string entity_type_display_name = 5;
211
212     // Optional. Indicates whether the parameter is required. That is,
213     // whether the intent cannot be completed without collecting the parameter
214     // value.
215     bool mandatory = 6;
216
217     // Optional. The collection of prompts that the agent can present to the
218     // user in order to collect value for the parameter.
219     repeated string prompts = 7;
220
221     // Optional. Indicates whether the parameter represents a list of values.
222     bool is_list = 8;
223   }
224
225   // Corresponds to the `Response` field in the Dialogflow console.
226   message Message {
227     // The text response message.
228     message Text {
229       // Optional. The collection of the agent's responses.
230       repeated string text = 1;
231     }
232
233     // The image response message.
234     message Image {
235       // Optional. The public URI to an image file.
236       string image_uri = 1;
237
238       // A text description of the image to be used for accessibility,
239       // e.g., screen readers. Required if image_uri is set for CarouselSelect.
240       string accessibility_text = 2;
241     }
242
243     // The quick replies response message.
244     message QuickReplies {
245       // Optional. The title of the collection of quick replies.
246       string title = 1;
247
248       // Optional. The collection of quick replies.
249       repeated string quick_replies = 2;
250     }
251
252     // The card response message.
253     message Card {
254       // Optional. Contains information about a button.
255       message Button {
256         // Optional. The text to show on the button.
257         string text = 1;
258
259         // Optional. The text to send back to the Dialogflow API or a URI to
260         // open.
261         string postback = 2;
262       }
263
264       // Optional. The title of the card.
265       string title = 1;
266
267       // Optional. The subtitle of the card.
268       string subtitle = 2;
269
270       // Optional. The public URI to an image file for the card.
271       string image_uri = 3;
272
273       // Optional. The collection of card buttons.
274       repeated Button buttons = 4;
275     }
276
277     // The simple response message containing speech or text.
278     message SimpleResponse {
279       // One of text_to_speech or ssml must be provided. The plain text of the
280       // speech output. Mutually exclusive with ssml.
281       string text_to_speech = 1;
282
283       // One of text_to_speech or ssml must be provided. Structured spoken
284       // response to the user in the SSML format. Mutually exclusive with
285       // text_to_speech.
286       string ssml = 2;
287
288       // Optional. The text to display.
289       string display_text = 3;
290     }
291
292     // The collection of simple response candidates.
293     // This message in `QueryResult.fulfillment_messages` and
294     // `WebhookResponse.fulfillment_messages` should contain only one
295     // `SimpleResponse`.
296     message SimpleResponses {
297       // Required. The list of simple responses.
298       repeated SimpleResponse simple_responses = 1;
299     }
300
301     // The basic card message. Useful for displaying information.
302     message BasicCard {
303       // The button object that appears at the bottom of a card.
304       message Button {
305         // Opens the given URI.
306         message OpenUriAction {
307           // Required. The HTTP or HTTPS scheme URI.
308           string uri = 1;
309         }
310
311         // Required. The title of the button.
312         string title = 1;
313
314         // Required. Action to take when a user taps on the button.
315         OpenUriAction open_uri_action = 2;
316       }
317
318       // Optional. The title of the card.
319       string title = 1;
320
321       // Optional. The subtitle of the card.
322       string subtitle = 2;
323
324       // Required, unless image is present. The body text of the card.
325       string formatted_text = 3;
326
327       // Optional. The image for the card.
328       Image image = 4;
329
330       // Optional. The collection of card buttons.
331       repeated Button buttons = 5;
332     }
333
334     // The suggestion chip message that the user can tap to quickly post a reply
335     // to the conversation.
336     message Suggestion {
337       // Required. The text shown the in the suggestion chip.
338       string title = 1;
339     }
340
341     // The collection of suggestions.
342     message Suggestions {
343       // Required. The list of suggested replies.
344       repeated Suggestion suggestions = 1;
345     }
346
347     // The suggestion chip message that allows the user to jump out to the app
348     // or website associated with this agent.
349     message LinkOutSuggestion {
350       // Required. The name of the app or site this chip is linking to.
351       string destination_name = 1;
352
353       // Required. The URI of the app or site to open when the user taps the
354       // suggestion chip.
355       string uri = 2;
356     }
357
358     // The card for presenting a list of options to select from.
359     message ListSelect {
360       // An item in the list.
361       message Item {
362         // Required. Additional information about this option.
363         SelectItemInfo info = 1;
364
365         // Required. The title of the list item.
366         string title = 2;
367
368         // Optional. The main text describing the item.
369         string description = 3;
370
371         // Optional. The image to display.
372         Image image = 4;
373       }
374
375       // Optional. The overall title of the list.
376       string title = 1;
377
378       // Required. List items.
379       repeated Item items = 2;
380     }
381
382     // The card for presenting a carousel of options to select from.
383     message CarouselSelect {
384       // An item in the carousel.
385       message Item {
386         // Required. Additional info about the option item.
387         SelectItemInfo info = 1;
388
389         // Required. Title of the carousel item.
390         string title = 2;
391
392         // Optional. The body text of the card.
393         string description = 3;
394
395         // Optional. The image to display.
396         Image image = 4;
397       }
398
399       // Required. Carousel items.
400       repeated Item items = 1;
401     }
402
403     // Additional info about the select item for when it is triggered in a
404     // dialog.
405     message SelectItemInfo {
406       // Required. A unique key that will be sent back to the agent if this
407       // response is given.
408       string key = 1;
409
410       // Optional. A list of synonyms that can also be used to trigger this
411       // item in dialog.
412       repeated string synonyms = 2;
413     }
414
415     // Plays audio from a file in Telephony Gateway.
416     message TelephonyPlayAudio {
417       // Required. URI to a Google Cloud Storage object containing the audio to
418       // play, e.g., "gs://bucket/object". The object must contain a single
419       // channel (mono) of linear PCM audio (2 bytes / sample) at 8kHz.
420       //
421       // This object must be readable by the `service-<Project
422       // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` service account
423       // where <Project Number> is the number of the Telephony Gateway project
424       // (usually the same as the Dialogflow agent project). If the Google Cloud
425       // Storage bucket is in the Telephony Gateway project, this permission is
426       // added by default when enabling the Dialogflow V2 API.
427       //
428       // For audio from other sources, consider using the
429       // `TelephonySynthesizeSpeech` message with SSML.
430       string audio_uri = 1;
431     }
432
433     // Synthesizes speech and plays back the synthesized audio to the caller in
434     // Telephony Gateway.
435     //
436     // Telephony Gateway takes the synthesizer settings from
437     // `DetectIntentResponse.output_audio_config` which can either be set
438     // at request-level or can come from the agent-level synthesizer config.
439     message TelephonySynthesizeSpeech {
440       // Required. The source to be synthesized.
441       oneof source {
442         // The raw text to be synthesized.
443         string text = 1;
444
445         // The SSML to be synthesized. For more information, see
446         // [SSML](https://developers.google.com/actions/reference/ssml).
447         string ssml = 2;
448       }
449     }
450
451     // Transfers the call in Telephony Gateway.
452     message TelephonyTransferCall {
453       // Required. The phone number to transfer the call to
454       // in [E.164 format](https://en.wikipedia.org/wiki/E.164).
455       //
456       // We currently only allow transferring to US numbers (+1xxxyyyzzzz).
457       string phone_number = 1;
458     }
459
460     // Represents different platforms that a rich message can be intended for.
461     enum Platform {
462       // Not specified.
463       PLATFORM_UNSPECIFIED = 0;
464
465       // Facebook.
466       FACEBOOK = 1;
467
468       // Slack.
469       SLACK = 2;
470
471       // Telegram.
472       TELEGRAM = 3;
473
474       // Kik.
475       KIK = 4;
476
477       // Skype.
478       SKYPE = 5;
479
480       // Line.
481       LINE = 6;
482
483       // Viber.
484       VIBER = 7;
485
486       // Actions on Google.
487       // When using Actions on Google, you can choose one of the specific
488       // Intent.Message types that mention support for Actions on Google,
489       // or you can use the advanced Intent.Message.payload field.
490       // The payload field provides access to AoG features not available in the
491       // specific message types.
492       // If using the Intent.Message.payload field, it should have a structure
493       // similar to the JSON message shown here. For more information, see
494       // [Actions on Google Webhook
495       // Format](https://developers.google.com/actions/dialogflow/webhook)
496       // <pre>{
497       //   "expectUserResponse": true,
498       //   "isSsml": false,
499       //   "noInputPrompts": [],
500       //   "richResponse": {
501       //     "items": [
502       //       {
503       //         "simpleResponse": {
504       //           "displayText": "hi",
505       //           "textToSpeech": "hello"
506       //         }
507       //       }
508       //     ],
509       //     "suggestions": [
510       //       {
511       //         "title": "Say this"
512       //       },
513       //       {
514       //         "title": "or this"
515       //       }
516       //     ]
517       //   },
518       //   "systemIntent": {
519       //     "data": {
520       //       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
521       //       "listSelect": {
522       //         "items": [
523       //           {
524       //             "optionInfo": {
525       //               "key": "key1",
526       //               "synonyms": [
527       //                 "key one"
528       //               ]
529       //             },
530       //             "title": "must not be empty, but unique"
531       //           },
532       //           {
533       //             "optionInfo": {
534       //               "key": "key2",
535       //               "synonyms": [
536       //                 "key two"
537       //               ]
538       //             },
539       //             "title": "must not be empty, but unique"
540       //           }
541       //         ]
542       //       }
543       //     },
544       //     "intent": "actions.intent.OPTION"
545       //   }
546       // }</pre>
547       ACTIONS_ON_GOOGLE = 8;
548
549       // Telephony Gateway.
550       TELEPHONY = 10;
551     }
552
553     // Required. The rich response message.
554     oneof message {
555       // Returns a text response.
556       Text text = 1;
557
558       // Displays an image.
559       Image image = 2;
560
561       // Displays quick replies.
562       QuickReplies quick_replies = 3;
563
564       // Displays a card.
565       Card card = 4;
566
567       // Returns a response containing a custom, platform-specific payload.
568       // See the Intent.Message.Platform type for a description of the
569       // structure that may be required for your platform.
570       google.protobuf.Struct payload = 5;
571
572       // Returns a voice or text-only response for Actions on Google.
573       SimpleResponses simple_responses = 7;
574
575       // Displays a basic card for Actions on Google.
576       BasicCard basic_card = 8;
577
578       // Displays suggestion chips for Actions on Google.
579       Suggestions suggestions = 9;
580
581       // Displays a link out suggestion chip for Actions on Google.
582       LinkOutSuggestion link_out_suggestion = 10;
583
584       // Displays a list card for Actions on Google.
585       ListSelect list_select = 11;
586
587       // Displays a carousel card for Actions on Google.
588       CarouselSelect carousel_select = 12;
589
590       // Plays audio from a file in Telephony Gateway.
591       TelephonyPlayAudio telephony_play_audio = 13;
592
593       // Synthesizes speech in Telephony Gateway.
594       TelephonySynthesizeSpeech telephony_synthesize_speech = 14;
595
596       // Transfers the call in Telephony Gateway.
597       TelephonyTransferCall telephony_transfer_call = 15;
598     }
599
600     // Optional. The platform that this message is intended for.
601     Platform platform = 6;
602   }
603
604   // Represents a single followup intent in the chain.
605   message FollowupIntentInfo {
606     // The unique identifier of the followup intent.
607     // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
608     string followup_intent_name = 1;
609
610     // The unique identifier of the followup intent parent.
611     // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
612     string parent_followup_intent_name = 2;
613   }
614
615   // Represents the different states that webhooks can be in.
616   enum WebhookState {
617     // Webhook is disabled in the agent and in the intent.
618     WEBHOOK_STATE_UNSPECIFIED = 0;
619
620     // Webhook is enabled in the agent and in the intent.
621     WEBHOOK_STATE_ENABLED = 1;
622
623     // Webhook is enabled in the agent and in the intent. Also, each slot
624     // filling prompt is forwarded to the webhook.
625     WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
626   }
627
628   // Required for all methods except `create` (`create` populates the name
629   // automatically.
630   // The unique identifier of this intent.
631   // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
632   string name = 1;
633
634   // Required. The name of this intent.
635   string display_name = 2;
636
637   // Required. Indicates whether webhooks are enabled for the intent.
638   WebhookState webhook_state = 6;
639
640   // Optional. The priority of this intent. Higher numbers represent higher
641   // priorities. Zero or negative numbers mean that the intent is disabled.
642   int32 priority = 3;
643
644   // Optional. Indicates whether this is a fallback intent.
645   bool is_fallback = 4;
646
647   // Optional. Indicates whether Machine Learning is enabled for the intent.
648   // Note: If `ml_enabled` setting is set to false, then this intent is not
649   // taken into account during inference in `ML ONLY` match mode. Also,
650   // auto-markup in the UI is turned off.
651   // DEPRECATED! Please use `ml_disabled` field instead.
652   // NOTE: If both `ml_enabled` and `ml_disabled` are either not set or false,
653   // then the default value is determined as follows:
654   // - Before April 15th, 2018 the default is:
655   //   ml_enabled = false / ml_disabled = true.
656   // - After April 15th, 2018 the default is:
657   //   ml_enabled = true / ml_disabled = false.
658   bool ml_enabled = 5 [deprecated = true];
659
660   // Optional. Indicates whether Machine Learning is disabled for the intent.
661   // Note: If `ml_disabled` setting is set to true, then this intent is not
662   // taken into account during inference in `ML ONLY` match mode. Also,
663   // auto-markup in the UI is turned off.
664   bool ml_disabled = 19;
665
666   // Optional. Indicates that this intent ends an interaction. Some integrations
667   // (e.g., Actions on Google or Dialogflow phone gateway) use this information
668   // to close interaction with an end user. Default is false.
669   bool end_interaction = 21;
670
671   // Optional. The list of context names required for this intent to be
672   // triggered.
673   // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
674   repeated string input_context_names = 7;
675
676   // Optional. The collection of event names that trigger the intent.
677   // If the collection of input contexts is not empty, all of the contexts must
678   // be present in the active user session for an event to trigger this intent.
679   repeated string events = 8;
680
681   // Optional. The collection of examples/templates that the agent is
682   // trained on.
683   repeated TrainingPhrase training_phrases = 9;
684
685   // Optional. The name of the action associated with the intent.
686   // Note: The action name must not contain whitespaces.
687   string action = 10;
688
689   // Optional. The collection of contexts that are activated when the intent
690   // is matched. Context messages in this collection should not set the
691   // parameters field. Setting the `lifespan_count` to 0 will reset the context
692   // when the intent is matched.
693   // Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
694   repeated Context output_contexts = 11;
695
696   // Optional. Indicates whether to delete all contexts in the current
697   // session when this intent is matched.
698   bool reset_contexts = 12;
699
700   // Optional. The collection of parameters associated with the intent.
701   repeated Parameter parameters = 13;
702
703   // Optional. The collection of rich messages corresponding to the
704   // `Response` field in the Dialogflow console.
705   repeated Message messages = 14;
706
707   // Optional. The list of platforms for which the first response will be
708   // taken from among the messages assigned to the DEFAULT_PLATFORM.
709   repeated Message.Platform default_response_platforms = 15;
710
711   // The unique identifier of the root intent in the chain of followup intents.
712   // It identifies the correct followup intents chain for this intent.
713   // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
714   string root_followup_intent_name = 16;
715
716   // The unique identifier of the parent intent in the chain of followup
717   // intents.
718   // It identifies the parent followup intent.
719   // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
720   string parent_followup_intent_name = 17;
721
722   // Optional. Collection of information about all followup intents that have
723   // name of this intent as a root_name.
724   repeated FollowupIntentInfo followup_intent_info = 18;
725 }
726
727 // The request message for
728 // [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents].
729 message ListIntentsRequest {
730   // Required. The agent to list all intents from.
731   // Format: `projects/<Project ID>/agent`.
732   string parent = 1;
733
734   // Optional. The language to list training phrases, parameters and rich
735   // messages for. If not specified, the agent's default language is used.
736   // [More than a dozen
737   // languages](https://dialogflow.com/docs/reference/language) are supported.
738   // Note: languages must be enabled in the agent before they can be used.
739   string language_code = 2;
740
741   // Optional. The resource view to apply to the returned intent.
742   IntentView intent_view = 3;
743
744   // Optional. The maximum number of items to return in a single page. By
745   // default 100 and at most 1000.
746   int32 page_size = 4;
747
748   // Optional. The next_page_token value returned from a previous list request.
749   string page_token = 5;
750 }
751
752 // The response message for
753 // [Intents.ListIntents][google.cloud.dialogflow.v2beta1.Intents.ListIntents].
754 message ListIntentsResponse {
755   // The list of agent intents. There will be a maximum number of items
756   // returned based on the page_size field in the request.
757   repeated Intent intents = 1;
758
759   // Token to retrieve the next page of results, or empty if there are no
760   // more results in the list.
761   string next_page_token = 2;
762 }
763
764 // The request message for
765 // [Intents.GetIntent][google.cloud.dialogflow.v2beta1.Intents.GetIntent].
766 message GetIntentRequest {
767   // Required. The name of the intent.
768   // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
769   string name = 1;
770
771   // Optional. The language to retrieve training phrases, parameters and rich
772   // messages for. If not specified, the agent's default language is used.
773   // [More than a dozen
774   // languages](https://dialogflow.com/docs/reference/language) are supported.
775   // Note: languages must be enabled in the agent, before they can be used.
776   string language_code = 2;
777
778   // Optional. The resource view to apply to the returned intent.
779   IntentView intent_view = 3;
780 }
781
782 // The request message for
783 // [Intents.CreateIntent][google.cloud.dialogflow.v2beta1.Intents.CreateIntent].
784 message CreateIntentRequest {
785   // Required. The agent to create a intent for.
786   // Format: `projects/<Project ID>/agent`.
787   string parent = 1;
788
789   // Required. The intent to create.
790   Intent intent = 2;
791
792   // Optional. The language of training phrases, parameters and rich messages
793   // defined in `intent`. If not specified, the agent's default language is
794   // used. [More than a dozen
795   // languages](https://dialogflow.com/docs/reference/language) are supported.
796   // Note: languages must be enabled in the agent, before they can be used.
797   string language_code = 3;
798
799   // Optional. The resource view to apply to the returned intent.
800   IntentView intent_view = 4;
801 }
802
803 // The request message for
804 // [Intents.UpdateIntent][google.cloud.dialogflow.v2beta1.Intents.UpdateIntent].
805 message UpdateIntentRequest {
806   // Required. The intent to update.
807   // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
808   Intent intent = 1;
809
810   // Optional. The language of training phrases, parameters and rich messages
811   // defined in `intent`. If not specified, the agent's default language is
812   // used. [More than a dozen
813   // languages](https://dialogflow.com/docs/reference/language) are supported.
814   // Note: languages must be enabled in the agent, before they can be used.
815   string language_code = 2;
816
817   // Optional. The mask to control which fields get updated.
818   google.protobuf.FieldMask update_mask = 3;
819
820   // Optional. The resource view to apply to the returned intent.
821   IntentView intent_view = 4;
822 }
823
824 // The request message for
825 // [Intents.DeleteIntent][google.cloud.dialogflow.v2beta1.Intents.DeleteIntent].
826 message DeleteIntentRequest {
827   // Required. The name of the intent to delete.
828   // Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
829   string name = 1;
830 }
831
832 // The request message for
833 // [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents].
834 message BatchUpdateIntentsRequest {
835   // Required. The name of the agent to update or create intents in.
836   // Format: `projects/<Project ID>/agent`.
837   string parent = 1;
838
839   // Required. The source of the intent batch.
840   oneof intent_batch {
841     // The URI to a Google Cloud Storage file containing intents to update or
842     // create. The file format can either be a serialized proto (of IntentBatch
843     // type) or JSON object. Note: The URI must start with "gs://".
844     string intent_batch_uri = 2;
845
846     // The collection of intents to update or create.
847     IntentBatch intent_batch_inline = 3;
848   }
849
850   // Optional. The language of training phrases, parameters and rich messages
851   // defined in `intents`. If not specified, the agent's default language is
852   // used. [More than a dozen
853   // languages](https://dialogflow.com/docs/reference/language) are supported.
854   // Note: languages must be enabled in the agent, before they can be used.
855   string language_code = 4;
856
857   // Optional. The mask to control which fields get updated.
858   google.protobuf.FieldMask update_mask = 5;
859
860   // Optional. The resource view to apply to the returned intent.
861   IntentView intent_view = 6;
862 }
863
864 // The response message for
865 // [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2beta1.Intents.BatchUpdateIntents].
866 message BatchUpdateIntentsResponse {
867   // The collection of updated or created intents.
868   repeated Intent intents = 1;
869 }
870
871 // The request message for
872 // [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2beta1.Intents.BatchDeleteIntents].
873 message BatchDeleteIntentsRequest {
874   // Required. The name of the agent to delete all entities types for. Format:
875   // `projects/<Project ID>/agent`.
876   string parent = 1;
877
878   // Required. The collection of intents to delete. Only intent `name` must be
879   // filled in.
880   repeated Intent intents = 2;
881 }
882
883 // This message is a wrapper around a collection of intents.
884 message IntentBatch {
885   // A collection of intents.
886   repeated Intent intents = 1;
887 }
888
889 // Represents the options for views of an intent.
890 // An intent can be a sizable object. Therefore, we provide a resource view that
891 // does not return training phrases in the response by default.
892 enum IntentView {
893   // Training phrases field is not populated in the response.
894   INTENT_VIEW_UNSPECIFIED = 0;
895
896   // All fields are populated.
897   INTENT_VIEW_FULL = 1;
898 }