Package com.google.apps.card.v1
Class Grid.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,BuilderT>
-
- 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,java.lang.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 typegoogle.apps.card.v1.Grid
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Grid.BuilderaddAllItems(java.lang.Iterable<? extends Grid.GridItem> values)The items to display in the grid.Grid.BuilderaddItems(int index, Grid.GridItem value)The items to display in the grid.Grid.BuilderaddItems(int index, Grid.GridItem.Builder builderForValue)The items to display in the grid.Grid.BuilderaddItems(Grid.GridItem value)The items to display in the grid.Grid.BuilderaddItems(Grid.GridItem.Builder builderForValue)The items to display in the grid.Grid.GridItem.BuilderaddItemsBuilder()The items to display in the grid.Grid.GridItem.BuilderaddItemsBuilder(int index)The items to display in the grid.Grid.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)Gridbuild()GridbuildPartial()Grid.Builderclear()Grid.BuilderclearBorderStyle()The border style to apply to each grid item.Grid.BuilderclearColumnCount()The number of columns to display in the grid.Grid.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Grid.BuilderclearItems()The items to display in the grid.Grid.BuilderclearOnClick()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.Grid.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Grid.BuilderclearTitle()The text that displays in the grid header.Grid.Builderclone()BorderStylegetBorderStyle()The border style to apply to each grid item.BorderStyle.BuildergetBorderStyleBuilder()The border style to apply to each grid item.BorderStyleOrBuildergetBorderStyleOrBuilder()The border style to apply to each grid item.intgetColumnCount()The number of columns to display in the grid.GridgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()Grid.GridItemgetItems(int index)The items to display in the grid.Grid.GridItem.BuildergetItemsBuilder(int index)The items to display in the grid.java.util.List<Grid.GridItem.Builder>getItemsBuilderList()The items to display in the grid.intgetItemsCount()The items to display in the grid.java.util.List<Grid.GridItem>getItemsList()The items to display in the grid.Grid.GridItemOrBuildergetItemsOrBuilder(int index)The items to display in the grid.java.util.List<? extends Grid.GridItemOrBuilder>getItemsOrBuilderList()The items to display in the grid.OnClickgetOnClick()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.OnClick.BuildergetOnClickBuilder()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.OnClickOrBuildergetOnClickOrBuilder()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.java.lang.StringgetTitle()The text that displays in the grid header.com.google.protobuf.ByteStringgetTitleBytes()The text that displays in the grid header.booleanhasBorderStyle()The border style to apply to each grid item.booleanhasOnClick()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.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Grid.BuildermergeBorderStyle(BorderStyle value)The border style to apply to each grid item.Grid.BuildermergeFrom(Grid other)Grid.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Grid.BuildermergeFrom(com.google.protobuf.Message other)Grid.BuildermergeOnClick(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.Grid.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Grid.BuilderremoveItems(int index)The items to display in the grid.Grid.BuildersetBorderStyle(BorderStyle value)The border style to apply to each grid item.Grid.BuildersetBorderStyle(BorderStyle.Builder builderForValue)The border style to apply to each grid item.Grid.BuildersetColumnCount(int value)The number of columns to display in the grid.Grid.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)Grid.BuildersetItems(int index, Grid.GridItem value)The items to display in the grid.Grid.BuildersetItems(int index, Grid.GridItem.Builder builderForValue)The items to display in the grid.Grid.BuildersetOnClick(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.Grid.BuildersetOnClick(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.Grid.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)Grid.BuildersetTitle(java.lang.String value)The text that displays in the grid header.Grid.BuildersetTitleBytes(com.google.protobuf.ByteString value)The text that displays in the grid header.Grid.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Overrides:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clear
public Grid.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Grid.Builder>
-
getDefaultInstanceForType
public Grid getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public Grid build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Grid buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Grid.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
setField
public Grid.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clearField
public Grid.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clearOneof
public Grid.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
setRepeatedField
public Grid.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
addRepeatedField
public Grid.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
mergeFrom
public Grid.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Grid.Builder>
-
mergeFrom
public Grid.Builder mergeFrom(Grid other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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 java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Grid.Builder>- Throws:
java.io.IOException
-
getTitle
public java.lang.String getTitle()
The text that displays in the grid header.
string title = 1;- Specified by:
getTitlein interfaceGridOrBuilder- Returns:
- The title.
-
getTitleBytes
public com.google.protobuf.ByteString getTitleBytes()
The text that displays in the grid header.
string title = 1;- Specified by:
getTitleBytesin interfaceGridOrBuilder- Returns:
- The bytes for title.
-
setTitle
public Grid.Builder setTitle(java.lang.String value)
The text that displays in the grid header.
string title = 1;- Parameters:
value- The title to set.- Returns:
- This builder for chaining.
-
clearTitle
public Grid.Builder clearTitle()
The text that displays in the grid header.
string title = 1;- Returns:
- This builder for chaining.
-
setTitleBytes
public Grid.Builder setTitleBytes(com.google.protobuf.ByteString value)
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
public java.util.List<Grid.GridItem> getItemsList()
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;- Specified by:
getItemsListin interfaceGridOrBuilder
-
getItemsCount
public int getItemsCount()
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;- Specified by:
getItemsCountin interfaceGridOrBuilder
-
getItems
public Grid.GridItem getItems(int index)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;- Specified by:
getItemsin interfaceGridOrBuilder
-
setItems
public Grid.Builder setItems(int index, Grid.GridItem value)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
setItems
public Grid.Builder setItems(int index, Grid.GridItem.Builder builderForValue)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
public Grid.Builder addItems(Grid.GridItem value)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
public Grid.Builder addItems(int index, Grid.GridItem value)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
public Grid.Builder addItems(Grid.GridItem.Builder builderForValue)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItems
public Grid.Builder addItems(int index, Grid.GridItem.Builder builderForValue)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addAllItems
public Grid.Builder addAllItems(java.lang.Iterable<? extends Grid.GridItem> values)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
clearItems
public Grid.Builder clearItems()
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
removeItems
public Grid.Builder removeItems(int index)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
getItemsBuilder
public Grid.GridItem.Builder getItemsBuilder(int index)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
getItemsOrBuilder
public Grid.GridItemOrBuilder getItemsOrBuilder(int index)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;- Specified by:
getItemsOrBuilderin interfaceGridOrBuilder
-
getItemsOrBuilderList
public java.util.List<? extends Grid.GridItemOrBuilder> getItemsOrBuilderList()
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;- Specified by:
getItemsOrBuilderListin interfaceGridOrBuilder
-
addItemsBuilder
public Grid.GridItem.Builder addItemsBuilder()
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
addItemsBuilder
public Grid.GridItem.Builder addItemsBuilder(int index)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
-
getItemsBuilderList
public java.util.List<Grid.GridItem.Builder> 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:
hasBorderStylein interfaceGridOrBuilder- Returns:
- Whether the borderStyle field is set.
-
getBorderStyle
public BorderStyle getBorderStyle()
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;- Specified by:
getBorderStylein interfaceGridOrBuilder- Returns:
- The borderStyle.
-
setBorderStyle
public Grid.Builder setBorderStyle(BorderStyle value)
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
setBorderStyle
public Grid.Builder setBorderStyle(BorderStyle.Builder builderForValue)
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
mergeBorderStyle
public Grid.Builder mergeBorderStyle(BorderStyle value)
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
clearBorderStyle
public Grid.Builder clearBorderStyle()
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
getBorderStyleBuilder
public BorderStyle.Builder getBorderStyleBuilder()
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;
-
getBorderStyleOrBuilder
public BorderStyleOrBuilder getBorderStyleOrBuilder()
The border style to apply to each grid item.
.google.apps.card.v1.BorderStyle border_style = 3;- Specified by:
getBorderStyleOrBuilderin 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:
getColumnCountin interfaceGridOrBuilder- Returns:
- The columnCount.
-
setColumnCount
public Grid.Builder setColumnCount(int value)
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
public Grid.Builder 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:
hasOnClickin interfaceGridOrBuilder- Returns:
- Whether the onClick field is set.
-
getOnClick
public OnClick 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:
getOnClickin interfaceGridOrBuilder- Returns:
- The onClick.
-
setOnClick
public Grid.Builder 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.
.google.apps.card.v1.OnClick on_click = 5;
-
setOnClick
public Grid.Builder 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.
.google.apps.card.v1.OnClick on_click = 5;
-
mergeOnClick
public Grid.Builder 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.
.google.apps.card.v1.OnClick on_click = 5;
-
clearOnClick
public Grid.Builder 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
public OnClick.Builder 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
public OnClickOrBuilder 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:
getOnClickOrBuilderin interfaceGridOrBuilder
-
setUnknownFields
public final Grid.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
mergeUnknownFields
public final Grid.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
-