yangys
2024-05-18 cc0bdfb33ef638dfafe3185c92c7076d815e1c9b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package com.qianwen.core.websocket.distribute;
 
import java.util.List;
 
public class MessageDO {
    private Boolean needBroadcast;
    private List<Object> sessionKeys;
    private List<String> sessionIds;
    private String messageText;
 
    public MessageDO setNeedBroadcast(final Boolean needBroadcast) {
        this.needBroadcast = needBroadcast;
        return this;
    }
 
    public MessageDO setSessionKeys(final List<Object> sessionKeys) {
        this.sessionKeys = sessionKeys;
        return this;
    }
 
    public MessageDO setSessionIds(final List<String> sessionIds) {
        this.sessionIds = sessionIds;
        return this;
    }
 
    public MessageDO setMessageText(final String messageText) {
        this.messageText = messageText;
        return this;
    }
 
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (o instanceof MessageDO) {
            MessageDO other = (MessageDO) o;
            if (other.canEqual(this)) {
                Object this$needBroadcast = getNeedBroadcast();
                Object other$needBroadcast = other.getNeedBroadcast();
                if (this$needBroadcast == null) {
                    if (other$needBroadcast != null) {
                        return false;
                    }
                } else if (!this$needBroadcast.equals(other$needBroadcast)) {
                    return false;
                }
                Object this$sessionKeys = getSessionKeys();
                Object other$sessionKeys = other.getSessionKeys();
                if (this$sessionKeys == null) {
                    if (other$sessionKeys != null) {
                        return false;
                    }
                } else if (!this$sessionKeys.equals(other$sessionKeys)) {
                    return false;
                }
                Object this$sessionIds = getSessionIds();
                Object other$sessionIds = other.getSessionIds();
                if (this$sessionIds == null) {
                    if (other$sessionIds != null) {
                        return false;
                    }
                } else if (!this$sessionIds.equals(other$sessionIds)) {
                    return false;
                }
                Object this$messageText = getMessageText();
                Object other$messageText = other.getMessageText();
                return this$messageText == null ? other$messageText == null : this$messageText.equals(other$messageText);
            }
            return false;
        }
        return false;
    }
 
    protected boolean canEqual(final Object other) {
        return other instanceof MessageDO;
    }
 
    public int hashCode() {
        Object $needBroadcast = getNeedBroadcast();
        int result = (1 * 59) + ($needBroadcast == null ? 43 : $needBroadcast.hashCode());
        Object $sessionKeys = getSessionKeys();
        int result2 = (result * 59) + ($sessionKeys == null ? 43 : $sessionKeys.hashCode());
        Object $sessionIds = getSessionIds();
        int result3 = (result2 * 59) + ($sessionIds == null ? 43 : $sessionIds.hashCode());
        Object $messageText = getMessageText();
        return (result3 * 59) + ($messageText == null ? 43 : $messageText.hashCode());
    }
 
    public String toString() {
        return "MessageDO(needBroadcast=" + getNeedBroadcast() + ", sessionKeys=" + getSessionKeys() + ", sessionIds=" + getSessionIds() + ", messageText=" + getMessageText() + ")";
    }
 
    public Boolean getNeedBroadcast() {
        return this.needBroadcast;
    }
 
    public List<Object> getSessionKeys() {
        return this.sessionKeys;
    }
 
    public List<String> getSessionIds() {
        return this.sessionIds;
    }
 
    public String getMessageText() {
        return this.messageText;
    }
 
    public static MessageDO broadcastMessage(String text) {
        return new MessageDO().setMessageText(text).setNeedBroadcast(true);
    }
}