Class FeedbackButtonsElement
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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeFeedbackButtonsElement. -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButtonsElementIF
MAX_ACTION_ID_LENGTH, TYPE -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forFeedbackButtonsElement.static FeedbackButtonsElementcopyOf(FeedbackButtonsElementIF instance) Creates an immutable copy of aFeedbackButtonsElementIFvalue.booleanThis instance is equal to all instances ofFeedbackButtonsElementthat have equal attribute values.getType()inthashCode()Computes a hash code from attributes:type,positiveButton,negativeButton,actionId.static FeedbackButtonsElementof(FeedbackButton positiveButton, FeedbackButton negativeButton) Construct a new immutableFeedbackButtonsElementinstance.toString()Prints the immutable valueFeedbackButtonsElementwith attribute values.final FeedbackButtonsElementwithActionId(String value) Copy the current immutable object by setting a present value for the optionalactionIdattribute.final FeedbackButtonsElementwithActionId(Optional<String> optional) Copy the current immutable object by setting an optional value for theactionIdattribute.final FeedbackButtonsElementwithNegativeButton(FeedbackButton value) Copy the current immutable object by setting a value for thenegativeButtonattribute.final FeedbackButtonsElementwithPositiveButton(FeedbackButton value) Copy the current immutable object by setting a value for thepositiveButtonattribute.Methods inherited from interface com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButtonsElementIF
check
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceFeedbackButtonsElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getPositiveButton
- Specified by:
getPositiveButtonin interfaceFeedbackButtonsElementIF- Returns:
- The value of the
positiveButtonattribute
-
getNegativeButton
- Specified by:
getNegativeButtonin interfaceFeedbackButtonsElementIF- Returns:
- The value of the
negativeButtonattribute
-
getActionId
- Specified by:
getActionIdin interfaceFeedbackButtonsElementIF- Returns:
- The value of the
actionIdattribute
-
withPositiveButton
Copy the current immutable object by setting a value for thepositiveButtonattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for positiveButton- Returns:
- A modified copy or the
thisobject
-
withNegativeButton
Copy the current immutable object by setting a value for thenegativeButtonattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for negativeButton- Returns:
- A modified copy or the
thisobject
-
withActionId
Copy the current immutable object by setting a present value for the optionalactionIdattribute.- Parameters:
value- The value for actionId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withActionId
Copy the current immutable object by setting an optional value for theactionIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for actionId- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofFeedbackButtonsElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,positiveButton,negativeButton,actionId. -
toString
Prints the immutable valueFeedbackButtonsElementwith attribute values. -
of
public static FeedbackButtonsElement of(FeedbackButton positiveButton, FeedbackButton negativeButton) Construct a new immutableFeedbackButtonsElementinstance.- Parameters:
positiveButton- The value for thepositiveButtonattributenegativeButton- The value for thenegativeButtonattribute- Returns:
- An immutable FeedbackButtonsElement instance
-
copyOf
Creates an immutable copy of aFeedbackButtonsElementIFvalue. 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
Creates a builder forFeedbackButtonsElement.FeedbackButtonsElement.builder() .setPositiveButton(com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButton) // requiredpositiveButton.setNegativeButton(com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButton) // requirednegativeButton.setActionId(Optional<String>) // optionalactionId.build();- Returns:
- A new FeedbackButtonsElement builder
-