Class FeedbackButtonsElement.Builder

java.lang.Object
com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButtonsElement.Builder
Enclosing class:
FeedbackButtonsElement

@Generated(from="FeedbackButtonsElementIF", generator="Immutables") @NotThreadSafe public static final class FeedbackButtonsElement.Builder extends Object
Builds instances of type FeedbackButtonsElement. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      Fill a builder with attribute values from the provided FeedbackButtonsElementIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setPositiveButton

      public final FeedbackButtonsElement.Builder setPositiveButton(FeedbackButton positiveButton)
      Initializes the value for the positiveButton attribute.
      Parameters:
      positiveButton - The value for positiveButton
      Returns:
      this builder for use in a chained invocation
    • setNegativeButton

      public final FeedbackButtonsElement.Builder setNegativeButton(FeedbackButton negativeButton)
      Initializes the value for the negativeButton attribute.
      Parameters:
      negativeButton - The value for negativeButton
      Returns:
      this builder for use in a chained invocation
    • setActionId

      public final FeedbackButtonsElement.Builder setActionId(@Nullable String actionId)
      Initializes the optional value actionId to actionId.
      Parameters:
      actionId - The value for actionId, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setActionId

      public final FeedbackButtonsElement.Builder setActionId(Optional<String> actionId)
      Initializes the optional value actionId to actionId.
      Parameters:
      actionId - The value for actionId
      Returns:
      this builder for use in a chained invocation
    • build

      public FeedbackButtonsElement build()
      Returns:
      An immutable instance of FeedbackButtonsElement
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing