Class ChannelSelectMenu
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.ChannelSelectMenu
- All Implemented Interfaces:
BlockElement,ChannelSelectMenuIF,HasActionId
@Generated(from="ChannelSelectMenuIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ChannelSelectMenu
extends Object
implements ChannelSelectMenuIF
Immutable implementation of
ChannelSelectMenuIF.
Use the builder to create immutable instances:
ChannelSelectMenu.builder().
Use the static factory method to create immutable instances:
ChannelSelectMenu.of().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.ChannelSelectMenuIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelSelectMenu.Builderbuilder()Creates a builder forChannelSelectMenu.static ChannelSelectMenucopyOf(ChannelSelectMenuIF instance) Creates an immutable copy of aChannelSelectMenuIFvalue.booleanThis instance is equal to all instances ofChannelSelectMenuthat have equal attribute values.getType()inthashCode()Computes a hash code from attributes:type,placeholder,actionId,initialChannelId,confirmationDialog.static ChannelSelectMenuConstruct a new immutableChannelSelectMenuinstance.toString()Prints the immutable valueChannelSelectMenuwith attribute values.final ChannelSelectMenuwithActionId(String value) Copy the current immutable object by setting a value for theactionIdattribute.final ChannelSelectMenuCopy the current immutable object by setting a present value for the optionalconfirmationDialogattribute.final ChannelSelectMenuwithConfirmationDialog(Optional<? extends ConfirmationDialog> optional) Copy the current immutable object by setting an optional value for theconfirmationDialogattribute.final ChannelSelectMenuwithInitialChannelId(String value) Copy the current immutable object by setting a present value for the optionalinitialChannelIdattribute.final ChannelSelectMenuwithInitialChannelId(Optional<String> optional) Copy the current immutable object by setting an optional value for theinitialChannelIdattribute.final ChannelSelectMenuwithPlaceholder(Text value) Copy the current immutable object by setting a value for theplaceholderattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceChannelSelectMenuIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getPlaceholder
- Specified by:
getPlaceholderin interfaceChannelSelectMenuIF- Returns:
- The value of the
placeholderattribute
-
getActionId
- Specified by:
getActionIdin interfaceChannelSelectMenuIF- Specified by:
getActionIdin interfaceHasActionId- Returns:
- The value of the
actionIdattribute
-
getInitialChannelId
- Specified by:
getInitialChannelIdin interfaceChannelSelectMenuIF- Returns:
- The value of the
initialChannelIdattribute
-
getConfirmationDialog
- Specified by:
getConfirmationDialogin interfaceChannelSelectMenuIF- Returns:
- The value of the
confirmationDialogattribute
-
withPlaceholder
Copy the current immutable object by setting a value for theplaceholderattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for placeholder- Returns:
- A modified copy or the
thisobject
-
withActionId
Copy the current immutable object by setting a value for theactionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for actionId- Returns:
- A modified copy or the
thisobject
-
withInitialChannelId
Copy the current immutable object by setting a present value for the optionalinitialChannelIdattribute.- Parameters:
value- The value for initialChannelId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withInitialChannelId
Copy the current immutable object by setting an optional value for theinitialChannelIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for initialChannelId- Returns:
- A modified copy or
thisif not changed
-
withConfirmationDialog
Copy the current immutable object by setting a present value for the optionalconfirmationDialogattribute.- Parameters:
value- The value for confirmationDialog,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withConfirmationDialog
public final ChannelSelectMenu withConfirmationDialog(Optional<? extends ConfirmationDialog> optional) Copy the current immutable object by setting an optional value for theconfirmationDialogattribute. 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 confirmationDialog- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofChannelSelectMenuthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,placeholder,actionId,initialChannelId,confirmationDialog. -
toString
Prints the immutable valueChannelSelectMenuwith attribute values. -
of
Construct a new immutableChannelSelectMenuinstance.- Parameters:
placeholder- The value for theplaceholderattributeactionId- The value for theactionIdattribute- Returns:
- An immutable ChannelSelectMenu instance
-
copyOf
Creates an immutable copy of aChannelSelectMenuIFvalue. 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 ChannelSelectMenu instance
-
builder
Creates a builder forChannelSelectMenu.ChannelSelectMenu.builder() .setPlaceholder(com.hubspot.slack.client.models.blocks.objects.Text) // requiredplaceholder.setActionId(String) // requiredactionId.setInitialChannelId(Optional<String>) // optionalinitialChannelId.setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optionalconfirmationDialog.build();- Returns:
- A new ChannelSelectMenu builder
-