public class Payload extends Object
Implementation of RTMMessage Payloads
Modifier and Type | Class and Description |
---|---|
static class |
Payload.PayloadBuilder |
Modifier and Type | Method and Description |
---|---|
static Payload.PayloadBuilder |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
List<Attachment> |
getAttachments()
An array of legacy secondary attachments.
|
List<LayoutBlock> |
getBlocks()
An array of
layout blocks in the same format as described in the
layout block guide. |
String |
getChannel()
Deprecated.
|
String |
getIconEmoji()
Deprecated.
|
String |
getIconUrl()
Deprecated.
|
String |
getText()
The first step is to prepare this message as a key/value pair in JSON.
|
String |
getThreadTs()
You can add the thread_ts parameter to your POST request
in order to make your message appear as a reply in a thread.
|
String |
getUsername()
Deprecated.
|
int |
hashCode() |
void |
setAttachments(List<Attachment> attachments)
An array of legacy secondary attachments.
|
void |
setBlocks(List<LayoutBlock> blocks)
An array of
layout blocks in the same format as described in the
layout block guide. |
void |
setChannel(String channel)
Deprecated.
|
void |
setIconEmoji(String iconEmoji)
Deprecated.
|
void |
setIconUrl(String iconUrl)
Deprecated.
|
void |
setText(String text)
The first step is to prepare this message as a key/value pair in JSON.
|
void |
setThreadTs(String threadTs)
You can add the thread_ts parameter to your POST request
in order to make your message appear as a reply in a thread.
|
void |
setUsername(String username)
Deprecated.
|
String |
toString() |
public static Payload.PayloadBuilder builder()
public String getThreadTs()
public String getText()
@Deprecated public String getChannel()
Incoming webhooks output to a default channel and can only send messages to a single channel at a time. You can override a custom integration's configured channel by specifying the channel field in your JSON payload.
Specify a Slack channel by name with "channel": "#other-channel", or send a Slackbot message to a specific user with "channel": "@username".
@Deprecated public String getUsername()
Incoming webhooks originate from a default identity you configured when originally creating your webhook. You can override a custom integration's configured name with the username field in your JSON payload.
@Deprecated public String getIconUrl()
You can also override the bot icon either with icon_url or icon_emoji.
@Deprecated public String getIconEmoji()
You can also override the bot icon either with icon_url or icon_emoji.
public List<LayoutBlock> getBlocks()
layout blocks
in the same format as described in the
layout block guide.public List<Attachment> getAttachments()
blocks
instead.public void setThreadTs(String threadTs)
public void setText(String text)
@Deprecated public void setChannel(String channel)
Incoming webhooks output to a default channel and can only send messages to a single channel at a time. You can override a custom integration's configured channel by specifying the channel field in your JSON payload.
Specify a Slack channel by name with "channel": "#other-channel", or send a Slackbot message to a specific user with "channel": "@username".
@Deprecated public void setUsername(String username)
Incoming webhooks originate from a default identity you configured when originally creating your webhook. You can override a custom integration's configured name with the username field in your JSON payload.
@Deprecated public void setIconUrl(String iconUrl)
You can also override the bot icon either with icon_url or icon_emoji.
@Deprecated public void setIconEmoji(String iconEmoji)
You can also override the bot icon either with icon_url or icon_emoji.
public void setBlocks(List<LayoutBlock> blocks)
layout blocks
in the same format as described in the
layout block guide.public void setAttachments(List<Attachment> attachments)
blocks
instead.protected boolean canEqual(Object other)
Copyright © 2020. All rights reserved.