Class BlockElementAction

java.lang.Object
com.hubspot.slack.client.models.interaction.BlockElementAction
All Implemented Interfaces:
BlockElementActionIF

@Generated(from="BlockElementActionIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class BlockElementAction extends Object implements BlockElementActionIF
Immutable implementation of BlockElementActionIF.

Use the builder to create immutable instances: BlockElementAction.builder().

  • Method Details

    • getBlockId

      public String getBlockId()
      Specified by:
      getBlockId in interface BlockElementActionIF
      Returns:
      The value of the blockId attribute
    • getActionId

      public String getActionId()
      Specified by:
      getActionId in interface BlockElementActionIF
      Returns:
      The value of the actionId attribute
    • getElement

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

      public Optional<String> getSelectedValue()
      Specified by:
      getSelectedValue in interface BlockElementActionIF
      Returns:
      The value of the selectedValue attribute
    • getSelectedDate

      public Optional<LocalDate> getSelectedDate()
      Specified by:
      getSelectedDate in interface BlockElementActionIF
      Returns:
      The value of the selectedDate attribute
    • getActionTs

      public Optional<String> getActionTs()
      Specified by:
      getActionTs in interface BlockElementActionIF
      Returns:
      The value of the actionTs attribute
    • withBlockId

      public final BlockElementAction withBlockId(String value)
      Copy the current immutable object by setting a value for the blockId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for blockId
      Returns:
      A modified copy or the this object
    • withActionId

      public final BlockElementAction withActionId(String value)
      Copy the current immutable object by setting a value for the actionId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for actionId
      Returns:
      A modified copy or the this object
    • withElement

      public final BlockElementAction 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
    • withSelectedValue

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

      public final BlockElementAction withSelectedValue(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the selectedValue 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 selectedValue
      Returns:
      A modified copy or this if not changed
    • withSelectedDate

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

      public final BlockElementAction withSelectedDate(Optional<? extends LocalDate> optional)
      Copy the current immutable object by setting an optional value for the selectedDate 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 selectedDate
      Returns:
      A modified copy or this if not changed
    • withActionTs

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

      public final BlockElementAction withActionTs(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the actionTs 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 actionTs
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of BlockElementAction 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, actionId, element, selectedValue, selectedDate, actionTs.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static BlockElementAction copyOf(BlockElementActionIF instance)
      Creates an immutable copy of a BlockElementActionIF 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 BlockElementAction instance
    • builder

      public static BlockElementAction.Builder builder()
      Creates a builder for BlockElementAction.
       BlockElementAction.builder()
          .setBlockId(String) // required blockId
          .setActionId(String) // required actionId
          .setElement(com.hubspot.slack.client.models.blocks.elements.BlockElement) // required element
          .setSelectedValue(Optional<String>) // optional selectedValue
          .setSelectedDate(Optional<java.time.LocalDate>) // optional selectedDate
          .setActionTs(Optional<String>) // optional actionTs
          .build();
       
      Returns:
      A new BlockElementAction builder