Class InputBlock

java.lang.Object
com.slack.api.model.block.InputBlock
All Implemented Interfaces:
LayoutBlock

public class InputBlock
extends java.lang.Object
implements LayoutBlock
https://api.slack.com/reference/messaging/blocks#input
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  InputBlock.InputBlockBuilder  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String TYPE  
  • Constructor Summary

    Constructors 
    Constructor Description
    InputBlock()  
    InputBlock​(java.lang.String blockId, PlainTextObject label, BlockElement element, java.lang.Boolean dispatchAction, PlainTextObject hint, boolean optional)  
  • Method Summary

    Modifier and Type Method Description
    static InputBlock.InputBlockBuilder builder()  
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.lang.String getBlockId()
    Returns the block_id string; the value can be null if the object is manually crafted.
    java.lang.Boolean getDispatchAction()
    A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload.
    BlockElement getElement()
    A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.
    PlainTextObject getHint()
    An optional hint that appears below an input element in a lighter grey.
    PlainTextObject getLabel()
    A label that appears above an input element in the form of a text object that must have type of plain_text.
    java.lang.String getType()
    Determines the type of layout block, e.g.
    int hashCode()  
    boolean isOptional()
    A boolean that indicates whether the input element may be empty when a user submits the modal.
    void setBlockId​(java.lang.String blockId)  
    void setDispatchAction​(java.lang.Boolean dispatchAction)
    A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload.
    void setElement​(BlockElement element)
    A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.
    void setHint​(PlainTextObject hint)
    An optional hint that appears below an input element in a lighter grey.
    void setLabel​(PlainTextObject label)
    A label that appears above an input element in the form of a text object that must have type of plain_text.
    void setOptional​(boolean optional)
    A boolean that indicates whether the input element may be empty when a user submits the modal.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • builder

      public static InputBlock.InputBlockBuilder builder()
    • getType

      public java.lang.String getType()
      Description copied from interface: LayoutBlock
      Determines the type of layout block, e.g. section, divider, context, actions and image.
      Specified by:
      getType in interface LayoutBlock
    • getBlockId

      public java.lang.String getBlockId()
      Description copied from interface: LayoutBlock
      Returns the block_id string; the value can be null if the object is manually crafted.
      Specified by:
      getBlockId in interface LayoutBlock
    • getLabel

      public PlainTextObject getLabel()
      A label that appears above an input element in the form of a text object that must have type of plain_text. Maximum length for the text in this field is 2000 characters.
    • getElement

      public BlockElement getElement()
      A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.
    • getDispatchAction

      public java.lang.Boolean getDispatchAction()
      A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload. Defaults to false.
    • getHint

      public PlainTextObject getHint()
      An optional hint that appears below an input element in a lighter grey. It must be a a text object with a type of plain_text. Maximum length for the text in this field is 2000 characters.
    • isOptional

      public boolean isOptional()
      A boolean that indicates whether the input element may be empty when a user submits the modal. Defaults to false.
    • setBlockId

      public void setBlockId​(java.lang.String blockId)
    • setLabel

      public void setLabel​(PlainTextObject label)
      A label that appears above an input element in the form of a text object that must have type of plain_text. Maximum length for the text in this field is 2000 characters.
    • setElement

      public void setElement​(BlockElement element)
      A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.
    • setDispatchAction

      public void setDispatchAction​(java.lang.Boolean dispatchAction)
      A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload. Defaults to false.
    • setHint

      public void setHint​(PlainTextObject hint)
      An optional hint that appears below an input element in a lighter grey. It must be a a text object with a type of plain_text. Maximum length for the text in this field is 2000 characters.
    • setOptional

      public void setOptional​(boolean optional)
      A boolean that indicates whether the input element may be empty when a user submits the modal. Defaults to false.
    • 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