java.lang.Object
com.hubspot.slack.client.models.blocks.elements.contextactionselements.IconButtonElement
All Implemented Interfaces:
BlockElement, ContextActionsElement, IconButtonElementIF

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

Use the builder to create immutable instances: IconButtonElement.builder(). Use the static factory method to create immutable instances: IconButtonElement.of().

  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface BlockElement
      Specified by:
      getType in interface IconButtonElementIF
      Returns:
      The computed-at-construction value of the type attribute
    • getIcon

      public String getIcon()
      Specified by:
      getIcon in interface IconButtonElementIF
      Returns:
      The value of the icon attribute
    • getText

      public Text getText()
      Specified by:
      getText in interface IconButtonElementIF
      Returns:
      The value of the text attribute
    • getActionId

      public Optional<String> getActionId()
      Specified by:
      getActionId in interface IconButtonElementIF
      Returns:
      The value of the actionId attribute
    • getValue

      public Optional<String> getValue()
      Specified by:
      getValue in interface IconButtonElementIF
      Returns:
      The value of the value attribute
    • getConfirm

      public Optional<ConfirmationDialog> getConfirm()
      Specified by:
      getConfirm in interface IconButtonElementIF
      Returns:
      The value of the confirm attribute
    • getAccessibilityLabel

      public Optional<String> getAccessibilityLabel()
      Specified by:
      getAccessibilityLabel in interface IconButtonElementIF
      Returns:
      The value of the accessibilityLabel attribute
    • getVisibleToUserIds

      public com.google.common.collect.ImmutableList<String> getVisibleToUserIds()
      Specified by:
      getVisibleToUserIds in interface IconButtonElementIF
      Returns:
      The value of the visibleToUserIds attribute
    • withIcon

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

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

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

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

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

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

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

      public final IconButtonElement withConfirm(Optional<? extends ConfirmationDialog> optional)
      Copy the current immutable object by setting an optional value for the confirm 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 confirm
      Returns:
      A modified copy or this if not changed
    • withAccessibilityLabel

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

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

      public final IconButtonElement withVisibleToUserIds(String... elements)
      Copy the current immutable object with elements that replace the content of visibleToUserIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withVisibleToUserIds

      public final IconButtonElement withVisibleToUserIds(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of visibleToUserIds. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of visibleToUserIds elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of IconButtonElement 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: type, icon, text, actionId, value, confirm, accessibilityLabel, visibleToUserIds.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static IconButtonElement of(String icon, Text text)
      Construct a new immutable IconButtonElement instance.
      Parameters:
      icon - The value for the icon attribute
      text - The value for the text attribute
      Returns:
      An immutable IconButtonElement instance
    • copyOf

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

      public static IconButtonElement.Builder builder()
      Creates a builder for IconButtonElement.
       IconButtonElement.builder()
          .setIcon(String) // required icon
          .setText(com.hubspot.slack.client.models.blocks.objects.Text) // required text
          .setActionId(Optional<String>) // optional actionId
          .setValue(Optional<String>) // optional value
          .setConfirm(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optional confirm
          .setAccessibilityLabel(Optional<String>) // optional accessibilityLabel
          .addVisibleToUserIds|addAllVisibleToUserIds(String) // visibleToUserIds elements
          .build();
       
      Returns:
      A new IconButtonElement builder