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

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

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

  • Method Details

    • getType

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

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

      public boolean isDecimalAllowed()
      Specified by:
      isDecimalAllowed in interface NumberInputIF
      Returns:
      The value of the decimalAllowed attribute
    • getPlaceholder

      public Optional<Text> getPlaceholder()
      Specified by:
      getPlaceholder in interface NumberInputIF
      Returns:
      The value of the placeholder attribute
    • getInitialValue

      public Optional<String> getInitialValue()
      Specified by:
      getInitialValue in interface NumberInputIF
      Returns:
      The value of the initialValue attribute
    • getMinValue

      public Optional<String> getMinValue()
      Specified by:
      getMinValue in interface NumberInputIF
      Returns:
      The value of the minValue attribute
    • getMaxValue

      public Optional<String> getMaxValue()
      Specified by:
      getMaxValue in interface NumberInputIF
      Returns:
      The value of the maxValue attribute
    • isFocusOnLoad

      public Optional<Boolean> isFocusOnLoad()
      Specified by:
      isFocusOnLoad in interface NumberInputIF
      Returns:
      The value of the focusOnLoad attribute
    • withActionId

      public final NumberInput 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
    • withDecimalAllowed

      public final NumberInput withDecimalAllowed(boolean value)
      Copy the current immutable object by setting a value for the decimalAllowed attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for decimalAllowed
      Returns:
      A modified copy or the this object
    • withPlaceholder

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

      public final NumberInput withPlaceholder(Optional<? extends Text> optional)
      Copy the current immutable object by setting an optional value for the placeholder 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 placeholder
      Returns:
      A modified copy or this if not changed
    • withInitialValue

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

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

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

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

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

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

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

      public final NumberInput withFocusOnLoad(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the focusOnLoad 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 focusOnLoad
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

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

      public static NumberInput.Builder builder()
      Creates a builder for NumberInput.
       NumberInput.builder()
          .setActionId(String) // required actionId
          .setDecimalAllowed(boolean) // required decimalAllowed
          .setPlaceholder(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optional placeholder
          .setInitialValue(Optional<String>) // optional initialValue
          .setMinValue(Optional<String>) // optional minValue
          .setMaxValue(Optional<String>) // optional maxValue
          .setFocusOnLoad(Optional<Boolean>) // optional focusOnLoad
          .build();
       
      Returns:
      A new NumberInput builder