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

com.foxinmy.weixin4j.qy.model.PrivilegeInfo Maven / Gradle / Ivy

There is a newer version: 1.10.2
Show newest version
package com.foxinmy.weixin4j.qy.model;

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

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 权限信息
 * 
 * @className Privilege
 * @author jinyu([email protected])
 * @date 2016年3月28日
 * @since JDK 1.6
 * @see
 */
public class PrivilegeInfo implements Serializable {

	private static final long serialVersionUID = 2689295767648714897L;
	/**
	 * 权限级别
	 */
	private int level;
	/**
	 * 	应用可见范围(成员)
	 */
	@JSONField(name = "allow_user")
	private List allowUserIds;
	/**
	 * 应用可见范围(部门)
	 */
	@JSONField(name = "allow_party")
	private List allowPartyIds;
	/**
	 * 	应用可见范围(标签)
	 */
	@JSONField(name = "allow_tag")
	private List allowTagIds;
	/**
	 * 额外通讯录(成员)
	 */
	@JSONField(name = "extra_user")
	private List extraUserIds;
	/**
	 * 额外通讯录(部门)
	 */
	@JSONField(name = "extra_party")
	private List extraPartyIds;
	/**
	 * 额外通讯录(标签)
	 */
	@JSONField(name = "extra_tag")
	private List extraTagIds;

	public int getLevel() {
		return level;
	}

	@JSONField(serialize = false)
	public PrivilegeLevel getFormatLevel() {
		return PrivilegeLevel.values()[level - 1];
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public List getAllowUserIds() {
		return allowUserIds;
	}

	public void setAllowUserIds(List allowUserIds) {
		this.allowUserIds = allowUserIds;
	}

	public List getAllowPartyIds() {
		return allowPartyIds;
	}

	public void setAllowPartyIds(List allowPartyIds) {
		this.allowPartyIds = allowPartyIds;
	}

	public List getAllowTagIds() {
		return allowTagIds;
	}

	public void setAllowTagIds(List allowTagIds) {
		this.allowTagIds = allowTagIds;
	}

	public List getExtraUserIds() {
		return extraUserIds;
	}

	public void setExtraUserIds(List extraUserIds) {
		this.extraUserIds = extraUserIds;
	}

	public List getExtraPartyIds() {
		return extraPartyIds;
	}

	public void setExtraPartyIds(List extraPartyIds) {
		this.extraPartyIds = extraPartyIds;
	}

	public List getExtraTagIds() {
		return extraTagIds;
	}

	public void setExtraTagIds(List extraTagIds) {
		this.extraTagIds = extraTagIds;
	}

	@Override
	public String toString() {
		return "PrivilegeInfo [level=" + level + ", allowUserIds=" + allowUserIds + ", allowPartyIds=" + allowPartyIds
				+ ", allowTagIds=" + allowTagIds + ", extraUserIds=" + extraUserIds + ", extraPartyIds=" + extraPartyIds
				+ ", extraTagIds=" + extraTagIds + "]";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy