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