Class Grid.GridItem.Builder (0.1.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Grid.GridItem.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Grid.GridItem.Builder
Overrides

build()

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

buildPartial()

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

clear()

public Grid.GridItem.Builder clear()
Returns
TypeDescription
Grid.GridItem.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Grid.GridItem.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Grid.GridItem.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Grid.GridItem.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Grid.GridItem.Builder
Overrides

clearSubtitle()

public Grid.GridItem.Builder clearSubtitle()

The grid item's subtitle.

string subtitle = 4;

Returns
TypeDescription
Grid.GridItem.Builder

This builder for chaining.

clearTitle()

public Grid.GridItem.Builder clearTitle()

The grid item's title.

string title = 3;

Returns
TypeDescription
Grid.GridItem.Builder

This builder for chaining.

clone()

public Grid.GridItem.Builder clone()
Returns
TypeDescription
Grid.GridItem.Builder
Overrides

getDefaultInstanceForType()

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
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.

getImageBuilder()

public ImageComponent.Builder getImageBuilder()

The image that displays in the grid item.

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

Returns
TypeDescription
ImageComponent.Builder

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.

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Grid.GridItem other)

public Grid.GridItem.Builder mergeFrom(Grid.GridItem other)
Parameter
NameDescription
otherGrid.GridItem
Returns
TypeDescription
Grid.GridItem.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Grid.GridItem.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Grid.GridItem.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Grid.GridItem.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueImageComponent
Returns
TypeDescription
Grid.GridItem.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Grid.GridItem.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Grid.GridItem.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Grid.GridItem.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The id to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
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
NameDescription
valueImageComponent
Returns
TypeDescription
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
NameDescription
builderForValueImageComponent.Builder
Returns
TypeDescription
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
NameDescription
valueGrid.GridItem.GridItemLayout

The layout to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Grid.GridItem.Builder
Overrides

setSubtitle(String value)

public Grid.GridItem.Builder setSubtitle(String value)

The grid item's subtitle.

string subtitle = 4;

Parameter
NameDescription
valueString

The subtitle to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for subtitle to set.

Returns
TypeDescription
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
NameDescription
valueString

The title to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for title to set.

Returns
TypeDescription
Grid.GridItem.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Grid.GridItem.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Grid.GridItem.Builder
Overrides