Class SelectionInput.SelectionItem.Builder

  • All Implemented Interfaces:
    SelectionInput.SelectionItemOrBuilder, 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:
    SelectionInput.SelectionItem

    public static final class SelectionInput.SelectionItem.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<SelectionInput.SelectionItem.Builder>
    implements SelectionInput.SelectionItemOrBuilder
     An item that users can select in a selection input, such as a checkbox
     or switch.
    
     [Google Workspace Add-ons and Chat
     apps](https://developers.google.com/workspace/extend):
     
    Protobuf type google.apps.card.v1.SelectionInput.SelectionItem
    • 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<SelectionInput.SelectionItem.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<SelectionInput.SelectionItem.Builder>
      • getDefaultInstanceForType

        public SelectionInput.SelectionItem 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 SelectionInput.SelectionItem build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public SelectionInput.SelectionItem buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

        public SelectionInput.SelectionItem.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<SelectionInput.SelectionItem.Builder>
      • addRepeatedField

        public SelectionInput.SelectionItem.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<SelectionInput.SelectionItem.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,​SelectionInput.SelectionItem.Builder>
      • mergeFrom

        public SelectionInput.SelectionItem.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<SelectionInput.SelectionItem.Builder>
        Throws:
        java.io.IOException
      • getTextBytes

        public com.google.protobuf.ByteString getTextBytes()
         The text that identifies or describes the item to users.
         
        string text = 1;
        Specified by:
        getTextBytes in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The bytes for text.
      • setText

        public SelectionInput.SelectionItem.Builder setText​(java.lang.String value)
         The text that identifies or describes the item to users.
         
        string text = 1;
        Parameters:
        value - The text to set.
        Returns:
        This builder for chaining.
      • setTextBytes

        public SelectionInput.SelectionItem.Builder setTextBytes​(com.google.protobuf.ByteString value)
         The text that identifies or describes the item to users.
         
        string text = 1;
        Parameters:
        value - The bytes for text to set.
        Returns:
        This builder for chaining.
      • getValue

        public java.lang.String getValue()
         The value associated with this item. The client should use this as a form
         input value.
        
         For details about working with form inputs, see [Receive form
         data](https://developers.google.com/workspace/chat/read-form-data).
         
        string value = 2;
        Specified by:
        getValue in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The value.
      • getValueBytes

        public com.google.protobuf.ByteString getValueBytes()
         The value associated with this item. The client should use this as a form
         input value.
        
         For details about working with form inputs, see [Receive form
         data](https://developers.google.com/workspace/chat/read-form-data).
         
        string value = 2;
        Specified by:
        getValueBytes in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The bytes for value.
      • setValue

        public SelectionInput.SelectionItem.Builder setValue​(java.lang.String value)
         The value associated with this item. The client should use this as a form
         input value.
        
         For details about working with form inputs, see [Receive form
         data](https://developers.google.com/workspace/chat/read-form-data).
         
        string value = 2;
        Parameters:
        value - The value to set.
        Returns:
        This builder for chaining.
      • clearValue

        public SelectionInput.SelectionItem.Builder clearValue()
         The value associated with this item. The client should use this as a form
         input value.
        
         For details about working with form inputs, see [Receive form
         data](https://developers.google.com/workspace/chat/read-form-data).
         
        string value = 2;
        Returns:
        This builder for chaining.
      • setValueBytes

        public SelectionInput.SelectionItem.Builder setValueBytes​(com.google.protobuf.ByteString value)
         The value associated with this item. The client should use this as a form
         input value.
        
         For details about working with form inputs, see [Receive form
         data](https://developers.google.com/workspace/chat/read-form-data).
         
        string value = 2;
        Parameters:
        value - The bytes for value to set.
        Returns:
        This builder for chaining.
      • getSelected

        public boolean getSelected()
         Whether the item is selected by default. If the selection input only
         accepts one value (such as for radio buttons or a dropdown menu), only
         set this field for one item.
         
        bool selected = 3;
        Specified by:
        getSelected in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The selected.
      • setSelected

        public SelectionInput.SelectionItem.Builder setSelected​(boolean value)
         Whether the item is selected by default. If the selection input only
         accepts one value (such as for radio buttons or a dropdown menu), only
         set this field for one item.
         
        bool selected = 3;
        Parameters:
        value - The selected to set.
        Returns:
        This builder for chaining.
      • clearSelected

        public SelectionInput.SelectionItem.Builder clearSelected()
         Whether the item is selected by default. If the selection input only
         accepts one value (such as for radio buttons or a dropdown menu), only
         set this field for one item.
         
        bool selected = 3;
        Returns:
        This builder for chaining.
      • getStartIconUri

        public java.lang.String getStartIconUri()
         For multiselect menus, the URL for the icon displayed next to
         the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
         URL. For example,
         `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
         
        string start_icon_uri = 4;
        Specified by:
        getStartIconUri in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The startIconUri.
      • getStartIconUriBytes

        public com.google.protobuf.ByteString getStartIconUriBytes()
         For multiselect menus, the URL for the icon displayed next to
         the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
         URL. For example,
         `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
         
        string start_icon_uri = 4;
        Specified by:
        getStartIconUriBytes in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The bytes for startIconUri.
      • setStartIconUri

        public SelectionInput.SelectionItem.Builder setStartIconUri​(java.lang.String value)
         For multiselect menus, the URL for the icon displayed next to
         the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
         URL. For example,
         `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
         
        string start_icon_uri = 4;
        Parameters:
        value - The startIconUri to set.
        Returns:
        This builder for chaining.
      • clearStartIconUri

        public SelectionInput.SelectionItem.Builder clearStartIconUri()
         For multiselect menus, the URL for the icon displayed next to
         the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
         URL. For example,
         `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
         
        string start_icon_uri = 4;
        Returns:
        This builder for chaining.
      • setStartIconUriBytes

        public SelectionInput.SelectionItem.Builder setStartIconUriBytes​(com.google.protobuf.ByteString value)
         For multiselect menus, the URL for the icon displayed next to
         the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS`
         URL. For example,
         `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.
         
        string start_icon_uri = 4;
        Parameters:
        value - The bytes for startIconUri to set.
        Returns:
        This builder for chaining.
      • getBottomText

        public java.lang.String getBottomText()
         For multiselect menus, a text description or label that's
         displayed below the item's `text` field.
         
        string bottom_text = 5;
        Specified by:
        getBottomText in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The bottomText.
      • getBottomTextBytes

        public com.google.protobuf.ByteString getBottomTextBytes()
         For multiselect menus, a text description or label that's
         displayed below the item's `text` field.
         
        string bottom_text = 5;
        Specified by:
        getBottomTextBytes in interface SelectionInput.SelectionItemOrBuilder
        Returns:
        The bytes for bottomText.
      • setBottomText

        public SelectionInput.SelectionItem.Builder setBottomText​(java.lang.String value)
         For multiselect menus, a text description or label that's
         displayed below the item's `text` field.
         
        string bottom_text = 5;
        Parameters:
        value - The bottomText to set.
        Returns:
        This builder for chaining.
      • clearBottomText

        public SelectionInput.SelectionItem.Builder clearBottomText()
         For multiselect menus, a text description or label that's
         displayed below the item's `text` field.
         
        string bottom_text = 5;
        Returns:
        This builder for chaining.
      • setBottomTextBytes

        public SelectionInput.SelectionItem.Builder setBottomTextBytes​(com.google.protobuf.ByteString value)
         For multiselect menus, a text description or label that's
         displayed below the item's `text` field.
         
        string bottom_text = 5;
        Parameters:
        value - The bytes for bottomText to set.
        Returns:
        This builder for chaining.