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

me.chanjar.weixin.mp.builder.kefu.VideoBuilder Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package me.chanjar.weixin.mp.builder.kefu;

import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage;

/**
 * 视频消息builder
 * 
 * 用法: WxMpKefuMessage m = WxMpKefuMessage.VOICE()
 *                              .mediaId(...)
 *                              .title(...)
 *                              .thumbMediaId(..)
 *                              .description(..)
 *                              .toUser(...)
 *                              .build();
 * 
* * @author chanjarster */ public final class VideoBuilder extends BaseBuilder { private String mediaId; private String title; private String description; private String thumbMediaId; public VideoBuilder() { this.msgType = WxConsts.KefuMsgType.VIDEO; } public VideoBuilder mediaId(String mediaId) { this.mediaId = mediaId; return this; } public VideoBuilder title(String title) { this.title = title; return this; } public VideoBuilder description(String description) { this.description = description; return this; } public VideoBuilder thumbMediaId(String thumb_media_id) { this.thumbMediaId = thumb_media_id; return this; } @Override public WxMpKefuMessage build() { WxMpKefuMessage m = super.build(); m.setMediaId(this.mediaId); m.setTitle(this.title); m.setDescription(this.description); m.setThumbMediaId(this.thumbMediaId); return m; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy