com.seejoke.wechat.entity.msgbuilder.VoiceBuilder Maven / Gradle / Ivy
package com.seejoke.wechat.entity.msgbuilder;
import com.seejoke.wechat.api.WxConsts;
import com.seejoke.wechat.entity.WxMessage;
/**
* 语音消息builder
*
* 用法: WxCustomMessage m = WxCustomMessage.VOICE().mediaId(...).toUser(...).build();
*
* @author diaodiaofly
*
*/
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;
}
@Override
public WxMessage build() {
WxMessage m = super.build();
m.setMediaId(this.mediaId);
return m;
}
}