Packages

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
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Grid
  2. Updatable
  3. GeneratedMessage
  4. Serializable
  5. Product
  6. Equals
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addAllItems(__vs: Iterable[GridItem]): Grid
  5. def addItems(__vs: GridItem*): Grid
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val borderStyle: Option[BorderStyle]
  8. def clearBorderStyle: Grid
  9. def clearItems: Grid
  10. def clearOnClick: Grid
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. val columnCount: Int
  13. def companion: Grid.type
    Definition Classes
    Grid → GeneratedMessage
  14. def discardUnknownFields: Grid
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def getBorderStyle: BorderStyle
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def getField(__field: FieldDescriptor): PValue
    Definition Classes
    Grid → GeneratedMessage
  19. def getFieldByNumber(__fieldNumber: Int): Any
    Definition Classes
    Grid → GeneratedMessage
  20. def getOnClick: OnClick
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. val items: Seq[GridItem]
  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. val onClick: Option[OnClick]
  27. def productElementNames: Iterator[String]
    Definition Classes
    Product
  28. def serializedSize: Int
    Definition Classes
    Grid → GeneratedMessage
  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. val title: String
  31. final def toByteArray: Array[Byte]
    Definition Classes
    GeneratedMessage
  32. final def toByteString: ByteString
    Definition Classes
    GeneratedMessage
  33. final def toPMessage: PMessage
    Definition Classes
    GeneratedMessage
  34. def toProtoString: String
    Definition Classes
    Grid → GeneratedMessage
  35. val unknownFields: UnknownFieldSet
  36. def update(ms: (Lens[Grid, Grid]) => Mutation[Grid]*): Grid
    Definition Classes
    Updatable
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. def withBorderStyle(__v: BorderStyle): Grid
  41. def withColumnCount(__v: Int): Grid
  42. def withItems(__v: Seq[GridItem]): Grid
  43. def withOnClick(__v: OnClick): Grid
  44. def withTitle(__v: String): Grid
  45. def withUnknownFields(__v: UnknownFieldSet): Grid
  46. final def writeDelimitedTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage
  47. def writeTo(_output__: CodedOutputStream): Unit
    Definition Classes
    Grid → GeneratedMessage
  48. final def writeTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Updatable[Grid]

Inherited from GeneratedMessage

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped