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

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

The newest version!
package me.chanjar.weixin.mp.builder.outxml;

import me.chanjar.weixin.mp.bean.message.WxMpXmlOutVideoMessage;

/**
 * 视频消息builder
 *
 * @author chanjarster
 */
public final class VideoBuilder extends BaseBuilder {

  private String mediaId;
  private String title;
  private String description;

  public VideoBuilder title(String title) {
    this.title = title;
    return this;
  }

  public VideoBuilder description(String description) {
    this.description = description;
    return this;
  }

  public VideoBuilder mediaId(String mediaId) {
    this.mediaId = mediaId;
    return this;
  }

  @Override
  public WxMpXmlOutVideoMessage build() {
    WxMpXmlOutVideoMessage m = new WxMpXmlOutVideoMessage();
    setCommon(m);
    m.getVideo().setTitle(this.title);
    m.getVideo().setDescription(this.description);
    m.getVideo().setMediaId(this.mediaId);
    return m;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy