java.lang.Object
com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButton
All Implemented Interfaces:
FeedbackButtonIF

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

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

  • Method Details

    • getText

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

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

      public Optional<String> getAccessibilityLabel()
      Specified by:
      getAccessibilityLabel in interface FeedbackButtonIF
      Returns:
      The value of the accessibilityLabel attribute
    • withText

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

      public final FeedbackButton 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
    • withAccessibilityLabel

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

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

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

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

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

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

      public static FeedbackButton.Builder builder()
      Creates a builder for FeedbackButton.
       FeedbackButton.builder()
          .setText(com.hubspot.slack.client.models.blocks.objects.Text) // required text
          .setValue(String) // required value
          .setAccessibilityLabel(Optional<String>) // optional accessibilityLabel
          .build();
       
      Returns:
      A new FeedbackButton builder