Class Grid.GridItem (2.37.1)

public static final class Grid.GridItem extends GeneratedMessageV3 implements Grid.GridItemOrBuilder

Represents an item in a grid layout. Items can contain text, an image, or both text and an image.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.Grid.GridItem

Static Fields

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

IMAGE_FIELD_NUMBER

public static final int IMAGE_FIELD_NUMBER
Field Value
TypeDescription
int

LAYOUT_FIELD_NUMBER

public static final int LAYOUT_FIELD_NUMBER
Field Value
TypeDescription
int

SUBTITLE_FIELD_NUMBER

public static final int SUBTITLE_FIELD_NUMBER
Field Value
TypeDescription
int

TITLE_FIELD_NUMBER

public static final int TITLE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Grid.GridItem getDefaultInstance()
Returns
TypeDescription
Grid.GridItem

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Grid.GridItem.Builder newBuilder()
Returns
TypeDescription
Grid.GridItem.Builder

newBuilder(Grid.GridItem prototype)

public static Grid.GridItem.Builder newBuilder(Grid.GridItem prototype)
Parameter
NameDescription
prototypeGrid.GridItem
Returns
TypeDescription
Grid.GridItem.Builder

parseDelimitedFrom(InputStream input)

public static Grid.GridItem parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Grid.GridItem parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Grid.GridItem parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Grid.GridItem parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Grid.GridItem parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Grid.GridItem parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Grid.GridItem parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Grid.GridItem parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Grid.GridItem parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Grid.GridItem parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Grid.GridItem parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Grid.GridItem parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Grid.GridItem
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Grid.GridItem> parser()
Returns
TypeDescription
Parser<GridItem>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public Grid.GridItem getDefaultInstanceForType()
Returns
TypeDescription
Grid.GridItem

getId()

public String getId()

A user-specified identifier for this grid item. This identifier is returned in the parent grid's onClick callback parameters.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

A user-specified identifier for this grid item. This identifier is returned in the parent grid's onClick callback parameters.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getImage()

public ImageComponent getImage()

The image that displays in the grid item.

.google.apps.card.v1.ImageComponent image = 2;

Returns
TypeDescription
ImageComponent

The image.

getImageOrBuilder()

public ImageComponentOrBuilder getImageOrBuilder()

The image that displays in the grid item.

.google.apps.card.v1.ImageComponent image = 2;

Returns
TypeDescription
ImageComponentOrBuilder

getLayout()

public Grid.GridItem.GridItemLayout getLayout()

The layout to use for the grid item.

.google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;

Returns
TypeDescription
Grid.GridItem.GridItemLayout

The layout.

getLayoutValue()

public int getLayoutValue()

The layout to use for the grid item.

.google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9;

Returns
TypeDescription
int

The enum numeric value on the wire for layout.

getParserForType()

public Parser<Grid.GridItem> getParserForType()
Returns
TypeDescription
Parser<GridItem>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSubtitle()

public String getSubtitle()

The grid item's subtitle.

string subtitle = 4;

Returns
TypeDescription
String

The subtitle.

getSubtitleBytes()

public ByteString getSubtitleBytes()

The grid item's subtitle.

string subtitle = 4;

Returns
TypeDescription
ByteString

The bytes for subtitle.

getTitle()

public String getTitle()

The grid item's title.

string title = 3;

Returns
TypeDescription
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

The grid item's title.

string title = 3;

Returns
TypeDescription
ByteString

The bytes for title.

hasImage()

public boolean hasImage()

The image that displays in the grid item.

.google.apps.card.v1.ImageComponent image = 2;

Returns
TypeDescription
boolean

Whether the image field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Grid.GridItem.Builder newBuilderForType()
Returns
TypeDescription
Grid.GridItem.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Grid.GridItem.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Grid.GridItem.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Grid.GridItem.Builder toBuilder()
Returns
TypeDescription
Grid.GridItem.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException