Class SlackFormOptionGroup

java.lang.Object
com.hubspot.slack.client.models.dialog.form.elements.SlackFormOptionGroup
All Implemented Interfaces:
HasLabel, HasOptions, SlackFormOptionGroupIF

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

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

  • Method Details

    • getLabel

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

      public List<SlackFormOption> getOptions()
      Specified by:
      getOptions in interface HasOptions
      Returns:
      The value of the options attribute
    • withLabel

      public final SlackFormOptionGroup 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
    • withOptions

      public final SlackFormOptionGroup withOptions(SlackFormOption... elements)
      Copy the current immutable object with elements that replace the content of options.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withOptions

      public final SlackFormOptionGroup withOptions(Iterable<? extends SlackFormOption> elements)
      Copy the current immutable object with elements that replace the content of options. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of options elements to set
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

      public static SlackFormOptionGroup.Builder builder()
      Creates a builder for SlackFormOptionGroup.
       SlackFormOptionGroup.builder()
          .setLabel(String) // required label
          .addOptions|addAllOptions(SlackFormOption) // options elements
          .build();
       
      Returns:
      A new SlackFormOptionGroup builder