|
| 1 | +package me.chanjar.weixin.cp.bean.outxmlbuilder; |
| 2 | + |
| 3 | +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutEventMessage; |
| 4 | + |
| 5 | +/** |
| 6 | + * @author eYoung |
| 7 | + * @description: |
| 8 | + * @date create at 2021/12/3 16:34 |
| 9 | + */ |
| 10 | +public class EventBuilder extends BaseBuilder<EventBuilder, WxCpXmlOutEventMessage> { |
| 11 | + |
| 12 | + private String event; |
| 13 | + private String chatId; |
| 14 | + private String changeType; |
| 15 | + private String updateDetail; |
| 16 | + private String joinScene; |
| 17 | + private String quitScene; |
| 18 | + private String memChangeCnt; |
| 19 | + private String tagType; |
| 20 | + private String strategyId; |
| 21 | + private String userID; |
| 22 | + private String externalUserID; |
| 23 | + private String state; |
| 24 | + private String welcomeCode; |
| 25 | + private String source; |
| 26 | + private String failReason; |
| 27 | + private String id; |
| 28 | + |
| 29 | + public EventBuilder chatId(String chatId) { |
| 30 | + this.chatId = chatId; |
| 31 | + return this; |
| 32 | + } |
| 33 | + |
| 34 | + public EventBuilder event(String event) { |
| 35 | + this.event = event; |
| 36 | + return this; |
| 37 | + } |
| 38 | + |
| 39 | + public EventBuilder changeType(String changeType) { |
| 40 | + this.changeType = changeType; |
| 41 | + return this; |
| 42 | + } |
| 43 | + |
| 44 | + public EventBuilder updateDetail(String updateDetail) { |
| 45 | + this.updateDetail = updateDetail; |
| 46 | + return this; |
| 47 | + } |
| 48 | + |
| 49 | + public EventBuilder joinScene(String joinScene) { |
| 50 | + this.joinScene = joinScene; |
| 51 | + return this; |
| 52 | + } |
| 53 | + |
| 54 | + public EventBuilder quitScene(String quitScene) { |
| 55 | + this.quitScene = quitScene; |
| 56 | + return this; |
| 57 | + } |
| 58 | + |
| 59 | + public EventBuilder memChangeCnt(String memChangeCnt) { |
| 60 | + this.memChangeCnt = memChangeCnt; |
| 61 | + return this; |
| 62 | + } |
| 63 | + |
| 64 | + public EventBuilder tagType(String tagType) { |
| 65 | + this.tagType = tagType; |
| 66 | + return this; |
| 67 | + } |
| 68 | + |
| 69 | + public EventBuilder strategyId(String strategyId) { |
| 70 | + this.strategyId = strategyId; |
| 71 | + return this; |
| 72 | + } |
| 73 | + |
| 74 | + public EventBuilder userID(String userID) { |
| 75 | + this.userID = userID; |
| 76 | + return this; |
| 77 | + } |
| 78 | + |
| 79 | + public EventBuilder externalUserID(String externalUserID) { |
| 80 | + this.externalUserID = externalUserID; |
| 81 | + return this; |
| 82 | + } |
| 83 | + |
| 84 | + public EventBuilder state(String state) { |
| 85 | + this.state = state; |
| 86 | + return this; |
| 87 | + } |
| 88 | + |
| 89 | + public EventBuilder source(String source){ |
| 90 | + this.source = source; |
| 91 | + return this; |
| 92 | + } |
| 93 | + |
| 94 | + public EventBuilder welcomeCode(String welcomeCode) { |
| 95 | + this.welcomeCode = welcomeCode; |
| 96 | + return this; |
| 97 | + } |
| 98 | + |
| 99 | + public EventBuilder failReason(String failReason){ |
| 100 | + this.failReason = failReason; |
| 101 | + return this; |
| 102 | + } |
| 103 | + |
| 104 | + public EventBuilder id(String id){ |
| 105 | + this.id = id; |
| 106 | + return this; |
| 107 | + } |
| 108 | + |
| 109 | + @Override |
| 110 | + public WxCpXmlOutEventMessage build() { |
| 111 | + WxCpXmlOutEventMessage m = new WxCpXmlOutEventMessage(); |
| 112 | + super.setCommon(m); |
| 113 | + m.setEvent(this.event); |
| 114 | + m.setChatId(this.chatId); |
| 115 | + m.setChangeType(this.changeType); |
| 116 | + m.setUpdateDetail(this.updateDetail); |
| 117 | + m.setJoinScene(this.joinScene); |
| 118 | + m.setQuitScene(this.quitScene); |
| 119 | + m.setMemChangeCnt(this.memChangeCnt); |
| 120 | + m.setTagType(this.tagType); |
| 121 | + m.setStrategyId(this.strategyId); |
| 122 | + m.setUserID(this.userID); |
| 123 | + m.setExternalUserID(this.externalUserID); |
| 124 | + m.setState(this.state); |
| 125 | + m.setWelcomeCode(this.welcomeCode); |
| 126 | + m.setSource(this.source); |
| 127 | + m.setFailReason(this.failReason); |
| 128 | + m.setId(this.id); |
| 129 | + return m; |
| 130 | + } |
| 131 | +} |
0 commit comments