xref: /aosp_15_r20/external/googleapis/google/actions/sdk/v2/conversation/prompt/prompt.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2020 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.actions.sdk.v2.conversation;
18
19import "google/actions/sdk/v2/conversation/prompt/content/canvas.proto";
20import "google/actions/sdk/v2/conversation/prompt/content/content.proto";
21import "google/actions/sdk/v2/conversation/prompt/content/link.proto";
22import "google/actions/sdk/v2/conversation/prompt/simple.proto";
23import "google/actions/sdk/v2/conversation/prompt/suggestion.proto";
24
25option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
26option java_multiple_files = true;
27option java_outer_classname = "PromptProto";
28option java_package = "com.google.actions.sdk.v2.conversation";
29
30// Represent a response to a user.
31message Prompt {
32  // Optional. Mode for how this messages should be merged with previously
33  // defined messages.
34  // "false" will clear all previously defined messages (first and last
35  // simple, content, suggestions link and canvas) and add messages defined in
36  // this prompt.
37  // "true" will add messages defined in this prompt to messages defined in
38  // previous responses. Setting this field to "true" will also enable appending
39  // to some fields inside Simple prompts, the Suggestion prompt and the Canvas
40  // prompt (part of the Content prompt). The Content and Link messages will
41  // always be overwritten if defined in the prompt.
42  // Default value is "false".
43  bool append = 1 [deprecated = true];
44
45  // Optional. Mode for how this messages should be merged with previously
46  // defined messages.
47  // "true" clears all previously defined messages (first and last
48  // simple, content, suggestions link and canvas) and adds messages defined in
49  // this prompt.
50  // "false" adds messages defined in this prompt to messages defined in
51  // previous responses. Leaving this field to "false" also enables
52  // appending to some fields inside Simple prompts, the Suggestions prompt,
53  // and the Canvas prompt (part of the Content prompt). The Content and Link
54  // messages are always overwritten if defined in the prompt. Default
55  // value is "false".
56  bool override = 8;
57
58  // Optional. The first voice and text-only response.
59  Simple first_simple = 2;
60
61  // Optional. A content like a card, list or media to display to the user.
62  Content content = 3;
63
64  // Optional. The last voice and text-only response.
65  Simple last_simple = 4;
66
67  // Optional. Suggestions to be displayed to the user which will always appear
68  // at the end of the response.
69  // If the "override" field in the containing prompt is "false", the titles
70  // defined in this field will be added to titles defined in any previously
71  // defined suggestions prompts and duplicate values will be removed.
72  repeated Suggestion suggestions = 5;
73
74  // Optional. An additional suggestion chip that can link out to the associated app
75  // or site.
76  // The chip will be rendered with the title "Open <name>". Max 20 chars.
77  Link link = 6;
78
79  // Optional. Represents a Interactive Canvas response to be sent to the user.
80  Canvas canvas = 9;
81}
82