java.lang.Object
com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButtonsElement
All Implemented Interfaces:
BlockElement, ContextActionsElement, FeedbackButtonsElementIF

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

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

  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface BlockElement
      Specified by:
      getType in interface FeedbackButtonsElementIF
      Returns:
      The computed-at-construction value of the type attribute
    • getPositiveButton

      public FeedbackButton getPositiveButton()
      Specified by:
      getPositiveButton in interface FeedbackButtonsElementIF
      Returns:
      The value of the positiveButton attribute
    • getNegativeButton

      public FeedbackButton getNegativeButton()
      Specified by:
      getNegativeButton in interface FeedbackButtonsElementIF
      Returns:
      The value of the negativeButton attribute
    • getActionId

      public Optional<String> getActionId()
      Specified by:
      getActionId in interface FeedbackButtonsElementIF
      Returns:
      The value of the actionId attribute
    • withPositiveButton

      public final FeedbackButtonsElement withPositiveButton(FeedbackButton value)
      Copy the current immutable object by setting a value for the positiveButton attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for positiveButton
      Returns:
      A modified copy or the this object
    • withNegativeButton

      public final FeedbackButtonsElement withNegativeButton(FeedbackButton value)
      Copy the current immutable object by setting a value for the negativeButton attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for negativeButton
      Returns:
      A modified copy or the this object
    • withActionId

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

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

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

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

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

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

      public static FeedbackButtonsElement.Builder builder()
      Creates a builder for FeedbackButtonsElement.
       FeedbackButtonsElement.builder()
          .setPositiveButton(com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButton) // required positiveButton
          .setNegativeButton(com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButton) // required negativeButton
          .setActionId(Optional<String>) // optional actionId
          .build();
       
      Returns:
      A new FeedbackButtonsElement builder