me.chanjar.weixin.mp.bean.custombuilder.VoiceBuilder Maven / Gradle / Ivy
package me.chanjar.weixin.mp.bean.custombuilder;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.mp.bean.WxMpCustomMessage;
/**
* 语音消息builder
*
* 用法: WxMpCustomMessage m = WxMpCustomMessage.VOICE().mediaId(...).toUser(...).build();
*
* @author chanjarster
*
*/
public final class VoiceBuilder extends BaseBuilder {
private String mediaId;
public VoiceBuilder() {
this.msgType = WxConsts.CUSTOM_MSG_VOICE;
}
public VoiceBuilder mediaId(String media_id) {
this.mediaId = media_id;
return this;
}
public WxMpCustomMessage build() {
WxMpCustomMessage m = super.build();
m.setMediaId(this.mediaId);
return m;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy