View Javadoc
1   package com.foxinmy.weixin4j.model.media;
2   
3   import java.io.Serializable;
4   import java.util.Date;
5   
6   import com.foxinmy.weixin4j.type.MediaType;
7   
8   /**
9    * 媒体文件上传结果
10   *
11   * @className MediaUploadResult
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2015年7月25日
14   * @since JDK 1.6
15   * @see
16   */
17  public class MediaUploadResult implements Serializable {
18  
19  	private static final long serialVersionUID = -620630472640999536L;
20  	private String mediaId;
21  	private MediaType mediaType;
22  	private Date createdAt;
23  	/**
24  	 * 新增的图片素材的图片URL
25  	 */
26  	private String url;
27  
28  	public MediaUploadResult(String mediaId, MediaType mediaType,
29  			Date createdAt, String url) {
30  		this.mediaId = mediaId;
31  		this.mediaType = mediaType;
32  		this.createdAt = createdAt;
33  		this.url = url;
34  	}
35  
36  	public String getMediaId() {
37  		return mediaId;
38  	}
39  
40  	public MediaType getMediaType() {
41  		return mediaType;
42  	}
43  
44  	public Date getCreatedAt() {
45  		return createdAt;
46  	}
47  
48  	public String getUrl() {
49  		return url;
50  	}
51  
52  	@Override
53  	public String toString() {
54  		return "MediaUploadResult [mediaId=" + mediaId + ", mediaType="
55  				+ mediaType + ", createdAt=" + createdAt + ", url=" + url + "]";
56  	}
57  }