View Javadoc
1   package com.foxinmy.weixin4j.qy.model;
2   
3   import java.io.Serializable;
4   
5   import com.alibaba.fastjson.annotation.JSONField;
6   import com.foxinmy.weixin4j.qy.type.ReportLocationType;
7   
8   /**
9    * 设置企业号应用
10   * 
11   * @className AgentSetter
12   * @author jinyu(foxinmy@gmail.com)
13   * @date 2015年3月16日
14   * @since JDK 1.6
15   */
16  public class AgentSetter implements Serializable {
17  	private static final long serialVersionUID = 5420335232308079801L;
18  
19  	/**
20  	 * 企业应用的id
21  	 */
22  	@JSONField(name = "agentid")
23  	private int agentId;
24  	/**
25  	 * 企业应用是否打开地理位置上报
26  	 */
27  	@JSONField(name = "report_location_flag")
28  	private ReportLocationType reportLocationType;
29  	/**
30  	 * 企业应用头像的mediaid,通过多媒体接口上传图片获得mediaid,上传后会自动裁剪成方形和圆形两个头像
31  	 */
32  	@JSONField(name = "logo_mediaid")
33  	private String logoMediaId;
34  	/**
35  	 * 企业应用名称
36  	 */
37  	private String name;
38  	/**
39  	 * 企业应用详情
40  	 */
41  	private String description;
42  	/**
43  	 * chatExtensionUrl 企业应用可信域名
44  	 */
45  	@JSONField(name = "redirect_domain")
46  	private String redirectDomain;
47  	/**
48  	 * 是否上报用户进入应用事件。0:不接收;1:接收。主页型应用无需该参数
49  	 */
50  	@JSONField(name = "isreportenter")
51  	private boolean isReportEnter;
52  	/**
53  	 * 应用主页url。url必须以http或者https开头。消息型应用无需该参数
54  	 */
55  	@JSONField(name = "home_url")
56  	private String homeUrl;
57  
58  	public AgentSetter(int agentId) {
59  		this.agentId = agentId;
60  	}
61  
62  	public int getAgentId() {
63  		return agentId;
64  	}
65  
66  	public ReportLocationType getReportLocationType() {
67  		return reportLocationType;
68  	}
69  
70  	public String getLogoMediaId() {
71  		return logoMediaId;
72  	}
73  
74  	public String getName() {
75  		return name;
76  	}
77  
78  	public String getDescription() {
79  		return description;
80  	}
81  
82  	public String getRedirectDomain() {
83  		return redirectDomain;
84  	}
85  
86  	public boolean isReportEnter() {
87  		return isReportEnter;
88  	}
89  
90  	public String getHomeUrl() {
91  		return homeUrl;
92  	}
93  
94  	// ---------- setter 应该全部去掉
95  
96  	public void setReportLocationType(ReportLocationType reportLocationType) {
97  		this.reportLocationType = reportLocationType;
98  	}
99  
100 	public void setLogoMediaid(String logoMediaId) {
101 		this.logoMediaId = logoMediaId;
102 	}
103 
104 	public void setName(String name) {
105 		this.name = name;
106 	}
107 
108 	public void setDescription(String description) {
109 		this.description = description;
110 	}
111 
112 	public void setRedirectDomain(String redirectDomain) {
113 		this.redirectDomain = redirectDomain;
114 	}
115 
116 	public void setAgentId(int agentId) {
117 		this.agentId = agentId;
118 	}
119 
120 	public void setLogoMediaId(String logoMediaId) {
121 		this.logoMediaId = logoMediaId;
122 	}
123 
124 	public void setReportEnter(boolean isReportEnter) {
125 		this.isReportEnter = isReportEnter;
126 	}
127 
128 	public void setHomeUrl(String homeUrl) {
129 		this.homeUrl = homeUrl;
130 	}
131 
132 	@Override
133 	public String toString() {
134 		return "agentId=" + agentId + ", reportLocationType="
135 				+ reportLocationType + ", logoMediaId=" + logoMediaId
136 				+ ", name=" + name + ", description=" + description
137 				+ ", redirectDomain=" + redirectDomain + ", isReportEnter="
138 				+ isReportEnter + ", homeUrl=" + homeUrl;
139 	}
140 }