final class Grid extends GeneratedMessageV3 with 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

Source
Grid.java
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Grid
  2. GridOrBuilder
  3. GeneratedMessageV3
  4. Serializable
  5. AbstractMessage
  6. Message
  7. MessageOrBuilder
  8. AbstractMessageLite
  9. MessageLite
  10. MessageLiteOrBuilder
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(obj: AnyRef): Boolean
    Definition Classes
    Grid → AbstractMessage → Message → AnyRef → Any
    Annotations
    @Override()
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. def findInitializationErrors(): List[String]
    Definition Classes
    AbstractMessage → MessageOrBuilder
  10. def getAllFields(): Map[FieldDescriptor, AnyRef]
    Definition Classes
    GeneratedMessageV3 → MessageOrBuilder
  11. def getBorderStyle(): BorderStyle

    The border style to apply to each grid item.
    

    The border style to apply to each grid item.
    

    .google.apps.card.v1.BorderStyle border_style = 3;

    returns

    The borderStyle.

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  12. def getBorderStyleOrBuilder(): BorderStyleOrBuilder

    The border style to apply to each grid item.
    

    The border style to apply to each grid item.
    

    .google.apps.card.v1.BorderStyle border_style = 3;

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def getColumnCount(): Int

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

    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

    The columnCount.

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  15. def getDefaultInstanceForType(): Grid
    Definition Classes
    Grid → MessageOrBuilder → MessageLiteOrBuilder
    Annotations
    @Override()
  16. def getDescriptorForType(): Descriptor
    Definition Classes
    GeneratedMessageV3 → MessageOrBuilder
  17. def getField(arg0: FieldDescriptor): AnyRef
    Definition Classes
    GeneratedMessageV3 → MessageOrBuilder
  18. def getInitializationErrorString(): String
    Definition Classes
    AbstractMessage → MessageOrBuilder
  19. def getItems(index: Int): GridItem

    The items to display in the grid.
    

    The items to display in the grid.
    

    repeated .google.apps.card.v1.Grid.GridItem items = 2;

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  20. def getItemsCount(): Int

    The items to display in the grid.
    

    The items to display in the grid.
    

    repeated .google.apps.card.v1.Grid.GridItem items = 2;

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  21. def getItemsList(): List[GridItem]

    The items to display in the grid.
    

    The items to display in the grid.
    

    repeated .google.apps.card.v1.Grid.GridItem items = 2;

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  22. def getItemsOrBuilder(index: Int): GridItemOrBuilder

    The items to display in the grid.
    

    The items to display in the grid.
    

    repeated .google.apps.card.v1.Grid.GridItem items = 2;

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  23. def getItemsOrBuilderList(): List[_ <: GridItemOrBuilder]

    The items to display in the grid.
    

    The items to display in the grid.
    

    repeated .google.apps.card.v1.Grid.GridItem items = 2;

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  24. def getOnClick(): 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.
    

    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;

    returns

    The onClick.

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  25. def getOnClickOrBuilder(): OnClickOrBuilder

    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.
    

    .google.apps.card.v1.OnClick on_click = 5;

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  26. def getOneofFieldDescriptor(arg0: OneofDescriptor): FieldDescriptor
    Definition Classes
    GeneratedMessageV3 → AbstractMessage → MessageOrBuilder
  27. def getParserForType(): Parser[Grid]
    Definition Classes
    Grid → GeneratedMessageV3 → Message → MessageLite
    Annotations
    @Override()
  28. def getRepeatedField(arg0: FieldDescriptor, arg1: Int): AnyRef
    Definition Classes
    GeneratedMessageV3 → MessageOrBuilder
  29. def getRepeatedFieldCount(arg0: FieldDescriptor): Int
    Definition Classes
    GeneratedMessageV3 → MessageOrBuilder
  30. def getSerializedSize(): Int
    Definition Classes
    Grid → GeneratedMessageV3 → AbstractMessage → MessageLite
    Annotations
    @Override()
  31. def getTitle(): String

    The text that displays in the grid header.
    

    The text that displays in the grid header.
    

    string title = 1;

    returns

    The title.

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  32. def getTitleBytes(): ByteString

    The text that displays in the grid header.
    

    The text that displays in the grid header.
    

    string title = 1;

    returns

    The bytes for title.

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  33. def getUnknownFields(): UnknownFieldSet
    Definition Classes
    GeneratedMessageV3 → MessageOrBuilder
  34. def hasBorderStyle(): Boolean

    The border style to apply to each grid item.
    

    The border style to apply to each grid item.
    

    .google.apps.card.v1.BorderStyle border_style = 3;

    returns

    Whether the borderStyle field is set.

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  35. def hasField(arg0: FieldDescriptor): Boolean
    Definition Classes
    GeneratedMessageV3 → MessageOrBuilder
  36. def hasOnClick(): 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.
    

    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;

    returns

    Whether the onClick field is set.

    Definition Classes
    GridGridOrBuilder
    Annotations
    @Override()
  37. def hasOneof(arg0: OneofDescriptor): Boolean
    Definition Classes
    GeneratedMessageV3 → AbstractMessage → MessageOrBuilder
  38. def hashCode(): Int
    Definition Classes
    Grid → AbstractMessage → Message → AnyRef → Any
    Annotations
    @Override()
  39. def internalGetFieldAccessorTable(): FieldAccessorTable
    Attributes
    protected[v1]
    Definition Classes
    Grid → GeneratedMessageV3
    Annotations
    @Override()
  40. def internalGetMapField(arg0: Int): MapField[_ <: AnyRef, _ <: AnyRef]
    Attributes
    protected[protobuf]
    Definition Classes
    GeneratedMessageV3
  41. final def isInitialized(): Boolean
    Definition Classes
    Grid → GeneratedMessageV3 → AbstractMessage → MessageLiteOrBuilder
    Annotations
    @Override()
  42. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  43. def makeExtensionsImmutable(): Unit
    Attributes
    protected[protobuf]
    Definition Classes
    GeneratedMessageV3
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. def newBuilderForType(parent: BuilderParent): Builder
    Attributes
    protected[v1]
    Definition Classes
    Grid → GeneratedMessageV3
    Annotations
    @Override()
  46. def newBuilderForType(): Builder
    Definition Classes
    Grid → Message → MessageLite
    Annotations
    @Override()
  47. def newBuilderForType(arg0: BuilderParent): Builder
    Attributes
    protected[protobuf]
    Definition Classes
    GeneratedMessageV3 → AbstractMessage
  48. def newInstance(unused: UnusedPrivateParameter): AnyRef
    Attributes
    protected[v1]
    Definition Classes
    Grid → GeneratedMessageV3
    Annotations
    @Override() @SuppressWarnings()
  49. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  51. def parseUnknownField(arg0: CodedInputStream, arg1: Builder, arg2: ExtensionRegistryLite, arg3: Int): Boolean
    Attributes
    protected[protobuf]
    Definition Classes
    GeneratedMessageV3
    Annotations
    @throws(classOf[java.io.IOException])
  52. def parseUnknownFieldProto3(arg0: CodedInputStream, arg1: Builder, arg2: ExtensionRegistryLite, arg3: Int): Boolean
    Attributes
    protected[protobuf]
    Definition Classes
    GeneratedMessageV3
    Annotations
    @throws(classOf[java.io.IOException])
  53. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  54. def toBuilder(): Builder
    Definition Classes
    Grid → Message → MessageLite
    Annotations
    @Override()
  55. def toByteArray(): Array[Byte]
    Definition Classes
    AbstractMessageLite → MessageLite
  56. def toByteString(): ByteString
    Definition Classes
    AbstractMessageLite → MessageLite
  57. final def toString(): String
    Definition Classes
    AbstractMessage → Message → AnyRef → Any
  58. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  59. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  60. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  61. def writeDelimitedTo(arg0: OutputStream): Unit
    Definition Classes
    AbstractMessageLite → MessageLite
    Annotations
    @throws(classOf[java.io.IOException])
  62. def writeReplace(): AnyRef
    Attributes
    protected[protobuf]
    Definition Classes
    GeneratedMessageV3
    Annotations
    @throws(classOf[java.io.ObjectStreamException])
  63. def writeTo(output: CodedOutputStream): Unit
    Definition Classes
    Grid → GeneratedMessageV3 → AbstractMessage → MessageLite
    Annotations
    @Override()
  64. def writeTo(arg0: OutputStream): Unit
    Definition Classes
    AbstractMessageLite → MessageLite
    Annotations
    @throws(classOf[java.io.IOException])

Deprecated Value Members

  1. def mergeFromAndMakeImmutableInternal(arg0: CodedInputStream, arg1: ExtensionRegistryLite): Unit
    Attributes
    protected[protobuf]
    Definition Classes
    GeneratedMessageV3
    Annotations
    @throws(classOf[com.google.protobuf.InvalidProtocolBufferException]) @Deprecated
    Deprecated

Inherited from GridOrBuilder

Inherited from GeneratedMessageV3

Inherited from Serializable

Inherited from AbstractMessage

Inherited from Message

Inherited from MessageOrBuilder

Inherited from AbstractMessageLite[MessageType, BuilderType]

Inherited from MessageLite

Inherited from MessageLiteOrBuilder

Inherited from AnyRef

Inherited from Any

Ungrouped