@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","LiteMessageIF"}) @Immutable public final class LiteMessage extends Object implements LiteMessageIF
LiteMessageIF.
Use the builder to create immutable instances:
LiteMessage.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
LiteMessage.Builder
Builds instances of type
LiteMessage. |
LOG| Modifier and Type | Method and Description |
|---|---|
static LiteMessage.Builder |
builder()
Creates a builder for
LiteMessage. |
static LiteMessage |
copyOf(LiteMessageIF instance)
Creates an immutable copy of a
LiteMessageIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
LiteMessage that have equal attribute values. |
List<Attachment> |
getAttachments() |
Optional<String> |
getBotId() |
List<SlackFile> |
getFiles() |
Optional<String> |
getLatestReplyTimestamp() |
List<ReplySkeleton> |
getReplies()
Deprecated.
use
getReplyUserIds() or getLatestReplyTimestamp()
These can be used to find the user ids and the last reply timestamp.
Used to return a list of `ReplySkeleton` |
Optional<Integer> |
getReplyCount() |
Optional<List<String>> |
getReplyUserIds() |
Optional<Integer> |
getReplyUsersCount() |
Optional<String> |
getSubtype() |
String |
getText() |
Optional<String> |
getThreadTimestamp() |
String |
getTimestamp() |
String |
getType() |
Optional<String> |
getUser() |
Optional<String> |
getUsername() |
int |
hashCode()
Computes a hash code from attributes:
type, subtype, user, botId, username, text, attachments, files, timestamp, threadTimestamp, replyCount, replyUserIds, replyUsersCount, latestReplyTimestamp, replies. |
String |
toString()
Prints the immutable value
LiteMessage with attribute values. |
LiteMessage |
withAttachments(Attachment... elements)
Copy the current immutable object with elements that replace the content of
attachments. |
LiteMessage |
withAttachments(Iterable<? extends Attachment> elements)
Copy the current immutable object with elements that replace the content of
attachments. |
LiteMessage |
withBotId(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
botId attribute. |
LiteMessage |
withBotId(String value)
Copy the current immutable object by setting a present value for the optional
botId attribute. |
LiteMessage |
withFiles(Iterable<? extends SlackFile> elements)
Copy the current immutable object with elements that replace the content of
files. |
LiteMessage |
withFiles(SlackFile... elements)
Copy the current immutable object with elements that replace the content of
files. |
LiteMessage |
withLatestReplyTimestamp(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
latestReplyTimestamp attribute. |
LiteMessage |
withLatestReplyTimestamp(String value)
Copy the current immutable object by setting a present value for the optional
latestReplyTimestamp attribute. |
LiteMessage |
withReplies(Iterable<? extends ReplySkeleton> elements)
Deprecated.
|
LiteMessage |
withReplies(ReplySkeleton... elements)
Deprecated.
|
LiteMessage |
withReplyCount(Integer value)
Copy the current immutable object by setting a present value for the optional
replyCount attribute. |
LiteMessage |
withReplyCount(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for the
replyCount attribute. |
LiteMessage |
withReplyUserIds(List<String> value)
Copy the current immutable object by setting a present value for the optional
replyUserIds attribute. |
LiteMessage |
withReplyUserIds(Optional<List<String>> optional)
Copy the current immutable object by setting an optional value for the
replyUserIds attribute. |
LiteMessage |
withReplyUsersCount(Integer value)
Copy the current immutable object by setting a present value for the optional
replyUsersCount attribute. |
LiteMessage |
withReplyUsersCount(Optional<Integer> optional)
Copy the current immutable object by setting an optional value for the
replyUsersCount attribute. |
LiteMessage |
withSubtype(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
subtype attribute. |
LiteMessage |
withSubtype(String value)
Copy the current immutable object by setting a present value for the optional
subtype attribute. |
LiteMessage |
withText(String text)
Copy the current immutable object by setting a value for the
text attribute. |
LiteMessage |
withThreadTimestamp(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
threadTimestamp attribute. |
LiteMessage |
withThreadTimestamp(String value)
Copy the current immutable object by setting a present value for the optional
threadTimestamp attribute. |
LiteMessage |
withTimestamp(String timestamp)
Copy the current immutable object by setting a value for the
timestamp attribute. |
LiteMessage |
withType(String type)
Copy the current immutable object by setting a value for the
type attribute. |
LiteMessage |
withUser(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
user attribute. |
LiteMessage |
withUser(String value)
Copy the current immutable object by setting a present value for the optional
user attribute. |
LiteMessage |
withUsername(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
username attribute. |
LiteMessage |
withUsername(String value)
Copy the current immutable object by setting a present value for the optional
username attribute. |
public String getType()
getType in interface LiteMessageIFtype attributepublic Optional<String> getSubtype()
getSubtype in interface LiteMessageIFsubtype attributepublic Optional<String> getUser()
getUser in interface LiteMessageIFuser attributepublic Optional<String> getBotId()
getBotId in interface LiteMessageIFbotId attributepublic Optional<String> getUsername()
getUsername in interface LiteMessageIFusername attributepublic String getText()
getText in interface LiteMessageIFtext attributepublic List<Attachment> getAttachments()
getAttachments in interface LiteMessageIFattachments attributepublic List<SlackFile> getFiles()
getFiles in interface LiteMessageIFfiles attributepublic String getTimestamp()
getTimestamp in interface LiteMessageIFtimestamp attributepublic Optional<String> getThreadTimestamp()
getThreadTimestamp in interface LiteMessageIFthreadTimestamp attributepublic Optional<Integer> getReplyCount()
getReplyCount in interface LiteMessageIFreplyCount attributepublic Optional<List<String>> getReplyUserIds()
getReplyUserIds in interface LiteMessageIFreplyUserIds attributepublic Optional<Integer> getReplyUsersCount()
getReplyUsersCount in interface LiteMessageIFreplyUsersCount attributepublic Optional<String> getLatestReplyTimestamp()
getLatestReplyTimestamp in interface LiteMessageIFlatestReplyTimestamp attribute@Deprecated public List<ReplySkeleton> getReplies()
getReplyUserIds() or getLatestReplyTimestamp()
These can be used to find the user ids and the last reply timestamp.
Used to return a list of `ReplySkeleton`getReplies in interface LiteMessageIFpublic final LiteMessage 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 LiteMessage withSubtype(@Nullable String value)
subtype attribute.value - The value for subtype, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withSubtype(Optional<String> optional)
subtype attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for subtypethis objectpublic final LiteMessage withUser(@Nullable String value)
user attribute.value - The value for user, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withUser(Optional<String> optional)
user attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for userthis objectpublic final LiteMessage withBotId(@Nullable String value)
botId attribute.value - The value for botId, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withBotId(Optional<String> optional)
botId attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for botIdthis objectpublic final LiteMessage withUsername(@Nullable String value)
username attribute.value - The value for username, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withUsername(Optional<String> optional)
username attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for usernamethis objectpublic final LiteMessage 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 LiteMessage withAttachments(Attachment... elements)
attachments.elements - The elements to setthis objectpublic final LiteMessage 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 LiteMessage withFiles(SlackFile... elements)
files.elements - The elements to setthis objectpublic final LiteMessage withFiles(Iterable<? extends SlackFile> elements)
files.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of files elements to setthis objectpublic final LiteMessage 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 LiteMessage withThreadTimestamp(@Nullable String value)
threadTimestamp attribute.value - The value for threadTimestamp, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withThreadTimestamp(Optional<String> optional)
threadTimestamp attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for threadTimestampthis objectpublic final LiteMessage withReplyCount(@Nullable Integer value)
replyCount attribute.value - The value for replyCount, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withReplyCount(Optional<Integer> optional)
replyCount attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for replyCountthis objectpublic final LiteMessage withReplyUserIds(@Nullable List<String> value)
replyUserIds attribute.value - The value for replyUserIds, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withReplyUserIds(Optional<List<String>> optional)
replyUserIds 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 replyUserIdsthis objectpublic final LiteMessage withReplyUsersCount(@Nullable Integer value)
replyUsersCount attribute.value - The value for replyUsersCount, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withReplyUsersCount(Optional<Integer> optional)
replyUsersCount attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for replyUsersCountthis objectpublic final LiteMessage withLatestReplyTimestamp(@Nullable String value)
latestReplyTimestamp attribute.value - The value for latestReplyTimestamp, null is accepted as java.util.Optional.empty()this objectpublic final LiteMessage withLatestReplyTimestamp(Optional<String> optional)
latestReplyTimestamp attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for latestReplyTimestampthis object@Deprecated public final LiteMessage withReplies(ReplySkeleton... elements)
replies.elements - The elements to setthis object@Deprecated public final LiteMessage withReplies(Iterable<? extends ReplySkeleton> elements)
replies.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of replies elements to setthis objectpublic boolean equals(@Nullable Object another)
LiteMessage that have equal attribute values.public int hashCode()
type, subtype, user, botId, username, text, attachments, files, timestamp, threadTimestamp, replyCount, replyUserIds, replyUsersCount, latestReplyTimestamp, replies.public String toString()
LiteMessage with attribute values.public static LiteMessage copyOf(LiteMessageIF instance)
LiteMessageIF 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 LiteMessage.Builder builder()
LiteMessage.Copyright © 2019. All rights reserved.