Class ChatPostMessageRequest
java.lang.Object
com.slack.api.methods.request.chat.ChatPostMessageRequest
- All Implemented Interfaces:
SlackApiRequest
public class ChatPostMessageRequest extends Object implements SlackApiRequest
https://api.slack.com/methods/chat.postMessage
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChatPostMessageRequest.ChatPostMessageRequestBuilder -
Method Summary
Modifier and Type Method Description static ChatPostMessageRequest.ChatPostMessageRequestBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)List<Attachment>getAttachments()A JSON-based array of structured attachments, presented as a URL-encoded string.StringgetAttachmentsAsString()A JSON-based array of structured attachments, presented as a URL-encoded string.List<LayoutBlock>getBlocks()A JSON-based array of structured blocks, presented as a URL-encoded string.StringgetBlocksAsString()A JSON-based array of structured blocks as a String, presented as a URL-encoded string.StringgetChannel()Channel, private group, or IM channel to send message to.StringgetIconEmoji()Emoji to use as the icon for this message.StringgetIconUrl()URL to an image to use as the icon for this message.StringgetParse()Change how messages are treated.StringgetText()Text of the message to send.StringgetThreadTs()Provide another message's `ts` value to make this message a reply.StringgetToken()Authentication token.StringgetUsername()aSet your bot's user name.inthashCode()BooleanisAsUser()booleanisLinkNames()Find and link channel names and usernames.booleanisMrkdwn()Disable Slack markup parsing by setting to `false`.booleanisReplyBroadcast()Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation.booleanisUnfurlLinks()Pass true to enable unfurling of primarily text-based content.booleanisUnfurlMedia()Pass false to disable unfurling of media content.voidsetAsUser(Boolean asUser)voidsetAttachments(List<Attachment> attachments)A JSON-based array of structured attachments, presented as a URL-encoded string.voidsetAttachmentsAsString(String attachmentsAsString)A JSON-based array of structured attachments, presented as a URL-encoded string.voidsetBlocks(List<LayoutBlock> blocks)A JSON-based array of structured blocks, presented as a URL-encoded string.voidsetBlocksAsString(String blocksAsString)A JSON-based array of structured blocks as a String, presented as a URL-encoded string.voidsetChannel(String channel)Channel, private group, or IM channel to send message to.voidsetIconEmoji(String iconEmoji)Emoji to use as the icon for this message.voidsetIconUrl(String iconUrl)URL to an image to use as the icon for this message.voidsetLinkNames(boolean linkNames)Find and link channel names and usernames.voidsetMrkdwn(boolean mrkdwn)Disable Slack markup parsing by setting to `false`.voidsetParse(String parse)Change how messages are treated.voidsetReplyBroadcast(boolean replyBroadcast)Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation.voidsetText(String text)Text of the message to send.voidsetThreadTs(String threadTs)Provide another message's `ts` value to make this message a reply.voidsetToken(String token)Authentication token.voidsetUnfurlLinks(boolean unfurlLinks)Pass true to enable unfurling of primarily text-based content.voidsetUnfurlMedia(boolean unfurlMedia)Pass false to disable unfurling of media content.voidsetUsername(String username)aSet your bot's user name.StringtoString()
-
Method Details
-
isAsUser
-
setAsUser
-
builder
-
getToken
Authentication token. Requires scope: `chat:write`- Specified by:
getTokenin interfaceSlackApiRequest
-
getUsername
aSet your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. -
getThreadTs
Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. -
getChannel
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. -
getText
Text of the message to send. See below for an explanation of [formatting](#formatting). This field is usually required, unless you're providing only `attachments` instead. -
getParse
Change how messages are treated. Defaults to `none`. See [below](#formatting). -
isLinkNames
public boolean isLinkNames()Find and link channel names and usernames. -
getBlocks
A JSON-based array of structured blocks, presented as a URL-encoded string. -
getBlocksAsString
A JSON-based array of structured blocks as a String, presented as a URL-encoded string. -
getAttachments
A JSON-based array of structured attachments, presented as a URL-encoded string. -
getAttachmentsAsString
A JSON-based array of structured attachments, presented as a URL-encoded string. -
isUnfurlLinks
public boolean isUnfurlLinks()Pass true to enable unfurling of primarily text-based content. -
isUnfurlMedia
public boolean isUnfurlMedia()Pass false to disable unfurling of media content. -
isMrkdwn
public boolean isMrkdwn()Disable Slack markup parsing by setting to `false`. Enabled by default. -
getIconUrl
URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. -
getIconEmoji
Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below. -
isReplyBroadcast
public boolean isReplyBroadcast()Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. -
setToken
Authentication token. Requires scope: `chat:write` -
setUsername
aSet your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. -
setThreadTs
Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. -
setChannel
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. -
setText
Text of the message to send. See below for an explanation of [formatting](#formatting). This field is usually required, unless you're providing only `attachments` instead. -
setParse
Change how messages are treated. Defaults to `none`. See [below](#formatting). -
setLinkNames
public void setLinkNames(boolean linkNames)Find and link channel names and usernames. -
setBlocks
A JSON-based array of structured blocks, presented as a URL-encoded string. -
setBlocksAsString
A JSON-based array of structured blocks as a String, presented as a URL-encoded string. -
setAttachments
A JSON-based array of structured attachments, presented as a URL-encoded string. -
setAttachmentsAsString
A JSON-based array of structured attachments, presented as a URL-encoded string. -
setUnfurlLinks
public void setUnfurlLinks(boolean unfurlLinks)Pass true to enable unfurling of primarily text-based content. -
setUnfurlMedia
public void setUnfurlMedia(boolean unfurlMedia)Pass false to disable unfurling of media content. -
setMrkdwn
public void setMrkdwn(boolean mrkdwn)Disable Slack markup parsing by setting to `false`. Enabled by default. -
setIconUrl
URL to an image to use as the icon for this message. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below. -
setIconEmoji
Emoji to use as the icon for this message. Overrides `icon_url`. Must be used in conjunction with `as_user` set to `false`, otherwise ignored. See [authorship](#authorship) below. -
setReplyBroadcast
public void setReplyBroadcast(boolean replyBroadcast)Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-