- 2.65.0 (latest)
- 2.64.1
- 2.63.2
- 2.62.0
- 2.61.3
- 2.60.0
- 2.59.2
- 2.58.0
- 2.57.0
- 2.56.0
- 2.54.1
- 2.53.0
- 2.52.0
- 2.51.0
- 2.50.1
- 2.49.0
- 2.48.0
- 2.46.0
- 2.45.1
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.1
- 2.38.0
- 2.37.1
- 2.36.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.1
- 2.24.0
- 2.23.1
- 2.22.1
- 2.21.1
- 2.15.0
- 2.14.3
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.6
- 2.8.4
- 2.7.4
public static final class Card.Section.Builder extends GeneratedMessage.Builder<Card.Section.Builder> implements Card.SectionOrBuilderA 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Card.Section.BuilderImplements
Card.SectionOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllWidgets(Iterable<? extends Widget> values)
public Card.Section.Builder addAllWidgets(Iterable<? extends Widget> values)All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.apps.card.v1.Widget> |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
addWidgets(Widget value)
public Card.Section.Builder addWidgets(Widget value)All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
Widget |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
addWidgets(Widget.Builder builderForValue)
public Card.Section.Builder addWidgets(Widget.Builder builderForValue)All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Widget.Builder |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
addWidgets(int index, Widget value)
public Card.Section.Builder addWidgets(int index, Widget value)All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Widget |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
addWidgets(int index, Widget.Builder builderForValue)
public Card.Section.Builder addWidgets(int index, Widget.Builder builderForValue)All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Widget.Builder |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
addWidgetsBuilder()
public Widget.Builder addWidgetsBuilder()All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Returns | |
|---|---|
| Type | Description |
Widget.Builder |
|
addWidgetsBuilder(int index)
public Widget.Builder addWidgetsBuilder(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.Builder |
|
build()
public Card.Section build()| Returns | |
|---|---|
| Type | Description |
Card.Section |
|
buildPartial()
public Card.Section buildPartial()| Returns | |
|---|---|
| Type | Description |
Card.Section |
|
clear()
public Card.Section.Builder clear()| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
clearCollapseControl()
public Card.Section.Builder clearCollapseControl()Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
clearCollapsible()
public Card.Section.Builder clearCollapsible()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 |
Card.Section.Builder |
This builder for chaining. |
clearHeader()
public Card.Section.Builder clearHeader()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 |
Card.Section.Builder |
This builder for chaining. |
clearUncollapsibleWidgetsCount()
public Card.Section.Builder clearUncollapsibleWidgetsCount()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 |
Card.Section.Builder |
This builder for chaining. |
clearWidgets()
public Card.Section.Builder clearWidgets()All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
getCollapseControl()
public CollapseControl getCollapseControl()Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Returns | |
|---|---|
| Type | Description |
CollapseControl |
The collapseControl. |
getCollapseControlBuilder()
public CollapseControl.Builder getCollapseControlBuilder()Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Returns | |
|---|---|
| Type | Description |
CollapseControl.Builder |
|
getCollapseControlOrBuilder()
public CollapseControlOrBuilder getCollapseControlOrBuilder()Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Returns | |
|---|---|
| Type | Description |
CollapseControlOrBuilder |
|
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 |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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. |
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 |
|
getWidgetsBuilder(int index)
public Widget.Builder getWidgetsBuilder(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.Builder |
|
getWidgetsBuilderList()
public List<Widget.Builder> getWidgetsBuilderList()All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
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> |
|
hasCollapseControl()
public boolean hasCollapseControl()Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the collapseControl field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeCollapseControl(CollapseControl value)
public Card.Section.Builder mergeCollapseControl(CollapseControl value)Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Parameter | |
|---|---|
| Name | Description |
value |
CollapseControl |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
mergeFrom(Card.Section other)
public Card.Section.Builder mergeFrom(Card.Section other)| Parameter | |
|---|---|
| Name | Description |
other |
Card.Section |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Card.Section.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Card.Section.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
removeWidgets(int index)
public Card.Section.Builder removeWidgets(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 |
Card.Section.Builder |
|
setCollapseControl(CollapseControl value)
public Card.Section.Builder setCollapseControl(CollapseControl value)Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Parameter | |
|---|---|
| Name | Description |
value |
CollapseControl |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
setCollapseControl(CollapseControl.Builder builderForValue)
public Card.Section.Builder setCollapseControl(CollapseControl.Builder builderForValue)Optional. Define the expand and collapse button of the section. This button will be shown only if the section is collapsible. If this field isn't set, the default button is used.
.google.apps.card.v1.CollapseControl collapse_control = 8;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
CollapseControl.Builder |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
setCollapsible(boolean value)
public Card.Section.Builder setCollapsible(boolean value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
booleanThe collapsible to set. |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
This builder for chaining. |
setHeader(String value)
public Card.Section.Builder setHeader(String value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe header to set. |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
This builder for chaining. |
setHeaderBytes(ByteString value)
public Card.Section.Builder setHeaderBytes(ByteString value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for header to set. |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
This builder for chaining. |
setUncollapsibleWidgetsCount(int value)
public Card.Section.Builder setUncollapsibleWidgetsCount(int value)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;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe uncollapsibleWidgetsCount to set. |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
This builder for chaining. |
setWidgets(int index, Widget value)
public Card.Section.Builder setWidgets(int index, Widget value)All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Widget |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|
setWidgets(int index, Widget.Builder builderForValue)
public Card.Section.Builder setWidgets(int index, Widget.Builder builderForValue)All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Widget.Builder |
| Returns | |
|---|---|
| Type | Description |
Card.Section.Builder |
|