Class UserSelectMenu

java.lang.Object
com.hubspot.slack.client.models.blocks.elements.UserSelectMenu
All Implemented Interfaces:
BlockElement, HasActionId, UserSelectMenuIF

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

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

  • Method Details

    • getType

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

      public Text getPlaceholder()
      Specified by:
      getPlaceholder in interface UserSelectMenuIF
      Returns:
      The value of the placeholder attribute
    • getActionId

      public String getActionId()
      Specified by:
      getActionId in interface HasActionId
      Specified by:
      getActionId in interface UserSelectMenuIF
      Returns:
      The value of the actionId attribute
    • getInitialUserId

      public Optional<String> getInitialUserId()
      Specified by:
      getInitialUserId in interface UserSelectMenuIF
      Returns:
      The value of the initialUserId attribute
    • getConfirmationDialog

      public Optional<ConfirmationDialog> getConfirmationDialog()
      Specified by:
      getConfirmationDialog in interface UserSelectMenuIF
      Returns:
      The value of the confirmationDialog attribute
    • withPlaceholder

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

      public final UserSelectMenu 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
    • withInitialUserId

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

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

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

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

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

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

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

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

      public static UserSelectMenu.Builder builder()
      Creates a builder for UserSelectMenu.
       UserSelectMenu.builder()
          .setPlaceholder(com.hubspot.slack.client.models.blocks.objects.Text) // required placeholder
          .setActionId(String) // required actionId
          .setInitialUserId(Optional<String>) // optional initialUserId
          .setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optional confirmationDialog
          .build();
       
      Returns:
      A new UserSelectMenu builder