Class OptionObject

java.lang.Object
com.slack.api.model.block.composition.OptionObject

public class OptionObject
extends java.lang.Object
https://api.slack.com/reference/messaging/composition-objects#option
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  OptionObject.OptionObjectBuilder  
  • Constructor Summary

    Constructors 
    Constructor Description
    OptionObject()  
    OptionObject​(TextObject text, java.lang.String value, PlainTextObject description, java.lang.String url)  
  • Method Summary

    Modifier and Type Method Description
    static OptionObject.OptionObjectBuilder builder()  
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    PlainTextObject getDescription()
    A plain_text only text object that defines a line of descriptive text shown below the text field beside the radio button.
    TextObject getText()
    A text object that defines the text shown in the option on the menu.
    java.lang.String getUrl()
    A URL to load in the user's browser when the option is clicked.
    java.lang.String getValue()
    The string value that will be passed to your app when this option is chosen.
    int hashCode()  
    void setDescription​(PlainTextObject description)
    A plain_text only text object that defines a line of descriptive text shown below the text field beside the radio button.
    void setText​(TextObject text)
    A text object that defines the text shown in the option on the menu.
    void setUrl​(java.lang.String url)
    A URL to load in the user's browser when the option is clicked.
    void setValue​(java.lang.String value)
    The string value that will be passed to your app when this option is chosen.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • builder

      public static OptionObject.OptionObjectBuilder builder()
    • getText

      public TextObject getText()
      A text object that defines the text shown in the option on the menu. Overflow, select, and multi-select menus can only use plain_text objects, while radio buttons and checkboxes can use mrkdwn text objects. Maximum length for the text in this field is 75 characters.
    • getValue

      public java.lang.String getValue()
      The string value that will be passed to your app when this option is chosen. Maximum length for this field is 75 characters.
    • getDescription

      public PlainTextObject getDescription()
      A plain_text only text object that defines a line of descriptive text shown below the text field beside the radio button. Maximum length for the text object within this field is 75 characters.
    • getUrl

      public java.lang.String getUrl()
      A URL to load in the user's browser when the option is clicked. The url attribute is only available in overflow menus. https://api.slack.com/reference/block-kit/block-elements#overflow

      Maximum length for this field is 3000 characters. If you're using url, you'll still receive an interaction payload and will need to send an acknowledgement response. A URL to load in the user's browser when the option is clicked.

    • setText

      public void setText​(TextObject text)
      A text object that defines the text shown in the option on the menu. Overflow, select, and multi-select menus can only use plain_text objects, while radio buttons and checkboxes can use mrkdwn text objects. Maximum length for the text in this field is 75 characters.
    • setValue

      public void setValue​(java.lang.String value)
      The string value that will be passed to your app when this option is chosen. Maximum length for this field is 75 characters.
    • setDescription

      public void setDescription​(PlainTextObject description)
      A plain_text only text object that defines a line of descriptive text shown below the text field beside the radio button. Maximum length for the text object within this field is 75 characters.
    • setUrl

      public void setUrl​(java.lang.String url)
      A URL to load in the user's browser when the option is clicked. The url attribute is only available in overflow menus. https://api.slack.com/reference/block-kit/block-elements#overflow

      Maximum length for this field is 3000 characters. If you're using url, you'll still receive an interaction payload and will need to send an acknowledgement response. A URL to load in the user's browser when the option is clicked.

    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object