Package com.google.apps.card.v1
Class Widget.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Widget.Builder>
com.google.protobuf.GeneratedMessage.Builder<Widget.Builder>
com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,Widget.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
com.google.apps.card.v1.Widget.Builder
- All Implemented Interfaces:
WidgetOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
Widget
public static final class Widget.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
implements WidgetOrBuilder
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.Protobuf type
google.apps.card.v1.Widget
-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
A list of buttons.Displays up to 2 columns.Displays a widget that lets users input a date, time, or date and time.Displays a decorated text item.Displays a horizontal line divider between widgets.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) Displays a grid with a collection of items.Specifies whether widgets align to the left, right, or center of a column.Displays an image.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) Displays a selection control that lets users select items.Displays a text box that users can type into.Displays a text paragraph.clone()
A list of buttons.A list of buttons.A list of buttons.Displays up to 2 columns.Displays up to 2 columns.Displays up to 2 columns.Displays a widget that lets users input a date, time, or date and time.Displays a widget that lets users input a date, time, or date and time.Displays a widget that lets users input a date, time, or date and time.Displays a decorated text item.Displays a decorated text item.Displays a decorated text item.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
Displays a horizontal line divider between widgets.Displays a horizontal line divider between widgets.Displays a horizontal line divider between widgets.getGrid()
Displays a grid with a collection of items.Displays a grid with a collection of items.Displays a grid with a collection of items.Specifies whether widgets align to the left, right, or center of a column.int
Specifies whether widgets align to the left, right, or center of a column.getImage()
Displays an image.Displays an image.Displays an image.Displays a selection control that lets users select items.Displays a selection control that lets users select items.Displays a selection control that lets users select items.Displays a text box that users can type into.Displays a text box that users can type into.Displays a text box that users can type into.Displays a text paragraph.Displays a text paragraph.Displays a text paragraph.boolean
A list of buttons.boolean
Displays up to 2 columns.boolean
Displays a widget that lets users input a date, time, or date and time.boolean
Displays a decorated text item.boolean
Displays a horizontal line divider between widgets.boolean
hasGrid()
Displays a grid with a collection of items.boolean
hasImage()
Displays an image.boolean
Displays a selection control that lets users select items.boolean
Displays a text box that users can type into.boolean
Displays a text paragraph.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeButtonList
(ButtonList value) A list of buttons.mergeColumns
(Columns value) Displays up to 2 columns.Displays a widget that lets users input a date, time, or date and time.mergeDecoratedText
(DecoratedText value) Displays a decorated text item.mergeDivider
(Divider value) Displays a horizontal line divider between widgets.mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) Displays a grid with a collection of items.mergeImage
(Image value) Displays an image.Displays a selection control that lets users select items.mergeTextInput
(TextInput value) Displays a text box that users can type into.mergeTextParagraph
(TextParagraph value) Displays a text paragraph.final Widget.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) setButtonList
(ButtonList value) A list of buttons.setButtonList
(ButtonList.Builder builderForValue) A list of buttons.setColumns
(Columns value) Displays up to 2 columns.setColumns
(Columns.Builder builderForValue) Displays up to 2 columns.setDateTimePicker
(DateTimePicker value) Displays a widget that lets users input a date, time, or date and time.setDateTimePicker
(DateTimePicker.Builder builderForValue) Displays a widget that lets users input a date, time, or date and time.setDecoratedText
(DecoratedText value) Displays a decorated text item.setDecoratedText
(DecoratedText.Builder builderForValue) Displays a decorated text item.setDivider
(Divider value) Displays a horizontal line divider between widgets.setDivider
(Divider.Builder builderForValue) Displays a horizontal line divider between widgets.Displays a grid with a collection of items.setGrid
(Grid.Builder builderForValue) Displays a grid with a collection of items.Specifies whether widgets align to the left, right, or center of a column.setHorizontalAlignmentValue
(int value) Specifies whether widgets align to the left, right, or center of a column.Displays an image.setImage
(Image.Builder builderForValue) Displays an image.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setSelectionInput
(SelectionInput value) Displays a selection control that lets users select items.setSelectionInput
(SelectionInput.Builder builderForValue) Displays a selection control that lets users select items.setTextInput
(TextInput value) Displays a text box that users can type into.setTextInput
(TextInput.Builder builderForValue) Displays a text box that users can type into.setTextParagraph
(TextParagraph value) Displays a text paragraph.setTextParagraph
(TextParagraph.Builder builderForValue) Displays a text paragraph.final Widget.Builder
setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getParentForChildren
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableBuilder
addExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, newBuilderForField, parseUnknownField, setExtension, setExtension
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
getOneofFieldDescriptor, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<Widget.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
setField
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
setRepeatedField
public Widget.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
addRepeatedField
public Widget.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Widget.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,
Widget.Builder>
-
mergeFrom
public Widget.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Widget.Builder>
- Throws:
IOException
-
getDataCase
- Specified by:
getDataCase
in interfaceWidgetOrBuilder
-
clearData
-
hasTextParagraph
public boolean hasTextParagraph()Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
- Specified by:
hasTextParagraph
in interfaceWidgetOrBuilder
- Returns:
- Whether the textParagraph field is set.
-
getTextParagraph
Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
- Specified by:
getTextParagraph
in interfaceWidgetOrBuilder
- Returns:
- The textParagraph.
-
setTextParagraph
Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
-
setTextParagraph
Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
-
mergeTextParagraph
Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
-
clearTextParagraph
Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
-
getTextParagraphBuilder
Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
-
getTextParagraphOrBuilder
Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": " <b>bold text</b>" } ```
.google.apps.card.v1.TextParagraph text_paragraph = 1;
- Specified by:
getTextParagraphOrBuilder
in interfaceWidgetOrBuilder
-
hasImage
public boolean hasImage()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" } ```
.google.apps.card.v1.Image image = 2;
- Specified by:
hasImage
in interfaceWidgetOrBuilder
- Returns:
- Whether the image field is set.
-
getImage
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" } ```
.google.apps.card.v1.Image image = 2;
- Specified by:
getImage
in interfaceWidgetOrBuilder
- Returns:
- The image.
-
setImage
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" } ```
.google.apps.card.v1.Image image = 2;
-
setImage
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" } ```
.google.apps.card.v1.Image image = 2;
-
mergeImage
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" } ```
.google.apps.card.v1.Image image = 2;
-
clearImage
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" } ```
.google.apps.card.v1.Image image = 2;
-
getImageBuilder
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" } ```
.google.apps.card.v1.Image image = 2;
-
getImageOrBuilder
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" } ```
.google.apps.card.v1.Image image = 2;
- Specified by:
getImageOrBuilder
in interfaceWidgetOrBuilder
-
hasDecoratedText
public boolean hasDecoratedText()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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
- Specified by:
hasDecoratedText
in interfaceWidgetOrBuilder
- Returns:
- Whether the decoratedText field is set.
-
getDecoratedText
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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
- Specified by:
getDecoratedText
in interfaceWidgetOrBuilder
- Returns:
- The decoratedText.
-
setDecoratedText
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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
-
setDecoratedText
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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
-
mergeDecoratedText
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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
-
clearDecoratedText
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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
-
getDecoratedTextBuilder
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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
-
getDecoratedTextOrBuilder
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" } } ```
.google.apps.card.v1.DecoratedText decorated_text = 3;
- Specified by:
getDecoratedTextOrBuilder
in interfaceWidgetOrBuilder
-
hasButtonList
public boolean hasButtonList()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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
- Specified by:
hasButtonList
in interfaceWidgetOrBuilder
- Returns:
- Whether the buttonList field is set.
-
getButtonList
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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
- Specified by:
getButtonList
in interfaceWidgetOrBuilder
- Returns:
- The buttonList.
-
setButtonList
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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
-
setButtonList
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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
-
mergeButtonList
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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
-
clearButtonList
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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
-
getButtonListBuilder
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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
-
getButtonListOrBuilder
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, "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE", "altText": "check calendar" }, "onClick": { "openLink": { "url": "https://example.com/calendar" } } } ] } ```
.google.apps.card.v1.ButtonList button_list = 4;
- Specified by:
getButtonListOrBuilder
in interfaceWidgetOrBuilder
-
hasTextInput
public boolean hasTextInput()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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
- Specified by:
hasTextInput
in interfaceWidgetOrBuilder
- Returns:
- Whether the textInput field is set.
-
getTextInput
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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
- Specified by:
getTextInput
in interfaceWidgetOrBuilder
- Returns:
- The textInput.
-
setTextInput
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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
-
setTextInput
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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
-
mergeTextInput
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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
-
clearTextInput
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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
-
getTextInputBuilder
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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
-
getTextInputOrBuilder
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" } ] } } ```
.google.apps.card.v1.TextInput text_input = 5;
- Specified by:
getTextInputOrBuilder
in interfaceWidgetOrBuilder
-
hasSelectionInput
public boolean hasSelectionInput()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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
- Specified by:
hasSelectionInput
in interfaceWidgetOrBuilder
- Returns:
- Whether the selectionInput field is set.
-
getSelectionInput
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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
- Specified by:
getSelectionInput
in interfaceWidgetOrBuilder
- Returns:
- The selectionInput.
-
setSelectionInput
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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
-
setSelectionInput
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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
-
mergeSelectionInput
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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
-
clearSelectionInput
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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
-
getSelectionInputBuilder
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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
-
getSelectionInputOrBuilder
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 } ] } ```
.google.apps.card.v1.SelectionInput selection_input = 6;
- Specified by:
getSelectionInputOrBuilder
in interfaceWidgetOrBuilder
-
hasDateTimePicker
public boolean hasDateTimePicker()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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
- Specified by:
hasDateTimePicker
in interfaceWidgetOrBuilder
- Returns:
- Whether the dateTimePicker field is set.
-
getDateTimePicker
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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
- Specified by:
getDateTimePicker
in interfaceWidgetOrBuilder
- Returns:
- The dateTimePicker.
-
setDateTimePicker
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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
-
setDateTimePicker
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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
-
mergeDateTimePicker
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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
-
clearDateTimePicker
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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
-
getDateTimePickerBuilder
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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
-
getDateTimePickerOrBuilder
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" } ```
.google.apps.card.v1.DateTimePicker date_time_picker = 7;
- Specified by:
getDateTimePickerOrBuilder
in interfaceWidgetOrBuilder
-
hasDivider
public boolean hasDivider()Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
- Specified by:
hasDivider
in interfaceWidgetOrBuilder
- Returns:
- Whether the divider field is set.
-
getDivider
Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
- Specified by:
getDivider
in interfaceWidgetOrBuilder
- Returns:
- The divider.
-
setDivider
Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
-
setDivider
Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
-
mergeDivider
Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
-
clearDivider
Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
-
getDividerBuilder
Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
-
getDividerOrBuilder
Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` "divider": { } ```
.google.apps.card.v1.Divider divider = 9;
- Specified by:
getDividerOrBuilder
in interfaceWidgetOrBuilder
-
hasGrid
public boolean hasGrid()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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
- Specified by:
hasGrid
in interfaceWidgetOrBuilder
- Returns:
- Whether the grid field is set.
-
getGrid
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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
- Specified by:
getGrid
in interfaceWidgetOrBuilder
- Returns:
- The grid.
-
setGrid
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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
-
setGrid
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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
-
mergeGrid
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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
-
clearGrid
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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
-
getGridBuilder
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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
-
getGridOrBuilder
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](https://developers.google.com/workspace/extend): 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" } } } ```
.google.apps.card.v1.Grid grid = 10;
- Specified by:
getGridOrBuilder
in interfaceWidgetOrBuilder
-
hasColumns
public boolean hasColumns()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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
- Specified by:
hasColumns
in interfaceWidgetOrBuilder
- Returns:
- Whether the columns field is set.
-
getColumns
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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
- Specified by:
getColumns
in interfaceWidgetOrBuilder
- Returns:
- The columns.
-
setColumns
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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
-
setColumns
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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
-
mergeColumns
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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
-
clearColumns
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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
-
getColumnsBuilder
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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
-
getColumnsOrBuilder
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" } } ] } ] } ```
.google.apps.card.v1.Columns columns = 11;
- Specified by:
getColumnsOrBuilder
in interfaceWidgetOrBuilder
-
getHorizontalAlignmentValue
public int getHorizontalAlignmentValue()Specifies whether widgets align to the left, right, or center of a column.
.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8;
- Specified by:
getHorizontalAlignmentValue
in interfaceWidgetOrBuilder
- Returns:
- The enum numeric value on the wire for horizontalAlignment.
-
setHorizontalAlignmentValue
Specifies whether widgets align to the left, right, or center of a column.
.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8;
- Parameters:
value
- The enum numeric value on the wire for horizontalAlignment to set.- Returns:
- This builder for chaining.
-
getHorizontalAlignment
Specifies whether widgets align to the left, right, or center of a column.
.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8;
- Specified by:
getHorizontalAlignment
in interfaceWidgetOrBuilder
- Returns:
- The horizontalAlignment.
-
setHorizontalAlignment
Specifies whether widgets align to the left, right, or center of a column.
.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8;
- Parameters:
value
- The horizontalAlignment to set.- Returns:
- This builder for chaining.
-
clearHorizontalAlignment
Specifies whether widgets align to the left, right, or center of a column.
.google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8;
- Returns:
- This builder for chaining.
-
setUnknownFields
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Widget.Builder>
-