Class ContextualAddOnMarkup.Card.Section.Builder (0.7.0)

public static final class ContextualAddOnMarkup.Card.Section.Builder extends GeneratedMessageV3.Builder<ContextualAddOnMarkup.Card.Section.Builder> implements ContextualAddOnMarkup.Card.SectionOrBuilder

A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there's currently no need for layout properties (for example, float).

Protobuf type google.chat.v1.ContextualAddOnMarkup.Card.Section

Static Methods

getDescriptor()

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

Methods

addAllWidgets(Iterable<? extends WidgetMarkup> values)

public ContextualAddOnMarkup.Card.Section.Builder addAllWidgets(Iterable<? extends WidgetMarkup> values)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ContextualAddOnMarkup.Card.Section.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

addWidgets(WidgetMarkup value)

public ContextualAddOnMarkup.Card.Section.Builder addWidgets(WidgetMarkup value)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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

addWidgets(WidgetMarkup.Builder builderForValue)

public ContextualAddOnMarkup.Card.Section.Builder addWidgets(WidgetMarkup.Builder builderForValue)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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

addWidgets(int index, WidgetMarkup value)

public ContextualAddOnMarkup.Card.Section.Builder addWidgets(int index, WidgetMarkup value)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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

addWidgets(int index, WidgetMarkup.Builder builderForValue)

public ContextualAddOnMarkup.Card.Section.Builder addWidgets(int index, WidgetMarkup.Builder builderForValue)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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

addWidgetsBuilder()

public WidgetMarkup.Builder addWidgetsBuilder()

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Returns
Type Description
WidgetMarkup.Builder

addWidgetsBuilder(int index)

public WidgetMarkup.Builder addWidgetsBuilder(int index)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup.Builder

build()

public ContextualAddOnMarkup.Card.Section build()
Returns
Type Description
ContextualAddOnMarkup.Card.Section

buildPartial()

public ContextualAddOnMarkup.Card.Section buildPartial()
Returns
Type Description
ContextualAddOnMarkup.Card.Section

clear()

public ContextualAddOnMarkup.Card.Section.Builder clear()
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ContextualAddOnMarkup.Card.Section.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

clearHeader()

public ContextualAddOnMarkup.Card.Section.Builder clearHeader()

The header of the section. Formatted text is supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string header = 1;

Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ContextualAddOnMarkup.Card.Section.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

clearWidgets()

public ContextualAddOnMarkup.Card.Section.Builder clearWidgets()

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

clone()

public ContextualAddOnMarkup.Card.Section.Builder clone()
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

getDefaultInstanceForType()

public ContextualAddOnMarkup.Card.Section getDefaultInstanceForType()
Returns
Type Description
ContextualAddOnMarkup.Card.Section

getDescriptorForType()

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

getHeader()

public String getHeader()

The header of the section. Formatted text is supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string header = 1;

Returns
Type Description
String

The header.

getHeaderBytes()

public ByteString getHeaderBytes()

The header of the section. Formatted text is supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string header = 1;

Returns
Type Description
ByteString

The bytes for header.

getWidgets(int index)

public WidgetMarkup getWidgets(int index)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup

getWidgetsBuilder(int index)

public WidgetMarkup.Builder getWidgetsBuilder(int index)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup.Builder

getWidgetsBuilderList()

public List<WidgetMarkup.Builder> getWidgetsBuilderList()

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Returns
Type Description
List<Builder>

getWidgetsCount()

public int getWidgetsCount()

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Returns
Type Description
int

getWidgetsList()

public List<WidgetMarkup> getWidgetsList()

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Returns
Type Description
List<WidgetMarkup>

getWidgetsOrBuilder(int index)

public WidgetMarkupOrBuilder getWidgetsOrBuilder(int index)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkupOrBuilder

getWidgetsOrBuilderList()

public List<? extends WidgetMarkupOrBuilder> getWidgetsOrBuilderList()

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

Returns
Type Description
List<? extends com.google.chat.v1.WidgetMarkupOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ContextualAddOnMarkup.Card.Section other)

public ContextualAddOnMarkup.Card.Section.Builder mergeFrom(ContextualAddOnMarkup.Card.Section other)
Parameter
Name Description
other ContextualAddOnMarkup.Card.Section
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ContextualAddOnMarkup.Card.Section.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ContextualAddOnMarkup.Card.Section.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ContextualAddOnMarkup.Card.Section.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

removeWidgets(int index)

public ContextualAddOnMarkup.Card.Section.Builder removeWidgets(int index)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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

setField(Descriptors.FieldDescriptor field, Object value)

public ContextualAddOnMarkup.Card.Section.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

setHeader(String value)

public ContextualAddOnMarkup.Card.Section.Builder setHeader(String value)

The header of the section. Formatted text is supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string header = 1;

Parameter
Name Description
value String

The header to set.

Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

This builder for chaining.

setHeaderBytes(ByteString value)

public ContextualAddOnMarkup.Card.Section.Builder setHeaderBytes(ByteString value)

The header of the section. Formatted text is supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.

string header = 1;

Parameter
Name Description
value ByteString

The bytes for header to set.

Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

public final ContextualAddOnMarkup.Card.Section.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ContextualAddOnMarkup.Card.Section.Builder
Overrides

setWidgets(int index, WidgetMarkup value)

public ContextualAddOnMarkup.Card.Section.Builder setWidgets(int index, WidgetMarkup value)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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

setWidgets(int index, WidgetMarkup.Builder builderForValue)

public ContextualAddOnMarkup.Card.Section.Builder setWidgets(int index, WidgetMarkup.Builder builderForValue)

A section must contain at least one widget.

repeated .google.chat.v1.WidgetMarkup widgets = 2;

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