Package com.google.apps.card.v1
Class Grid.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Grid.Builder>
com.google.protobuf.GeneratedMessage.Builder<Grid.Builder>
com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,Grid.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
com.google.apps.card.v1.Grid.Builder
- All Implemented Interfaces:
GridOrBuilder
,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:
Grid
public static final class Grid.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
implements GridOrBuilder
Displays a grid with a collection of items. Items can only include text or images. For responsive columns, or to include more than text or images, use [`Columns`][google.apps.card.v1.Columns]. For an example in Google Chat apps, see [Display a Grid with a collection of items](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items). A grid supports any number of columns and items. The number of rows is determined by items divided by 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" } } } ```Protobuf type
google.apps.card.v1.Grid
-
Method Summary
Modifier and TypeMethodDescriptionaddAllItems
(Iterable<? extends Grid.GridItem> values) The items to display in the grid.addItems
(int index, Grid.GridItem value) The items to display in the grid.addItems
(int index, Grid.GridItem.Builder builderForValue) The items to display in the grid.addItems
(Grid.GridItem value) The items to display in the grid.addItems
(Grid.GridItem.Builder builderForValue) The items to display in the grid.The items to display in the grid.addItemsBuilder
(int index) The items to display in the grid.addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
The border style to apply to each grid item.The number of columns to display in the grid.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) The items to display in the grid.This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) The text that displays in the grid header.clone()
The border style to apply to each grid item.The border style to apply to each grid item.The border style to apply to each grid item.int
The number of columns to display in the grid.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getItems
(int index) The items to display in the grid.getItemsBuilder
(int index) The items to display in the grid.The items to display in the grid.int
The items to display in the grid.The items to display in the grid.getItemsOrBuilder
(int index) The items to display in the grid.List
<? extends Grid.GridItemOrBuilder> The items to display in the grid.This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.getTitle()
The text that displays in the grid header.com.google.protobuf.ByteString
The text that displays in the grid header.boolean
The border style to apply to each grid item.boolean
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeBorderStyle
(BorderStyle value) The border style to apply to each grid item.mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeOnClick
(OnClick value) This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.final Grid.Builder
mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) removeItems
(int index) The items to display in the grid.setBorderStyle
(BorderStyle value) The border style to apply to each grid item.setBorderStyle
(BorderStyle.Builder builderForValue) The border style to apply to each grid item.setColumnCount
(int value) The number of columns to display in the grid.setItems
(int index, Grid.GridItem value) The items to display in the grid.setItems
(int index, Grid.GridItem.Builder builderForValue) The items to display in the grid.setOnClick
(OnClick value) This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.setOnClick
(OnClick.Builder builderForValue) This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) The text that displays in the grid header.setTitleBytes
(com.google.protobuf.ByteString value) The text that displays in the grid header.final Grid.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<Grid.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<Grid.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<Grid.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<Grid.Builder>
-
setField
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clearField
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clearOneof
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
setRepeatedField
public Grid.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<Grid.Builder>
-
addRepeatedField
public Grid.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<Grid.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Grid.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,
Grid.Builder>
-
mergeFrom
public Grid.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<Grid.Builder>
- Throws:
IOException
-
getTitle
The text that displays in the grid header.
string title = 1;
- Specified by:
getTitle
in interfaceGridOrBuilder
- Returns:
- The title.
-
getTitleBytes
public com.google.protobuf.ByteString getTitleBytes()The text that displays in the grid header.
string title = 1;
- Specified by:
getTitleBytes
in interfaceGridOrBuilder
- Returns:
- The bytes for title.
-
setTitle
The text that displays in the grid header.
string title = 1;
- Parameters:
value
- The title to set.- Returns:
- This builder for chaining.
-
clearTitle
The text that displays in the grid header.
string title = 1;
- Returns:
- This builder for chaining.
-
setTitleBytes
The text that displays in the grid header.
string title = 1;
- Parameters:
value
- The bytes for title to set.- Returns:
- This builder for chaining.
-
getItemsList
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
- Specified by:
getItemsList
in interfaceGridOrBuilder
-
getItemsCount
public int getItemsCount()The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
- Specified by:
getItemsCount
in interfaceGridOrBuilder
-
getItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
- Specified by:
getItems
in interfaceGridOrBuilder
-
setItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
setItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addAllItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
clearItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
removeItems
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
getItemsBuilder
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
getItemsOrBuilder
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
- Specified by:
getItemsOrBuilder
in interfaceGridOrBuilder
-
getItemsOrBuilderList
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
- Specified by:
getItemsOrBuilderList
in interfaceGridOrBuilder
-
addItemsBuilder
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItemsBuilder
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
getItemsBuilderList
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
hasBorderStyle
public boolean hasBorderStyle()The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
- Specified by:
hasBorderStyle
in interfaceGridOrBuilder
- Returns:
- Whether the borderStyle field is set.
-
getBorderStyle
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
- Specified by:
getBorderStyle
in interfaceGridOrBuilder
- Returns:
- The borderStyle.
-
setBorderStyle
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
setBorderStyle
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
mergeBorderStyle
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
clearBorderStyle
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
getBorderStyleBuilder
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
getBorderStyleOrBuilder
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
- Specified by:
getBorderStyleOrBuilder
in interfaceGridOrBuilder
-
getColumnCount
public int getColumnCount()The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion).
int32 column_count = 4;
- Specified by:
getColumnCount
in interfaceGridOrBuilder
- Returns:
- The columnCount.
-
setColumnCount
The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion).
int32 column_count = 4;
- Parameters:
value
- The columnCount to set.- Returns:
- This builder for chaining.
-
clearColumnCount
The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion).
int32 column_count = 4;
- Returns:
- This builder for chaining.
-
hasOnClick
public boolean hasOnClick()This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
- Specified by:
hasOnClick
in interfaceGridOrBuilder
- Returns:
- Whether the onClick field is set.
-
getOnClick
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
- Specified by:
getOnClick
in interfaceGridOrBuilder
- Returns:
- The onClick.
-
setOnClick
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
-
setOnClick
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
-
mergeOnClick
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
-
clearOnClick
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
-
getOnClickBuilder
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
-
getOnClickOrBuilder
This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters.
.google.apps.card.v1.OnClick on_click = 5;
- Specified by:
getOnClickOrBuilder
in interfaceGridOrBuilder
-
setUnknownFields
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-