Class Card.Section (2.37.1)

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
TypeDescription
int

HEADER_FIELD_NUMBER

public static final int HEADER_FIELD_NUMBER
Field Value
TypeDescription
int

UNCOLLAPSIBLE_WIDGETS_COUNT_FIELD_NUMBER

public static final int UNCOLLAPSIBLE_WIDGETS_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

WIDGETS_FIELD_NUMBER

public static final int WIDGETS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Card.Section getDefaultInstance()
Returns
TypeDescription
Card.Section

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Card.Section.Builder newBuilder()
Returns
TypeDescription
Card.Section.Builder

newBuilder(Card.Section prototype)

public static Card.Section.Builder newBuilder(Card.Section prototype)
Parameter
NameDescription
prototypeCard.Section
Returns
TypeDescription
Card.Section.Builder

parseDelimitedFrom(InputStream input)

public static Card.Section parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Card.Section parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Card.Section parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Card.Section parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Card.Section parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Card.Section parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Card.Section parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Card.Section
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
boolean

The collapsible.

getDefaultInstanceForType()

public Card.Section getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for header.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.apps.card.v1.WidgetOrBuilder>

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Card.Section.Builder newBuilderForType()
Returns
TypeDescription
Card.Section.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Card.Section.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Card.Section.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Card.Section.Builder toBuilder()
Returns
TypeDescription
Card.Section.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException