Class ContextualAddOnMarkup.Card.Builder (0.7.0)

publicstaticfinalclass ContextualAddOnMarkup.Card.BuilderextendsGeneratedMessageV3.Builder<ContextualAddOnMarkup.Card.Builder>implementsContextualAddOnMarkup.CardOrBuilder

A card is a UI element that can contain UI widgets such as text and images.

Protobuf type google.chat.v1.ContextualAddOnMarkup.Card

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllCardActions(Iterable<? extends ContextualAddOnMarkup.Card.CardAction> values)

publicContextualAddOnMarkup.Card.BuilderaddAllCardActions(Iterable<?extendsContextualAddOnMarkup.Card.CardAction>values)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
values Iterable<? extends com.google.chat.v1.ContextualAddOnMarkup.Card.CardAction>
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addAllSections(Iterable<? extends ContextualAddOnMarkup.Card.Section> values)

publicContextualAddOnMarkup.Card.BuilderaddAllSections(Iterable<?extendsContextualAddOnMarkup.Card.Section>values)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
values Iterable<? extends com.google.chat.v1.ContextualAddOnMarkup.Card.Section>
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addCardActions(ContextualAddOnMarkup.Card.CardAction value)

publicContextualAddOnMarkup.Card.BuilderaddCardActions(ContextualAddOnMarkup.Card.CardActionvalue)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
value ContextualAddOnMarkup.Card.CardAction
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addCardActions(ContextualAddOnMarkup.Card.CardAction.Builder builderForValue)

publicContextualAddOnMarkup.Card.BuilderaddCardActions(ContextualAddOnMarkup.Card.CardAction.BuilderbuilderForValue)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
builderForValue ContextualAddOnMarkup.Card.CardAction.Builder
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addCardActions(int index, ContextualAddOnMarkup.Card.CardAction value)

publicContextualAddOnMarkup.Card.BuilderaddCardActions(intindex,ContextualAddOnMarkup.Card.CardActionvalue)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameters
Name Description
index int
value ContextualAddOnMarkup.Card.CardAction
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addCardActions(int index, ContextualAddOnMarkup.Card.CardAction.Builder builderForValue)

publicContextualAddOnMarkup.Card.BuilderaddCardActions(intindex,ContextualAddOnMarkup.Card.CardAction.BuilderbuilderForValue)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameters
Name Description
index int
builderForValue ContextualAddOnMarkup.Card.CardAction.Builder
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addCardActionsBuilder()

publicContextualAddOnMarkup.Card.CardAction.BuilderaddCardActionsBuilder()

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Returns
Type Description
ContextualAddOnMarkup.Card.CardAction.Builder

addCardActionsBuilder(int index)

publicContextualAddOnMarkup.Card.CardAction.BuilderaddCardActionsBuilder(intindex)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.CardAction.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicContextualAddOnMarkup.Card.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

addSections(ContextualAddOnMarkup.Card.Section value)

publicContextualAddOnMarkup.Card.BuilderaddSections(ContextualAddOnMarkup.Card.Sectionvalue)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
value ContextualAddOnMarkup.Card.Section
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addSections(ContextualAddOnMarkup.Card.Section.Builder builderForValue)

publicContextualAddOnMarkup.Card.BuilderaddSections(ContextualAddOnMarkup.Card.Section.BuilderbuilderForValue)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
builderForValue ContextualAddOnMarkup.Card.Section.Builder
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addSections(int index, ContextualAddOnMarkup.Card.Section value)

publicContextualAddOnMarkup.Card.BuilderaddSections(intindex,ContextualAddOnMarkup.Card.Sectionvalue)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameters
Name Description
index int
value ContextualAddOnMarkup.Card.Section
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addSections(int index, ContextualAddOnMarkup.Card.Section.Builder builderForValue)

publicContextualAddOnMarkup.Card.BuilderaddSections(intindex,ContextualAddOnMarkup.Card.Section.BuilderbuilderForValue)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameters
Name Description
index int
builderForValue ContextualAddOnMarkup.Card.Section.Builder
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

addSectionsBuilder()

publicContextualAddOnMarkup.Card.Section.BuilderaddSectionsBuilder()

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

addSectionsBuilder(int index)

publicContextualAddOnMarkup.Card.Section.BuilderaddSectionsBuilder(intindex)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

build()

publicContextualAddOnMarkup.Cardbuild()
Returns
Type Description
ContextualAddOnMarkup.Card

buildPartial()

publicContextualAddOnMarkup.CardbuildPartial()
Returns
Type Description
ContextualAddOnMarkup.Card

clear()

publicContextualAddOnMarkup.Card.Builderclear()
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

clearCardActions()

publicContextualAddOnMarkup.Card.BuilderclearCardActions()

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Returns
Type Description
ContextualAddOnMarkup.Card.Builder

clearField(Descriptors.FieldDescriptor field)

publicContextualAddOnMarkup.Card.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

clearHeader()

publicContextualAddOnMarkup.Card.BuilderclearHeader()

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Returns
Type Description
ContextualAddOnMarkup.Card.Builder

clearName()

publicContextualAddOnMarkup.Card.BuilderclearName()

Name of the card.

string name = 4;

Returns
Type Description
ContextualAddOnMarkup.Card.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicContextualAddOnMarkup.Card.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

clearSections()

publicContextualAddOnMarkup.Card.BuilderclearSections()

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Returns
Type Description
ContextualAddOnMarkup.Card.Builder

clone()

publicContextualAddOnMarkup.Card.Builderclone()
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

getCardActions(int index)

publicContextualAddOnMarkup.Card.CardActiongetCardActions(intindex)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.CardAction

getCardActionsBuilder(int index)

publicContextualAddOnMarkup.Card.CardAction.BuildergetCardActionsBuilder(intindex)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.CardAction.Builder

getCardActionsBuilderList()

publicList<ContextualAddOnMarkup.Card.CardAction.Builder>getCardActionsBuilderList()

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Returns
Type Description
List<Builder>

getCardActionsCount()

publicintgetCardActionsCount()

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Returns
Type Description
int

getCardActionsList()

publicList<ContextualAddOnMarkup.Card.CardAction>getCardActionsList()

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Returns
Type Description
List<CardAction>

getCardActionsOrBuilder(int index)

publicContextualAddOnMarkup.Card.CardActionOrBuildergetCardActionsOrBuilder(intindex)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.CardActionOrBuilder

getCardActionsOrBuilderList()

publicList<?extendsContextualAddOnMarkup.Card.CardActionOrBuilder>getCardActionsOrBuilderList()

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Returns
Type Description
List<? extends com.google.chat.v1.ContextualAddOnMarkup.Card.CardActionOrBuilder>

getDefaultInstanceForType()

publicContextualAddOnMarkup.CardgetDefaultInstanceForType()
Returns
Type Description
ContextualAddOnMarkup.Card

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHeader()

publicContextualAddOnMarkup.Card.CardHeadergetHeader()

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Returns
Type Description
ContextualAddOnMarkup.Card.CardHeader

The header.

getHeaderBuilder()

publicContextualAddOnMarkup.Card.CardHeader.BuildergetHeaderBuilder()

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Returns
Type Description
ContextualAddOnMarkup.Card.CardHeader.Builder

getHeaderOrBuilder()

publicContextualAddOnMarkup.Card.CardHeaderOrBuildergetHeaderOrBuilder()

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Returns
Type Description
ContextualAddOnMarkup.Card.CardHeaderOrBuilder

getName()

publicStringgetName()

Name of the card.

string name = 4;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Name of the card.

string name = 4;

Returns
Type Description
ByteString

The bytes for name.

getSections(int index)

publicContextualAddOnMarkup.Card.SectiongetSections(intindex)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.Section

getSectionsBuilder(int index)

publicContextualAddOnMarkup.Card.Section.BuildergetSectionsBuilder(intindex)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

getSectionsBuilderList()

publicList<ContextualAddOnMarkup.Card.Section.Builder>getSectionsBuilderList()

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Returns
Type Description
List<Builder>

getSectionsCount()

publicintgetSectionsCount()

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Returns
Type Description
int

getSectionsList()

publicList<ContextualAddOnMarkup.Card.Section>getSectionsList()

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Returns
Type Description
List<Section>

getSectionsOrBuilder(int index)

publicContextualAddOnMarkup.Card.SectionOrBuildergetSectionsOrBuilder(intindex)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.SectionOrBuilder

getSectionsOrBuilderList()

publicList<?extendsContextualAddOnMarkup.Card.SectionOrBuilder>getSectionsOrBuilderList()

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Returns
Type Description
List<? extends com.google.chat.v1.ContextualAddOnMarkup.Card.SectionOrBuilder>

hasHeader()

publicbooleanhasHeader()

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Returns
Type Description
boolean

Whether the header field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ContextualAddOnMarkup.Card other)

publicContextualAddOnMarkup.Card.BuildermergeFrom(ContextualAddOnMarkup.Cardother)
Parameter
Name Description
other ContextualAddOnMarkup.Card
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicContextualAddOnMarkup.Card.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicContextualAddOnMarkup.Card.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

mergeHeader(ContextualAddOnMarkup.Card.CardHeader value)

publicContextualAddOnMarkup.Card.BuildermergeHeader(ContextualAddOnMarkup.Card.CardHeadervalue)

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Parameter
Name Description
value ContextualAddOnMarkup.Card.CardHeader
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalContextualAddOnMarkup.Card.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

removeCardActions(int index)

publicContextualAddOnMarkup.Card.BuilderremoveCardActions(intindex)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

removeSections(int index)

publicContextualAddOnMarkup.Card.BuilderremoveSections(intindex)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameter
Name Description
index int
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

setCardActions(int index, ContextualAddOnMarkup.Card.CardAction value)

publicContextualAddOnMarkup.Card.BuildersetCardActions(intindex,ContextualAddOnMarkup.Card.CardActionvalue)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameters
Name Description
index int
value ContextualAddOnMarkup.Card.CardAction
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

setCardActions(int index, ContextualAddOnMarkup.Card.CardAction.Builder builderForValue)

publicContextualAddOnMarkup.Card.BuildersetCardActions(intindex,ContextualAddOnMarkup.Card.CardAction.BuilderbuilderForValue)

The actions of this card.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3;

Parameters
Name Description
index int
builderForValue ContextualAddOnMarkup.Card.CardAction.Builder
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicContextualAddOnMarkup.Card.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

setHeader(ContextualAddOnMarkup.Card.CardHeader value)

publicContextualAddOnMarkup.Card.BuildersetHeader(ContextualAddOnMarkup.Card.CardHeadervalue)

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Parameter
Name Description
value ContextualAddOnMarkup.Card.CardHeader
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

setHeader(ContextualAddOnMarkup.Card.CardHeader.Builder builderForValue)

publicContextualAddOnMarkup.Card.BuildersetHeader(ContextualAddOnMarkup.Card.CardHeader.BuilderbuilderForValue)

The header of the card. A header usually contains a title and an image.

.google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1;

Parameter
Name Description
builderForValue ContextualAddOnMarkup.Card.CardHeader.Builder
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

setName(String value)

publicContextualAddOnMarkup.Card.BuildersetName(Stringvalue)

Name of the card.

string name = 4;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
ContextualAddOnMarkup.Card.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicContextualAddOnMarkup.Card.BuildersetNameBytes(ByteStringvalue)

Name of the card.

string name = 4;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
ContextualAddOnMarkup.Card.Builder

This builder for chaining.

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

publicContextualAddOnMarkup.Card.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

setSections(int index, ContextualAddOnMarkup.Card.Section value)

publicContextualAddOnMarkup.Card.BuildersetSections(intindex,ContextualAddOnMarkup.Card.Sectionvalue)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameters
Name Description
index int
value ContextualAddOnMarkup.Card.Section
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

setSections(int index, ContextualAddOnMarkup.Card.Section.Builder builderForValue)

publicContextualAddOnMarkup.Card.BuildersetSections(intindex,ContextualAddOnMarkup.Card.Section.BuilderbuilderForValue)

Sections are separated by a line divider.

repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2;

Parameters
Name Description
index int
builderForValue ContextualAddOnMarkup.Card.Section.Builder
Returns
Type Description
ContextualAddOnMarkup.Card.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalContextualAddOnMarkup.Card.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ContextualAddOnMarkup.Card.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.