Package com.slack.api.model.block
Class InputBlock
java.lang.Object
com.slack.api.model.block.InputBlock
- All Implemented Interfaces:
LayoutBlock
https://docs.slack.dev/reference/block-kit/blocks/input-block
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInputBlock(String blockId, PlainTextObject label, BlockElement element, Boolean dispatchAction, PlainTextObject hint, boolean optional) Creates a newInputBlockinstance. -
Method Summary
Modifier and TypeMethodDescriptionstatic InputBlock.InputBlockBuilderbuilder()protected booleanbooleanReturns the block_id string; the value can be null if the object is manually crafted.A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload.A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.getHint()An optional hint that appears below an input element in a lighter grey.getLabel()A label that appears above an input element in the form of a text object that must have type of plain_text.getType()Determines the type of layout block, e.g.inthashCode()booleanA 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.toString()
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
InputBlock
public InputBlock() -
InputBlock
public InputBlock(String blockId, PlainTextObject label, BlockElement element, Boolean dispatchAction, PlainTextObject hint, boolean optional) Creates a newInputBlockinstance.- Parameters:
blockId-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.element- A plain-text input element, a select menu element, a multi-select menu, or a datepicker element.dispatchAction- A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload. Defaults to false.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.optional- A boolean that indicates whether the input element may be empty when a user submits the modal. Defaults to false.
-
-
Method Details
-
builder
-
getType
Description copied from interface:LayoutBlockDetermines the type of layout block, e.g. section, divider, context, actions and image.- Specified by:
getTypein interfaceLayoutBlock
-
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
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
A plain-text input element, a select menu element, a multi-select menu, or a datepicker element. -
getDispatchAction
A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload. Defaults to false. -
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
-
setLabel
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
A plain-text input element, a select menu element, a multi-select menu, or a datepicker element. -
setDispatchAction
A boolean that indicates whether or not use of element in this block should dispatch a block_actions payload. Defaults to false. -
setHint
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. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-