xref: /aosp_15_r20/external/googleapis/google/actions/sdk/v2/conversation/intent.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/protobuf/struct.proto";
20
21option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
22option java_multiple_files = true;
23option java_outer_classname = "IntentProto";
24option java_package = "com.google.actions.sdk.v2.conversation";
25
26// Represents an intent.
27message Intent {
28  // Required. The name of the last matched intent.
29  string name = 1;
30
31  // Required. Represents parameters identified as part of intent matching.
32  // This is a map of the name of the identified parameter to the value of the
33  // parameter identified from user input. All parameters defined in
34  // the matched intent that are identified will be surfaced here.
35  map<string, IntentParameterValue> params = 2;
36
37  // Optional. Typed or spoken input from the end user that matched this intent.
38  // This will be populated when an intent is matched, based on the user input.
39  string query = 3;
40}
41
42// Represents a value for intent parameter.
43message IntentParameterValue {
44  // Required. Original text value extracted from user utterance.
45  string original = 1;
46
47  // Required. Structured value for parameter extracted from user input.
48  // This will only be populated if the parameter is defined in the matched
49  // intent and the value of the parameter could be identified during intent
50  // matching.
51  google.protobuf.Value resolved = 2;
52}
53