Class StaticMultiSelectMenu

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

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

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

  • Method Details

    • getType

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

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

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

      public List<Option> getOptions()
      Specified by:
      getOptions in interface StaticMultiSelectMenuIF
      Returns:
      The value of the options attribute
    • getOptionGroups

      public List<OptionGroup> getOptionGroups()
      Specified by:
      getOptionGroups in interface StaticMultiSelectMenuIF
      Returns:
      The value of the optionGroups attribute
    • getInitialOptions

      public List<OptionOrOptionGroup> getInitialOptions()
      Specified by:
      getInitialOptions in interface StaticMultiSelectMenuIF
      Returns:
      The value of the initialOptions attribute
    • getConfirmationDialog

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

      public final StaticMultiSelectMenu 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 StaticMultiSelectMenu 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
    • withOptions

      public final StaticMultiSelectMenu withOptions(Option... elements)
      Copy the current immutable object with elements that replace the content of options.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withOptions

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

      public final StaticMultiSelectMenu withOptionGroups(OptionGroup... elements)
      Copy the current immutable object with elements that replace the content of optionGroups.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withOptionGroups

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

      public final StaticMultiSelectMenu withInitialOptions(OptionOrOptionGroup... elements)
      Copy the current immutable object with elements that replace the content of initialOptions.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withInitialOptions

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

      public final StaticMultiSelectMenu 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 StaticMultiSelectMenu 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 StaticMultiSelectMenu 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, options, optionGroups, initialOptions, confirmationDialog.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static StaticMultiSelectMenu of(Text placeholder, String actionId, List<Option> options)
      Construct a new immutable StaticMultiSelectMenu instance.
      Parameters:
      placeholder - The value for the placeholder attribute
      actionId - The value for the actionId attribute
      options - The value for the options attribute
      Returns:
      An immutable StaticMultiSelectMenu instance
    • of

      public static StaticMultiSelectMenu of(Text placeholder, String actionId, Iterable<? extends Option> options)
      Construct a new immutable StaticMultiSelectMenu instance.
      Parameters:
      placeholder - The value for the placeholder attribute
      actionId - The value for the actionId attribute
      options - The value for the options attribute
      Returns:
      An immutable StaticMultiSelectMenu instance
    • copyOf

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

      public static StaticMultiSelectMenu.Builder builder()
      Creates a builder for StaticMultiSelectMenu.
       StaticMultiSelectMenu.builder()
          .setPlaceholder(com.hubspot.slack.client.models.blocks.objects.Text) // required placeholder
          .setActionId(String) // required actionId
          .addOptions|addAllOptions(com.hubspot.slack.client.models.blocks.objects.Option) // options elements
          .addOptionGroups|addAllOptionGroups(com.hubspot.slack.client.models.blocks.objects.OptionGroup) // optionGroups elements
          .addInitialOptions|addAllInitialOptions(com.hubspot.slack.client.models.blocks.objects.OptionOrOptionGroup) // initialOptions elements
          .setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optional confirmationDialog
          .build();
       
      Returns:
      A new StaticMultiSelectMenu builder