Class Card.Section (2.41.0)

public static final class Card.Section extends GeneratedMessageV3 implements Card.SectionOrBuilder

A section contains a collection of widgets that are rendered vertically in the order that they're specified.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.Card.Section

Static Fields

COLLAPSIBLE_FIELD_NUMBER

public static final int COLLAPSIBLE_FIELD_NUMBER
Field Value
Type Description
int

HEADER_FIELD_NUMBER

public static final int HEADER_FIELD_NUMBER
Field Value
Type Description
int

UNCOLLAPSIBLE_WIDGETS_COUNT_FIELD_NUMBER

public static final int UNCOLLAPSIBLE_WIDGETS_COUNT_FIELD_NUMBER
Field Value
Type Description
int

WIDGETS_FIELD_NUMBER

public static final int WIDGETS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Card.Section getDefaultInstance()
Returns
Type Description
Card.Section

getDescriptor()

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

newBuilder()

public static Card.Section.Builder newBuilder()
Returns
Type Description
Card.Section.Builder

newBuilder(Card.Section prototype)

public static Card.Section.Builder newBuilder(Card.Section prototype)
Parameter
Name Description
prototype Card.Section
Returns
Type Description
Card.Section.Builder

parseDelimitedFrom(InputStream input)

public static Card.Section parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Card.Section
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Card.Section
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Card.Section parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Card.Section
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Card.Section
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Card.Section parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Card.Section
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Card.Section
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Card.Section parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Card.Section
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Card.Section
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Card.Section parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Card.Section
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Card.Section
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Card.Section parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Card.Section
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Card.Section
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Card.Section> parser()
Returns
Type Description
Parser<Section>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCollapsible()

public boolean getCollapsible()

Indicates whether this section is collapsible.

Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking Show more. Users can hide the widgets again by clicking Show less.

To determine which widgets are hidden, specify uncollapsibleWidgetsCount.

bool collapsible = 5;

Returns
Type Description
boolean

The collapsible.

getDefaultInstanceForType()

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

getHeader()

public String getHeader()

Text that appears at the top of a section. Supports simple HTML formatted text. 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()

Text that appears at the top of a section. Supports simple HTML formatted text. 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.

getParserForType()

public Parser<Card.Section> getParserForType()
Returns
Type Description
Parser<Section>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUncollapsibleWidgetsCount()

public int getUncollapsibleWidgetsCount()

The number of uncollapsible widgets which remain visible even when a section is collapsed.

For example, when a section contains five widgets and the uncollapsibleWidgetsCount is set to 2, the first two widgets are always shown and the last three are collapsed by default. The uncollapsibleWidgetsCount is taken into account only when collapsible is true.

int32 uncollapsible_widgets_count = 6;

Returns
Type Description
int

The uncollapsibleWidgetsCount.

getWidgets(int index)

public Widget getWidgets(int index)

All the widgets in the section. Must contain at least one widget.

repeated .google.apps.card.v1.Widget widgets = 2;

Parameter
Name Description
index int
Returns
Type Description
Widget

getWidgetsCount()

public int getWidgetsCount()

All the widgets in the section. Must contain at least one widget.

repeated .google.apps.card.v1.Widget widgets = 2;

Returns
Type Description
int

getWidgetsList()

public List<Widget> getWidgetsList()

All the widgets in the section. Must contain at least one widget.

repeated .google.apps.card.v1.Widget widgets = 2;

Returns
Type Description
List<Widget>

getWidgetsOrBuilder(int index)

public WidgetOrBuilder getWidgetsOrBuilder(int index)

All the widgets in the section. Must contain at least one widget.

repeated .google.apps.card.v1.Widget widgets = 2;

Parameter
Name Description
index int
Returns
Type Description
WidgetOrBuilder

getWidgetsOrBuilderList()

public List<? extends WidgetOrBuilder> getWidgetsOrBuilderList()

All the widgets in the section. Must contain at least one widget.

repeated .google.apps.card.v1.Widget widgets = 2;

Returns
Type Description
List<? extends com.google.apps.card.v1.WidgetOrBuilder>

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Card.Section.Builder newBuilderForType()
Returns
Type Description
Card.Section.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Card.Section.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Card.Section.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Card.Section.Builder toBuilder()
Returns
Type Description
Card.Section.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException