cn.binarywang.wx.miniapp.builder.TextMessageBuilder Maven / Gradle / Ivy
package cn.binarywang.wx.miniapp.builder;
import cn.binarywang.wx.miniapp.bean.WxMaKefuMessage;
import static cn.binarywang.wx.miniapp.constant.WxMaConstants.KefuMsgType;
/**
* 文本消息builder.
*
* @author Binary Wang
*/
public final class TextMessageBuilder extends BaseBuilder {
private String content;
public TextMessageBuilder() {
this.msgType = KefuMsgType.TEXT;
}
public TextMessageBuilder content(String content) {
this.content = content;
return this;
}
@Override
public WxMaKefuMessage build() {
WxMaKefuMessage m = super.build();
m.setText(new WxMaKefuMessage.KfText(this.content));
return m;
}
}