Class SlackEventMessageChanged
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventMessageBase
com.hubspot.slack.client.models.events.AbstractSlackEventMessageChanged
com.hubspot.slack.client.models.events.SlackEventMessageChanged
- All Implemented Interfaces:
HasChannel,SlackEvent
@Generated(from="AbstractSlackEventMessageChanged",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackEventMessageChanged
extends AbstractSlackEventMessageChanged
Immutable implementation of
AbstractSlackEventMessageChanged.
Use the builder to create immutable instances:
SlackEventMessageChanged.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeSlackEventMessageChanged. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forSlackEventMessageChanged.static SlackEventMessageChangedcopyOf(AbstractSlackEventMessageChanged instance) Creates an immutable copy of aAbstractSlackEventMessageChangedvalue.booleanThis instance is equal to all instances ofSlackEventMessageChangedthat have equal attribute values.getTs()getType()inthashCode()Computes a hash code from attributes:type,ts,subtype,attachments,channelId,hidden,message,previousMessage,eventTs.booleanisHidden()toString()Prints the immutable valueSlackEventMessageChangedwith attribute values.final SlackEventMessageChangedwithAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventMessageChangedwithAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.final SlackEventMessageChangedwithChannelId(String value) Copy the current immutable object by setting a value for thechannelIdattribute.final SlackEventMessageChangedwithEventTs(String value) Copy the current immutable object by setting a value for theeventTsattribute.final SlackEventMessageChangedwithHidden(boolean value) Copy the current immutable object by setting a value for thehiddenattribute.final SlackEventMessageChangedwithMessage(LiteMessage value) Copy the current immutable object by setting a value for themessageattribute.final SlackEventMessageChangedwithPreviousMessage(LiteMessage value) Copy the current immutable object by setting a present value for the optionalpreviousMessageattribute.final SlackEventMessageChangedwithPreviousMessage(Optional<? extends LiteMessage> optional) Copy the current immutable object by setting an optional value for thepreviousMessageattribute.final SlackEventMessageChangedwithSubtype(SlackMessageSubtype value) Copy the current immutable object by setting a present value for the optionalsubtypeattribute.final SlackEventMessageChangedwithSubtype(Optional<? extends SlackMessageSubtype> optional) Copy the current immutable object by setting an optional value for thesubtypeattribute.final SlackEventMessageChangedCopy the current immutable object by setting a value for thetsattribute.final SlackEventMessageChangedwithType(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
-
getAttachments
- Specified by:
getAttachmentsin classSlackEventMessageBase- Returns:
- The value of the
attachmentsattribute
-
getChannelId
- Specified by:
getChannelIdin interfaceHasChannel- Specified by:
getChannelIdin classAbstractSlackEventMessageChanged- Returns:
- The value of the
channelIdattribute
-
isHidden
public boolean isHidden()- Specified by:
isHiddenin classAbstractSlackEventMessageChanged- Returns:
- The value of the
hiddenattribute
-
getMessage
- Specified by:
getMessagein classAbstractSlackEventMessageChanged- Returns:
- The value of the
messageattribute
-
getPreviousMessage
- Specified by:
getPreviousMessagein classAbstractSlackEventMessageChanged- Returns:
- The value of the
previousMessageattribute
-
getEventTs
- Specified by:
getEventTsin classAbstractSlackEventMessageChanged- Returns:
- The value of the
eventTsattribute
-
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
-
withHidden
Copy the current immutable object by setting a value for thehiddenattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hidden- Returns:
- A modified copy or the
thisobject
-
withMessage
Copy the current immutable object by setting a value for themessageattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message- Returns:
- A modified copy or the
thisobject
-
withPreviousMessage
Copy the current immutable object by setting a present value for the optionalpreviousMessageattribute.- Parameters:
value- The value for previousMessage,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withPreviousMessage
Copy the current immutable object by setting an optional value for thepreviousMessageattribute. 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 previousMessage- Returns:
- A modified copy or
thisif not changed
-
withEventTs
Copy the current immutable object by setting a value for theeventTsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for eventTs- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofSlackEventMessageChangedthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,ts,subtype,attachments,channelId,hidden,message,previousMessage,eventTs. -
toString
Prints the immutable valueSlackEventMessageChangedwith attribute values. -
copyOf
Creates an immutable copy of aAbstractSlackEventMessageChangedvalue. 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 SlackEventMessageChanged instance
-
builder
Creates a builder forSlackEventMessageChanged.SlackEventMessageChanged.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.setHidden(boolean) // requiredhidden.setMessage(com.hubspot.slack.client.models.LiteMessage) // requiredmessage.setPreviousMessage(Optional<com.hubspot.slack.client.models.LiteMessage>) // optionalpreviousMessage.setEventTs(String) // requiredeventTs.build();- Returns:
- A new SlackEventMessageChanged builder
-