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 java.lang.Object implements LayoutBlock
https://api.slack.com/reference/messaging/blocks#input
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInputBlock.InputBlockBuilder -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTYPE -
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.InputBlockBuilderbuilder()protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetBlockId()Returns the block_id string; the value can be null if the object is manually crafted.java.lang.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.java.lang.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(java.lang.String blockId)voidsetDispatchAction(java.lang.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.java.lang.StringtoString()
-
Field Details
-
TYPE
public static final java.lang.String TYPE- See Also:
- Constant Field Values
-
-
Constructor Details
-
InputBlock
public InputBlock() -
InputBlock
public InputBlock(java.lang.String blockId, PlainTextObject label, BlockElement element, java.lang.Boolean dispatchAction, PlainTextObject hint, boolean optional)
-
-
Method Details
-
builder
-
getType
public java.lang.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 java.lang.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
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
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
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
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
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
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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other) -
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-