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.Builder
addAllItems(java.lang.Iterable<? extends Grid.GridItem> values)
The items to display in the grid.Grid.Builder
addItems(int index, Grid.GridItem value)
The items to display in the grid.Grid.Builder
addItems(int index, Grid.GridItem.Builder builderForValue)
The items to display in the grid.Grid.Builder
addItems(Grid.GridItem value)
The items to display in the grid.Grid.Builder
addItems(Grid.GridItem.Builder builderForValue)
The items to display in the grid.Grid.GridItem.Builder
addItemsBuilder()
The items to display in the grid.Grid.GridItem.Builder
addItemsBuilder(int index)
The items to display in the grid.Grid.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Grid
build()
Grid
buildPartial()
Grid.Builder
clear()
Grid.Builder
clearBorderStyle()
The border style to apply to each grid item.Grid.Builder
clearColumnCount()
The number of columns to display in the grid.Grid.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
Grid.Builder
clearItems()
The items to display in the grid.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.Grid.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
Grid.Builder
clearTitle()
The text that displays in the grid header.Grid.Builder
clone()
BorderStyle
getBorderStyle()
The border style to apply to each grid item.BorderStyle.Builder
getBorderStyleBuilder()
The border style to apply to each grid item.BorderStyleOrBuilder
getBorderStyleOrBuilder()
The border style to apply to each grid item.int
getColumnCount()
The number of columns to display in the grid.Grid
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Grid.GridItem
getItems(int index)
The items to display in the grid.Grid.GridItem.Builder
getItemsBuilder(int index)
The items to display in the grid.java.util.List<Grid.GridItem.Builder>
getItemsBuilderList()
The items to display in the grid.int
getItemsCount()
The items to display in the grid.java.util.List<Grid.GridItem>
getItemsList()
The items to display in the grid.Grid.GridItemOrBuilder
getItemsOrBuilder(int index)
The items to display in the grid.java.util.List<? extends Grid.GridItemOrBuilder>
getItemsOrBuilderList()
The items to display in the grid.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.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.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.java.lang.String
getTitle()
The text that displays in the grid header.com.google.protobuf.ByteString
getTitleBytes()
The text that displays in the grid header.boolean
hasBorderStyle()
The border style to apply to each grid item.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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Grid.Builder
mergeBorderStyle(BorderStyle value)
The border style to apply to each grid item.Grid.Builder
mergeFrom(Grid other)
Grid.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Grid.Builder
mergeFrom(com.google.protobuf.Message other)
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.Grid.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
Grid.Builder
removeItems(int index)
The items to display in the grid.Grid.Builder
setBorderStyle(BorderStyle value)
The border style to apply to each grid item.Grid.Builder
setBorderStyle(BorderStyle.Builder builderForValue)
The border style to apply to each grid item.Grid.Builder
setColumnCount(int value)
The number of columns to display in the grid.Grid.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Grid.Builder
setItems(int index, Grid.GridItem value)
The items to display in the grid.Grid.Builder
setItems(int index, Grid.GridItem.Builder builderForValue)
The items to display in the grid.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.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.Grid.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Grid.Builder
setTitle(java.lang.String value)
The text that displays in the grid header.Grid.Builder
setTitleBytes(com.google.protobuf.ByteString value)
The text that displays in the grid header.Grid.Builder
setUnknownFields(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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clear
public 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
public Grid 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
public Grid build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Grid buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Grid.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
public Grid.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clearField
public Grid.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
clearOneof
public Grid.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- 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, java.lang.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, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
mergeFrom
public Grid.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Grid.Builder>
-
mergeFrom
public Grid.Builder mergeFrom(Grid other)
-
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 java.io.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:
java.io.IOException
-
getTitle
public java.lang.String 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
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:
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
public Grid.GridItem getItems(int index)
The items to display in the grid.
repeated .google.apps.card.v1.Grid.GridItem items = 2;
- Specified by:
getItems
in 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:
getItemsOrBuilder
in 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:
getItemsOrBuilderList
in 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:
hasBorderStyle
in 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:
getBorderStyle
in 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:
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
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:
hasOnClick
in 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:
getOnClick
in 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:
getOnClickOrBuilder
in interfaceGridOrBuilder
-
setUnknownFields
public final Grid.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
mergeUnknownFields
public final Grid.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Grid.Builder>
-
-