table.proto 2.9 KB

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