Class Card.Section.Builder

  • All Implemented Interfaces:
    Card.SectionOrBuilder, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable
    Enclosing class:
    Card.Section

    public static final class Card.Section.Builder
    extends com.google.protobuf.GeneratedMessageV3.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 Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • clear

        public Card.Section.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Card.Section.Builder>
      • getDefaultInstanceForType

        public Card.Section getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Card.Section build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Card.Section buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Card.Section.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • setField

        public Card.Section.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • clearField

        public Card.Section.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • clearOneof

        public Card.Section.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • setRepeatedField

        public Card.Section.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • addRepeatedField

        public Card.Section.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • mergeFrom

        public Card.Section.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Card.Section.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,​Card.Section.Builder>
      • mergeFrom

        public Card.Section.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Card.Section.Builder>
        Throws:
        java.io.IOException
      • getHeader

        public java.lang.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](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:
        getHeader in interface Card.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:
        getHeaderBytes in interface Card.SectionOrBuilder
        Returns:
        The bytes for header.
      • setHeader

        public Card.Section.Builder setHeader​(java.lang.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](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

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

        public Card.Section.Builder setHeaderBytes​(com.google.protobuf.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](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

        public java.util.List<Widget> getWidgetsList()
         All the widgets in the section.
         Must contain at least one widget.
         
        repeated .google.apps.card.v1.Widget widgets = 2;
        Specified by:
        getWidgetsList in interface Card.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:
        getWidgetsCount in interface Card.SectionOrBuilder
      • getWidgets

        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;
        Specified by:
        getWidgets in interface Card.SectionOrBuilder
      • setWidgets

        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;
      • setWidgets

        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;
      • addWidgets

        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;
      • addWidgets

        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;
      • addWidgets

        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;
      • addWidgets

        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;
      • addAllWidgets

        public Card.Section.Builder addAllWidgets​(java.lang.Iterable<? extends Widget> values)
         All the widgets in the section.
         Must contain at least one widget.
         
        repeated .google.apps.card.v1.Widget widgets = 2;
      • 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;
      • removeWidgets

        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;
      • getWidgetsBuilder

        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;
      • 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;
      • addWidgetsBuilder

        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;
      • getWidgetsBuilderList

        public java.util.List<Widget.Builder> 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:
        getCollapsible in interface Card.SectionOrBuilder
        Returns:
        The collapsible.
      • setCollapsible

        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;
        Parameters:
        value - The collapsible to set.
        Returns:
        This builder for chaining.
      • 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:
        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:
        getUncollapsibleWidgetsCount in interface Card.SectionOrBuilder
        Returns:
        The uncollapsibleWidgetsCount.
      • setUncollapsibleWidgetsCount

        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;
        Parameters:
        value - The uncollapsibleWidgetsCount to set.
        Returns:
        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:
        This builder for chaining.
      • setUnknownFields

        public final Card.Section.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>
      • mergeUnknownFields

        public final Card.Section.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Card.Section.Builder>