Class SlackEventMessageIm
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessageBase
com.hubspot.slack.client.models.events.AbstractSlackEventMessageIm
com.hubspot.slack.client.models.events.SlackEventMessageIm
- All Implemented Interfaces:
HasChannel,HasUser,SlackEvent
@Generated(from="AbstractSlackEventMessageIm",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackEventMessageIm
extends AbstractSlackEventMessageIm
Immutable implementation of
AbstractSlackEventMessageIm.
Use the builder to create immutable instances:
SlackEventMessageIm.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeSlackEventMessageIm. -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackEventMessageIm.Builderbuilder()Creates a builder forSlackEventMessageIm.static SlackEventMessageImcopyOf(AbstractSlackEventMessageIm instance) Creates an immutable copy of aAbstractSlackEventMessageImvalue.booleanThis instance is equal to all instances ofSlackEventMessageImthat have equal attribute values.getText()getTs()getType()inthashCode()Computes a hash code from attributes:type,ts,subtype,attachments,channelId,threadTs,text,userId.toString()Prints the immutable valueSlackEventMessageImwith attribute values.final SlackEventMessageImwithAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventMessageImwithAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventMessageImwithChannelId(String value) Copy the current immutable object by setting a value for thechannelIdattribute.final SlackEventMessageImwithSubtype(SlackMessageSubtype value) Copy the current immutable object by setting a present value for the optionalsubtypeattribute.final SlackEventMessageImwithSubtype(Optional<? extends SlackMessageSubtype> optional) Copy the current immutable object by setting an optional value for thesubtypeattribute.final SlackEventMessageImCopy the current immutable object by setting a value for thetextattribute.final SlackEventMessageImwithThreadTs(String value) Copy the current immutable object by setting a present value for the optionalthreadTsattribute.final SlackEventMessageImwithThreadTs(Optional<String> optional) Copy the current immutable object by setting an optional value for thethreadTsattribute.final SlackEventMessageImCopy the current immutable object by setting a value for thetsattribute.final SlackEventMessageImwithType(SlackEventType value) Copy the current immutable object by setting a value for thetypeattribute.final SlackEventMessageImwithUserId(String value) Copy the current immutable object by setting a value for theuserIdattribute.
-
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
-
getAttachments
- Specified by:
getAttachmentsin classSlackEventMessageBase- Returns:
- The value of the
attachmentsattribute
-
getChannelId
- Specified by:
getChannelIdin interfaceHasChannel- Specified by:
getChannelIdin classAbstractSlackEventMessageIm- Returns:
- The value of the
channelIdattribute
-
getThreadTs
- Specified by:
getThreadTsin classAbstractSlackEventMessageIm- Returns:
- The value of the
threadTsattribute
-
getText
- Specified by:
getTextin classAbstractSlackEventMessageIm- Returns:
- The value of the
textattribute
-
getUserId
- Specified by:
getUserIdin interfaceHasUser- Specified by:
getUserIdin classAbstractSlackEventMessageIm- Returns:
- The value of the
userIdattribute
-
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
-
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
-
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
-
equals
This instance is equal to all instances ofSlackEventMessageImthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,ts,subtype,attachments,channelId,threadTs,text,userId. -
toString
Prints the immutable valueSlackEventMessageImwith attribute values. -
copyOf
Creates an immutable copy of aAbstractSlackEventMessageImvalue. 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 SlackEventMessageIm instance
-
builder
Creates a builder forSlackEventMessageIm.SlackEventMessageIm.builder() .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.setText(String) // requiredtext.setUserId(String) // requireduserId.build();- Returns:
- A new SlackEventMessageIm builder
-