Class SlackEventMessage
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessageBase
com.hubspot.slack.client.models.events.AbstractSlackEventMessage
com.hubspot.slack.client.models.events.SlackEventMessage
- All Implemented Interfaces:
HasChannel,HasEdited,HasUser,SlackEvent
@Generated(from="AbstractSlackEventMessage",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackEventMessage
extends AbstractSlackEventMessage
Immutable implementation of
AbstractSlackEventMessage.
Use the builder to create immutable instances:
SlackEventMessage.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackEventMessage.Builderbuilder()Creates a builder forSlackEventMessage.static SlackEventMessagecopyOf(AbstractSlackEventMessage instance) Creates an immutable copy of aAbstractSlackEventMessagevalue.booleanThis instance is equal to all instances ofSlackEventMessagethat have equal attribute values.getBotId()getFiles()getText()getTs()getType()inthashCode()Computes a hash code from attributes:edited,type,ts,subtype,attachments,channelId,threadTs,botId,userId,text,files.toString()Prints the immutable valueSlackEventMessagewith attribute values.final SlackEventMessagewithAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventMessagewithAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventMessageCopy the current immutable object by setting a present value for the optionalbotIdattribute.final SlackEventMessageCopy the current immutable object by setting an optional value for thebotIdattribute.final SlackEventMessagewithChannelId(String value) Copy the current immutable object by setting a value for thechannelIdattribute.final SlackEventMessagewithEdited(MessageEdited value) Copy the current immutable object by setting a present value for the optionaleditedattribute.final SlackEventMessagewithEdited(Optional<? extends MessageEdited> optional) Copy the current immutable object by setting an optional value for theeditedattribute.final SlackEventMessageCopy the current immutable object with elements that replace the content offiles.final SlackEventMessageCopy the current immutable object with elements that replace the content offiles.final SlackEventMessagewithSubtype(SlackMessageSubtype value) Copy the current immutable object by setting a present value for the optionalsubtypeattribute.final SlackEventMessagewithSubtype(Optional<? extends SlackMessageSubtype> optional) Copy the current immutable object by setting an optional value for thesubtypeattribute.final SlackEventMessageCopy the current immutable object by setting a value for thetextattribute.final SlackEventMessagewithThreadTs(String value) Copy the current immutable object by setting a present value for the optionalthreadTsattribute.final SlackEventMessagewithThreadTs(Optional<String> optional) Copy the current immutable object by setting an optional value for thethreadTsattribute.final SlackEventMessageCopy the current immutable object by setting a value for thetsattribute.final SlackEventMessagewithType(SlackEventType value) Copy the current immutable object by setting a value for thetypeattribute.final SlackEventMessagewithUserId(String value) Copy the current immutable object by setting a value for theuserIdattribute.
-
Method Details
-
getEdited
- Returns:
- The value of the
editedattribute
-
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
-
getAttachments
- Specified by:
getAttachmentsin classSlackEventMessageBase- Returns:
- The value of the
attachmentsattribute
-
getChannelId
- Specified by:
getChannelIdin interfaceHasChannel- Specified by:
getChannelIdin classAbstractSlackEventMessage- Returns:
- The value of the
channelIdattribute
-
getThreadTs
- Specified by:
getThreadTsin classAbstractSlackEventMessage- Returns:
- The value of the
threadTsattribute
-
getBotId
- Specified by:
getBotIdin classAbstractSlackEventMessage- Returns:
- The value of the
botIdattribute
-
getUserId
- Specified by:
getUserIdin interfaceHasUser- Specified by:
getUserIdin classAbstractSlackEventMessage- Returns:
- The value of the
userIdattribute
-
getText
- Specified by:
getTextin classAbstractSlackEventMessage- Returns:
- The value of the
textattribute
-
getFiles
- Specified by:
getFilesin classAbstractSlackEventMessage- Returns:
- The value of the
filesattribute
-
withEdited
Copy the current immutable object by setting a present value for the optionaleditedattribute.- Parameters:
value- The value for edited,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withEdited
Copy the current immutable object by setting an optional value for theeditedattribute. 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 edited- Returns:
- A modified copy or
thisif not changed
-
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
-
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
-
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
-
withBotId
Copy the current immutable object by setting a present value for the optionalbotIdattribute.- Parameters:
value- The value for botId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBotId
Copy the current immutable object by setting an optional value for thebotIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for botId- Returns:
- A modified copy or
thisif not changed
-
withUserId
Copy the current immutable object by setting a value for theuserIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userId- Returns:
- A modified copy or the
thisobject
-
withText
Copy the current immutable object by setting a value for thetextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
withFiles
Copy the current immutable object with elements that replace the content offiles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withFiles
Copy the current immutable object with elements that replace the content offiles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of files elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackEventMessagethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:edited,type,ts,subtype,attachments,channelId,threadTs,botId,userId,text,files. -
toString
Prints the immutable valueSlackEventMessagewith attribute values. -
copyOf
Creates an immutable copy of aAbstractSlackEventMessagevalue. 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 SlackEventMessage instance
-
builder
Creates a builder forSlackEventMessage.SlackEventMessage.builder() .setEdited(Optional<com.hubspot.slack.client.models.events.MessageEdited>) // optionaledited.setType(com.hubspot.slack.client.models.events.SlackEventType) // requiredtype.setTs(String) // requiredts.setSubtype(Optional<com.hubspot.slack.client.models.events.SlackMessageSubtype>) // optionalsubtype.addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) //attachmentselements .setChannelId(String) // requiredchannelId.setThreadTs(Optional<String>) // optionalthreadTs.setBotId(Optional<String>) // optionalbotId.setUserId(String) // requireduserId.setText(String) // requiredtext.addFiles|addAllFiles(com.hubspot.slack.client.models.files.SlackFile) //fileselements .build();- Returns:
- A new SlackEventMessage builder
-