Class ConversationSelectMenu

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

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

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

  • Method Details

    • getType

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

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

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

      public Optional<String> getInitialConversationId()
      Specified by:
      getInitialConversationId in interface ConversationSelectMenuIF
      Returns:
      The value of the initialConversationId attribute
    • getConfirmationDialog

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

      public boolean getResponseUrlEnabled()
      Specified by:
      getResponseUrlEnabled in interface ConversationSelectMenuIF
      Returns:
      The computed-at-construction value of the responseUrlEnabled attribute
    • getDefaultToCurrentConversation

      public boolean getDefaultToCurrentConversation()
      Specified by:
      getDefaultToCurrentConversation in interface ConversationSelectMenuIF
      Returns:
      The computed-at-construction value of the defaultToCurrentConversation attribute
    • withPlaceholder

      public final ConversationSelectMenu 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 ConversationSelectMenu 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
    • withInitialConversationId

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

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

      public final ConversationSelectMenu 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 ConversationSelectMenu 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 ConversationSelectMenu 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, initialConversationId, confirmationDialog, responseUrlEnabled, defaultToCurrentConversation.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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

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