Class PlainTextObject

java.lang.Object
com.slack.api.model.block.composition.TextObject
com.slack.api.model.block.composition.PlainTextObject
All Implemented Interfaces:
ContextBlockElement

public class PlainTextObject extends TextObject
https://api.slack.com/reference/messaging/composition-objects#text
  • Field Details

  • Constructor Details

    • PlainTextObject

      public PlainTextObject()
    • PlainTextObject

      public PlainTextObject(String text, Boolean emoji)
  • Method Details

    • builder

      public static PlainTextObject.PlainTextObjectBuilder builder()
    • toBuilder

    • getType

      public String getType()
    • getText

      public String getText()
      Specified by:
      getText in class TextObject
    • getEmoji

      public Boolean getEmoji()
      The documentation of the Slack API states that the verbatim field is optional. The API examples always render the emoji field (as true, but that is its default value) -- so that is not helpful. I picked the Boolean because basically you have 3 possible states: - true - false - not present (and therefore not rendered in the resulting JSON sent to the Slack API)
    • setText

      public void setText(String text)
    • setEmoji

      public void setEmoji(Boolean emoji)
      The documentation of the Slack API states that the verbatim field is optional. The API examples always render the emoji field (as true, but that is its default value) -- so that is not helpful. I picked the Boolean because basically you have 3 possible states: - true - false - not present (and therefore not rendered in the resulting JSON sent to the Slack API)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object