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