package com.myoa.engineering.crawl.ppomppu.sender.dto; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; /** * SectionBlock * @author Shin Woo-jin (woo-jin.shin@linecorp.com) * @since 2021-11-30 * */ @Getter @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_NULL) public class SlackSectionMessageBlock implements SlackMessageBlock { private static final long serialVersionUID = -7600944576753160168L; private SlackMessageBlockType type; private SlackBaseMessageBlock text; @Builder private SlackSectionMessageBlock(SlackMessageBlockType type, SlackBaseMessageBlock text) { this.type = type; this.text = text; } public static SlackSectionMessageBlock ofMarkDown(String message) { return SlackSectionMessageBlock.builder() .type(SlackMessageBlockType.SECTION) .text(SlackBaseMessageBlock.ofMarkDown(message)) .build(); } public String getType() { return type.getType(); } }