Class IconButtonElement
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.contextactionselements.IconButtonElement
- All Implemented Interfaces:
BlockElement,ContextActionsElement,IconButtonElementIF
@Generated(from="IconButtonElementIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class IconButtonElement
extends Object
implements IconButtonElementIF
Immutable implementation of
IconButtonElementIF.
Use the builder to create immutable instances:
IconButtonElement.builder().
Use the static factory method to create immutable instances:
IconButtonElement.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.contextactionselements.IconButtonElementIF
MAX_ACCESSIBILITY_LABEL_LENGTH, MAX_ACTION_ID_LENGTH, MAX_VALUE_LENGTH, TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic IconButtonElement.Builderbuilder()Creates a builder forIconButtonElement.static IconButtonElementcopyOf(IconButtonElementIF instance) Creates an immutable copy of aIconButtonElementIFvalue.booleanThis instance is equal to all instances ofIconButtonElementthat have equal attribute values.getIcon()getText()getType()getValue()com.google.common.collect.ImmutableList<String> inthashCode()Computes a hash code from attributes:type,icon,text,actionId,value,confirm,accessibilityLabel,visibleToUserIds.static IconButtonElementConstruct a new immutableIconButtonElementinstance.toString()Prints the immutable valueIconButtonElementwith attribute values.final IconButtonElementwithAccessibilityLabel(String value) Copy the current immutable object by setting a present value for the optionalaccessibilityLabelattribute.final IconButtonElementwithAccessibilityLabel(Optional<String> optional) Copy the current immutable object by setting an optional value for theaccessibilityLabelattribute.final IconButtonElementwithActionId(String value) Copy the current immutable object by setting a present value for the optionalactionIdattribute.final IconButtonElementwithActionId(Optional<String> optional) Copy the current immutable object by setting an optional value for theactionIdattribute.final IconButtonElementwithConfirm(ConfirmationDialog value) Copy the current immutable object by setting a present value for the optionalconfirmattribute.final IconButtonElementwithConfirm(Optional<? extends ConfirmationDialog> optional) Copy the current immutable object by setting an optional value for theconfirmattribute.final IconButtonElementCopy the current immutable object by setting a value for theiconattribute.final IconButtonElementCopy the current immutable object by setting a value for thetextattribute.final IconButtonElementCopy the current immutable object by setting a present value for the optionalvalueattribute.final IconButtonElementCopy the current immutable object by setting an optional value for thevalueattribute.final IconButtonElementwithVisibleToUserIds(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofvisibleToUserIds.final IconButtonElementwithVisibleToUserIds(String... elements) Copy the current immutable object with elements that replace the content ofvisibleToUserIds.Methods inherited from interface com.hubspot.slack.client.models.blocks.elements.contextactionselements.IconButtonElementIF
check
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceIconButtonElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getIcon
- Specified by:
getIconin interfaceIconButtonElementIF- Returns:
- The value of the
iconattribute
-
getText
- Specified by:
getTextin interfaceIconButtonElementIF- Returns:
- The value of the
textattribute
-
getActionId
- Specified by:
getActionIdin interfaceIconButtonElementIF- Returns:
- The value of the
actionIdattribute
-
getValue
- Specified by:
getValuein interfaceIconButtonElementIF- Returns:
- The value of the
valueattribute
-
getConfirm
- Specified by:
getConfirmin interfaceIconButtonElementIF- Returns:
- The value of the
confirmattribute
-
getAccessibilityLabel
- Specified by:
getAccessibilityLabelin interfaceIconButtonElementIF- Returns:
- The value of the
accessibilityLabelattribute
-
getVisibleToUserIds
- Specified by:
getVisibleToUserIdsin interfaceIconButtonElementIF- Returns:
- The value of the
visibleToUserIdsattribute
-
withIcon
Copy the current immutable object by setting a value for theiconattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for icon- Returns:
- A modified copy or the
thisobject
-
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
-
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
-
withValue
Copy the current immutable object by setting a present value for the optionalvalueattribute.- Parameters:
value- The value for value,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withValue
Copy the current immutable object by setting an optional value for thevalueattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for value- Returns:
- A modified copy or
thisif not changed
-
withConfirm
Copy the current immutable object by setting a present value for the optionalconfirmattribute.- Parameters:
value- The value for confirm,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withConfirm
Copy the current immutable object by setting an optional value for theconfirmattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for confirm- Returns:
- A modified copy or
thisif not changed
-
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
-
withVisibleToUserIds
Copy the current immutable object with elements that replace the content ofvisibleToUserIds.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withVisibleToUserIds
Copy the current immutable object with elements that replace the content ofvisibleToUserIds. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of visibleToUserIds elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofIconButtonElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,icon,text,actionId,value,confirm,accessibilityLabel,visibleToUserIds. -
toString
Prints the immutable valueIconButtonElementwith attribute values. -
of
Construct a new immutableIconButtonElementinstance.- Parameters:
icon- The value for theiconattributetext- The value for thetextattribute- Returns:
- An immutable IconButtonElement instance
-
copyOf
Creates an immutable copy of aIconButtonElementIFvalue. 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 IconButtonElement instance
-
builder
Creates a builder forIconButtonElement.IconButtonElement.builder() .setIcon(String) // requiredicon.setText(com.hubspot.slack.client.models.blocks.objects.Text) // requiredtext.setActionId(Optional<String>) // optionalactionId.setValue(Optional<String>) // optionalvalue.setConfirm(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optionalconfirm.setAccessibilityLabel(Optional<String>) // optionalaccessibilityLabel.addVisibleToUserIds|addAllVisibleToUserIds(String) //visibleToUserIdselements .build();- Returns:
- A new IconButtonElement builder
-