Class SlackEventBotMessage
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessageBase
com.hubspot.slack.client.models.events.AbstractSlackEventBotMessage
com.hubspot.slack.client.models.events.SlackEventBotMessage
- All Implemented Interfaces:
HasChannel,SlackEvent
@Generated(from="AbstractSlackEventBotMessage",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackEventBotMessage
extends AbstractSlackEventBotMessage
Immutable implementation of
AbstractSlackEventBotMessage.
Use the builder to create immutable instances:
SlackEventBotMessage.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeSlackEventBotMessage. -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackEventBotMessage.Builderbuilder()Creates a builder forSlackEventBotMessage.static SlackEventBotMessagecopyOf(AbstractSlackEventBotMessage instance) Creates an immutable copy of aAbstractSlackEventBotMessagevalue.booleanThis instance is equal to all instances ofSlackEventBotMessagethat have equal attribute values.getBotId()getText()getTs()getType()inthashCode()Computes a hash code from attributes:type,ts,subtype,channelId,threadTs,text,attachments,botId,blocks.toString()Prints the immutable valueSlackEventBotMessagewith attribute values.final SlackEventBotMessagewithAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventBotMessagewithAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventBotMessagewithBlocks(Block... elements) Copy the current immutable object with elements that replace the content ofblocks.final SlackEventBotMessagewithBlocks(Iterable<? extends Block> elements) Copy the current immutable object with elements that replace the content ofblocks.final SlackEventBotMessageCopy the current immutable object by setting a value for thebotIdattribute.final SlackEventBotMessagewithChannelId(String value) Copy the current immutable object by setting a value for thechannelIdattribute.final SlackEventBotMessagewithSubtype(SlackMessageSubtype value) Copy the current immutable object by setting a present value for the optionalsubtypeattribute.final SlackEventBotMessagewithSubtype(Optional<? extends SlackMessageSubtype> optional) Copy the current immutable object by setting an optional value for thesubtypeattribute.final SlackEventBotMessageCopy the current immutable object by setting a present value for the optionaltextattribute.final SlackEventBotMessageCopy the current immutable object by setting an optional value for thetextattribute.final SlackEventBotMessagewithThreadTs(String value) Copy the current immutable object by setting a present value for the optionalthreadTsattribute.final SlackEventBotMessagewithThreadTs(Optional<String> optional) Copy the current immutable object by setting an optional value for thethreadTsattribute.final SlackEventBotMessageCopy the current immutable object by setting a value for thetsattribute.final SlackEventBotMessagewithType(SlackEventType value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getType
- Returns:
- The value of the
typeattribute
-
getTs
- Returns:
- The value of the
tsattribute
-
getSubtype
- Specified by:
getSubtypein classSlackEventMessageBase- Returns:
- The value of the
subtypeattribute
-
getChannelId
- Specified by:
getChannelIdin interfaceHasChannel- Specified by:
getChannelIdin classAbstractSlackEventBotMessage- Returns:
- The value of the
channelIdattribute
-
getThreadTs
- Specified by:
getThreadTsin classAbstractSlackEventBotMessage- Returns:
- The value of the
threadTsattribute
-
getText
- Specified by:
getTextin classAbstractSlackEventBotMessage- Returns:
- The value of the
textattribute
-
getAttachments
- Specified by:
getAttachmentsin classAbstractSlackEventBotMessage- Returns:
- The value of the
attachmentsattribute
-
getBotId
- Specified by:
getBotIdin classAbstractSlackEventBotMessage- Returns:
- The value of the
botIdattribute
-
getBlocks
- Specified by:
getBlocksin classAbstractSlackEventBotMessage- Returns:
- The value of the
blocksattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withTs
Copy the current immutable object by setting a value for thetsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ts- Returns:
- A modified copy or the
thisobject
-
withSubtype
Copy the current immutable object by setting a present value for the optionalsubtypeattribute.- Parameters:
value- The value for subtype,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withSubtype
Copy the current immutable object by setting an optional value for thesubtypeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for subtype- Returns:
- A modified copy or
thisif not changed
-
withChannelId
Copy the current immutable object by setting a value for thechannelIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for channelId- Returns:
- A modified copy or the
thisobject
-
withThreadTs
Copy the current immutable object by setting a present value for the optionalthreadTsattribute.- Parameters:
value- The value for threadTs,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withThreadTs
Copy the current immutable object by setting an optional value for thethreadTsattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for threadTs- Returns:
- A modified copy or
thisif not changed
-
withText
Copy the current immutable object by setting a present value for the optionaltextattribute.- Parameters:
value- The value for text,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withText
Copy the current immutable object by setting an optional value for thetextattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for text- Returns:
- A modified copy or
thisif not changed
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of attachments elements to set- Returns:
- A modified copy or
thisif not changed
-
withBotId
Copy the current immutable object by setting a value for thebotIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for botId- Returns:
- A modified copy or the
thisobject
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of blocks elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackEventBotMessagethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,ts,subtype,channelId,threadTs,text,attachments,botId,blocks. -
toString
Prints the immutable valueSlackEventBotMessagewith attribute values. -
copyOf
Creates an immutable copy of aAbstractSlackEventBotMessagevalue. 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 SlackEventBotMessage instance
-
builder
Creates a builder forSlackEventBotMessage.SlackEventBotMessage.builder() .setType(com.hubspot.slack.client.models.events.SlackEventType) // requiredtype.setTs(String) // requiredts.setSubtype(Optional<com.hubspot.slack.client.models.events.SlackMessageSubtype>) // optionalsubtype.setChannelId(String) // requiredchannelId.setThreadTs(Optional<String>) // optionalthreadTs.setText(Optional<String>) // optionaltext.addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) //attachmentselements .setBotId(String) // requiredbotId.addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) //blockselements .build();- Returns:
- A new SlackEventBotMessage builder
-