Class HeaderBlock

java.lang.Object
com.slack.api.model.block.HeaderBlock
All Implemented Interfaces:
LayoutBlock

public class HeaderBlock extends Object implements LayoutBlock
https://docs.slack.dev/reference/block-kit/blocks/header-block
  • Field Details

  • Constructor Details

    • HeaderBlock

      public HeaderBlock()
    • HeaderBlock

      public HeaderBlock(String blockId, PlainTextObject text)
      Creates a new HeaderBlock instance.
      Parameters:
      blockId - A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.
      text - The text for the block, in the form of a plain_text text object. Maximum length for the text in this field is 3000 characters.
  • Method Details

    • builder

      public static HeaderBlock.HeaderBlockBuilder builder()
    • getType

      public String getType()
      Description copied from interface: LayoutBlock
      Determines the type of layout block, e.g. section, divider, context, actions and image.
      Specified by:
      getType in interface LayoutBlock
    • getBlockId

      public String getBlockId()
      A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.
      Specified by:
      getBlockId in interface LayoutBlock
    • getText

      public PlainTextObject getText()
      The text for the block, in the form of a plain_text text object. Maximum length for the text in this field is 3000 characters.
    • setBlockId

      public void setBlockId(String blockId)
      A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of a message. If a message is updated, use a new block_id.
    • setText

      public void setText(PlainTextObject text)
      The text for the block, in the form of a plain_text text object. Maximum length for the text in this field is 3000 characters.
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object