me.chanjar.weixin.cp.bean.messagebuilder.FileBuilder Maven / Gradle / Ivy
The newest version!
package me.chanjar.weixin.cp.bean.messagebuilder;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.cp.bean.WxCpMessage;
/**
* 获得消息builder
*
* 用法: WxCustomMessage m = WxCustomMessage.FILE().mediaId(...).toUser(...).build();
*
* @author Daniel Qian
*
*/
public final class FileBuilder extends BaseBuilder {
private String mediaId;
public FileBuilder() {
this.msgType = WxConsts.CUSTOM_MSG_FILE;
}
public FileBuilder mediaId(String media_id) {
this.mediaId = media_id;
return this;
}
public WxCpMessage build() {
WxCpMessage m = super.build();
m.setMediaId(this.mediaId);
return m;
}
}