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