Class Grid.GridItem.Builder (2.38.0)

public static final class Grid.GridItem.Builder extends GeneratedMessageV3.Builder<Grid.GridItem.Builder> 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 Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Grid.GridItem.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Grid.GridItem.Builder
Overrides

build()

public Grid.GridItem build()
Returns
Type Description
Grid.GridItem

buildPartial()

public Grid.GridItem buildPartial()
Returns
Type Description
Grid.GridItem

clear()

public Grid.GridItem.Builder clear()
Returns
Type Description
Grid.GridItem.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Grid.GridItem.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Grid.GridItem.Builder
Overrides

clearId()

public Grid.GridItem.Builder clearId()

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

string id = 1;

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

clearImage()

public Grid.GridItem.Builder clearImage()

The image that displays in the grid item.

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

Returns
Type Description
Grid.GridItem.Builder

clearLayout()

public Grid.GridItem.Builder clearLayout()

The layout to use for the grid item.

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

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Grid.GridItem.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Grid.GridItem.Builder
Overrides

clearSubtitle()

public Grid.GridItem.Builder clearSubtitle()

The grid item's subtitle.

string subtitle = 4;

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

clearTitle()

public Grid.GridItem.Builder clearTitle()

The grid item's title.

string title = 3;

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

clone()

public Grid.GridItem.Builder clone()
Returns
Type Description
Grid.GridItem.Builder
Overrides

getDefaultInstanceForType()

public Grid.GridItem getDefaultInstanceForType()
Returns
Type Description
Grid.GridItem

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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
Type Description
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
Type Description
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
Type Description
ImageComponent

The image.

getImageBuilder()

public ImageComponent.Builder getImageBuilder()

The image that displays in the grid item.

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

Returns
Type Description
ImageComponent.Builder

getImageOrBuilder()

public ImageComponentOrBuilder getImageOrBuilder()

The image that displays in the grid item.

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

Returns
Type Description
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
Type Description
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
Type Description
int

The enum numeric value on the wire for layout.

getSubtitle()

public String getSubtitle()

The grid item's subtitle.

string subtitle = 4;

Returns
Type Description
String

The subtitle.

getSubtitleBytes()

public ByteString getSubtitleBytes()

The grid item's subtitle.

string subtitle = 4;

Returns
Type Description
ByteString

The bytes for subtitle.

getTitle()

public String getTitle()

The grid item's title.

string title = 3;

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

The grid item's title.

string title = 3;

Returns
Type Description
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
Type Description
boolean

Whether the image field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Grid.GridItem other)

public Grid.GridItem.Builder mergeFrom(Grid.GridItem other)
Parameter
Name Description
other Grid.GridItem
Returns
Type Description
Grid.GridItem.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Grid.GridItem.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Grid.GridItem.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Grid.GridItem.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Grid.GridItem.Builder
Overrides

mergeImage(ImageComponent value)

public Grid.GridItem.Builder mergeImage(ImageComponent value)

The image that displays in the grid item.

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

Parameter
Name Description
value ImageComponent
Returns
Type Description
Grid.GridItem.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Grid.GridItem.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Grid.GridItem.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Grid.GridItem.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Grid.GridItem.Builder
Overrides

setId(String value)

public Grid.GridItem.Builder setId(String value)

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

string id = 1;

Parameter
Name Description
value String

The id to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setIdBytes(ByteString value)

public Grid.GridItem.Builder setIdBytes(ByteString value)

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

string id = 1;

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setImage(ImageComponent value)

public Grid.GridItem.Builder setImage(ImageComponent value)

The image that displays in the grid item.

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

Parameter
Name Description
value ImageComponent
Returns
Type Description
Grid.GridItem.Builder

setImage(ImageComponent.Builder builderForValue)

public Grid.GridItem.Builder setImage(ImageComponent.Builder builderForValue)

The image that displays in the grid item.

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

Parameter
Name Description
builderForValue ImageComponent.Builder
Returns
Type Description
Grid.GridItem.Builder

setLayout(Grid.GridItem.GridItemLayout value)

public Grid.GridItem.Builder setLayout(Grid.GridItem.GridItemLayout value)

The layout to use for the grid item.

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

Parameter
Name Description
value Grid.GridItem.GridItemLayout

The layout to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setLayoutValue(int value)

public Grid.GridItem.Builder setLayoutValue(int value)

The layout to use for the grid item.

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

Parameter
Name Description
value int

The enum numeric value on the wire for layout to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Grid.GridItem.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Grid.GridItem.Builder
Overrides

setSubtitle(String value)

public Grid.GridItem.Builder setSubtitle(String value)

The grid item's subtitle.

string subtitle = 4;

Parameter
Name Description
value String

The subtitle to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setSubtitleBytes(ByteString value)

public Grid.GridItem.Builder setSubtitleBytes(ByteString value)

The grid item's subtitle.

string subtitle = 4;

Parameter
Name Description
value ByteString

The bytes for subtitle to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setTitle(String value)

public Grid.GridItem.Builder setTitle(String value)

The grid item's title.

string title = 3;

Parameter
Name Description
value String

The title to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public Grid.GridItem.Builder setTitleBytes(ByteString value)

The grid item's title.

string title = 3;

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
Grid.GridItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Grid.GridItem.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Grid.GridItem.Builder
Overrides