All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.chanjar.weixin.cp.bean.messagebuilder.VoiceBuilder Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package me.chanjar.weixin.cp.bean.messagebuilder;

import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.cp.bean.message.WxCpMessage;

/**
 * 语音消息builder
 * 
 * 用法: WxCustomMessage m = WxCustomMessage.VOICE().mediaId(...).toUser(...).build();
 * 
* * @author Daniel Qian */ public final class VoiceBuilder extends BaseBuilder { private String mediaId; /** * Instantiates a new Voice builder. */ public VoiceBuilder() { this.msgType = WxConsts.KefuMsgType.VOICE; } /** * Media id voice builder. * * @param media_id the media id * @return the voice builder */ public VoiceBuilder mediaId(String media_id) { this.mediaId = media_id; return this; } @Override public WxCpMessage build() { WxCpMessage m = super.build(); m.setMediaId(this.mediaId); return m; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy