Class FeedbackButton
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().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButtonIF
MAX_ACCESSIBILITY_LABEL_LENGTH, MAX_TEXT_LENGTH, MAX_VALUE_LENGTH -
Method Summary
Modifier and TypeMethodDescriptionstatic FeedbackButton.Builderbuilder()Creates a builder forFeedbackButton.static FeedbackButtoncopyOf(FeedbackButtonIF instance) Creates an immutable copy of aFeedbackButtonIFvalue.booleanThis instance is equal to all instances ofFeedbackButtonthat have equal attribute values.getText()getValue()inthashCode()Computes a hash code from attributes:text,value,accessibilityLabel.static FeedbackButtonConstruct a new immutableFeedbackButtoninstance.toString()Prints the immutable valueFeedbackButtonwith attribute values.final FeedbackButtonwithAccessibilityLabel(String value) Copy the current immutable object by setting a present value for the optionalaccessibilityLabelattribute.final FeedbackButtonwithAccessibilityLabel(Optional<String> optional) Copy the current immutable object by setting an optional value for theaccessibilityLabelattribute.final FeedbackButtonCopy the current immutable object by setting a value for thetextattribute.final FeedbackButtonCopy the current immutable object by setting a value for thevalueattribute.Methods inherited from interface com.hubspot.slack.client.models.blocks.elements.contextactionselements.FeedbackButtonIF
check
-
Method Details
-
getText
- Specified by:
getTextin interfaceFeedbackButtonIF- Returns:
- The value of the
textattribute
-
getValue
- Specified by:
getValuein interfaceFeedbackButtonIF- Returns:
- The value of the
valueattribute
-
getAccessibilityLabel
- Specified by:
getAccessibilityLabelin interfaceFeedbackButtonIF- Returns:
- The value of the
accessibilityLabelattribute
-
withText
Copy the current immutable object by setting a value for thetextattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy or the
thisobject
-
withAccessibilityLabel
Copy the current immutable object by setting a present value for the optionalaccessibilityLabelattribute.- Parameters:
value- The value for accessibilityLabel,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withAccessibilityLabel
Copy the current immutable object by setting an optional value for theaccessibilityLabelattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for accessibilityLabel- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofFeedbackButtonthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:text,value,accessibilityLabel. -
toString
Prints the immutable valueFeedbackButtonwith attribute values. -
of
Construct a new immutableFeedbackButtoninstance.- Parameters:
text- The value for thetextattributevalue- The value for thevalueattribute- Returns:
- An immutable FeedbackButton instance
-
copyOf
Creates an immutable copy of aFeedbackButtonIFvalue. 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
Creates a builder forFeedbackButton.FeedbackButton.builder() .setText(com.hubspot.slack.client.models.blocks.objects.Text) // requiredtext.setValue(String) // requiredvalue.setAccessibilityLabel(Optional<String>) // optionalaccessibilityLabel.build();- Returns:
- A new FeedbackButton builder
-