Show / Hide Table of Contents

Class GoogleAppsCardV1Widget

Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.

Inheritance
object
GoogleAppsCardV1Widget
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.HangoutsChat.v1.Data
Assembly: Google.Apis.HangoutsChat.v1.dll
Syntax
public class GoogleAppsCardV1Widget : IDirectResponseSchema

Properties

ButtonList

A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link:

"buttonList": { "buttons": [ { "text": "Edit", "color":
{ "red": 0, "green": 0, "blue": 1, }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText":
"check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] }
Declaration
[JsonProperty("buttonList")]
public virtual GoogleAppsCardV1ButtonList ButtonList { get; set; }
Property Value
Type Description
GoogleAppsCardV1ButtonList

Carousel

A carousel contains a collection of nested widgets. For example, this is a JSON representation of a carousel that contains two text paragraphs.

{ "widgets": [ { "textParagraph": { "text": "First text paragraph in
the carousel." } }, { "textParagraph": { "text": "Second text paragraph in the carousel." } } ] }
Declaration
[JsonProperty("carousel")]
public virtual GoogleAppsCardV1Carousel Carousel { get; set; }
Property Value
Type Description
GoogleAppsCardV1Carousel

ChipList

A list of chips. For example, the following JSON creates two chips. The first is a text chip and the second is an icon chip that opens a link:

"chipList": { "chips": [ { "text": "Edit", "disabled": true, }, {
"icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url":
"https://example.com/calendar" } } } ] }
Declaration
[JsonProperty("chipList")]
public virtual GoogleAppsCardV1ChipList ChipList { get; set; }
Property Value
Type Description
GoogleAppsCardV1ChipList

Columns

Displays up to 2 columns. To include more than 2 columns, or to use rows, use the Grid widget. For example, the following JSON creates 2 columns that each contain text paragraphs:

"columns": {
"columnItems": [ { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER",
"verticalAlignment": "CENTER", "widgets": [ { "textParagraph": { "text": "First column text paragraph" } } ]
}, { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", "horizontalAlignment": "CENTER", "verticalAlignment":
"CENTER", "widgets": [ { "textParagraph": { "text": "Second column text paragraph" } } ] } ] }
Declaration
[JsonProperty("columns")]
public virtual GoogleAppsCardV1Columns Columns { get; set; }
Property Value
Type Description
GoogleAppsCardV1Columns

DateTimePicker

Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment:

"dateTimePicker": { "name": "appointment_time",
"label": "Book your appointment at:", "type": "DATE_AND_TIME", "valueMsEpoch": "796435200000" }
Declaration
[JsonProperty("dateTimePicker")]
public virtual GoogleAppsCardV1DateTimePicker DateTimePicker { get; set; }
Property Value
Type Description
GoogleAppsCardV1DateTimePicker

DecoratedText

Displays a decorated text item. For example, the following JSON creates a decorated text widget showing email address:

"decoratedText": { "icon": { "knownIcon": "EMAIL" }, "topLabel": "Email Address", "text":
"sasha@example.com", "bottomLabel": "This is a new Email address!", "switchControl": { "name":
"has_send_welcome_email_to_sasha", "selected": false, "controlType": "CHECKBOX" } }
Declaration
[JsonProperty("decoratedText")]
public virtual GoogleAppsCardV1DecoratedText DecoratedText { get; set; }
Property Value
Type Description
GoogleAppsCardV1DecoratedText

Divider

Displays a horizontal line divider between widgets. For example, the following JSON creates a divider:

"divider": { }
Declaration
[JsonProperty("divider")]
public virtual GoogleAppsCardV1Divider Divider { get; set; }
Property Value
Type Description
GoogleAppsCardV1Divider

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

Grid

Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Google Workspace add-ons and Chat apps: For example, the following JSON creates a 2 column grid with a single item:

"grid": { "title": "A fine collection of items", "columnCount": 2,
"borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri":
"https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" }
}, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url":
"https://www.example.com" } } }
Declaration
[JsonProperty("grid")]
public virtual GoogleAppsCardV1Grid Grid { get; set; }
Property Value
Type Description
GoogleAppsCardV1Grid

HorizontalAlignment

Specifies whether widgets align to the left, right, or center of a column.

Declaration
[JsonProperty("horizontalAlignment")]
public virtual string HorizontalAlignment { get; set; }
Property Value
Type Description
string

Image

Displays an image. For example, the following JSON creates an image with alternative text:

"image": {
"imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", "altText":
"Chat app avatar" }
Declaration
[JsonProperty("image")]
public virtual GoogleAppsCardV1Image Image { get; set; }
Property Value
Type Description
GoogleAppsCardV1Image

SelectionInput

Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size:

"selectionInput": { "name": "size", "label": "Size" "type": "DROPDOWN", "items": [
{ "text": "S", "value": "small", "selected": false }, { "text": "M", "value": "medium", "selected": true },
{ "text": "L", "value": "large", "selected": false }, { "text": "XL", "value": "extra_large", "selected":
false } ] }
Declaration
[JsonProperty("selectionInput")]
public virtual GoogleAppsCardV1SelectionInput SelectionInput { get; set; }
Property Value
Type Description
GoogleAppsCardV1SelectionInput

TextInput

Displays a text box that users can type into. For example, the following JSON creates a text input for an email address:

"textInput": { "name": "mailing_address", "label": "Mailing Address" }

As another example, the following JSON creates a text input for a programming language with static suggestions:

"textInput": { "name": "preferred_programing_language", "label": "Preferred Language", "initialSuggestions":
{ "items": [ { "text": "C++" }, { "text": "Java" }, { "text": "JavaScript" }, { "text": "Python" } ] } }
Declaration
[JsonProperty("textInput")]
public virtual GoogleAppsCardV1TextInput TextInput { get; set; }
Property Value
Type Description
GoogleAppsCardV1TextInput

TextParagraph

Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace add-ons. For example, the following JSON creates a bolded text:

"textParagraph": { "text": " *bold text*" }
Declaration
[JsonProperty("textParagraph")]
public virtual GoogleAppsCardV1TextParagraph TextParagraph { get; set; }
Property Value
Type Description
GoogleAppsCardV1TextParagraph

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX