Interface AutoCompleteCallbackAction

All Superinterfaces:
InteractionCallbackAction<Void>, RestAction<Void>

public interface AutoCompleteCallbackAction extends InteractionCallbackAction<Void>
An InteractionCallbackAction that can be used to suggest auto-complete choices.
  • Method Details

    • getOptionType

      @Nonnull OptionType getOptionType()
      The OptionType of the choices you can suggest.
      Returns:
      The option type
    • addChoices

      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.
      Parameters:
      choices - The choice suggestions to present to the user
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
      • null is provided
      • More than 25 are added
      • Any of the choice names is empty or longer than 100
      • The option type is incompatible with the choice type
      • The numeric value of any of the choices is not between -9.007199254740991E15 and 9.007199254740991E15
      • The string value of any of the choices is empty or longer than 100
    • addChoices

      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.
      Parameters:
      choices - The choice suggestions to present to the user
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
      • null is provided
      • More than 25 are added
      • Any of the choice names is empty or longer than 100
      • The option type is incompatible with the choice type
      • The numeric value of any of the choices is not between -9.007199254740991E15 and 9.007199254740991E15
      • The string value of any of the choices is empty or longer than 100
    • addChoice

      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.
      Parameters:
      name - The choice name to show to the user, 1-100 characters
      value - The choice value, 1-100 characters
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
      • null is provided
      • More than 25 are added
      • The choice name is empty or longer than 100
      • The option type is not OptionType.STRING
      • The string value of any of the choices is empty or longer than 100
    • addChoice

      @Nonnull @CheckReturnValue default AutoCompleteCallbackAction addChoice(@Nonnull String name, long value)
      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.
      Parameters:
      name - The choice name to show to the user, 1-100 characters
      value - The choice value, must be between -9.007199254740991E15 and 9.007199254740991E15
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
    • addChoice

      @Nonnull @CheckReturnValue default AutoCompleteCallbackAction addChoice(@Nonnull String name, double value)
      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.
      Parameters:
      name - The choice name to show to the user, 1-100 characters
      value - The choice value, must be between -9.007199254740991E15 and 9.007199254740991E15
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
    • addChoiceStrings

      @Nonnull @CheckReturnValue default AutoCompleteCallbackAction addChoiceStrings(@Nonnull String... choices)
      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.

      The provided strings will be used as value and name for the Choices.

      Parameters:
      choices - The choice suggestions to present to the user, each limited to 100 characters
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
      • null is provided
      • More than 25 are added
      • Any of the choice names is empty or longer than 100
      • The string value of any of the choices is empty or longer than 100
    • addChoiceStrings

      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.

      The provided strings will be used as value and name for the Choices.

      Parameters:
      choices - The choice suggestions to present to the user, each limited to 100 characters
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
      • null is provided
      • More than 25 are added
      • Any of the choice names is empty or longer than 100
      • The string value of any of the choices is empty or longer than 100
    • addChoiceLongs

      @Nonnull @CheckReturnValue default AutoCompleteCallbackAction addChoiceLongs(@Nonnull long... choices)
      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.

      The string values of the provided longs will be used as value and name for the Choices.

      Parameters:
      choices - The choice suggestions to present to the user
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
    • addChoiceLongs

      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.

      The string values of the provided longs will be used as value and name for the Choices.

      Parameters:
      choices - The choice suggestions to present to the user
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
    • addChoiceDoubles

      @Nonnull @CheckReturnValue default AutoCompleteCallbackAction addChoiceDoubles(@Nonnull double... choices)
      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.

      The string values of the provided doubles will be used as value and name for the Choices.

      Parameters:
      choices - The choice suggestions to present to the user
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true:
    • addChoiceDoubles

      Add up to 25 choices which can be picked from by the user.
      The user may continue writing inputs instead of using one of your choices.

      The string values of the provided doubles will be used as value and name for the Choices.

      Parameters:
      choices - The choice suggestions to present to the user
      Returns:
      The same callback action, for chaining convenience
      Throws:
      IllegalArgumentException - If any of the following is true: