Package com.google.apps.card.v1
Class Widget
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessage
-
- com.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.apps.card.v1.Widget
-
- All Implemented Interfaces:
WidgetOrBuilder
,com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,java.io.Serializable
public final class Widget extends com.google.protobuf.GeneratedMessageV3 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 typegoogle.apps.card.v1.Widget
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Widget.Builder
Each card is made up of widgets.static class
Widget.DataCase
static class
Widget.HorizontalAlignment
Specifies whether widgets align to the left, right, or center of a column.static class
Widget.ImageType
The shape used to crop the image.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage
com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionSerializer, com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
-
-
Field Summary
Fields Modifier and Type Field Description static int
BUTTON_LIST_FIELD_NUMBER
static int
COLUMNS_FIELD_NUMBER
static int
DATE_TIME_PICKER_FIELD_NUMBER
static int
DECORATED_TEXT_FIELD_NUMBER
static int
DIVIDER_FIELD_NUMBER
static int
GRID_FIELD_NUMBER
static int
HORIZONTAL_ALIGNMENT_FIELD_NUMBER
static int
IMAGE_FIELD_NUMBER
static int
SELECTION_INPUT_FIELD_NUMBER
static int
TEXT_INPUT_FIELD_NUMBER
static int
TEXT_PARAGRAPH_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
ButtonList
getButtonList()
A list of buttons.ButtonListOrBuilder
getButtonListOrBuilder()
A list of buttons.Columns
getColumns()
Displays up to 2 columns.ColumnsOrBuilder
getColumnsOrBuilder()
Displays up to 2 columns.Widget.DataCase
getDataCase()
DateTimePicker
getDateTimePicker()
Displays a widget that lets users input a date, time, or date and time.DateTimePickerOrBuilder
getDateTimePickerOrBuilder()
Displays a widget that lets users input a date, time, or date and time.DecoratedText
getDecoratedText()
Displays a decorated text item.DecoratedTextOrBuilder
getDecoratedTextOrBuilder()
Displays a decorated text item.static Widget
getDefaultInstance()
Widget
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
Divider
getDivider()
Displays a horizontal line divider between widgets.DividerOrBuilder
getDividerOrBuilder()
Displays a horizontal line divider between widgets.Grid
getGrid()
Displays a grid with a collection of items.GridOrBuilder
getGridOrBuilder()
Displays a grid with a collection of items.Widget.HorizontalAlignment
getHorizontalAlignment()
Specifies whether widgets align to the left, right, or center of a column.int
getHorizontalAlignmentValue()
Specifies whether widgets align to the left, right, or center of a column.Image
getImage()
Displays an image.ImageOrBuilder
getImageOrBuilder()
Displays an image.com.google.protobuf.Parser<Widget>
getParserForType()
SelectionInput
getSelectionInput()
Displays a selection control that lets users select items.SelectionInputOrBuilder
getSelectionInputOrBuilder()
Displays a selection control that lets users select items.int
getSerializedSize()
TextInput
getTextInput()
Displays a text box that users can type into.TextInputOrBuilder
getTextInputOrBuilder()
Displays a text box that users can type into.TextParagraph
getTextParagraph()
Displays a text paragraph.TextParagraphOrBuilder
getTextParagraphOrBuilder()
Displays a text paragraph.boolean
hasButtonList()
A list of buttons.boolean
hasColumns()
Displays up to 2 columns.boolean
hasDateTimePicker()
Displays a widget that lets users input a date, time, or date and time.boolean
hasDecoratedText()
Displays a decorated text item.boolean
hasDivider()
Displays a horizontal line divider between widgets.boolean
hasGrid()
Displays a grid with a collection of items.int
hashCode()
boolean
hasImage()
Displays an image.boolean
hasSelectionInput()
Displays a selection control that lets users select items.boolean
hasTextInput()
Displays a text box that users can type into.boolean
hasTextParagraph()
Displays a text paragraph.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static Widget.Builder
newBuilder()
static Widget.Builder
newBuilder(Widget prototype)
Widget.Builder
newBuilderForType()
protected Widget.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected java.lang.Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Widget
parseDelimitedFrom(java.io.InputStream input)
static Widget
parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Widget
parseFrom(byte[] data)
static Widget
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Widget
parseFrom(com.google.protobuf.ByteString data)
static Widget
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Widget
parseFrom(com.google.protobuf.CodedInputStream input)
static Widget
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Widget
parseFrom(java.io.InputStream input)
static Widget
parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Widget
parseFrom(java.nio.ByteBuffer data)
static Widget
parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Widget>
parser()
Widget.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType
-
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableMessage
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getAllFieldsRaw, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, newExtensionSerializer, newExtensionWriter, newMessageSetExtensionSerializer, newMessageSetExtensionWriter
-
Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getDescriptorForType, getOneofFieldDescriptor, getUnknownFields, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
TEXT_PARAGRAPH_FIELD_NUMBER
public static final int TEXT_PARAGRAPH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IMAGE_FIELD_NUMBER
public static final int IMAGE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DECORATED_TEXT_FIELD_NUMBER
public static final int DECORATED_TEXT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BUTTON_LIST_FIELD_NUMBER
public static final int BUTTON_LIST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TEXT_INPUT_FIELD_NUMBER
public static final int TEXT_INPUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SELECTION_INPUT_FIELD_NUMBER
public static final int SELECTION_INPUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DATE_TIME_PICKER_FIELD_NUMBER
public static final int DATE_TIME_PICKER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DIVIDER_FIELD_NUMBER
public static final int DIVIDER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
GRID_FIELD_NUMBER
public static final int GRID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COLUMNS_FIELD_NUMBER
public static final int COLUMNS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HORIZONTAL_ALIGNMENT_FIELD_NUMBER
public static final int HORIZONTAL_ALIGNMENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
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
-
getDataCase
public Widget.DataCase getDataCase()
- Specified by:
getDataCase
in interfaceWidgetOrBuilder
-
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
public TextParagraph 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.
-
getTextParagraphOrBuilder
public TextParagraphOrBuilder 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
public Image 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.
-
getImageOrBuilder
public ImageOrBuilder 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
public DecoratedText 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.
-
getDecoratedTextOrBuilder
public DecoratedTextOrBuilder 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
public ButtonList 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.
-
getButtonListOrBuilder
public ButtonListOrBuilder 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
public TextInput 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.
-
getTextInputOrBuilder
public TextInputOrBuilder 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
public SelectionInput 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.
-
getSelectionInputOrBuilder
public SelectionInputOrBuilder 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
public DateTimePicker 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.
-
getDateTimePickerOrBuilder
public DateTimePickerOrBuilder 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
public Divider 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.
-
getDividerOrBuilder
public DividerOrBuilder 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
public Grid 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.
-
getGridOrBuilder
public GridOrBuilder 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
public Columns 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.
-
getColumnsOrBuilder
public ColumnsOrBuilder 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.
-
getHorizontalAlignment
public Widget.HorizontalAlignment 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.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableMessage<com.google.protobuf.GeneratedMessageV3>
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Widget parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Widget parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Widget parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Widget parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Widget parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Widget parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Widget parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Widget parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Widget parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Widget parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Widget parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Widget parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public Widget.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Widget.Builder newBuilder()
-
newBuilder
public static Widget.Builder newBuilder(Widget prototype)
-
toBuilder
public Widget.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Widget.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Widget getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Widget> parser()
-
getParserForType
public com.google.protobuf.Parser<Widget> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
public Widget 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
-
-