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

com.foxinmy.weixin4j.message.event.MenuPhotoEventMessage Maven / Gradle / Ivy

package com.foxinmy.weixin4j.message.event;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

/**
 * 弹出拍照或者相册发图的事件推送(pic_sysphoto|pic_photo_or_album|pic_weixin)
 * 
 * @className MenuPhotoEventMessage
 * @author jinyu([email protected])
 * @date 2014年9月30日
 * @since JDK 1.6
 * @see 订阅号、服务号的系统发图的事件推送
 * @see 企业号的系统发图的事件推送
 */
public class MenuPhotoEventMessage extends MenuEventMessage {

	private static final long serialVersionUID = 3142350663022709730L;

	/**
	 * 发送的图片信息
	 */
	@XmlElement(name = "SendPicsInfo")
	private PictureInfo pictureInfo;

	public PictureInfo getPictureInfo() {
		return pictureInfo;
	}

	/**
	 * 图片信息
	 * 
	 * @className PictureInfo
	 * @author jinyu([email protected])
	 * @date 2015年3月29日
	 * @since JDK 1.6
	 * @see
	 */
	public static class PictureInfo implements Serializable {

		private static final long serialVersionUID = -3361375879168233258L;

		/**
		 * 发送的图片数量
		 */
		@XmlElement(name = "Count")
		private int count;
		/**
		 * 图片列表
		 */
		@XmlElementWrapper(name = "PicList")
		@XmlElement(name = "item")
		private List items;

		public int getCount() {
			return count;
		}

		public List getItems() {
			return items;
		}

		@Override
		public String toString() {
			return "PictureInfo [count=" + count + ", items=" + items + "]";
		}
	}

	/**
	 * 图片
	 * 
	 * @className PictureItem
	 * @author jinyu([email protected])
	 * @date 2015年3月29日
	 * @since JDK 1.6
	 * @see
	 */
	public static class PictureItem implements Serializable {

		private static final long serialVersionUID = -7636697449096645590L;

		/**
		 * 图片的MD5值,开发者若需要,可用于验证接收到图片
		 */
		@XmlElement(name = "PicMd5Sum")
		private String md5;

		public String getMd5() {
			return md5;
		}

		@Override
		public String toString() {
			return "PictureItem [md5=" + md5 + "]";
		}
	}

	@Override
	public String toString() {
		return "MenuPhotoEventMessage [pictureInfo=" + pictureInfo + ", "
				+ super.toString() + "]";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy