static_collection_prompt.proto 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.interactionmodel.prompt;
  16. import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
  17. import "google/api/field_behavior.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "StaticCollectionPromptProto";
  21. option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
  22. // A card for presenting a collection of options to select from.
  23. message StaticCollectionPrompt {
  24. // An item in the collection.
  25. message CollectionItem {
  26. // Required. The NLU key that matches the entry key name in the associated
  27. // Type. When item tapped, this key will be posted back as a select option
  28. // parameter.
  29. string key = 1 [(google.api.field_behavior) = REQUIRED];
  30. // Required. Title of the item. When tapped, this text will be
  31. // posted back to the conversation verbatim as if the user had typed it.
  32. // Each title must be unique among the set of items.
  33. string title = 2 [(google.api.field_behavior) = REQUIRED];
  34. // Optional. Body text of the item.
  35. string description = 3 [(google.api.field_behavior) = OPTIONAL];
  36. // Optional. Item image.
  37. StaticImagePrompt image = 4 [(google.api.field_behavior) = OPTIONAL];
  38. }
  39. // Optional. Title of the collection.
  40. string title = 1 [(google.api.field_behavior) = OPTIONAL];
  41. // Optional. Subtitle of the collection.
  42. string subtitle = 2 [(google.api.field_behavior) = OPTIONAL];
  43. // Required. Collection items.
  44. repeated CollectionItem items = 3 [(google.api.field_behavior) = REQUIRED];
  45. // Optional. Type of image display option.
  46. StaticImagePrompt.ImageFill image_fill = 4 [(google.api.field_behavior) = OPTIONAL];
  47. }