Class SlackDialog

java.lang.Object
com.hubspot.slack.client.models.dialog.SlackDialog
All Implemented Interfaces:
SlackDialogIF

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

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

  • Method Details

    • getTitle

      public String getTitle()
      Specified by:
      getTitle in interface SlackDialogIF
      Returns:
      The value of the title attribute
    • getCallbackId

      public String getCallbackId()
      Specified by:
      getCallbackId in interface SlackDialogIF
      Returns:
      The value of the callbackId attribute
    • getElements

      public List<SlackDialogFormElement> getElements()
      Specified by:
      getElements in interface SlackDialogIF
      Returns:
      The value of the elements attribute
    • getState

      public Optional<String> getState()
      Specified by:
      getState in interface SlackDialogIF
      Returns:
      The value of the state attribute
    • getSubmitLabel

      public Optional<String> getSubmitLabel()
      Specified by:
      getSubmitLabel in interface SlackDialogIF
      Returns:
      The value of the submitLabel attribute
    • getNotifyOnCancel

      public Optional<Boolean> getNotifyOnCancel()
      Specified by:
      getNotifyOnCancel in interface SlackDialogIF
      Returns:
      The value of the notifyOnCancel attribute
    • withTitle

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static SlackDialog.Builder builder()
      Creates a builder for SlackDialog.
       SlackDialog.builder()
          .setTitle(String) // required title
          .setCallbackId(String) // required callbackId
          .addElements|addAllElements(com.hubspot.slack.client.models.dialog.form.elements.SlackDialogFormElement) // elements elements
          .setState(Optional<String>) // optional state
          .setSubmitLabel(Optional<String>) // optional submitLabel
          .setNotifyOnCancel(Optional<Boolean>) // optional notifyOnCancel
          .build();
       
      Returns:
      A new SlackDialog builder