Package com.slack.api.model.block
Class InputBlock
- java.lang.Object
-
- com.slack.api.model.block.InputBlock
-
- All Implemented Interfaces:
LayoutBlock
public class InputBlock extends Object implements LayoutBlock
https://api.slack.com/reference/messaging/blocks#input
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInputBlock.InputBlockBuilder
-
Constructor Summary
Constructors Constructor Description InputBlock()InputBlock(String blockId, PlainTextObject label, BlockElement element, Boolean dispatchAction, PlainTextObject hint, boolean optional)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static InputBlock.InputBlockBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)StringgetBlockId()Returns the block_id string; the value can be null if the object is manually crafted.BooleangetDispatchAction()A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload.BlockElementgetElement()A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.PlainTextObjectgetHint()An optional hint that appears below an input element in a lighter grey.PlainTextObjectgetLabel()A label that appears above an input element in the form of a text object that must have type of plain_text.StringgetType()Determines the type of layout block, e.g.inthashCode()booleanisOptional()A boolean that indicates whether the input element may be empty when a user submits the modal.voidsetBlockId(String blockId)voidsetDispatchAction(Boolean dispatchAction)A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload.voidsetElement(BlockElement element)A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.voidsetHint(PlainTextObject hint)An optional hint that appears below an input element in a lighter grey.voidsetLabel(PlainTextObject label)A label that appears above an input element in the form of a text object that must have type of plain_text.voidsetOptional(boolean optional)A boolean that indicates whether the input element may be empty when a user submits the modal.StringtoString()
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InputBlock
public InputBlock()
-
InputBlock
public InputBlock(String blockId, PlainTextObject label, BlockElement element, Boolean dispatchAction, PlainTextObject hint, boolean optional)
-
-
Method Detail
-
builder
public static InputBlock.InputBlockBuilder builder()
-
getType
public String getType()
Description copied from interface:LayoutBlockDetermines the type of layout block, e.g. section, divider, context, actions and image.- Specified by:
getTypein interfaceLayoutBlock
-
getBlockId
public String getBlockId()
Description copied from interface:LayoutBlockReturns the block_id string; the value can be null if the object is manually crafted.- Specified by:
getBlockIdin interfaceLayoutBlock
-
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 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 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(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(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 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.
-
canEqual
protected boolean canEqual(Object other)
-
-