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().

  • Method Details

    • getBlockId

      public Optional<String> getBlockId()
      Specified by:
      getBlockId in interface Block
      Returns:
      The value of the blockId attribute
    • getType

      public String getType()
      Specified by:
      getType in interface Block
      Specified by:
      getType in interface InputIF
      Returns:
      The computed-at-construction value of the type attribute
    • getLabel

      public Text getLabel()
      Specified by:
      getLabel in interface InputIF
      Returns:
      The value of the label attribute
    • getElement

      public BlockElement getElement()
      Specified by:
      getElement in interface InputIF
      Returns:
      The value of the element attribute
    • getHint

      public Optional<Text> getHint()
      Specified by:
      getHint in interface InputIF
      Returns:
      The value of the hint attribute
    • isOptional

      public Optional<Boolean> isOptional()
      Specified by:
      isOptional in interface InputIF
      Returns:
      The value of the optional attribute
    • getDispatchAction

      public Optional<Boolean> getDispatchAction()
      Specified by:
      getDispatchAction in interface InputIF
      Returns:
      The value of the dispatchAction attribute
    • withBlockId

      public final Input withBlockId(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional blockId attribute.
      Parameters:
      value - The value for blockId, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withBlockId

      public final Input withBlockId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the blockId attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for blockId
      Returns:
      A modified copy or this if not changed
    • withLabel

      public final Input withLabel(Text value)
      Copy the current immutable object by setting a value for the label attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for label
      Returns:
      A modified copy or the this object
    • withElement

      public final Input withElement(BlockElement value)
      Copy the current immutable object by setting a value for the element attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for element
      Returns:
      A modified copy or the this object
    • withHint

      public final Input withHint(@Nullable Text value)
      Copy the current immutable object by setting a present value for the optional hint attribute.
      Parameters:
      value - The value for hint, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withHint

      public final Input withHint(Optional<? extends Text> optional)
      Copy the current immutable object by setting an optional value for the hint attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for hint
      Returns:
      A modified copy or this if not changed
    • withOptional

      public final Input withOptional(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional optional attribute.
      Parameters:
      value - The value for optional, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withOptional

      public final Input withOptional(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the optional attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for optional
      Returns:
      A modified copy or this if not changed
    • withDispatchAction

      public final Input withDispatchAction(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional dispatchAction attribute.
      Parameters:
      value - The value for dispatchAction, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withDispatchAction

      public final Input withDispatchAction(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the dispatchAction attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for dispatchAction
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Input that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: blockId, type, label, element, hint, optional, dispatchAction.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Input with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static Input of(Text label, BlockElement element)
      Construct a new immutable Input instance.
      Parameters:
      label - The value for the label attribute
      element - The value for the element attribute
      Returns:
      An immutable Input instance
    • copyOf

      public static Input copyOf(InputIF instance)
      Creates an immutable copy of a InputIF value. 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

      public static Input.Builder builder()
      Creates a builder for Input.
       Input.builder()
          .setBlockId(Optional<String>) // optional blockId
          .setLabel(com.hubspot.slack.client.models.blocks.objects.Text) // required label
          .setElement(com.hubspot.slack.client.models.blocks.elements.BlockElement) // required element
          .setHint(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optional hint
          .setOptional(Optional<Boolean>) // optional optional
          .setDispatchAction(Optional<Boolean>) // optional dispatchAction
          .build();
       
      Returns:
      A new Input builder