intent.proto 2.0 KB

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