Class ExternalSelectMenu

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

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

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

  • Method Details

    • getType

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

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

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

      public Optional<Option> getInitialOption()
      Specified by:
      getInitialOption in interface ExternalSelectMenuIF
      Returns:
      The value of the initialOption attribute
    • getMinQueryLength

      public Optional<Integer> getMinQueryLength()
      Specified by:
      getMinQueryLength in interface ExternalSelectMenuIF
      Returns:
      The value of the minQueryLength attribute
    • getConfirmationDialog

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

      public final ExternalSelectMenu 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 ExternalSelectMenu 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
    • withInitialOption

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

      public final ExternalSelectMenu withInitialOption(Optional<? extends Option> optional)
      Copy the current immutable object by setting an optional value for the initialOption 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 initialOption
      Returns:
      A modified copy or this if not changed
    • withMinQueryLength

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

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

      public final ExternalSelectMenu 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 ExternalSelectMenu 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 ExternalSelectMenu 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, initialOption, minQueryLength, confirmationDialog.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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

      public static ExternalSelectMenu.Builder builder()
      Creates a builder for ExternalSelectMenu.
       ExternalSelectMenu.builder()
          .setPlaceholder(com.hubspot.slack.client.models.blocks.objects.Text) // required placeholder
          .setActionId(String) // required actionId
          .setInitialOption(Optional<com.hubspot.slack.client.models.blocks.objects.Option>) // optional initialOption
          .setMinQueryLength(Optional<Integer>) // optional minQueryLength
          .setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optional confirmationDialog
          .build();
       
      Returns:
      A new ExternalSelectMenu builder