static_table_prompt.proto 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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/actions/sdk/v2/interactionmodel/prompt/content/static_link_prompt.proto";
  18. import "google/api/field_behavior.proto";
  19. option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "StaticTablePromptProto";
  22. option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
  23. // A table card for displaying a table of text.
  24. message StaticTablePrompt {
  25. // Optional. Overall title of the table. Must be set if subtitle is set.
  26. string title = 1 [(google.api.field_behavior) = OPTIONAL];
  27. // Optional. Subtitle for the table.
  28. string subtitle = 2 [(google.api.field_behavior) = OPTIONAL];
  29. // Optional. Image associated with the table.
  30. StaticImagePrompt image = 3 [(google.api.field_behavior) = OPTIONAL];
  31. // Optional. Headers and alignment of columns.
  32. repeated TableColumn columns = 4 [(google.api.field_behavior) = OPTIONAL];
  33. // Optional. Row data of the table. The first 3 rows are guaranteed to be shown but
  34. // others might be cut on certain surfaces. Please test with the simulator to
  35. // see which rows will be shown for a given surface. On surfaces that support
  36. // the `WEB_BROWSER` capability, you can point the user to
  37. // a web page with more data.
  38. repeated TableRow rows = 5 [(google.api.field_behavior) = OPTIONAL];
  39. // Optional. Button.
  40. StaticLinkPrompt button = 6 [(google.api.field_behavior) = OPTIONAL];
  41. }
  42. // Describes a column in the table.
  43. message TableColumn {
  44. // The alignment of the content within the cell.
  45. enum HorizontalAlignment {
  46. // HorizontalAlignment unspecified.
  47. UNSPECIFIED = 0;
  48. // Leading edge of the cell. This is the default.
  49. LEADING = 1;
  50. // Content is aligned to the center of the column.
  51. CENTER = 2;
  52. // Content is aligned to the trailing edge of the column.
  53. TRAILING = 3;
  54. }
  55. // Header text for the column.
  56. string header = 1;
  57. // Horizontal alignment of content w.r.t column. If unspecified, content
  58. // will be aligned to the leading edge.
  59. HorizontalAlignment align = 2;
  60. }
  61. // Describes a cell in a row.
  62. message TableCell {
  63. // Text content of the cell.
  64. string text = 1;
  65. }
  66. // Describes a row in the table.
  67. message TableRow {
  68. // Cells in this row. The first 3 cells are guaranteed to be shown but
  69. // others might be cut on certain surfaces. Please test with the simulator
  70. // to see which cells will be shown for a given surface.
  71. repeated TableCell cells = 1;
  72. // Indicates whether there should be a divider after each row.
  73. bool divider = 2;
  74. }