package com.ematou.wxservice.common.xml.builder;

import com.ematou.wxservice.mp.message.WeChatMpXmlOutMessage;
import com.ematou.wxservice.mp.message.WeChatMpXmlOutTextMessage;

/**
 * 构建文本消息
 * @author lhm
 * @version 1.0
 * 2021-05-11 15:03
 */
public class TextBuilder extends BaseBuilder<TextBuilder, WeChatMpXmlOutTextMessage> {

    private String content;

    public TextBuilder content(String content) {
        this.content = content;
        return this;
    }

    @Override
    public WeChatMpXmlOutTextMessage build() {
        WeChatMpXmlOutTextMessage weChatMpXmlOutTextMessage = new WeChatMpXmlOutTextMessage();
        setCommon(weChatMpXmlOutTextMessage);
        weChatMpXmlOutTextMessage.setContent(this.content);
        return weChatMpXmlOutTextMessage;
    }
}
