// Path: wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/vo/message/reply/VideoReply.java
// @XmlRootElement(name = "xml")
// @XmlAccessorType(XmlAccessType.FIELD)
// public class VideoReply extends Reply {
//     @XmlElement(name = "Video")
//     private VideoDetail videoDetail;
// 
//     {
//         super.setMsgType(ReplyEnumFactory.VIDEO.getReplyType());
//     }
// 
//     public VideoReply() {
//     }
// 
//     public VideoReply(VideoDetail videoDetail) {
//         this.videoDetail = videoDetail;
//     }
// 
//     public VideoDetail getVideoDetail() {
//         return videoDetail;
//     }
// 
//     public void setVideoDetail(VideoDetail videoDetail) {
//         this.videoDetail = videoDetail;
//     }
// 
// }


import java.util.List;
import org.usc.wechat.mp.sdk.vo.ReplyDetail;
import org.usc.wechat.mp.sdk.vo.message.reply.Reply;
import org.usc.wechat.mp.sdk.vo.message.reply.VideoReply;
import org.usc.wechat.mp.sdk.vo.message.reply.detail.VideoDetail;
package org.usc.wechat.mp.sdk.factory.builder;



/**
 *
 * @author Shunli
 */
public class VideoReplyBuilder implements ReplyBuilder {
    @Override
    public Reply buildReply(List<ReplyDetail> replyDetails) {
        ReplyDetail detail = replyDetails.get(0);

        VideoDetail videoDetail = new VideoDetail(detail.getMediaId());
        videoDetail.setTitle(detail.getTitle());
        videoDetail.setDescription(detail.getDescription());

// Path: wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/vo/message/reply/VideoReply.java
// @XmlRootElement(name = "xml")
// @XmlAccessorType(XmlAccessType.FIELD)
// public class VideoReply extends Reply {
//     @XmlElement(name = "Video")
//     private VideoDetail videoDetail;
// 
//     {
//         super.setMsgType(ReplyEnumFactory.VIDEO.getReplyType());
//     }
// 
//     public VideoReply() {
//     }
// 
//     public VideoReply(VideoDetail videoDetail) {
//         this.videoDetail = videoDetail;
//     }
// 
//     public VideoDetail getVideoDetail() {
//         return videoDetail;
//     }
// 
//     public void setVideoDetail(VideoDetail videoDetail) {
//         this.videoDetail = videoDetail;
//     }
// 
// }


// Path: wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/factory/builder/VideoReplyBuilder.java
import java.util.List;
import org.usc.wechat.mp.sdk.vo.ReplyDetail;
import org.usc.wechat.mp.sdk.vo.message.reply.Reply;
import org.usc.wechat.mp.sdk.vo.message.reply.VideoReply;
import org.usc.wechat.mp.sdk.vo.message.reply.detail.VideoDetail;

package org.usc.wechat.mp.sdk.factory.builder;



/**
 *
 * @author Shunli
 */
public class VideoReplyBuilder implements ReplyBuilder {
    @Override
    public Reply buildReply(List<ReplyDetail> replyDetails) {
        ReplyDetail detail = replyDetails.get(0);

        VideoDetail videoDetail = new VideoDetail(detail.getMediaId());
        videoDetail.setTitle(detail.getTitle());
        videoDetail.setDescription(detail.getDescription());

        return new VideoReply(videoDetail);