Class SlackFormTextareaElement

All Implemented Interfaces:
HasLabel

@Generated(from="AbstractSlackFormTextareaElement", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class SlackFormTextareaElement extends AbstractSlackFormTextareaElement
Immutable implementation of AbstractSlackFormTextareaElement.

Use the builder to create immutable instances: SlackFormTextareaElement.builder().

  • Method Details

    • getLabel

      public String getLabel()
      Returns:
      The value of the label attribute
    • getName

      public String getName()
      Specified by:
      getName in class SlackDialogFormElement
      Returns:
      The value of the name attribute
    • getPlaceholder

      public Optional<String> getPlaceholder()
      Specified by:
      getPlaceholder in class SlackDialogFormElement
      Returns:
      The value of the placeholder attribute
    • isOptional

      public Optional<Boolean> isOptional()
      Specified by:
      isOptional in class SlackDialogFormElement
      Returns:
      The value of the optional attribute
    • getSubtype

      public Optional<SlackFormElementSubtypes> getSubtype()
      Specified by:
      getSubtype in class AbstractSlackDialogFormTextElement
      Returns:
      The value of the subtype attribute
    • getHint

      public Optional<String> getHint()
      Specified by:
      getHint in class AbstractSlackDialogFormTextElement
      Returns:
      The value of the hint attribute
    • getMinLength

      public int getMinLength()
      Overrides:
      getMinLength in class AbstractSlackDialogFormTextElement
      Returns:
      The value of the minLength attribute
    • getMaxLength

      public int getMaxLength()
      Overrides:
      getMaxLength in class AbstractSlackDialogFormTextElement
      Returns:
      The value of the maxLength attribute
    • getValue

      public Optional<String> getValue()
      Specified by:
      getValue in class AbstractSlackDialogFormTextElement
      Returns:
      The value of the value attribute
    • getType

      public SlackFormElementTypes getType()
      Overrides:
      getType in class AbstractSlackFormTextareaElement
      Returns:
      The value of the type attribute
    • withLabel

      public final SlackFormTextareaElement withLabel(String value)
      Copy the current immutable object by setting a value for the label attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for label
      Returns:
      A modified copy or the this object
    • withName

      public final SlackFormTextareaElement withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy or the this object
    • withPlaceholder

      public final SlackFormTextareaElement withPlaceholder(@Nullable String 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 SlackFormTextareaElement withPlaceholder(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the placeholder 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 placeholder
      Returns:
      A modified copy or this if not changed
    • withOptional

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

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

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

      public final SlackFormTextareaElement withSubtype(Optional<? extends SlackFormElementSubtypes> optional)
      Copy the current immutable object by setting an optional value for the subtype 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 subtype
      Returns:
      A modified copy or this if not changed
    • withHint

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

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

      public final SlackFormTextareaElement withMinLength(int value)
      Copy the current immutable object by setting a value for the minLength attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minLength
      Returns:
      A modified copy or the this object
    • withMaxLength

      public final SlackFormTextareaElement withMaxLength(int value)
      Copy the current immutable object by setting a value for the maxLength attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maxLength
      Returns:
      A modified copy or the this object
    • withValue

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

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

      public final SlackFormTextareaElement withType(SlackFormElementTypes value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlackFormTextareaElement 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: label, name, placeholder, optional, subtype, hint, minLength, maxLength, value, type.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a AbstractSlackFormTextareaElement 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 SlackFormTextareaElement instance
    • builder

      public static SlackFormTextareaElement.Builder builder()
      Creates a builder for SlackFormTextareaElement.
       SlackFormTextareaElement.builder()
          .setLabel(String) // required label
          .setName(String) // required name
          .setPlaceholder(Optional<String>) // optional placeholder
          .setOptional(Optional<Boolean>) // optional optional
          .setSubtype(Optional<com.hubspot.slack.client.models.dialog.form.SlackFormElementSubtypes>) // optional subtype
          .setHint(Optional<String>) // optional hint
          .setMinLength(int) // optional minLength
          .setMaxLength(int) // optional maxLength
          .setValue(Optional<String>) // optional value
          .setType(com.hubspot.slack.client.models.dialog.form.SlackFormElementTypes) // optional type
          .build();
       
      Returns:
      A new SlackFormTextareaElement builder