Class ChatPostMessageRequest

java.lang.Object
com.slack.api.methods.request.chat.ChatPostMessageRequest
All Implemented Interfaces:
SlackApiRequest

public class ChatPostMessageRequest
extends java.lang.Object
implements SlackApiRequest
https://api.slack.com/methods/chat.postMessage
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  ChatPostMessageRequest.ChatPostMessageRequestBuilder  
  • Method Summary

    Modifier and Type Method Description
    static ChatPostMessageRequest.ChatPostMessageRequestBuilder builder()  
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.util.List<Attachment> getAttachments()
    A JSON-based array of structured attachments, presented as a URL-encoded string.
    java.lang.String getAttachmentsAsString()
    A JSON-based array of structured attachments, presented as a URL-encoded string.
    java.util.List<LayoutBlock> getBlocks()
    A JSON-based array of structured blocks, presented as a URL-encoded string.
    java.lang.String getBlocksAsString()
    A JSON-based array of structured blocks as a String, presented as a URL-encoded string.
    java.lang.String getChannel()
    Channel, private group, or IM channel to send message to.
    java.lang.String getIconEmoji()
    Emoji to use as the icon for this message.
    java.lang.String getIconUrl()
    URL to an image to use as the icon for this message.
    java.lang.String getParse()
    Change how messages are treated.
    java.lang.String getText()
    Text of the message to send.
    java.lang.String getThreadTs()
    Provide another message's `ts` value to make this message a reply.
    java.lang.String getToken()
    Authentication token.
    java.lang.String getUsername()
    aSet your bot's user name.
    int hashCode()  
    java.lang.Boolean isAsUser()  
    boolean isLinkNames()
    Find and link channel names and usernames.
    boolean isMrkdwn()
    Disable Slack markup parsing by setting to `false`.
    boolean isReplyBroadcast()
    Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation.
    boolean isUnfurlLinks()
    Pass true to enable unfurling of primarily text-based content.
    boolean isUnfurlMedia()
    Pass false to disable unfurling of media content.
    void setAsUser​(java.lang.Boolean asUser)  
    void setAttachments​(java.util.List<Attachment> attachments)
    A JSON-based array of structured attachments, presented as a URL-encoded string.
    void setAttachmentsAsString​(java.lang.String attachmentsAsString)
    A JSON-based array of structured attachments, presented as a URL-encoded string.
    void setBlocks​(java.util.List<LayoutBlock> blocks)
    A JSON-based array of structured blocks, presented as a URL-encoded string.
    void setBlocksAsString​(java.lang.String blocksAsString)
    A JSON-based array of structured blocks as a String, presented as a URL-encoded string.
    void setChannel​(java.lang.String channel)
    Channel, private group, or IM channel to send message to.
    void setIconEmoji​(java.lang.String iconEmoji)
    Emoji to use as the icon for this message.
    void setIconUrl​(java.lang.String iconUrl)
    URL to an image to use as the icon for this message.
    void setLinkNames​(boolean linkNames)
    Find and link channel names and usernames.
    void setMrkdwn​(boolean mrkdwn)
    Disable Slack markup parsing by setting to `false`.
    void setParse​(java.lang.String parse)
    Change how messages are treated.
    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.
    void setText​(java.lang.String text)
    Text of the message to send.
    void setThreadTs​(java.lang.String threadTs)
    Provide another message's `ts` value to make this message a reply.
    void setToken​(java.lang.String token)
    Authentication token.
    void setUnfurlLinks​(boolean unfurlLinks)
    Pass true to enable unfurling of primarily text-based content.
    void setUnfurlMedia​(boolean unfurlMedia)
    Pass false to disable unfurling of media content.
    void setUsername​(java.lang.String username)
    aSet your bot's user name.
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • isAsUser

      public java.lang.Boolean isAsUser()
    • setAsUser

      public void setAsUser​(java.lang.Boolean asUser)
    • builder

    • getToken

      public java.lang.String getToken()
      Authentication token. Requires scope: `chat:write`
      Specified by:
      getToken in interface SlackApiRequest
    • getUsername

      public java.lang.String 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

      public java.lang.String 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

      public java.lang.String 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

      public java.lang.String 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

      public java.lang.String getParse()
      Change how messages are treated. Defaults to `none`. See [below](#formatting).
    • isLinkNames

      public boolean isLinkNames()
      Find and link channel names and usernames.
    • getBlocks

      public java.util.List<LayoutBlock> getBlocks()
      A JSON-based array of structured blocks, presented as a URL-encoded string.
    • getBlocksAsString

      public java.lang.String getBlocksAsString()
      A JSON-based array of structured blocks as a String, presented as a URL-encoded string.
    • getAttachments

      public java.util.List<Attachment> getAttachments()
      A JSON-based array of structured attachments, presented as a URL-encoded string.
    • getAttachmentsAsString

      public java.lang.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

      public java.lang.String 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

      public java.lang.String 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

      public void setToken​(java.lang.String token)
      Authentication token. Requires scope: `chat:write`
    • setUsername

      public void setUsername​(java.lang.String username)
      aSet your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](#authorship) below.
    • setThreadTs

      public void setThreadTs​(java.lang.String threadTs)
      Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead.
    • setChannel

      public void setChannel​(java.lang.String channel)
      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

      public void setText​(java.lang.String text)
      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

      public void setParse​(java.lang.String parse)
      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

      public void setBlocks​(java.util.List<LayoutBlock> blocks)
      A JSON-based array of structured blocks, presented as a URL-encoded string.
    • setBlocksAsString

      public void setBlocksAsString​(java.lang.String blocksAsString)
      A JSON-based array of structured blocks as a String, presented as a URL-encoded string.
    • setAttachments

      public void setAttachments​(java.util.List<Attachment> attachments)
      A JSON-based array of structured attachments, presented as a URL-encoded string.
    • setAttachmentsAsString

      public void setAttachmentsAsString​(java.lang.String attachmentsAsString)
      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

      public void setIconUrl​(java.lang.String iconUrl)
      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

      public void setIconEmoji​(java.lang.String iconEmoji)
      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

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object