Class ConfirmationDialog

java.lang.Object
com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog
All Implemented Interfaces:
CompositionObject, ConfirmationDialogIF

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

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

  • Method Details

    • getTitle

      public Text getTitle()
      Specified by:
      getTitle in interface ConfirmationDialogIF
      Returns:
      The value of the title attribute
    • getText

      public Text getText()
      Specified by:
      getText in interface ConfirmationDialogIF
      Returns:
      The value of the text attribute
    • getConfirmButtonText

      public Text getConfirmButtonText()
      Specified by:
      getConfirmButtonText in interface ConfirmationDialogIF
      Returns:
      The value of the confirmButtonText attribute
    • getDenyButtonText

      public Text getDenyButtonText()
      Specified by:
      getDenyButtonText in interface ConfirmationDialogIF
      Returns:
      The value of the denyButtonText attribute
    • getStyle

      public Optional<Style> getStyle()
      Specified by:
      getStyle in interface ConfirmationDialogIF
      Returns:
      The value of the style attribute
    • withTitle

      public final ConfirmationDialog withTitle(Text value)
      Copy the current immutable object by setting a value for the title attribute. A shallow reference equality check is 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
    • withText

      public final ConfirmationDialog withText(Text value)
      Copy the current immutable object by setting a value for the text attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for text
      Returns:
      A modified copy or the this object
    • withConfirmButtonText

      public final ConfirmationDialog withConfirmButtonText(Text value)
      Copy the current immutable object by setting a value for the confirmButtonText attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for confirmButtonText
      Returns:
      A modified copy or the this object
    • withDenyButtonText

      public final ConfirmationDialog withDenyButtonText(Text value)
      Copy the current immutable object by setting a value for the denyButtonText attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for denyButtonText
      Returns:
      A modified copy or the this object
    • withStyle

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

      public final ConfirmationDialog withStyle(Optional<? extends Style> optional)
      Copy the current immutable object by setting an optional value for the style 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 style
      Returns:
      A modified copy or this if not changed
    • equals

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

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

      public static ConfirmationDialog of(Text title, Text text, Text confirmButtonText, Text denyButtonText)
      Construct a new immutable ConfirmationDialog instance.
      Parameters:
      title - The value for the title attribute
      text - The value for the text attribute
      confirmButtonText - The value for the confirmButtonText attribute
      denyButtonText - The value for the denyButtonText attribute
      Returns:
      An immutable ConfirmationDialog instance
    • copyOf

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

      public static ConfirmationDialog.Builder builder()
      Creates a builder for ConfirmationDialog.
       ConfirmationDialog.builder()
          .setTitle(com.hubspot.slack.client.models.blocks.objects.Text) // required title
          .setText(com.hubspot.slack.client.models.blocks.objects.Text) // required text
          .setConfirmButtonText(com.hubspot.slack.client.models.blocks.objects.Text) // required confirmButtonText
          .setDenyButtonText(com.hubspot.slack.client.models.blocks.objects.Text) // required denyButtonText
          .setStyle(Optional<com.hubspot.slack.client.models.blocks.Style>) // optional style
          .build();
       
      Returns:
      A new ConfirmationDialog builder