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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newFeedbackButtonsElement.from(FeedbackButtonsElementIF instance) Fill a builder with attribute values from the providedFeedbackButtonsElementIFinstance.setActionId(String actionId) Initializes the optional valueactionIdto actionId.setActionId(Optional<String> actionId) Initializes the optional valueactionIdto actionId.setNegativeButton(FeedbackButton negativeButton) Initializes the value for thenegativeButtonattribute.setPositiveButton(FeedbackButton positiveButton) Initializes the value for thepositiveButtonattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedFeedbackButtonsElementIFinstance. 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:
thisbuilder for use in a chained invocation
-
setPositiveButton
Initializes the value for thepositiveButtonattribute.- Parameters:
positiveButton- The value for positiveButton- Returns:
thisbuilder for use in a chained invocation
-
setNegativeButton
Initializes the value for thenegativeButtonattribute.- Parameters:
negativeButton- The value for negativeButton- Returns:
thisbuilder for use in a chained invocation
-
setActionId
Initializes the optional valueactionIdto actionId.- Parameters:
actionId- The value for actionId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setActionId
Initializes the optional valueactionIdto actionId.- Parameters:
actionId- The value for actionId- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newFeedbackButtonsElement.- Returns:
- An immutable instance of FeedbackButtonsElement
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-