java.lang.Object
com.hubspot.slack.client.models.dialog.form.elements.SlackFormOption
All Implemented Interfaces:
HasLabel, SlackFormOptionIF

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

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

  • Method Details

    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface HasLabel
      Returns:
      The value of the label attribute
    • getValue

      public String getValue()
      Specified by:
      getValue in interface SlackFormOptionIF
      Returns:
      The value of the value attribute
    • withLabel

      public final SlackFormOption 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
    • withValue

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

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

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

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

      public static SlackFormOption.Builder builder()
      Creates a builder for SlackFormOption.
       SlackFormOption.builder()
          .setLabel(String) // required label
          .setValue(String) // required value
          .build();
       
      Returns:
      A new SlackFormOption builder