Class ContextualAddOnMarkup.Card.Section.Builder (0.4.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.chat.v1.WidgetMarkup>
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ContextualAddOnMarkup.Card.Section.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueWidgetMarkup
Returns
TypeDescription
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
NameDescription
builderForValueWidgetMarkup.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueWidgetMarkup
Returns
TypeDescription
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
NameDescription
indexint
builderForValueWidgetMarkup.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
WidgetMarkup.Builder

build()

public ContextualAddOnMarkup.Card.Section build()
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section

buildPartial()

public ContextualAddOnMarkup.Card.Section buildPartial()
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section

clear()

public ContextualAddOnMarkup.Card.Section.Builder clear()
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ContextualAddOnMarkup.Card.Section.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder

clone()

public ContextualAddOnMarkup.Card.Section.Builder clone()
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder
Overrides

getDefaultInstanceForType()

public ContextualAddOnMarkup.Card.Section getDefaultInstanceForType()
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section

getDescriptorForType()

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

getWidgetsBuilderList()

public List<WidgetMarkup.Builder> getWidgetsBuilderList()

A section must contain at least one widget.

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

Returns
TypeDescription
List<Builder>

getWidgetsCount()

public int getWidgetsCount()

A section must contain at least one widget.

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

Returns
TypeDescription
int

getWidgetsList()

public List<WidgetMarkup> getWidgetsList()

A section must contain at least one widget.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
WidgetMarkupOrBuilder

getWidgetsOrBuilderList()

public List<? extends WidgetMarkupOrBuilder> getWidgetsOrBuilderList()

A section must contain at least one widget.

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

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ContextualAddOnMarkup.Card.Section other)

public ContextualAddOnMarkup.Card.Section.Builder mergeFrom(ContextualAddOnMarkup.Card.Section other)
Parameter
NameDescription
otherContextualAddOnMarkup.Card.Section
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ContextualAddOnMarkup.Card.Section.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ContextualAddOnMarkup.Card.Section.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

The header to set.

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

The bytes for header to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ContextualAddOnMarkup.Card.Section.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
valueWidgetMarkup
Returns
TypeDescription
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
NameDescription
indexint
builderForValueWidgetMarkup.Builder
Returns
TypeDescription
ContextualAddOnMarkup.Card.Section.Builder