-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessage.py
More file actions
61 lines (47 loc) · 1.45 KB
/
message.py
File metadata and controls
61 lines (47 loc) · 1.45 KB
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
class message(object):
"""description of class"""
def __init__(self, applicationId, sessionId, messageId, content, participants): #
self.applicationId = applicationId
self.sessionId = sessionId
self.messageId = messageId
self.content = content
self.participants = participants
@property
def applicationId(self):
return self.__applicationId
@applicationId.setter
def applicationId(self, applicationId):
self.__applicationId = applicationId
@property
def sessionId(self):
return self.__sessionId
@sessionId.setter
def sessionId(self, sessionId):
self.__sessionId = sessionId
@property
def messageId(self):
return self.__messageId
@messageId.setter
def messageId(self, messageId):
self.__messageId = messageId
@property
def content(self):
return self.__content
@content.setter
def content(self, content):
self.__content = content
@property
def participants(self):
return self.__participants
@participants.setter
def participants(self, participants):
self.__participants = participants
def serialize(self):
m = {
'applicationId': self.applicationId,
'sessionId': self.sessionId,
'messageId': self.messageId,
'content': self.content,
'participants': self.participants
}
return m