Class ContextualAddOnMarkup.Card.Section.Builder (0.1.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

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()

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>

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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

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

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

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()

buildPartial()

public ContextualAddOnMarkup.Card.Section buildPartial()

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearWidgets()

public ContextualAddOnMarkup.Card.Section.Builder clearWidgets()

A section must contain at least one widget.

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

clone()

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

getDefaultInstanceForType()

public ContextualAddOnMarkup.Card.Section getDefaultInstanceForType()

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setUnknownFields(UnknownFieldSet unknownFields)

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

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