- StaticPromptCandidate
- Selector
- SurfaceCapabilities
- StaticPromptResponse
- StaticSimplePrompt
- Variant
- StaticContentPrompt
- StaticCardPrompt
- StaticImagePrompt
- StaticLinkPrompt
- OpenUrl
- StaticTablePrompt
- TableColumn
- TableRow
- TableCell
- StaticMediaPrompt
- MediaObject
- MediaImage
- StaticListPrompt
- ListItem
- StaticCollectionPrompt
- CollectionItem
- Suggestion
- StaticCanvasPrompt
Represents a list of prompt candidates, one of which will be selected as the prompt to be shown in the response to the user. This message is localizable.
JSON representation | |
---|---|
{
"candidates": [
{
object ( |
Fields | |
---|---|
candidates[] |
The list of candidate prompts to be sent to the client. Each prompt has a selector to determine when it can be used. The first selector that matches a request will be sent and the rest will be ignored. |
StaticPromptCandidate
Represents a static prompt candidate.
JSON representation | |
---|---|
{ "selector": { object ( |
Fields | |
---|---|
selector |
Optional. The criteria for whether this prompt matches a request. If the selector is empty, this prompt will always be triggered. |
promptResponse |
The prompt response associated with the selector. |
Selector
Defines the criteria for whether a prompt matches a request.
JSON representation | |
---|---|
{
"surfaceCapabilities": {
object ( |
Fields | |
---|---|
surfaceCapabilities |
The set of required surface capabilities. |
SurfaceCapabilities
Represents the surface the user is using to make a request to the Action.
JSON representation | |
---|---|
{
"capabilities": [
enum ( |
Fields | |
---|---|
capabilities[] |
Required. The capabilities of the surface making a request to the Action. |
StaticPromptResponse
Represents structured responses to send to the user, such as text, speech, cards, canvas data, suggestion chips, etc.
JSON representation | |
---|---|
{ "firstSimple": { object ( |
Fields | |
---|---|
firstSimple |
Optional. The first voice and text-only response. |
content |
Optional. A content like a card, list or media to display to the user. |
lastSimple |
Optional. The last voice and text-only response. |
suggestions[] |
Optional. Suggestions to be displayed to the user which will always appear at the end of the response. If the "append" field in the containing prompt is "true" the titles defined in this field will be added to titles defined in any previously defined suggestions prompts and duplicate values will be removed. |
link |
Optional. An additional suggestion chip that can link out to the associated app or site. The chip will be rendered with the title "Open |
override |
Optional. Mode for how this messages should be merged with previously defined messages. "true" will clear all previously defined messages (first and last simple, content, suggestions link and canvas) and add messages defined in this prompt. "false" will add messages defined in this prompt to messages defined in previous responses. Setting this field to "false" will also enable appending to some fields inside Simple prompts, the Suggestions prompt and the Canvas prompt (part of the Content prompt). The Content and Link messages will always be overwritten if defined in the prompt. Default value is "false". |
canvas |
A response to be used for interactive canvas experience. |
StaticSimplePrompt
Represents a simple prompt to be send to a user.
JSON representation | |
---|---|
{
"variants": [
{
object ( |
Fields | |
---|---|
variants[] |
List of possible variants. |
Variant
Represents a variant which is part of the simple prompt.
JSON representation | |
---|---|
{ "speech": string, "text": string } |
Fields | |
---|---|
speech |
Optional. Represents the speech to be spoken to the user. Can be SSML or text to speech. If the "append" field in the containing prompt is "true" the speech defined in this field will be appended to the previous Simple prompt's speech. |
text |
Optional. Text to display in the chat bubble. If not given, a display rendering of the speech field above will be used. Limited to 640 chars. If the "append" field in the containing prompt is "true" the text defined in this field will be appended to the previous Simple prompt's text. |
StaticContentPrompt
A placeholder for the Content part of a StaticPrompt.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field content . Only one type of content can be present in a Prompt. content can be only one of the following: |
||
card |
A basic card. |
|
image |
An image. |
|
table |
Table card. |
|
media |
Response indicating a set of media to be played. |
|
list |
A card for presenting a list of options to select from. |
|
collection |
A card presenting a list of options to select from. |
StaticCardPrompt
A basic card for displaying some information, e.g. an image and/or text.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "text": string, "image": { object ( |
Fields | |
---|---|
title |
Optional. Overall title of the card. |
subtitle |
Optional. Subtitle of the card. |
text |
Required. Body text of the card which is needed unless image is present. Supports a limited set of markdown syntax for formatting. |
image |
Optional. A hero image for the card. The height is fixed to 192dp. |
imageFill |
Optional. How the image background will be filled. |
button |
Optional. A clickable button to be shown in the Card. |
StaticImagePrompt
An image displayed in the card.
JSON representation | |
---|---|
{ "url": string, "alt": string, "height": integer, "width": integer } |
Fields | |
---|---|
url |
Required. The source url of the image. Images can be JPG, PNG and GIF (animated and non-animated). For example, |
alt |
Required. A text description of the image to be used for accessibility, e.g. screen readers. |
height |
Optional. The height of the image in pixels. |
width |
Optional. The width of the image in pixels. |
StaticLinkPrompt
Defines a link which will be displayed as a suggestion chip and can be opened by the user.
JSON representation | |
---|---|
{
"name": string,
"open": {
object ( |
Fields | |
---|---|
name |
Name of the link |
open |
Defines behavior when the user opens the link. |
OpenUrl
Defines behavior when the user opens the link.
JSON representation | |
---|---|
{
"url": string,
"hint": enum ( |
Fields | |
---|---|
url |
The url field which could be any of: - http/https urls for opening an App-linked App or a webpage |
hint |
Indicates a hint for the url type. |
StaticTablePrompt
A table card for displaying a table of text.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "image": { object ( |
Fields | |
---|---|
title |
Optional. Overall title of the table. Must be set if subtitle is set. |
subtitle |
Optional. Subtitle for the table. |
image |
Optional. Image associated with the table. |
columns[] |
Optional. Headers and alignment of columns. |
rows[] |
Optional. Row data of the table. The first 3 rows are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which rows will be shown for a given surface. On surfaces that support the WEB_BROWSER capability, you can point the user to a web page with more data. |
button |
Optional. Button. |
TableColumn
Describes a column in the table.
JSON representation | |
---|---|
{
"header": string,
"align": enum ( |
Fields | |
---|---|
header |
Header text for the column. |
align |
Horizontal alignment of content w.r.t column. If unspecified, content will be aligned to the leading edge. |
TableRow
Describes a row in the table.
JSON representation | |
---|---|
{
"cells": [
{
object ( |
Fields | |
---|---|
cells[] |
Cells in this row. The first 3 cells are guaranteed to be shown but others might be cut on certain surfaces. Please test with the simulator to see which cells will be shown for a given surface. |
divider |
Indicates whether there should be a divider after each row. |
TableCell
Describes a cell in a row.
JSON representation | |
---|---|
{ "text": string } |
Fields | |
---|---|
text |
Text content of the cell. |
StaticMediaPrompt
Contains information about the media, such as name, description, url, etc. Next id: 9
JSON representation | |
---|---|
{ "mediaType": enum ( |
Fields | |
---|---|
mediaType |
Media type of this response. |
startOffset |
Start offset of the first media object. A duration in seconds with up to nine fractional digits, terminated by ' |
optionalMediaControls[] |
Optional media control types this media response session can support. If set, request will be made to 3p when a certain media event happens. If not set, 3p must still handle two default control type, FINISHED and FAILED. |
mediaObjects[] |
List of media objects. |
MediaObject
Represents a single media object.
JSON representation | |
---|---|
{
"name": string,
"description": string,
"url": string,
"image": {
object ( |
Fields | |
---|---|
name |
Name of this media object. |
description |
Description of this media object. |
url |
The url pointing to the media content. |
image |
Image to show with the media card. |
MediaImage
Image to be shown inside a MediaPrompt.
JSON representation | |
---|---|
{ // Union field |
Fields | ||
---|---|---|
Union field image . Only one type of MediaImage is allowed. image can be only one of the following: |
||
large |
A large image, such as the cover of the album, etc. |
|
icon |
A small image icon displayed on the right from the title. It's resized to 36x36 dp. |
StaticListPrompt
A card for presenting a list of options to select from.
JSON representation | |
---|---|
{
"title": string,
"subtitle": string,
"items": [
{
object ( |
Fields | |
---|---|
title |
Optional. Title of the list. |
subtitle |
Optional. Subtitle of the list. |
items[] |
Required. List items. |
ListItem
An item in the list.
JSON representation | |
---|---|
{
"key": string,
"title": string,
"description": string,
"image": {
object ( |
Fields | |
---|---|
key |
Required. The NLU key that matches the entry key name in the associated type. When item tapped, this key will be posted back as a select option parameter. |
title |
Required. Title of the item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of items. |
description |
Optional. Body text of the item. |
image |
Optional. Item image. |
StaticCollectionPrompt
A card for presenting a collection of options to select from.
JSON representation | |
---|---|
{ "title": string, "subtitle": string, "items": [ { object ( |
Fields | |
---|---|
title |
Optional. Title of the collection. |
subtitle |
Optional. Subtitle of the collection. |
items[] |
Required. Collection items. |
imageFill |
Optional. Type of image display option. |
CollectionItem
An item in the collection.
JSON representation | |
---|---|
{
"key": string,
"title": string,
"description": string,
"image": {
object ( |
Fields | |
---|---|
key |
Required. The NLU key that matches the entry key name in the associated Type. When item tapped, this key will be posted back as a select option parameter. |
title |
Required. Title of the item. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of items. |
description |
Optional. Body text of the item. |
image |
Optional. Item image. |
Suggestion
Represents a suggestion chip, a UI element shown to the user for convenience.
JSON representation | |
---|---|
{ "title": string } |
Fields | |
---|---|
title |
Required. The text shown in the suggestion chip. When tapped, this text will be posted back to the conversation verbatim as if the user had typed it. Each title must be unique among the set of suggestion chips. Max 25 chars |
StaticCanvasPrompt
Represents a Interactive Canvas response to be sent to the user. This can be used in conjunction with the "firstSimple" field in the containing prompt to speak to the user in addition to displaying a interactive canvas response.
JSON representation | |
---|---|
{ "url": string, "data": [ value ], "suppressMic": boolean } |
Fields | |
---|---|
url |
Required. URL of the web view to load. |
data[] |
Optional. JSON data to be passed through to the immersive experience web page as an event. If the "override" field in the containing prompt is "false" data values defined in this Canvas prompt will be added after data values defined in previous Canvas prompts. |
suppressMic |
Optional. A true value means that the mic won't be opened for capturing input after this immersive response is presented to the user. |