@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","MessageIF"}) @Immutable public final class Message extends Object implements MessageIF
MessageIF.
Use the builder to create immutable instances:
Message.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
Message.Builder
Builds instances of type
Message. |
| Modifier and Type | Method and Description |
|---|---|
static Message.Builder |
builder()
Creates a builder for
Message. |
static Message |
copyOf(MessageIF instance)
Creates an immutable copy of a
MessageIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
Message that have equal attribute values. |
List<Attachment> |
getAttachments() |
SlackChannel |
getChannel() |
Optional<LiteMessage> |
getNext() |
Optional<LiteMessage> |
getNextNext() |
Optional<String> |
getPermalink() |
Optional<LiteMessage> |
getPrevious() |
Optional<LiteMessage> |
getPreviousPrevious() |
String |
getSlackLink() |
String |
getTeam() |
String |
getText() |
String |
getTimestamp() |
String |
getType() |
String |
getUser() |
String |
getUsername() |
int |
hashCode()
Computes a hash code from attributes:
type, team, channel, user, username, timestamp, text, permalink, attachments, previousPrevious, previous, next, nextNext, slackLink. |
String |
toString()
Prints the immutable value
Message with attribute values. |
Message |
withAttachments(Attachment... elements)
Copy the current immutable object with elements that replace the content of
attachments. |
Message |
withAttachments(Iterable<? extends Attachment> elements)
Copy the current immutable object with elements that replace the content of
attachments. |
Message |
withChannel(SlackChannel channel)
Copy the current immutable object by setting a value for the
channel attribute. |
Message |
withNext(LiteMessage value)
Copy the current immutable object by setting a present value for the optional
next attribute. |
Message |
withNext(Optional<LiteMessage> optional)
Copy the current immutable object by setting an optional value for the
next attribute. |
Message |
withNextNext(LiteMessage value)
Copy the current immutable object by setting a present value for the optional
nextNext attribute. |
Message |
withNextNext(Optional<LiteMessage> optional)
Copy the current immutable object by setting an optional value for the
nextNext attribute. |
Message |
withPermalink(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
permalink attribute. |
Message |
withPermalink(String value)
Copy the current immutable object by setting a present value for the optional
permalink attribute. |
Message |
withPrevious(LiteMessage value)
Copy the current immutable object by setting a present value for the optional
previous attribute. |
Message |
withPrevious(Optional<LiteMessage> optional)
Copy the current immutable object by setting an optional value for the
previous attribute. |
Message |
withPreviousPrevious(LiteMessage value)
Copy the current immutable object by setting a present value for the optional
previousPrevious attribute. |
Message |
withPreviousPrevious(Optional<LiteMessage> optional)
Copy the current immutable object by setting an optional value for the
previousPrevious attribute. |
Message |
withTeam(String team)
Copy the current immutable object by setting a value for the
team attribute. |
Message |
withText(String text)
Copy the current immutable object by setting a value for the
text attribute. |
Message |
withTimestamp(String timestamp)
Copy the current immutable object by setting a value for the
timestamp attribute. |
Message |
withType(String type)
Copy the current immutable object by setting a value for the
type attribute. |
Message |
withUser(String user)
Copy the current immutable object by setting a value for the
user attribute. |
Message |
withUsername(String username)
Copy the current immutable object by setting a value for the
username attribute. |
public String getType()
public String getTeam()
public SlackChannel getChannel()
getChannel in interface MessageIFchannel attributepublic String getUser()
public String getUsername()
getUsername in interface MessageIFusername attributepublic String getTimestamp()
getTimestamp in interface MessageIFtimestamp attributepublic String getText()
public Optional<String> getPermalink()
getPermalink in interface MessageIFpermalink attributepublic List<Attachment> getAttachments()
getAttachments in interface MessageIFattachments attributepublic Optional<LiteMessage> getPreviousPrevious()
getPreviousPrevious in interface MessageIFpreviousPrevious attributepublic Optional<LiteMessage> getPrevious()
getPrevious in interface MessageIFprevious attributepublic Optional<LiteMessage> getNext()
public Optional<LiteMessage> getNextNext()
getNextNext in interface MessageIFnextNext attributepublic String getSlackLink()
getSlackLink in interface MessageIFslackLink attributepublic final Message withType(String type)
type attribute.
An equals check used to prevent copying of the same value by returning this.type - A new value for typethis objectpublic final Message withTeam(String team)
team attribute.
An equals check used to prevent copying of the same value by returning this.team - A new value for teamthis objectpublic final Message withChannel(SlackChannel channel)
channel attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.channel - A new value for channelthis objectpublic final Message withUser(String user)
user attribute.
An equals check used to prevent copying of the same value by returning this.user - A new value for userthis objectpublic final Message withUsername(String username)
username attribute.
An equals check used to prevent copying of the same value by returning this.username - A new value for usernamethis objectpublic final Message withTimestamp(String timestamp)
timestamp attribute.
An equals check used to prevent copying of the same value by returning this.timestamp - A new value for timestampthis objectpublic final Message withText(String text)
text attribute.
An equals check used to prevent copying of the same value by returning this.text - A new value for textthis objectpublic final Message withPermalink(@Nullable String value)
permalink attribute.value - The value for permalink, null is accepted as java.util.Optional.empty()this objectpublic final Message withPermalink(Optional<String> optional)
permalink attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for permalinkthis objectpublic final Message withAttachments(Attachment... elements)
attachments.elements - The elements to setthis objectpublic final Message withAttachments(Iterable<? extends Attachment> elements)
attachments.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of attachments elements to setthis objectpublic final Message withPreviousPrevious(@Nullable LiteMessage value)
previousPrevious attribute.value - The value for previousPrevious, null is accepted as java.util.Optional.empty()this objectpublic final Message withPreviousPrevious(Optional<LiteMessage> optional)
previousPrevious attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for previousPreviousthis objectpublic final Message withPrevious(@Nullable LiteMessage value)
previous attribute.value - The value for previous, null is accepted as java.util.Optional.empty()this objectpublic final Message withPrevious(Optional<LiteMessage> optional)
previous attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for previousthis objectpublic final Message withNext(@Nullable LiteMessage value)
next attribute.value - The value for next, null is accepted as java.util.Optional.empty()this objectpublic final Message withNext(Optional<LiteMessage> optional)
next attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for nextthis objectpublic final Message withNextNext(@Nullable LiteMessage value)
nextNext attribute.value - The value for nextNext, null is accepted as java.util.Optional.empty()this objectpublic final Message withNextNext(Optional<LiteMessage> optional)
nextNext attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for nextNextthis objectpublic boolean equals(@Nullable Object another)
Message that have equal attribute values.public int hashCode()
type, team, channel, user, username, timestamp, text, permalink, attachments, previousPrevious, previous, next, nextNext, slackLink.public String toString()
Message with attribute values.public static Message copyOf(MessageIF instance)
MessageIF value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static Message.Builder builder()
Message.Copyright © 2019. All rights reserved.