1 package com.foxinmy.weixin4j.mp.model;
2
3 import java.io.Serializable;
4 import java.util.Date;
5 import java.util.List;
6
7 import com.alibaba.fastjson.annotation.JSONField;
8 import com.foxinmy.weixin4j.mp.type.AutomatchMode;
9 import com.foxinmy.weixin4j.mp.type.AutoreplyMode;
10 import com.foxinmy.weixin4j.type.ButtonType;
11
12
13
14
15
16
17
18
19
20
21 public class AutoReplySetting implements Serializable {
22
23 private static final long serialVersionUID = 8164017927864497009L;
24
25
26
27
28 @JSONField(name = "is_add_friend_reply_open")
29 private boolean isAddFriendReplyOpen;
30
31
32
33 @JSONField(name = "is_autoreply_open")
34 private boolean isAutoreplyOpen;
35
36
37
38
39
40
41 @JSONField(name = "add_friend_autoreply_info")
42 private Entry addFriendReply;
43
44
45
46
47
48
49 @JSONField(name = "message_default_autoreply_info")
50 private Entry defaultReply;
51
52
53
54
55
56
57 private List<Rule> keywordReplyList;
58
59 public boolean isAddFriendReplyOpen() {
60 return isAddFriendReplyOpen;
61 }
62
63 public void setAddFriendReplyOpen(boolean isAddFriendReplyOpen) {
64 this.isAddFriendReplyOpen = isAddFriendReplyOpen;
65 }
66
67 public boolean isAutoreplyOpen() {
68 return isAutoreplyOpen;
69 }
70
71 public void setAutoreplyOpen(boolean isAutoreplyOpen) {
72 this.isAutoreplyOpen = isAutoreplyOpen;
73 }
74
75 public Entry getAddFriendReply() {
76 return addFriendReply;
77 }
78
79 public void setAddFriendReply(Entry addFriendReply) {
80 this.addFriendReply = addFriendReply;
81 }
82
83 public Entry getDefaultReply() {
84 return defaultReply;
85 }
86
87 public void setDefaultReply(Entry defaultReply) {
88 this.defaultReply = defaultReply;
89 }
90
91 public List<Rule> getKeywordReplyList() {
92 return keywordReplyList;
93 }
94
95 public void setKeywordReplyList(List<Rule> keywordReplyList) {
96 this.keywordReplyList = keywordReplyList;
97 }
98
99 @Override
100 public String toString() {
101 return "AutoReplySetting [isAddFriendReplyOpen=" + isAddFriendReplyOpen
102 + ", isAutoreplyOpen=" + isAutoreplyOpen + ", addFriendReply="
103 + addFriendReply + ", defaultReply=" + defaultReply
104 + ", keywordReplyList=" + keywordReplyList + "]";
105 }
106
107
108
109
110
111
112
113
114
115
116 public static class Rule implements Serializable {
117
118 private static final long serialVersionUID = -7299903545861946025L;
119
120
121
122 @JSONField(name = "rule_name")
123 private String ruleName;
124
125
126
127 @JSONField(name = "create_time")
128 private Date createTime;
129
130
131
132
133
134 @JSONField(name = "reply_mode")
135 private AutoreplyMode replyMode;
136
137
138
139
140
141 @JSONField(name = "keyword_list_info")
142 private List<Entry> keywordList;
143
144
145
146
147
148 @JSONField(name = "reply_list_info")
149 private List<Entry> replyList;
150
151 public String getRuleName() {
152 return ruleName;
153 }
154
155 public void setRuleName(String ruleName) {
156 this.ruleName = ruleName;
157 }
158
159 public Date getCreateTime() {
160 return createTime;
161 }
162
163 public void setCreateTime(Date createTime) {
164 this.createTime = createTime;
165 }
166
167 public AutoreplyMode getReplyMode() {
168 return replyMode;
169 }
170
171 public void setReplyMode(AutoreplyMode replyMode) {
172 this.replyMode = replyMode;
173 }
174
175 public List<Entry> getKeywordList() {
176 return keywordList;
177 }
178
179 public void setKeywordList(List<Entry> keywordList) {
180 this.keywordList = keywordList;
181 }
182
183 public List<Entry> getReplyList() {
184 return replyList;
185 }
186
187 public void setReplyList(List<Entry> replyList) {
188 this.replyList = replyList;
189 }
190
191 @Override
192 public String toString() {
193 return "Rule [ruleName=" + ruleName + ", createTime=" + createTime
194 + ", replyMode=" + replyMode + ", keywordList="
195 + keywordList + ", replyList=" + replyList + "]";
196 }
197 }
198
199
200
201
202
203
204
205
206
207
208 public static class Entry implements Serializable {
209
210 private static final long serialVersionUID = -187922224547974025L;
211
212
213
214
215 private ButtonType type;
216
217
218
219
220
221 private Serializable content;
222
223
224
225
226
227 @JSONField(name = "match_mode")
228 private AutomatchMode matchMode;
229
230 public ButtonType getType() {
231 return type;
232 }
233
234 public void setType(ButtonType type) {
235 this.type = type;
236 }
237
238 public Serializable getContent() {
239 return content;
240 }
241
242 public void setContent(Serializable content) {
243 this.content = content;
244 }
245
246 public AutomatchMode getMatchMode() {
247 return matchMode;
248 }
249
250 public void setMatchMode(AutomatchMode matchMode) {
251 this.matchMode = matchMode;
252 }
253
254 @Override
255 public String toString() {
256 return "Entry [type=" + type + ", content=" + content
257 + ", matchMode=" + matchMode + "]";
258 }
259 }
260 }