Class Input
java.lang.Object
com.hubspot.slack.client.models.blocks.Input
- All Implemented Interfaces:
BlockOrAttachment,Block,ContainerChildBlock,InputIF,ChatUnfurlBlocksOrAttachment
@Generated(from="InputIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Input
extends Object
implements InputIF
Immutable implementation of
InputIF.
Use the builder to create immutable instances:
Input.builder().
Use the static factory method to create immutable instances:
Input.of().
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Input.Builderbuilder()Creates a builder forInput.static InputCreates an immutable copy of aInputIFvalue.booleanThis instance is equal to all instances ofInputthat have equal attribute values.getHint()getLabel()getType()inthashCode()Computes a hash code from attributes:blockId,type,label,element,hint,optional,dispatchAction.static Inputof(Text label, BlockElement element) Construct a new immutableInputinstance.toString()Prints the immutable valueInputwith attribute values.final InputwithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final InputwithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final InputwithDispatchAction(Boolean value) Copy the current immutable object by setting a present value for the optionaldispatchActionattribute.final InputwithDispatchAction(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thedispatchActionattribute.final InputwithElement(BlockElement value) Copy the current immutable object by setting a value for theelementattribute.final InputCopy the current immutable object by setting a present value for the optionalhintattribute.final InputCopy the current immutable object by setting an optional value for thehintattribute.final InputCopy the current immutable object by setting a value for thelabelattribute.final InputwithOptional(Boolean value) Copy the current immutable object by setting a present value for the optionaloptionalattribute.final InputwithOptional(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theoptionalattribute.
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
-
getLabel
-
getElement
- Specified by:
getElementin interfaceInputIF- Returns:
- The value of the
elementattribute
-
getHint
-
isOptional
- Specified by:
isOptionalin interfaceInputIF- Returns:
- The value of the
optionalattribute
-
getDispatchAction
- Specified by:
getDispatchActionin interfaceInputIF- Returns:
- The value of the
dispatchActionattribute
-
withBlockId
Copy the current immutable object by setting a present value for the optionalblockIdattribute.- Parameters:
value- The value for blockId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBlockId
Copy the current immutable object by setting an optional value for theblockIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for blockId- Returns:
- A modified copy or
thisif not changed
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label- Returns:
- A modified copy or the
thisobject
-
withElement
Copy the current immutable object by setting a value for theelementattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for element- Returns:
- A modified copy or the
thisobject
-
withHint
Copy the current immutable object by setting a present value for the optionalhintattribute.- Parameters:
value- The value for hint,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withHint
Copy the current immutable object by setting an optional value for thehintattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for hint- Returns:
- A modified copy or
thisif not changed
-
withOptional
Copy the current immutable object by setting a present value for the optionaloptionalattribute.- Parameters:
value- The value for optional,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withOptional
Copy the current immutable object by setting an optional value for theoptionalattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for optional- Returns:
- A modified copy or
thisif not changed
-
withDispatchAction
Copy the current immutable object by setting a present value for the optionaldispatchActionattribute.- Parameters:
value- The value for dispatchAction,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withDispatchAction
Copy the current immutable object by setting an optional value for thedispatchActionattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for dispatchAction- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofInputthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,label,element,hint,optional,dispatchAction. -
toString
Prints the immutable valueInputwith attribute values. -
of
Construct a new immutableInputinstance.- Parameters:
label- The value for thelabelattributeelement- The value for theelementattribute- Returns:
- An immutable Input instance
-
copyOf
Creates an immutable copy of aInputIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Input instance
-
builder
Creates a builder forInput.Input.builder() .setBlockId(Optional<String>) // optionalblockId.setLabel(com.hubspot.slack.client.models.blocks.objects.Text) // requiredlabel.setElement(com.hubspot.slack.client.models.blocks.elements.BlockElement) // requiredelement.setHint(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optionalhint.setOptional(Optional<Boolean>) // optionaloptional.setDispatchAction(Optional<Boolean>) // optionaldispatchAction.build();- Returns:
- A new Input builder
-