final case class Grid(title: String = "", items: Seq[GridItem] = _root_.scala.Seq.empty, borderStyle: Option[BorderStyle] = _root_.scala.None, columnCount: Int = 0, onClick: Option[OnClick] = _root_.scala.None, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty) extends GeneratedMessage with Updatable[Grid] with Product with Serializable
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"
}
}
}
- title
The text that displays in the grid header.
- items
The items to display in the grid.
- borderStyle
The border style to apply to each grid item.
- columnCount
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).
- onClick
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.
- Annotations
- @SerialVersionUID()
- Source
- Grid.scala
- Alphabetic
- By Inheritance
- Grid
- Updatable
- GeneratedMessage
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Grid(title: String = "", items: Seq[GridItem] = _root_.scala.Seq.empty, borderStyle: Option[BorderStyle] = _root_.scala.None, columnCount: Int = 0, onClick: Option[OnClick] = _root_.scala.None, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty)
- title
The text that displays in the grid header.
- items
The items to display in the grid.
- borderStyle
The border style to apply to each grid item.
- columnCount
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).
- onClick
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.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAllItems(__vs: Iterable[GridItem]): Grid
- def addItems(__vs: GridItem*): Grid
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val borderStyle: Option[BorderStyle]
- def clearBorderStyle: Grid
- def clearItems: Grid
- def clearOnClick: Grid
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val columnCount: Int
- def companion: Grid.type
- Definition Classes
- Grid → GeneratedMessage
- def discardUnknownFields: Grid
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def getBorderStyle: BorderStyle
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getField(__field: FieldDescriptor): PValue
- Definition Classes
- Grid → GeneratedMessage
- def getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- Grid → GeneratedMessage
- def getOnClick: OnClick
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val items: Seq[GridItem]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val onClick: Option[OnClick]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def serializedSize: Int
- Definition Classes
- Grid → GeneratedMessage
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val title: String
- final def toByteArray: Array[Byte]
- Definition Classes
- GeneratedMessage
- final def toByteString: ByteString
- Definition Classes
- GeneratedMessage
- final def toPMessage: PMessage
- Definition Classes
- GeneratedMessage
- def toProtoString: String
- Definition Classes
- Grid → GeneratedMessage
- val unknownFields: UnknownFieldSet
- def update(ms: (Lens[Grid, Grid]) => Mutation[Grid]*): Grid
- Definition Classes
- Updatable
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withBorderStyle(__v: BorderStyle): Grid
- def withColumnCount(__v: Int): Grid
- def withItems(__v: Seq[GridItem]): Grid
- def withOnClick(__v: OnClick): Grid
- def withTitle(__v: String): Grid
- def withUnknownFields(__v: UnknownFieldSet): Grid
- final def writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
- def writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- Grid → GeneratedMessage
- final def writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage