// Path: wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/vo/message/reply/ImageReply.java
// @XmlRootElement(name = "xml")
// @XmlAccessorType(XmlAccessType.FIELD)
// public class ImageReply extends Reply {
//     @XmlElement(name = "Image")
//     private MediaDetail imageDetail;
// 
//     {
//         super.setMsgType(ReplyEnumFactory.IMAGE.getReplyType());
//     }
// 
//     public ImageReply() {
//     }
// 
//     public ImageReply(MediaDetail imageDetail) {
//         this.imageDetail = imageDetail;
//     }
// 
//     public MediaDetail getImageDetail() {
//         return imageDetail;
//     }
// 
//     public void setImageDetail(MediaDetail imageDetail) {
//         this.imageDetail = imageDetail;
//     }
// 
// }
// 
// Path: wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/vo/message/reply/detail/MediaDetail.java
// @XmlAccessorType(XmlAccessType.FIELD)
// public class MediaDetail extends AbstractToStringBuilder {
//     @XmlElement(name = "MediaId")
//     private String mediaId;
// 
//     public MediaDetail() {
//     }
// 
//     public MediaDetail(String mediaId) {
//         this.mediaId = mediaId;
//     }
// 
//     public String getMediaId() {
//         return mediaId;
//     }
// 
//     public void setMediaId(String mediaId) {
//         this.mediaId = mediaId;
//     }
// 
// }


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



/**
 *
 * @author Shunli
 */
public class ImageReplyBuilder implements ReplyBuilder {
    @Override
    public Reply buildReply(List<ReplyDetail> replyDetails) {
        ReplyDetail detail = replyDetails.get(0);
// Path: wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/vo/message/reply/ImageReply.java
// @XmlRootElement(name = "xml")
// @XmlAccessorType(XmlAccessType.FIELD)
// public class ImageReply extends Reply {
//     @XmlElement(name = "Image")
//     private MediaDetail imageDetail;
// 
//     {
//         super.setMsgType(ReplyEnumFactory.IMAGE.getReplyType());
//     }
// 
//     public ImageReply() {
//     }
// 
//     public ImageReply(MediaDetail imageDetail) {
//         this.imageDetail = imageDetail;
//     }
// 
//     public MediaDetail getImageDetail() {
//         return imageDetail;
//     }
// 
//     public void setImageDetail(MediaDetail imageDetail) {
//         this.imageDetail = imageDetail;
//     }
// 
// }
// 
// Path: wechat-mp-sdk/src/main/java/org/usc/wechat/mp/sdk/vo/message/reply/detail/MediaDetail.java
// @XmlAccessorType(XmlAccessType.FIELD)
// public class MediaDetail extends AbstractToStringBuilder {
//     @XmlElement(name = "MediaId")
//     private String mediaId;
// 
//     public MediaDetail() {
//     }
// 
//     public MediaDetail(String mediaId) {
//         this.mediaId = mediaId;
//     }
// 
//     public String getMediaId() {
//         return mediaId;
//     }
// 
//     public void setMediaId(String mediaId) {
//         this.mediaId = mediaId;
//     }
// 
// }


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

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



/**
 *
 * @author Shunli
 */
public class ImageReplyBuilder implements ReplyBuilder {
    @Override
    public Reply buildReply(List<ReplyDetail> replyDetails) {
        ReplyDetail detail = replyDetails.get(0);
        return new ImageReply(new MediaDetail(detail.getMediaId()));