Class NumberInputElement
- java.lang.Object
-
- com.slack.api.model.block.element.BlockElement
-
- com.slack.api.model.block.element.NumberInputElement
-
public class NumberInputElement extends BlockElement
https://api.slack.com/reference/block-kit/block-elements#number
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNumberInputElement.NumberInputElementBuilder
-
Constructor Summary
Constructors Constructor Description NumberInputElement()NumberInputElement(String actionId, boolean decimalAllowed, PlainTextObject placeholder, String initialValue, String minValue, String maxValue, DispatchActionConfig dispatchActionConfig, Boolean focusOnLoad)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NumberInputElement.NumberInputElementBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)StringgetActionId()An identifier for the input value when the parent modal is submitted.DispatchActionConfiggetDispatchActionConfig()A dispatch configuration object that determines when during text input the element returns a block_actions payload.BooleangetFocusOnLoad()Indicates whether the element will be set to autofocus within the view object.StringgetInitialValue()The initial value in the plain-text input when it is loaded.StringgetMaxValue()The maximum value, cannot be less than min_value.StringgetMinValue()The minimum value, cannot be greater than max_value.PlainTextObjectgetPlaceholder()A plain_text only text object that defines the placeholder text shown in the plain-text input.StringgetType()inthashCode()booleanisDecimalAllowed()Decimal numbers are allowed if is_decimal_allowed= true, set the value to false otherwise.voidsetActionId(String actionId)An identifier for the input value when the parent modal is submitted.voidsetDecimalAllowed(boolean decimalAllowed)Decimal numbers are allowed if is_decimal_allowed= true, set the value to false otherwise.voidsetDispatchActionConfig(DispatchActionConfig dispatchActionConfig)A dispatch configuration object that determines when during text input the element returns a block_actions payload.voidsetFocusOnLoad(Boolean focusOnLoad)Indicates whether the element will be set to autofocus within the view object.voidsetInitialValue(String initialValue)The initial value in the plain-text input when it is loaded.voidsetMaxValue(String maxValue)The maximum value, cannot be less than min_value.voidsetMinValue(String minValue)The minimum value, cannot be greater than max_value.voidsetPlaceholder(PlainTextObject placeholder)A plain_text only text object that defines the placeholder text shown in the plain-text input.StringtoString()
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NumberInputElement
public NumberInputElement()
-
NumberInputElement
public NumberInputElement(String actionId, boolean decimalAllowed, PlainTextObject placeholder, String initialValue, String minValue, String maxValue, DispatchActionConfig dispatchActionConfig, Boolean focusOnLoad)
-
-
Method Detail
-
builder
public static NumberInputElement.NumberInputElementBuilder builder()
-
getType
public String getType()
-
getActionId
public String getActionId()
An identifier for the input value when the parent modal is submitted. You can use this when you receive a view_submission payload to identify the value of the input element. Should be unique among all other action_ids used elsewhere by your app. Maximum length for this field is 255 characters.
-
isDecimalAllowed
public boolean isDecimalAllowed()
Decimal numbers are allowed if is_decimal_allowed= true, set the value to false otherwise.
-
getPlaceholder
public PlainTextObject getPlaceholder()
A plain_text only text object that defines the placeholder text shown in the plain-text input. Maximum length for the text in this field is 150 characters.
-
getInitialValue
public String getInitialValue()
The initial value in the plain-text input when it is loaded.
-
getMinValue
public String getMinValue()
The minimum value, cannot be greater than max_value.
-
getMaxValue
public String getMaxValue()
The maximum value, cannot be less than min_value.
-
getDispatchActionConfig
public DispatchActionConfig getDispatchActionConfig()
A dispatch configuration object that determines when during text input the element returns a block_actions payload.
-
getFocusOnLoad
public Boolean getFocusOnLoad()
Indicates whether the element will be set to autofocus within the view object. Only one element can be set to true. Defaults to false.
-
setActionId
public void setActionId(String actionId)
An identifier for the input value when the parent modal is submitted. You can use this when you receive a view_submission payload to identify the value of the input element. Should be unique among all other action_ids used elsewhere by your app. Maximum length for this field is 255 characters.
-
setDecimalAllowed
public void setDecimalAllowed(boolean decimalAllowed)
Decimal numbers are allowed if is_decimal_allowed= true, set the value to false otherwise.
-
setPlaceholder
public void setPlaceholder(PlainTextObject placeholder)
A plain_text only text object that defines the placeholder text shown in the plain-text input. Maximum length for the text in this field is 150 characters.
-
setInitialValue
public void setInitialValue(String initialValue)
The initial value in the plain-text input when it is loaded.
-
setMinValue
public void setMinValue(String minValue)
The minimum value, cannot be greater than max_value.
-
setMaxValue
public void setMaxValue(String maxValue)
The maximum value, cannot be less than min_value.
-
setDispatchActionConfig
public void setDispatchActionConfig(DispatchActionConfig dispatchActionConfig)
A dispatch configuration object that determines when during text input the element returns a block_actions payload.
-
setFocusOnLoad
public void setFocusOnLoad(Boolean focusOnLoad)
Indicates whether the element will be set to autofocus within the view object. Only one element can be set to true. Defaults to false.
-
canEqual
protected boolean canEqual(Object other)
-
-