Package com.google.apps.card.v1
Class Card.Section.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Card.Section.Builder>
com.google.apps.card.v1.Card.Section.Builder
- All Implemented Interfaces:
Card.SectionOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Card.Section
public static final class Card.Section.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Card.Section.Builder>
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](https://developers.google.com/workspace/extend):Protobuf type
google.apps.card.v1.Card.Section-
Method Summary
Modifier and TypeMethodDescriptionaddAllWidgets(Iterable<? extends Widget> values) All the widgets in the section.addWidgets(int index, Widget value) All the widgets in the section.addWidgets(int index, Widget.Builder builderForValue) All the widgets in the section.addWidgets(Widget value) All the widgets in the section.addWidgets(Widget.Builder builderForValue) All the widgets in the section.All the widgets in the section.addWidgetsBuilder(int index) All the widgets in the section.build()clear()Optional.Indicates whether this section is collapsible.Text that appears at the top of a section.The number of uncollapsible widgets which remain visible even when a section is collapsed.All the widgets in the section.Optional.Optional.Optional.booleanIndicates whether this section is collapsible.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorText that appears at the top of a section.com.google.protobuf.ByteStringText that appears at the top of a section.intThe number of uncollapsible widgets which remain visible even when a section is collapsed.getWidgets(int index) All the widgets in the section.getWidgetsBuilder(int index) All the widgets in the section.All the widgets in the section.intAll the widgets in the section.All the widgets in the section.getWidgetsOrBuilder(int index) All the widgets in the section.List<? extends WidgetOrBuilder>All the widgets in the section.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanOptional.mergeFrom(Card.Section other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeWidgets(int index) All the widgets in the section.Optional.setCollapseControl(CollapseControl.Builder builderForValue) Optional.setCollapsible(boolean value) Indicates whether this section is collapsible.Text that appears at the top of a section.setHeaderBytes(com.google.protobuf.ByteString value) Text that appears at the top of a section.setUncollapsibleWidgetsCount(int value) The number of uncollapsible widgets which remain visible even when a section is collapsed.setWidgets(int index, Widget value) All the widgets in the section.setWidgets(int index, Widget.Builder builderForValue) All the widgets in the section.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Card.Section.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Card.Section.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Card.Section.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Card.Section.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Card.Section.Builder>
-
mergeFrom
public Card.Section.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Card.Section.Builder>- Throws:
IOException
-
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](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
string header = 1;- Specified by:
getHeaderin interfaceCard.SectionOrBuilder- Returns:
- The header.
-
getHeaderBytes
public com.google.protobuf.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](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
string header = 1;- Specified by:
getHeaderBytesin interfaceCard.SectionOrBuilder- Returns:
- The bytes for header.
-
setHeader
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](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
string header = 1;- Parameters:
value- The header to set.- Returns:
- This builder for chaining.
-
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](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
string header = 1;- Returns:
- This builder for chaining.
-
setHeaderBytes
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](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
string header = 1;- Parameters:
value- The bytes for header to set.- Returns:
- This builder for chaining.
-
getWidgetsList
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;- Specified by:
getWidgetsListin interfaceCard.SectionOrBuilder
-
getWidgetsCount
public int getWidgetsCount()All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;- Specified by:
getWidgetsCountin interfaceCard.SectionOrBuilder
-
getWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;- Specified by:
getWidgetsin interfaceCard.SectionOrBuilder
-
setWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
setWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
addWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
addWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
addWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
addWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
addAllWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
clearWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
removeWidgets
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
getWidgetsBuilder
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
getWidgetsOrBuilder
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;- Specified by:
getWidgetsOrBuilderin interfaceCard.SectionOrBuilder
-
getWidgetsOrBuilderList
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2;- Specified by:
getWidgetsOrBuilderListin interfaceCard.SectionOrBuilder
-
addWidgetsBuilder
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
addWidgetsBuilder
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
getWidgetsBuilderList
All the widgets in the section. Must contain at least one widget.
repeated .google.apps.card.v1.Widget widgets = 2; -
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;- Specified by:
getCollapsiblein interfaceCard.SectionOrBuilder- Returns:
- The collapsible.
-
setCollapsible
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;- Parameters:
value- The collapsible to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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;- Specified by:
getUncollapsibleWidgetsCountin interfaceCard.SectionOrBuilder- Returns:
- The uncollapsibleWidgetsCount.
-
setUncollapsibleWidgetsCount
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;- Parameters:
value- The uncollapsibleWidgetsCount to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
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;- Specified by:
hasCollapseControlin interfaceCard.SectionOrBuilder- Returns:
- Whether the collapseControl field is set.
-
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;- Specified by:
getCollapseControlin interfaceCard.SectionOrBuilder- Returns:
- The collapseControl.
-
setCollapseControl
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; -
setCollapseControl
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; -
mergeCollapseControl
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; -
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; -
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; -
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;- Specified by:
getCollapseControlOrBuilderin interfaceCard.SectionOrBuilder
-