slidge-whatsapp 0.3.1__cp311-cp311-manylinux_2_36_aarch64.whl → 0.3.4__cp311-cp311-manylinux_2_36_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of slidge-whatsapp might be problematic. Click here for more details.

Files changed (74) hide show
  1. slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.h +178 -178
  2. slidge_whatsapp/generated/_whatsapp.cpython-311-aarch64-linux-gnu.so +0 -0
  3. slidge_whatsapp/generated/build.py +145 -145
  4. slidge_whatsapp/generated/go.py +1 -1
  5. slidge_whatsapp/generated/whatsapp.c +1517 -1517
  6. slidge_whatsapp/generated/whatsapp.go +1151 -1151
  7. slidge_whatsapp/generated/whatsapp.py +1175 -1175
  8. slidge_whatsapp/generated/whatsapp_go.h +178 -178
  9. slidge_whatsapp/go.mod +9 -9
  10. slidge_whatsapp/go.sum +18 -18
  11. slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +7 -2
  12. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/module.go +2 -1
  13. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +3 -0
  14. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +48 -7
  15. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +13 -0
  16. slidge_whatsapp/vendor/go.mau.fi/util/jsontime/helpers.go +16 -5
  17. slidge_whatsapp/vendor/go.mau.fi/util/jsontime/integer.go +27 -12
  18. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +39 -28
  19. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +17 -2
  20. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +2 -1
  21. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +18 -6
  22. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +40 -16
  23. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +24 -21
  24. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +21 -0
  25. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +3213 -2851
  26. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +108 -74
  27. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +7 -3
  28. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +1 -0
  29. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +7 -3
  30. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +1 -0
  31. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +35 -23
  32. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +5 -3
  33. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +47 -16
  34. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +4 -10
  35. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +28 -42
  36. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +33 -32
  37. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  38. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +5 -1
  39. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sessioncache.go +125 -0
  40. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +8 -0
  41. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +34 -11
  42. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +5 -3
  43. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +24 -9
  44. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +12 -1
  45. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +7 -4
  46. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +11 -6
  47. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go125.go +15 -0
  48. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go126.go +15 -0
  49. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +24 -1
  50. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +0 -1
  51. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +35 -26
  52. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +4 -2
  53. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +2 -0
  54. slidge_whatsapp/vendor/golang.org/x/net/http2/{writesched_priority.go → writesched_priority_rfc7540.go} +52 -52
  55. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority_rfc9128.go +209 -0
  56. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +1 -1
  57. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +2 -2
  58. slidge_whatsapp/vendor/golang.org/x/net/internal/socks/socks.go +1 -1
  59. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +9 -0
  60. slidge_whatsapp/vendor/golang.org/x/sys/unix/fdset.go +1 -3
  61. slidge_whatsapp/vendor/golang.org/x/sys/unix/ifreq_linux.go +1 -3
  62. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkall.sh +1 -0
  63. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +1 -3
  64. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_netbsd.go +17 -0
  65. slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +2 -0
  66. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +16 -0
  67. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +18 -0
  68. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +2 -9
  69. slidge_whatsapp/vendor/modules.txt +10 -10
  70. {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/METADATA +1 -1
  71. {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/RECORD +74 -70
  72. {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/WHEEL +0 -0
  73. {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/entry_points.txt +0 -0
  74. {slidge_whatsapp-0.3.1.dist-info → slidge_whatsapp-0.3.4.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,7 @@
2
2
  # python wrapper for package codeberg.org/slidge/slidge-whatsapp/slidge_whatsapp within overall package whatsapp
3
3
  # This is what you import to use the package.
4
4
  # File is generated by gopy. Do not edit.
5
- # gopy build -output=generated -no-make=true -build-tags="mupdf extlib static" .
5
+ # gopy build -output=generated -no-make=true -build-tags="mupdf extlib" .
6
6
 
7
7
  # the following is required to enable dlopen to open the _go.so file
8
8
  import os,sys,inspect,collections
@@ -1013,9 +1013,9 @@ DefaultUserServer = "s.whatsapp.net"
1013
1013
 
1014
1014
  # ---- Structs ---
1015
1015
 
1016
- # Python type for struct whatsapp.Call
1017
- class Call(go.GoClass):
1018
- """A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for\ncalls is currently not implemented, and this structure contains the bare minimum data required\nfor notifying on missed calls.\n"""
1016
+ # Python type for struct whatsapp.Avatar
1017
+ class Avatar(go.GoClass):
1018
+ """A Avatar represents a small image set for a Contact or Group.\n"""
1019
1019
  def __init__(self, *args, **kwargs):
1020
1020
  """
1021
1021
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1029,25 +1029,21 @@ class Call(go.GoClass):
1029
1029
  self.handle = args[0].handle
1030
1030
  _whatsapp.IncRef(self.handle)
1031
1031
  else:
1032
- self.handle = _whatsapp.whatsapp_Call_CTor()
1032
+ self.handle = _whatsapp.whatsapp_Avatar_CTor()
1033
1033
  _whatsapp.IncRef(self.handle)
1034
1034
  if 0 < len(args):
1035
- self.State = args[0]
1036
- if "State" in kwargs:
1037
- self.State = kwargs["State"]
1035
+ self.ID = args[0]
1036
+ if "ID" in kwargs:
1037
+ self.ID = kwargs["ID"]
1038
1038
  if 1 < len(args):
1039
- self.JID = args[1]
1040
- if "JID" in kwargs:
1041
- self.JID = kwargs["JID"]
1042
- if 2 < len(args):
1043
- self.Timestamp = args[2]
1044
- if "Timestamp" in kwargs:
1045
- self.Timestamp = kwargs["Timestamp"]
1039
+ self.URL = args[1]
1040
+ if "URL" in kwargs:
1041
+ self.URL = kwargs["URL"]
1046
1042
  def __del__(self):
1047
1043
  _whatsapp.DecRef(self.handle)
1048
1044
  def __str__(self):
1049
1045
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1050
- sv = 'whatsapp.Call{'
1046
+ sv = 'whatsapp.Avatar{'
1051
1047
  first = True
1052
1048
  for v in pr:
1053
1049
  if callable(v[1]):
@@ -1060,42 +1056,33 @@ class Call(go.GoClass):
1060
1056
  return sv + '}'
1061
1057
  def __repr__(self):
1062
1058
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1063
- sv = 'whatsapp.Call ( '
1059
+ sv = 'whatsapp.Avatar ( '
1064
1060
  for v in pr:
1065
1061
  if not callable(v[1]):
1066
1062
  sv += v[0] + '=' + str(v[1]) + ', '
1067
1063
  return sv + ')'
1068
1064
  @property
1069
- def State(self):
1070
- return _whatsapp.whatsapp_Call_State_Get(self.handle)
1071
- @State.setter
1072
- def State(self, value):
1073
- if isinstance(value, go.GoClass):
1074
- _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
1075
- else:
1076
- _whatsapp.whatsapp_Call_State_Set(self.handle, value)
1077
- @property
1078
- def JID(self):
1079
- return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1080
- @JID.setter
1081
- def JID(self, value):
1065
+ def ID(self):
1066
+ return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
1067
+ @ID.setter
1068
+ def ID(self, value):
1082
1069
  if isinstance(value, go.GoClass):
1083
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1070
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
1084
1071
  else:
1085
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1072
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
1086
1073
  @property
1087
- def Timestamp(self):
1088
- return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
1089
- @Timestamp.setter
1090
- def Timestamp(self, value):
1074
+ def URL(self):
1075
+ return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
1076
+ @URL.setter
1077
+ def URL(self, value):
1091
1078
  if isinstance(value, go.GoClass):
1092
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1079
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
1093
1080
  else:
1094
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1081
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
1095
1082
 
1096
- # Python type for struct whatsapp.Contact
1097
- class Contact(go.GoClass):
1098
- """A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
1083
+ # Python type for struct whatsapp.Gateway
1084
+ class Gateway(go.GoClass):
1085
+ """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
1099
1086
  def __init__(self, *args, **kwargs):
1100
1087
  """
1101
1088
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1109,21 +1096,29 @@ class Contact(go.GoClass):
1109
1096
  self.handle = args[0].handle
1110
1097
  _whatsapp.IncRef(self.handle)
1111
1098
  else:
1112
- self.handle = _whatsapp.whatsapp_Contact_CTor()
1099
+ self.handle = _whatsapp.whatsapp_Gateway_CTor()
1113
1100
  _whatsapp.IncRef(self.handle)
1114
1101
  if 0 < len(args):
1115
- self.JID = args[0]
1116
- if "JID" in kwargs:
1117
- self.JID = kwargs["JID"]
1102
+ self.DBPath = args[0]
1103
+ if "DBPath" in kwargs:
1104
+ self.DBPath = kwargs["DBPath"]
1118
1105
  if 1 < len(args):
1119
1106
  self.Name = args[1]
1120
1107
  if "Name" in kwargs:
1121
1108
  self.Name = kwargs["Name"]
1109
+ if 2 < len(args):
1110
+ self.LogLevel = args[2]
1111
+ if "LogLevel" in kwargs:
1112
+ self.LogLevel = kwargs["LogLevel"]
1113
+ if 3 < len(args):
1114
+ self.TempDir = args[3]
1115
+ if "TempDir" in kwargs:
1116
+ self.TempDir = kwargs["TempDir"]
1122
1117
  def __del__(self):
1123
1118
  _whatsapp.DecRef(self.handle)
1124
1119
  def __str__(self):
1125
1120
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1126
- sv = 'whatsapp.Contact{'
1121
+ sv = 'whatsapp.Gateway{'
1127
1122
  first = True
1128
1123
  for v in pr:
1129
1124
  if callable(v[1]):
@@ -1136,33 +1131,72 @@ class Contact(go.GoClass):
1136
1131
  return sv + '}'
1137
1132
  def __repr__(self):
1138
1133
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1139
- sv = 'whatsapp.Contact ( '
1134
+ sv = 'whatsapp.Gateway ( '
1140
1135
  for v in pr:
1141
1136
  if not callable(v[1]):
1142
1137
  sv += v[0] + '=' + str(v[1]) + ', '
1143
1138
  return sv + ')'
1144
1139
  @property
1145
- def JID(self):
1146
- return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
1147
- @JID.setter
1148
- def JID(self, value):
1140
+ def DBPath(self):
1141
+ return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
1142
+ @DBPath.setter
1143
+ def DBPath(self, value):
1149
1144
  if isinstance(value, go.GoClass):
1150
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
1145
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
1151
1146
  else:
1152
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
1147
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
1153
1148
  @property
1154
1149
  def Name(self):
1155
- return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
1150
+ return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
1156
1151
  @Name.setter
1157
1152
  def Name(self, value):
1158
1153
  if isinstance(value, go.GoClass):
1159
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
1154
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
1160
1155
  else:
1161
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
1156
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
1157
+ @property
1158
+ def LogLevel(self):
1159
+ return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
1160
+ @LogLevel.setter
1161
+ def LogLevel(self, value):
1162
+ if isinstance(value, go.GoClass):
1163
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
1164
+ else:
1165
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
1166
+ @property
1167
+ def TempDir(self):
1168
+ return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
1169
+ @TempDir.setter
1170
+ def TempDir(self, value):
1171
+ if isinstance(value, go.GoClass):
1172
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
1173
+ else:
1174
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
1175
+ def Init(self):
1176
+ """Init() str
1177
+
1178
+ Init performs initialization procedures for the Gateway, and is expected to be run before any
1179
+ calls to [Gateway.Session].
1180
+ """
1181
+ return _whatsapp.whatsapp_Gateway_Init(self.handle)
1182
+ def NewSession(self, device):
1183
+ """NewSession(object device) object
1184
+
1185
+ NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
1186
+ a valid ID, a pair operation will be required, as described in [Session.Login].
1187
+ """
1188
+ return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
1189
+ def CleanupSession(self, device):
1190
+ """CleanupSession(object device) str
1191
+
1192
+ CleanupSession will remove all invalid and obsolete references to the given device, and should be
1193
+ used when pairing a new device or unregistering from the Gateway.
1194
+ """
1195
+ return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
1162
1196
 
1163
- # Python type for struct whatsapp.Group
1164
- class Group(go.GoClass):
1165
- """A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
1197
+ # Python type for struct whatsapp.Message
1198
+ class Message(go.GoClass):
1199
+ """A Message represents one of many kinds of bidirectional communication payloads, for example, a\ntext message, a file (image, video) attachment, an emoji reaction, etc. Messages of different\nkinds are denoted as such, and re-use fields where the semantics overlap.\n"""
1166
1200
  def __init__(self, *args, **kwargs):
1167
1201
  """
1168
1202
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1176,37 +1210,97 @@ class Group(go.GoClass):
1176
1210
  self.handle = args[0].handle
1177
1211
  _whatsapp.IncRef(self.handle)
1178
1212
  else:
1179
- self.handle = _whatsapp.whatsapp_Group_CTor()
1213
+ self.handle = _whatsapp.whatsapp_Message_CTor()
1180
1214
  _whatsapp.IncRef(self.handle)
1181
1215
  if 0 < len(args):
1182
- self.JID = args[0]
1183
- if "JID" in kwargs:
1184
- self.JID = kwargs["JID"]
1216
+ self.Kind = args[0]
1217
+ if "Kind" in kwargs:
1218
+ self.Kind = kwargs["Kind"]
1185
1219
  if 1 < len(args):
1186
- self.Name = args[1]
1187
- if "Name" in kwargs:
1188
- self.Name = kwargs["Name"]
1220
+ self.ID = args[1]
1221
+ if "ID" in kwargs:
1222
+ self.ID = kwargs["ID"]
1189
1223
  if 2 < len(args):
1190
- self.Subject = args[2]
1191
- if "Subject" in kwargs:
1192
- self.Subject = kwargs["Subject"]
1224
+ self.JID = args[2]
1225
+ if "JID" in kwargs:
1226
+ self.JID = kwargs["JID"]
1193
1227
  if 3 < len(args):
1194
- self.Nickname = args[3]
1195
- if "Nickname" in kwargs:
1196
- self.Nickname = kwargs["Nickname"]
1228
+ self.GroupJID = args[3]
1229
+ if "GroupJID" in kwargs:
1230
+ self.GroupJID = kwargs["GroupJID"]
1197
1231
  if 4 < len(args):
1198
- self.Participants = args[4]
1199
- if "Participants" in kwargs:
1200
- self.Participants = kwargs["Participants"]
1232
+ self.OriginJID = args[4]
1233
+ if "OriginJID" in kwargs:
1234
+ self.OriginJID = kwargs["OriginJID"]
1201
1235
  if 5 < len(args):
1202
- self.InviteCode = args[5]
1203
- if "InviteCode" in kwargs:
1204
- self.InviteCode = kwargs["InviteCode"]
1236
+ self.Body = args[5]
1237
+ if "Body" in kwargs:
1238
+ self.Body = kwargs["Body"]
1239
+ if 6 < len(args):
1240
+ self.Timestamp = args[6]
1241
+ if "Timestamp" in kwargs:
1242
+ self.Timestamp = kwargs["Timestamp"]
1243
+ if 7 < len(args):
1244
+ self.IsCarbon = args[7]
1245
+ if "IsCarbon" in kwargs:
1246
+ self.IsCarbon = kwargs["IsCarbon"]
1247
+ if 8 < len(args):
1248
+ self.IsForwarded = args[8]
1249
+ if "IsForwarded" in kwargs:
1250
+ self.IsForwarded = kwargs["IsForwarded"]
1251
+ if 9 < len(args):
1252
+ self.ReplyID = args[9]
1253
+ if "ReplyID" in kwargs:
1254
+ self.ReplyID = kwargs["ReplyID"]
1255
+ if 10 < len(args):
1256
+ self.ReplyBody = args[10]
1257
+ if "ReplyBody" in kwargs:
1258
+ self.ReplyBody = kwargs["ReplyBody"]
1259
+ if 11 < len(args):
1260
+ self.Attachments = args[11]
1261
+ if "Attachments" in kwargs:
1262
+ self.Attachments = kwargs["Attachments"]
1263
+ if 12 < len(args):
1264
+ self.Preview = args[12]
1265
+ if "Preview" in kwargs:
1266
+ self.Preview = kwargs["Preview"]
1267
+ if 13 < len(args):
1268
+ self.Location = args[13]
1269
+ if "Location" in kwargs:
1270
+ self.Location = kwargs["Location"]
1271
+ if 14 < len(args):
1272
+ self.Poll = args[14]
1273
+ if "Poll" in kwargs:
1274
+ self.Poll = kwargs["Poll"]
1275
+ if 15 < len(args):
1276
+ self.Album = args[15]
1277
+ if "Album" in kwargs:
1278
+ self.Album = kwargs["Album"]
1279
+ if 16 < len(args):
1280
+ self.GroupInvite = args[16]
1281
+ if "GroupInvite" in kwargs:
1282
+ self.GroupInvite = kwargs["GroupInvite"]
1283
+ if 17 < len(args):
1284
+ self.MentionJIDs = args[17]
1285
+ if "MentionJIDs" in kwargs:
1286
+ self.MentionJIDs = kwargs["MentionJIDs"]
1287
+ if 18 < len(args):
1288
+ self.Receipts = args[18]
1289
+ if "Receipts" in kwargs:
1290
+ self.Receipts = kwargs["Receipts"]
1291
+ if 19 < len(args):
1292
+ self.Reactions = args[19]
1293
+ if "Reactions" in kwargs:
1294
+ self.Reactions = kwargs["Reactions"]
1295
+ if 20 < len(args):
1296
+ self.IsHistory = args[20]
1297
+ if "IsHistory" in kwargs:
1298
+ self.IsHistory = kwargs["IsHistory"]
1205
1299
  def __del__(self):
1206
1300
  _whatsapp.DecRef(self.handle)
1207
1301
  def __str__(self):
1208
1302
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1209
- sv = 'whatsapp.Group{'
1303
+ sv = 'whatsapp.Message{'
1210
1304
  first = True
1211
1305
  for v in pr:
1212
1306
  if callable(v[1]):
@@ -1219,69 +1313,204 @@ class Group(go.GoClass):
1219
1313
  return sv + '}'
1220
1314
  def __repr__(self):
1221
1315
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1222
- sv = 'whatsapp.Group ( '
1316
+ sv = 'whatsapp.Message ( '
1223
1317
  for v in pr:
1224
1318
  if not callable(v[1]):
1225
1319
  sv += v[0] + '=' + str(v[1]) + ', '
1226
1320
  return sv + ')'
1227
1321
  @property
1228
- def JID(self):
1229
- return _whatsapp.whatsapp_Group_JID_Get(self.handle)
1230
- @JID.setter
1231
- def JID(self, value):
1322
+ def Kind(self):
1323
+ return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
1324
+ @Kind.setter
1325
+ def Kind(self, value):
1232
1326
  if isinstance(value, go.GoClass):
1233
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
1327
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
1234
1328
  else:
1235
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
1329
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
1236
1330
  @property
1237
- def Name(self):
1238
- return _whatsapp.whatsapp_Group_Name_Get(self.handle)
1239
- @Name.setter
1240
- def Name(self, value):
1331
+ def ID(self):
1332
+ return _whatsapp.whatsapp_Message_ID_Get(self.handle)
1333
+ @ID.setter
1334
+ def ID(self, value):
1241
1335
  if isinstance(value, go.GoClass):
1242
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
1336
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
1243
1337
  else:
1244
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
1338
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
1245
1339
  @property
1246
- def Subject(self):
1247
- return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
1248
- @Subject.setter
1249
- def Subject(self, value):
1340
+ def JID(self):
1341
+ return _whatsapp.whatsapp_Message_JID_Get(self.handle)
1342
+ @JID.setter
1343
+ def JID(self, value):
1250
1344
  if isinstance(value, go.GoClass):
1251
- _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
1345
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
1346
+ else:
1347
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
1348
+ @property
1349
+ def GroupJID(self):
1350
+ return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
1351
+ @GroupJID.setter
1352
+ def GroupJID(self, value):
1353
+ if isinstance(value, go.GoClass):
1354
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
1355
+ else:
1356
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
1357
+ @property
1358
+ def OriginJID(self):
1359
+ return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
1360
+ @OriginJID.setter
1361
+ def OriginJID(self, value):
1362
+ if isinstance(value, go.GoClass):
1363
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
1364
+ else:
1365
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
1366
+ @property
1367
+ def Body(self):
1368
+ return _whatsapp.whatsapp_Message_Body_Get(self.handle)
1369
+ @Body.setter
1370
+ def Body(self, value):
1371
+ if isinstance(value, go.GoClass):
1372
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
1373
+ else:
1374
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
1375
+ @property
1376
+ def Timestamp(self):
1377
+ return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
1378
+ @Timestamp.setter
1379
+ def Timestamp(self, value):
1380
+ if isinstance(value, go.GoClass):
1381
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
1382
+ else:
1383
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
1384
+ @property
1385
+ def IsCarbon(self):
1386
+ return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
1387
+ @IsCarbon.setter
1388
+ def IsCarbon(self, value):
1389
+ if isinstance(value, go.GoClass):
1390
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
1391
+ else:
1392
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
1393
+ @property
1394
+ def IsForwarded(self):
1395
+ return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
1396
+ @IsForwarded.setter
1397
+ def IsForwarded(self, value):
1398
+ if isinstance(value, go.GoClass):
1399
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
1400
+ else:
1401
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
1402
+ @property
1403
+ def ReplyID(self):
1404
+ return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
1405
+ @ReplyID.setter
1406
+ def ReplyID(self, value):
1407
+ if isinstance(value, go.GoClass):
1408
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
1409
+ else:
1410
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
1411
+ @property
1412
+ def ReplyBody(self):
1413
+ return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
1414
+ @ReplyBody.setter
1415
+ def ReplyBody(self, value):
1416
+ if isinstance(value, go.GoClass):
1417
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
1418
+ else:
1419
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
1420
+ @property
1421
+ def Attachments(self):
1422
+ return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
1423
+ @Attachments.setter
1424
+ def Attachments(self, value):
1425
+ if isinstance(value, go.GoClass):
1426
+ _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
1252
1427
  else:
1253
1428
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1254
1429
  @property
1255
- def Nickname(self):
1256
- return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
1257
- @Nickname.setter
1258
- def Nickname(self, value):
1430
+ def Preview(self):
1431
+ return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
1432
+ @Preview.setter
1433
+ def Preview(self, value):
1259
1434
  if isinstance(value, go.GoClass):
1260
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
1435
+ _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
1261
1436
  else:
1262
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
1437
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1263
1438
  @property
1264
- def Participants(self):
1265
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
1266
- @Participants.setter
1267
- def Participants(self, value):
1439
+ def Location(self):
1440
+ return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
1441
+ @Location.setter
1442
+ def Location(self, value):
1268
1443
  if isinstance(value, go.GoClass):
1269
- _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
1444
+ _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
1270
1445
  else:
1271
1446
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1272
1447
  @property
1273
- def InviteCode(self):
1274
- return _whatsapp.whatsapp_Group_InviteCode_Get(self.handle)
1275
- @InviteCode.setter
1276
- def InviteCode(self, value):
1448
+ def Poll(self):
1449
+ return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
1450
+ @Poll.setter
1451
+ def Poll(self, value):
1277
1452
  if isinstance(value, go.GoClass):
1278
- _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value.handle)
1453
+ _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
1279
1454
  else:
1280
- _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value)
1455
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1456
+ @property
1457
+ def Album(self):
1458
+ return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
1459
+ @Album.setter
1460
+ def Album(self, value):
1461
+ if isinstance(value, go.GoClass):
1462
+ _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
1463
+ else:
1464
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1465
+ @property
1466
+ def GroupInvite(self):
1467
+ return Group(handle=_whatsapp.whatsapp_Message_GroupInvite_Get(self.handle))
1468
+ @GroupInvite.setter
1469
+ def GroupInvite(self, value):
1470
+ if isinstance(value, go.GoClass):
1471
+ _whatsapp.whatsapp_Message_GroupInvite_Set(self.handle, value.handle)
1472
+ else:
1473
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1474
+ @property
1475
+ def MentionJIDs(self):
1476
+ return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
1477
+ @MentionJIDs.setter
1478
+ def MentionJIDs(self, value):
1479
+ if isinstance(value, go.GoClass):
1480
+ _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
1481
+ else:
1482
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1483
+ @property
1484
+ def Receipts(self):
1485
+ return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
1486
+ @Receipts.setter
1487
+ def Receipts(self, value):
1488
+ if isinstance(value, go.GoClass):
1489
+ _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
1490
+ else:
1491
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1492
+ @property
1493
+ def Reactions(self):
1494
+ return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
1495
+ @Reactions.setter
1496
+ def Reactions(self, value):
1497
+ if isinstance(value, go.GoClass):
1498
+ _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
1499
+ else:
1500
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1501
+ @property
1502
+ def IsHistory(self):
1503
+ return _whatsapp.whatsapp_Message_IsHistory_Get(self.handle)
1504
+ @IsHistory.setter
1505
+ def IsHistory(self, value):
1506
+ if isinstance(value, go.GoClass):
1507
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value.handle)
1508
+ else:
1509
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value)
1281
1510
 
1282
- # Python type for struct whatsapp.GroupParticipant
1283
- class GroupParticipant(go.GoClass):
1284
- """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can generally be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1511
+ # Python type for struct whatsapp.Presence
1512
+ class Presence(go.GoClass):
1513
+ """Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
1285
1514
  def __init__(self, *args, **kwargs):
1286
1515
  """
1287
1516
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1295,29 +1524,25 @@ class GroupParticipant(go.GoClass):
1295
1524
  self.handle = args[0].handle
1296
1525
  _whatsapp.IncRef(self.handle)
1297
1526
  else:
1298
- self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1527
+ self.handle = _whatsapp.whatsapp_Presence_CTor()
1299
1528
  _whatsapp.IncRef(self.handle)
1300
1529
  if 0 < len(args):
1301
1530
  self.JID = args[0]
1302
1531
  if "JID" in kwargs:
1303
1532
  self.JID = kwargs["JID"]
1304
1533
  if 1 < len(args):
1305
- self.Nickname = args[1]
1306
- if "Nickname" in kwargs:
1307
- self.Nickname = kwargs["Nickname"]
1534
+ self.Kind = args[1]
1535
+ if "Kind" in kwargs:
1536
+ self.Kind = kwargs["Kind"]
1308
1537
  if 2 < len(args):
1309
- self.Affiliation = args[2]
1310
- if "Affiliation" in kwargs:
1311
- self.Affiliation = kwargs["Affiliation"]
1312
- if 3 < len(args):
1313
- self.Action = args[3]
1314
- if "Action" in kwargs:
1315
- self.Action = kwargs["Action"]
1538
+ self.LastSeen = args[2]
1539
+ if "LastSeen" in kwargs:
1540
+ self.LastSeen = kwargs["LastSeen"]
1316
1541
  def __del__(self):
1317
1542
  _whatsapp.DecRef(self.handle)
1318
1543
  def __str__(self):
1319
1544
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1320
- sv = 'whatsapp.GroupParticipant{'
1545
+ sv = 'whatsapp.Presence{'
1321
1546
  first = True
1322
1547
  for v in pr:
1323
1548
  if callable(v[1]):
@@ -1330,51 +1555,42 @@ class GroupParticipant(go.GoClass):
1330
1555
  return sv + '}'
1331
1556
  def __repr__(self):
1332
1557
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1333
- sv = 'whatsapp.GroupParticipant ( '
1558
+ sv = 'whatsapp.Presence ( '
1334
1559
  for v in pr:
1335
1560
  if not callable(v[1]):
1336
1561
  sv += v[0] + '=' + str(v[1]) + ', '
1337
1562
  return sv + ')'
1338
1563
  @property
1339
1564
  def JID(self):
1340
- return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1565
+ return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
1341
1566
  @JID.setter
1342
1567
  def JID(self, value):
1343
1568
  if isinstance(value, go.GoClass):
1344
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1569
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
1345
1570
  else:
1346
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1571
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
1347
1572
  @property
1348
- def Nickname(self):
1349
- return _whatsapp.whatsapp_GroupParticipant_Nickname_Get(self.handle)
1350
- @Nickname.setter
1351
- def Nickname(self, value):
1573
+ def Kind(self):
1574
+ return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
1575
+ @Kind.setter
1576
+ def Kind(self, value):
1352
1577
  if isinstance(value, go.GoClass):
1353
- _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value.handle)
1578
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
1354
1579
  else:
1355
- _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value)
1580
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
1356
1581
  @property
1357
- def Affiliation(self):
1358
- return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1359
- @Affiliation.setter
1360
- def Affiliation(self, value):
1582
+ def LastSeen(self):
1583
+ return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
1584
+ @LastSeen.setter
1585
+ def LastSeen(self, value):
1361
1586
  if isinstance(value, go.GoClass):
1362
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1587
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
1363
1588
  else:
1364
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1365
- @property
1366
- def Action(self):
1367
- return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1368
- @Action.setter
1369
- def Action(self, value):
1370
- if isinstance(value, go.GoClass):
1371
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1372
- else:
1373
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1589
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
1374
1590
 
1375
- # Python type for struct whatsapp.LoggedOut
1376
- class LoggedOut(go.GoClass):
1377
- """LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
1591
+ # Python type for struct whatsapp.ChatState
1592
+ class ChatState(go.GoClass):
1593
+ """A ChatState represents the activity of a contact within a certain discussion, for instance,\nwhether the contact is currently composing a message. This is separate to the concept of a\nPresence, which is the contact's general state across all discussions.\n"""
1378
1594
  def __init__(self, *args, **kwargs):
1379
1595
  """
1380
1596
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1388,17 +1604,25 @@ class LoggedOut(go.GoClass):
1388
1604
  self.handle = args[0].handle
1389
1605
  _whatsapp.IncRef(self.handle)
1390
1606
  else:
1391
- self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
1607
+ self.handle = _whatsapp.whatsapp_ChatState_CTor()
1392
1608
  _whatsapp.IncRef(self.handle)
1393
1609
  if 0 < len(args):
1394
- self.Reason = args[0]
1395
- if "Reason" in kwargs:
1396
- self.Reason = kwargs["Reason"]
1610
+ self.Kind = args[0]
1611
+ if "Kind" in kwargs:
1612
+ self.Kind = kwargs["Kind"]
1613
+ if 1 < len(args):
1614
+ self.JID = args[1]
1615
+ if "JID" in kwargs:
1616
+ self.JID = kwargs["JID"]
1617
+ if 2 < len(args):
1618
+ self.GroupJID = args[2]
1619
+ if "GroupJID" in kwargs:
1620
+ self.GroupJID = kwargs["GroupJID"]
1397
1621
  def __del__(self):
1398
1622
  _whatsapp.DecRef(self.handle)
1399
1623
  def __str__(self):
1400
1624
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1401
- sv = 'whatsapp.LoggedOut{'
1625
+ sv = 'whatsapp.ChatState{'
1402
1626
  first = True
1403
1627
  for v in pr:
1404
1628
  if callable(v[1]):
@@ -1411,24 +1635,42 @@ class LoggedOut(go.GoClass):
1411
1635
  return sv + '}'
1412
1636
  def __repr__(self):
1413
1637
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1414
- sv = 'whatsapp.LoggedOut ( '
1638
+ sv = 'whatsapp.ChatState ( '
1415
1639
  for v in pr:
1416
1640
  if not callable(v[1]):
1417
1641
  sv += v[0] + '=' + str(v[1]) + ', '
1418
1642
  return sv + ')'
1419
1643
  @property
1420
- def Reason(self):
1421
- return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
1422
- @Reason.setter
1423
- def Reason(self, value):
1644
+ def Kind(self):
1645
+ return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
1646
+ @Kind.setter
1647
+ def Kind(self, value):
1424
1648
  if isinstance(value, go.GoClass):
1425
- _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
1649
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
1426
1650
  else:
1427
- _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
1651
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
1652
+ @property
1653
+ def JID(self):
1654
+ return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
1655
+ @JID.setter
1656
+ def JID(self, value):
1657
+ if isinstance(value, go.GoClass):
1658
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
1659
+ else:
1660
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
1661
+ @property
1662
+ def GroupJID(self):
1663
+ return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
1664
+ @GroupJID.setter
1665
+ def GroupJID(self, value):
1666
+ if isinstance(value, go.GoClass):
1667
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
1668
+ else:
1669
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1428
1670
 
1429
- # Python type for struct whatsapp.Poll
1430
- class Poll(go.GoClass):
1431
- """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
1671
+ # Python type for struct whatsapp.Contact
1672
+ class Contact(go.GoClass):
1673
+ """A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
1432
1674
  def __init__(self, *args, **kwargs):
1433
1675
  """
1434
1676
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1442,21 +1684,21 @@ class Poll(go.GoClass):
1442
1684
  self.handle = args[0].handle
1443
1685
  _whatsapp.IncRef(self.handle)
1444
1686
  else:
1445
- self.handle = _whatsapp.whatsapp_Poll_CTor()
1687
+ self.handle = _whatsapp.whatsapp_Contact_CTor()
1446
1688
  _whatsapp.IncRef(self.handle)
1447
1689
  if 0 < len(args):
1448
- self.Title = args[0]
1449
- if "Title" in kwargs:
1450
- self.Title = kwargs["Title"]
1690
+ self.JID = args[0]
1691
+ if "JID" in kwargs:
1692
+ self.JID = kwargs["JID"]
1451
1693
  if 1 < len(args):
1452
- self.Options = args[1]
1453
- if "Options" in kwargs:
1454
- self.Options = kwargs["Options"]
1694
+ self.Name = args[1]
1695
+ if "Name" in kwargs:
1696
+ self.Name = kwargs["Name"]
1455
1697
  def __del__(self):
1456
1698
  _whatsapp.DecRef(self.handle)
1457
1699
  def __str__(self):
1458
1700
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1459
- sv = 'whatsapp.Poll{'
1701
+ sv = 'whatsapp.Contact{'
1460
1702
  first = True
1461
1703
  for v in pr:
1462
1704
  if callable(v[1]):
@@ -1469,33 +1711,33 @@ class Poll(go.GoClass):
1469
1711
  return sv + '}'
1470
1712
  def __repr__(self):
1471
1713
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1472
- sv = 'whatsapp.Poll ( '
1714
+ sv = 'whatsapp.Contact ( '
1473
1715
  for v in pr:
1474
1716
  if not callable(v[1]):
1475
1717
  sv += v[0] + '=' + str(v[1]) + ', '
1476
1718
  return sv + ')'
1477
1719
  @property
1478
- def Title(self):
1479
- return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
1480
- @Title.setter
1481
- def Title(self, value):
1720
+ def JID(self):
1721
+ return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
1722
+ @JID.setter
1723
+ def JID(self, value):
1482
1724
  if isinstance(value, go.GoClass):
1483
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
1725
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
1484
1726
  else:
1485
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
1727
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
1486
1728
  @property
1487
- def Options(self):
1488
- return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
1489
- @Options.setter
1490
- def Options(self, value):
1729
+ def Name(self):
1730
+ return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
1731
+ @Name.setter
1732
+ def Name(self, value):
1491
1733
  if isinstance(value, go.GoClass):
1492
- _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
1734
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
1493
1735
  else:
1494
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1736
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
1495
1737
 
1496
- # Python type for struct whatsapp.Presence
1497
- class Presence(go.GoClass):
1498
- """Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
1738
+ # Python type for struct whatsapp.GroupSubject
1739
+ class GroupSubject(go.GoClass):
1740
+ """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1499
1741
  def __init__(self, *args, **kwargs):
1500
1742
  """
1501
1743
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1509,25 +1751,25 @@ class Presence(go.GoClass):
1509
1751
  self.handle = args[0].handle
1510
1752
  _whatsapp.IncRef(self.handle)
1511
1753
  else:
1512
- self.handle = _whatsapp.whatsapp_Presence_CTor()
1754
+ self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1513
1755
  _whatsapp.IncRef(self.handle)
1514
1756
  if 0 < len(args):
1515
- self.JID = args[0]
1516
- if "JID" in kwargs:
1517
- self.JID = kwargs["JID"]
1757
+ self.Subject = args[0]
1758
+ if "Subject" in kwargs:
1759
+ self.Subject = kwargs["Subject"]
1518
1760
  if 1 < len(args):
1519
- self.Kind = args[1]
1520
- if "Kind" in kwargs:
1521
- self.Kind = kwargs["Kind"]
1761
+ self.SetAt = args[1]
1762
+ if "SetAt" in kwargs:
1763
+ self.SetAt = kwargs["SetAt"]
1522
1764
  if 2 < len(args):
1523
- self.LastSeen = args[2]
1524
- if "LastSeen" in kwargs:
1525
- self.LastSeen = kwargs["LastSeen"]
1765
+ self.SetBy = args[2]
1766
+ if "SetBy" in kwargs:
1767
+ self.SetBy = kwargs["SetBy"]
1526
1768
  def __del__(self):
1527
1769
  _whatsapp.DecRef(self.handle)
1528
1770
  def __str__(self):
1529
1771
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1530
- sv = 'whatsapp.Presence{'
1772
+ sv = 'whatsapp.GroupSubject{'
1531
1773
  first = True
1532
1774
  for v in pr:
1533
1775
  if callable(v[1]):
@@ -1540,42 +1782,42 @@ class Presence(go.GoClass):
1540
1782
  return sv + '}'
1541
1783
  def __repr__(self):
1542
1784
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1543
- sv = 'whatsapp.Presence ( '
1785
+ sv = 'whatsapp.GroupSubject ( '
1544
1786
  for v in pr:
1545
1787
  if not callable(v[1]):
1546
1788
  sv += v[0] + '=' + str(v[1]) + ', '
1547
1789
  return sv + ')'
1548
1790
  @property
1549
- def JID(self):
1550
- return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
1551
- @JID.setter
1552
- def JID(self, value):
1791
+ def Subject(self):
1792
+ return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1793
+ @Subject.setter
1794
+ def Subject(self, value):
1553
1795
  if isinstance(value, go.GoClass):
1554
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
1796
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1555
1797
  else:
1556
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
1798
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1557
1799
  @property
1558
- def Kind(self):
1559
- return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
1560
- @Kind.setter
1561
- def Kind(self, value):
1800
+ def SetAt(self):
1801
+ return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1802
+ @SetAt.setter
1803
+ def SetAt(self, value):
1562
1804
  if isinstance(value, go.GoClass):
1563
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
1805
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1564
1806
  else:
1565
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
1807
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1566
1808
  @property
1567
- def LastSeen(self):
1568
- return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
1569
- @LastSeen.setter
1570
- def LastSeen(self, value):
1809
+ def SetBy(self):
1810
+ return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
1811
+ @SetBy.setter
1812
+ def SetBy(self, value):
1571
1813
  if isinstance(value, go.GoClass):
1572
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
1814
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
1573
1815
  else:
1574
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
1816
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
1575
1817
 
1576
- # Python type for struct whatsapp.Receipt
1577
- class Receipt(go.GoClass):
1578
- """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
1818
+ # Python type for struct whatsapp.PollOption
1819
+ class PollOption(go.GoClass):
1820
+ """A PollOption represents an individual choice within a broader poll.\n"""
1579
1821
  def __init__(self, *args, **kwargs):
1580
1822
  """
1581
1823
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1589,37 +1831,17 @@ class Receipt(go.GoClass):
1589
1831
  self.handle = args[0].handle
1590
1832
  _whatsapp.IncRef(self.handle)
1591
1833
  else:
1592
- self.handle = _whatsapp.whatsapp_Receipt_CTor()
1834
+ self.handle = _whatsapp.whatsapp_PollOption_CTor()
1593
1835
  _whatsapp.IncRef(self.handle)
1594
1836
  if 0 < len(args):
1595
- self.Kind = args[0]
1596
- if "Kind" in kwargs:
1597
- self.Kind = kwargs["Kind"]
1598
- if 1 < len(args):
1599
- self.MessageIDs = args[1]
1600
- if "MessageIDs" in kwargs:
1601
- self.MessageIDs = kwargs["MessageIDs"]
1602
- if 2 < len(args):
1603
- self.JID = args[2]
1604
- if "JID" in kwargs:
1605
- self.JID = kwargs["JID"]
1606
- if 3 < len(args):
1607
- self.GroupJID = args[3]
1608
- if "GroupJID" in kwargs:
1609
- self.GroupJID = kwargs["GroupJID"]
1610
- if 4 < len(args):
1611
- self.Timestamp = args[4]
1612
- if "Timestamp" in kwargs:
1613
- self.Timestamp = kwargs["Timestamp"]
1614
- if 5 < len(args):
1615
- self.IsCarbon = args[5]
1616
- if "IsCarbon" in kwargs:
1617
- self.IsCarbon = kwargs["IsCarbon"]
1837
+ self.Title = args[0]
1838
+ if "Title" in kwargs:
1839
+ self.Title = kwargs["Title"]
1618
1840
  def __del__(self):
1619
1841
  _whatsapp.DecRef(self.handle)
1620
1842
  def __str__(self):
1621
1843
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1622
- sv = 'whatsapp.Receipt{'
1844
+ sv = 'whatsapp.PollOption{'
1623
1845
  first = True
1624
1846
  for v in pr:
1625
1847
  if callable(v[1]):
@@ -1632,65 +1854,100 @@ class Receipt(go.GoClass):
1632
1854
  return sv + '}'
1633
1855
  def __repr__(self):
1634
1856
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1635
- sv = 'whatsapp.Receipt ( '
1857
+ sv = 'whatsapp.PollOption ( '
1636
1858
  for v in pr:
1637
1859
  if not callable(v[1]):
1638
1860
  sv += v[0] + '=' + str(v[1]) + ', '
1639
1861
  return sv + ')'
1640
1862
  @property
1641
- def Kind(self):
1642
- return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
1643
- @Kind.setter
1644
- def Kind(self, value):
1863
+ def Title(self):
1864
+ return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
1865
+ @Title.setter
1866
+ def Title(self, value):
1645
1867
  if isinstance(value, go.GoClass):
1646
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
1868
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
1647
1869
  else:
1648
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
1649
- @property
1650
- def MessageIDs(self):
1651
- return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
1652
- @MessageIDs.setter
1653
- def MessageIDs(self, value):
1654
- if isinstance(value, go.GoClass):
1655
- _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
1870
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
1871
+
1872
+ # Python type for struct whatsapp.Album
1873
+ class Album(go.GoClass):
1874
+ """A Album message represents a collection of media files, typically images and videos.\n"""
1875
+ def __init__(self, *args, **kwargs):
1876
+ """
1877
+ handle=A Go-side object is always initialized with an explicit handle=arg
1878
+ otherwise parameters can be unnamed in order of field names or named fields
1879
+ in which case a new Go object is constructed first
1880
+ """
1881
+ if len(kwargs) == 1 and 'handle' in kwargs:
1882
+ self.handle = kwargs['handle']
1883
+ _whatsapp.IncRef(self.handle)
1884
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1885
+ self.handle = args[0].handle
1886
+ _whatsapp.IncRef(self.handle)
1656
1887
  else:
1657
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1658
- @property
1659
- def JID(self):
1660
- return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
1661
- @JID.setter
1662
- def JID(self, value):
1663
- if isinstance(value, go.GoClass):
1664
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
1665
- else:
1666
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
1888
+ self.handle = _whatsapp.whatsapp_Album_CTor()
1889
+ _whatsapp.IncRef(self.handle)
1890
+ if 0 < len(args):
1891
+ self.IsAlbum = args[0]
1892
+ if "IsAlbum" in kwargs:
1893
+ self.IsAlbum = kwargs["IsAlbum"]
1894
+ if 1 < len(args):
1895
+ self.ImageCount = args[1]
1896
+ if "ImageCount" in kwargs:
1897
+ self.ImageCount = kwargs["ImageCount"]
1898
+ if 2 < len(args):
1899
+ self.VideoCount = args[2]
1900
+ if "VideoCount" in kwargs:
1901
+ self.VideoCount = kwargs["VideoCount"]
1902
+ def __del__(self):
1903
+ _whatsapp.DecRef(self.handle)
1904
+ def __str__(self):
1905
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1906
+ sv = 'whatsapp.Album{'
1907
+ first = True
1908
+ for v in pr:
1909
+ if callable(v[1]):
1910
+ continue
1911
+ if first:
1912
+ first = False
1913
+ else:
1914
+ sv += ', '
1915
+ sv += v[0] + '=' + str(v[1])
1916
+ return sv + '}'
1917
+ def __repr__(self):
1918
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1919
+ sv = 'whatsapp.Album ( '
1920
+ for v in pr:
1921
+ if not callable(v[1]):
1922
+ sv += v[0] + '=' + str(v[1]) + ', '
1923
+ return sv + ')'
1667
1924
  @property
1668
- def GroupJID(self):
1669
- return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
1670
- @GroupJID.setter
1671
- def GroupJID(self, value):
1925
+ def IsAlbum(self):
1926
+ return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
1927
+ @IsAlbum.setter
1928
+ def IsAlbum(self, value):
1672
1929
  if isinstance(value, go.GoClass):
1673
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
1930
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
1674
1931
  else:
1675
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
1932
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
1676
1933
  @property
1677
- def Timestamp(self):
1678
- return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
1679
- @Timestamp.setter
1680
- def Timestamp(self, value):
1934
+ def ImageCount(self):
1935
+ return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
1936
+ @ImageCount.setter
1937
+ def ImageCount(self, value):
1681
1938
  if isinstance(value, go.GoClass):
1682
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
1939
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
1683
1940
  else:
1684
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
1941
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
1685
1942
  @property
1686
- def IsCarbon(self):
1687
- return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
1688
- @IsCarbon.setter
1689
- def IsCarbon(self, value):
1943
+ def VideoCount(self):
1944
+ return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
1945
+ @VideoCount.setter
1946
+ def VideoCount(self, value):
1690
1947
  if isinstance(value, go.GoClass):
1691
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
1948
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
1692
1949
  else:
1693
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
1950
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
1694
1951
 
1695
1952
  # Python type for struct whatsapp.Attachment
1696
1953
  class Attachment(go.GoClass):
@@ -1791,9 +2048,9 @@ class Attachment(go.GoClass):
1791
2048
  """
1792
2049
  return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
1793
2050
 
1794
- # Python type for struct whatsapp.Connect
1795
- class Connect(go.GoClass):
1796
- """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
2051
+ # Python type for struct whatsapp.Call
2052
+ class Call(go.GoClass):
2053
+ """A Call represents an incoming or outgoing voice/video call made over WhatsApp. Full support for\ncalls is currently not implemented, and this structure contains the bare minimum data required\nfor notifying on missed calls.\n"""
1797
2054
  def __init__(self, *args, **kwargs):
1798
2055
  """
1799
2056
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1807,21 +2064,25 @@ class Connect(go.GoClass):
1807
2064
  self.handle = args[0].handle
1808
2065
  _whatsapp.IncRef(self.handle)
1809
2066
  else:
1810
- self.handle = _whatsapp.whatsapp_Connect_CTor()
2067
+ self.handle = _whatsapp.whatsapp_Call_CTor()
1811
2068
  _whatsapp.IncRef(self.handle)
1812
2069
  if 0 < len(args):
1813
- self.JID = args[0]
2070
+ self.State = args[0]
2071
+ if "State" in kwargs:
2072
+ self.State = kwargs["State"]
2073
+ if 1 < len(args):
2074
+ self.JID = args[1]
1814
2075
  if "JID" in kwargs:
1815
2076
  self.JID = kwargs["JID"]
1816
- if 1 < len(args):
1817
- self.Error = args[1]
1818
- if "Error" in kwargs:
1819
- self.Error = kwargs["Error"]
2077
+ if 2 < len(args):
2078
+ self.Timestamp = args[2]
2079
+ if "Timestamp" in kwargs:
2080
+ self.Timestamp = kwargs["Timestamp"]
1820
2081
  def __del__(self):
1821
2082
  _whatsapp.DecRef(self.handle)
1822
2083
  def __str__(self):
1823
2084
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1824
- sv = 'whatsapp.Connect{'
2085
+ sv = 'whatsapp.Call{'
1825
2086
  first = True
1826
2087
  for v in pr:
1827
2088
  if callable(v[1]):
@@ -1834,33 +2095,42 @@ class Connect(go.GoClass):
1834
2095
  return sv + '}'
1835
2096
  def __repr__(self):
1836
2097
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1837
- sv = 'whatsapp.Connect ( '
2098
+ sv = 'whatsapp.Call ( '
1838
2099
  for v in pr:
1839
2100
  if not callable(v[1]):
1840
2101
  sv += v[0] + '=' + str(v[1]) + ', '
1841
2102
  return sv + ')'
1842
2103
  @property
2104
+ def State(self):
2105
+ return _whatsapp.whatsapp_Call_State_Get(self.handle)
2106
+ @State.setter
2107
+ def State(self, value):
2108
+ if isinstance(value, go.GoClass):
2109
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
2110
+ else:
2111
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value)
2112
+ @property
1843
2113
  def JID(self):
1844
- return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
2114
+ return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1845
2115
  @JID.setter
1846
2116
  def JID(self, value):
1847
2117
  if isinstance(value, go.GoClass):
1848
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
2118
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1849
2119
  else:
1850
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
2120
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1851
2121
  @property
1852
- def Error(self):
1853
- return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
1854
- @Error.setter
1855
- def Error(self, value):
2122
+ def Timestamp(self):
2123
+ return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
2124
+ @Timestamp.setter
2125
+ def Timestamp(self, value):
1856
2126
  if isinstance(value, go.GoClass):
1857
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
2127
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1858
2128
  else:
1859
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
2129
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1860
2130
 
1861
- # Python type for struct whatsapp.EventPayload
1862
- class EventPayload(go.GoClass):
1863
- """EventPayload represents the collected payloads for all event types handled by the overarching\nsession adapter handler. Only specific fields will be populated in events emitted by internal\nhandlers, see documentation for specific types for more information.\n"""
2131
+ # Python type for struct whatsapp.Group
2132
+ class Group(go.GoClass):
2133
+ """A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
1864
2134
  def __init__(self, *args, **kwargs):
1865
2135
  """
1866
2136
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1874,57 +2144,37 @@ class EventPayload(go.GoClass):
1874
2144
  self.handle = args[0].handle
1875
2145
  _whatsapp.IncRef(self.handle)
1876
2146
  else:
1877
- self.handle = _whatsapp.whatsapp_EventPayload_CTor()
2147
+ self.handle = _whatsapp.whatsapp_Group_CTor()
1878
2148
  _whatsapp.IncRef(self.handle)
1879
2149
  if 0 < len(args):
1880
- self.QRCode = args[0]
1881
- if "QRCode" in kwargs:
1882
- self.QRCode = kwargs["QRCode"]
2150
+ self.JID = args[0]
2151
+ if "JID" in kwargs:
2152
+ self.JID = kwargs["JID"]
1883
2153
  if 1 < len(args):
1884
- self.PairDeviceID = args[1]
1885
- if "PairDeviceID" in kwargs:
1886
- self.PairDeviceID = kwargs["PairDeviceID"]
2154
+ self.Name = args[1]
2155
+ if "Name" in kwargs:
2156
+ self.Name = kwargs["Name"]
1887
2157
  if 2 < len(args):
1888
- self.Connect = args[2]
1889
- if "Connect" in kwargs:
1890
- self.Connect = kwargs["Connect"]
2158
+ self.Subject = args[2]
2159
+ if "Subject" in kwargs:
2160
+ self.Subject = kwargs["Subject"]
1891
2161
  if 3 < len(args):
1892
- self.LoggedOut = args[3]
1893
- if "LoggedOut" in kwargs:
1894
- self.LoggedOut = kwargs["LoggedOut"]
2162
+ self.Nickname = args[3]
2163
+ if "Nickname" in kwargs:
2164
+ self.Nickname = kwargs["Nickname"]
1895
2165
  if 4 < len(args):
1896
- self.Contact = args[4]
1897
- if "Contact" in kwargs:
1898
- self.Contact = kwargs["Contact"]
2166
+ self.Participants = args[4]
2167
+ if "Participants" in kwargs:
2168
+ self.Participants = kwargs["Participants"]
1899
2169
  if 5 < len(args):
1900
- self.Presence = args[5]
1901
- if "Presence" in kwargs:
1902
- self.Presence = kwargs["Presence"]
1903
- if 6 < len(args):
1904
- self.Message = args[6]
1905
- if "Message" in kwargs:
1906
- self.Message = kwargs["Message"]
1907
- if 7 < len(args):
1908
- self.ChatState = args[7]
1909
- if "ChatState" in kwargs:
1910
- self.ChatState = kwargs["ChatState"]
1911
- if 8 < len(args):
1912
- self.Receipt = args[8]
1913
- if "Receipt" in kwargs:
1914
- self.Receipt = kwargs["Receipt"]
1915
- if 9 < len(args):
1916
- self.Group = args[9]
1917
- if "Group" in kwargs:
1918
- self.Group = kwargs["Group"]
1919
- if 10 < len(args):
1920
- self.Call = args[10]
1921
- if "Call" in kwargs:
1922
- self.Call = kwargs["Call"]
2170
+ self.InviteCode = args[5]
2171
+ if "InviteCode" in kwargs:
2172
+ self.InviteCode = kwargs["InviteCode"]
1923
2173
  def __del__(self):
1924
2174
  _whatsapp.DecRef(self.handle)
1925
2175
  def __str__(self):
1926
2176
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1927
- sv = 'whatsapp.EventPayload{'
2177
+ sv = 'whatsapp.Group{'
1928
2178
  first = True
1929
2179
  for v in pr:
1930
2180
  if callable(v[1]):
@@ -1937,114 +2187,69 @@ class EventPayload(go.GoClass):
1937
2187
  return sv + '}'
1938
2188
  def __repr__(self):
1939
2189
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1940
- sv = 'whatsapp.EventPayload ( '
2190
+ sv = 'whatsapp.Group ( '
1941
2191
  for v in pr:
1942
2192
  if not callable(v[1]):
1943
2193
  sv += v[0] + '=' + str(v[1]) + ', '
1944
2194
  return sv + ')'
1945
2195
  @property
1946
- def QRCode(self):
1947
- return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
1948
- @QRCode.setter
1949
- def QRCode(self, value):
2196
+ def JID(self):
2197
+ return _whatsapp.whatsapp_Group_JID_Get(self.handle)
2198
+ @JID.setter
2199
+ def JID(self, value):
1950
2200
  if isinstance(value, go.GoClass):
1951
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
2201
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
1952
2202
  else:
1953
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
2203
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
1954
2204
  @property
1955
- def PairDeviceID(self):
1956
- return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
1957
- @PairDeviceID.setter
1958
- def PairDeviceID(self, value):
2205
+ def Name(self):
2206
+ return _whatsapp.whatsapp_Group_Name_Get(self.handle)
2207
+ @Name.setter
2208
+ def Name(self, value):
1959
2209
  if isinstance(value, go.GoClass):
1960
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
2210
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
1961
2211
  else:
1962
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
2212
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
1963
2213
  @property
1964
- def Connect(self):
1965
- return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
1966
- @Connect.setter
1967
- def Connect(self, value):
2214
+ def Subject(self):
2215
+ return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
2216
+ @Subject.setter
2217
+ def Subject(self, value):
1968
2218
  if isinstance(value, go.GoClass):
1969
- _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
2219
+ _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
1970
2220
  else:
1971
2221
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1972
2222
  @property
1973
- def LoggedOut(self):
1974
- return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
1975
- @LoggedOut.setter
1976
- def LoggedOut(self, value):
2223
+ def Nickname(self):
2224
+ return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
2225
+ @Nickname.setter
2226
+ def Nickname(self, value):
1977
2227
  if isinstance(value, go.GoClass):
1978
- _whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
2228
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
1979
2229
  else:
1980
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2230
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
1981
2231
  @property
1982
- def Contact(self):
1983
- return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
1984
- @Contact.setter
1985
- def Contact(self, value):
2232
+ def Participants(self):
2233
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
2234
+ @Participants.setter
2235
+ def Participants(self, value):
1986
2236
  if isinstance(value, go.GoClass):
1987
- _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
2237
+ _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
1988
2238
  else:
1989
2239
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1990
2240
  @property
1991
- def Presence(self):
1992
- return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
1993
- @Presence.setter
1994
- def Presence(self, value):
1995
- if isinstance(value, go.GoClass):
1996
- _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
1997
- else:
1998
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1999
- @property
2000
- def Message(self):
2001
- return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
2002
- @Message.setter
2003
- def Message(self, value):
2004
- if isinstance(value, go.GoClass):
2005
- _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
2006
- else:
2007
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2008
- @property
2009
- def ChatState(self):
2010
- return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
2011
- @ChatState.setter
2012
- def ChatState(self, value):
2013
- if isinstance(value, go.GoClass):
2014
- _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
2015
- else:
2016
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2017
- @property
2018
- def Receipt(self):
2019
- return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
2020
- @Receipt.setter
2021
- def Receipt(self, value):
2022
- if isinstance(value, go.GoClass):
2023
- _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
2024
- else:
2025
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2026
- @property
2027
- def Group(self):
2028
- return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
2029
- @Group.setter
2030
- def Group(self, value):
2031
- if isinstance(value, go.GoClass):
2032
- _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
2033
- else:
2034
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2035
- @property
2036
- def Call(self):
2037
- return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
2038
- @Call.setter
2039
- def Call(self, value):
2241
+ def InviteCode(self):
2242
+ return _whatsapp.whatsapp_Group_InviteCode_Get(self.handle)
2243
+ @InviteCode.setter
2244
+ def InviteCode(self, value):
2040
2245
  if isinstance(value, go.GoClass):
2041
- _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
2246
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value.handle)
2042
2247
  else:
2043
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2248
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value)
2044
2249
 
2045
- # Python type for struct whatsapp.Gateway
2046
- class Gateway(go.GoClass):
2047
- """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
2250
+ # Python type for struct whatsapp.Poll
2251
+ class Poll(go.GoClass):
2252
+ """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
2048
2253
  def __init__(self, *args, **kwargs):
2049
2254
  """
2050
2255
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2058,29 +2263,21 @@ class Gateway(go.GoClass):
2058
2263
  self.handle = args[0].handle
2059
2264
  _whatsapp.IncRef(self.handle)
2060
2265
  else:
2061
- self.handle = _whatsapp.whatsapp_Gateway_CTor()
2266
+ self.handle = _whatsapp.whatsapp_Poll_CTor()
2062
2267
  _whatsapp.IncRef(self.handle)
2063
2268
  if 0 < len(args):
2064
- self.DBPath = args[0]
2065
- if "DBPath" in kwargs:
2066
- self.DBPath = kwargs["DBPath"]
2269
+ self.Title = args[0]
2270
+ if "Title" in kwargs:
2271
+ self.Title = kwargs["Title"]
2067
2272
  if 1 < len(args):
2068
- self.Name = args[1]
2069
- if "Name" in kwargs:
2070
- self.Name = kwargs["Name"]
2071
- if 2 < len(args):
2072
- self.LogLevel = args[2]
2073
- if "LogLevel" in kwargs:
2074
- self.LogLevel = kwargs["LogLevel"]
2075
- if 3 < len(args):
2076
- self.TempDir = args[3]
2077
- if "TempDir" in kwargs:
2078
- self.TempDir = kwargs["TempDir"]
2273
+ self.Options = args[1]
2274
+ if "Options" in kwargs:
2275
+ self.Options = kwargs["Options"]
2079
2276
  def __del__(self):
2080
2277
  _whatsapp.DecRef(self.handle)
2081
2278
  def __str__(self):
2082
2279
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2083
- sv = 'whatsapp.Gateway{'
2280
+ sv = 'whatsapp.Poll{'
2084
2281
  first = True
2085
2282
  for v in pr:
2086
2283
  if callable(v[1]):
@@ -2093,72 +2290,33 @@ class Gateway(go.GoClass):
2093
2290
  return sv + '}'
2094
2291
  def __repr__(self):
2095
2292
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2096
- sv = 'whatsapp.Gateway ( '
2293
+ sv = 'whatsapp.Poll ( '
2097
2294
  for v in pr:
2098
2295
  if not callable(v[1]):
2099
2296
  sv += v[0] + '=' + str(v[1]) + ', '
2100
2297
  return sv + ')'
2101
2298
  @property
2102
- def DBPath(self):
2103
- return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2104
- @DBPath.setter
2105
- def DBPath(self, value):
2106
- if isinstance(value, go.GoClass):
2107
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
2108
- else:
2109
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
2110
- @property
2111
- def Name(self):
2112
- return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2113
- @Name.setter
2114
- def Name(self, value):
2115
- if isinstance(value, go.GoClass):
2116
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
2117
- else:
2118
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2119
- @property
2120
- def LogLevel(self):
2121
- return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2122
- @LogLevel.setter
2123
- def LogLevel(self, value):
2299
+ def Title(self):
2300
+ return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
2301
+ @Title.setter
2302
+ def Title(self, value):
2124
2303
  if isinstance(value, go.GoClass):
2125
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2304
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
2126
2305
  else:
2127
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2306
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
2128
2307
  @property
2129
- def TempDir(self):
2130
- return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2131
- @TempDir.setter
2132
- def TempDir(self, value):
2308
+ def Options(self):
2309
+ return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2310
+ @Options.setter
2311
+ def Options(self, value):
2133
2312
  if isinstance(value, go.GoClass):
2134
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
2313
+ _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
2135
2314
  else:
2136
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
2137
- def Init(self):
2138
- """Init() str
2139
-
2140
- Init performs initialization procedures for the Gateway, and is expected to be run before any
2141
- calls to [Gateway.Session].
2142
- """
2143
- return _whatsapp.whatsapp_Gateway_Init(self.handle)
2144
- def NewSession(self, device):
2145
- """NewSession(object device) object
2146
-
2147
- NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
2148
- a valid ID, a pair operation will be required, as described in [Session.Login].
2149
- """
2150
- return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
2151
- def CleanupSession(self, device):
2152
- """CleanupSession(object device) str
2153
-
2154
- CleanupSession will remove all invalid and obsolete references to the given device, and should be
2155
- used when pairing a new device or unregistering from the Gateway.
2156
- """
2157
- return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
2315
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2158
2316
 
2159
- # Python type for struct whatsapp.GroupSubject
2160
- class GroupSubject(go.GoClass):
2161
- """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
2317
+ # Python type for struct whatsapp.Receipt
2318
+ class Receipt(go.GoClass):
2319
+ """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
2162
2320
  def __init__(self, *args, **kwargs):
2163
2321
  """
2164
2322
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2172,25 +2330,37 @@ class GroupSubject(go.GoClass):
2172
2330
  self.handle = args[0].handle
2173
2331
  _whatsapp.IncRef(self.handle)
2174
2332
  else:
2175
- self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
2333
+ self.handle = _whatsapp.whatsapp_Receipt_CTor()
2176
2334
  _whatsapp.IncRef(self.handle)
2177
2335
  if 0 < len(args):
2178
- self.Subject = args[0]
2179
- if "Subject" in kwargs:
2180
- self.Subject = kwargs["Subject"]
2336
+ self.Kind = args[0]
2337
+ if "Kind" in kwargs:
2338
+ self.Kind = kwargs["Kind"]
2181
2339
  if 1 < len(args):
2182
- self.SetAt = args[1]
2183
- if "SetAt" in kwargs:
2184
- self.SetAt = kwargs["SetAt"]
2340
+ self.MessageIDs = args[1]
2341
+ if "MessageIDs" in kwargs:
2342
+ self.MessageIDs = kwargs["MessageIDs"]
2185
2343
  if 2 < len(args):
2186
- self.SetBy = args[2]
2187
- if "SetBy" in kwargs:
2188
- self.SetBy = kwargs["SetBy"]
2344
+ self.JID = args[2]
2345
+ if "JID" in kwargs:
2346
+ self.JID = kwargs["JID"]
2347
+ if 3 < len(args):
2348
+ self.GroupJID = args[3]
2349
+ if "GroupJID" in kwargs:
2350
+ self.GroupJID = kwargs["GroupJID"]
2351
+ if 4 < len(args):
2352
+ self.Timestamp = args[4]
2353
+ if "Timestamp" in kwargs:
2354
+ self.Timestamp = kwargs["Timestamp"]
2355
+ if 5 < len(args):
2356
+ self.IsCarbon = args[5]
2357
+ if "IsCarbon" in kwargs:
2358
+ self.IsCarbon = kwargs["IsCarbon"]
2189
2359
  def __del__(self):
2190
2360
  _whatsapp.DecRef(self.handle)
2191
2361
  def __str__(self):
2192
2362
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2193
- sv = 'whatsapp.GroupSubject{'
2363
+ sv = 'whatsapp.Receipt{'
2194
2364
  first = True
2195
2365
  for v in pr:
2196
2366
  if callable(v[1]):
@@ -2203,356 +2373,262 @@ class GroupSubject(go.GoClass):
2203
2373
  return sv + '}'
2204
2374
  def __repr__(self):
2205
2375
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2206
- sv = 'whatsapp.GroupSubject ( '
2376
+ sv = 'whatsapp.Receipt ( '
2207
2377
  for v in pr:
2208
2378
  if not callable(v[1]):
2209
2379
  sv += v[0] + '=' + str(v[1]) + ', '
2210
2380
  return sv + ')'
2211
2381
  @property
2212
- def Subject(self):
2213
- return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
2214
- @Subject.setter
2215
- def Subject(self, value):
2382
+ def Kind(self):
2383
+ return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
2384
+ @Kind.setter
2385
+ def Kind(self, value):
2216
2386
  if isinstance(value, go.GoClass):
2217
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
2387
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
2218
2388
  else:
2219
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
2389
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
2220
2390
  @property
2221
- def SetAt(self):
2222
- return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
2223
- @SetAt.setter
2224
- def SetAt(self, value):
2391
+ def MessageIDs(self):
2392
+ return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
2393
+ @MessageIDs.setter
2394
+ def MessageIDs(self, value):
2225
2395
  if isinstance(value, go.GoClass):
2226
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
2396
+ _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
2227
2397
  else:
2228
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
2398
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2229
2399
  @property
2230
- def SetBy(self):
2231
- return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
2232
- @SetBy.setter
2233
- def SetBy(self, value):
2400
+ def JID(self):
2401
+ return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
2402
+ @JID.setter
2403
+ def JID(self, value):
2234
2404
  if isinstance(value, go.GoClass):
2235
- _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
2405
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
2236
2406
  else:
2237
- _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
2238
-
2239
- # Python type for struct whatsapp.Message
2240
- class Message(go.GoClass):
2241
- """A Message represents one of many kinds of bidirectional communication payloads, for example, a\ntext message, a file (image, video) attachment, an emoji reaction, etc. Messages of different\nkinds are denoted as such, and re-use fields where the semantics overlap.\n"""
2242
- def __init__(self, *args, **kwargs):
2243
- """
2244
- handle=A Go-side object is always initialized with an explicit handle=arg
2245
- otherwise parameters can be unnamed in order of field names or named fields
2246
- in which case a new Go object is constructed first
2247
- """
2248
- if len(kwargs) == 1 and 'handle' in kwargs:
2249
- self.handle = kwargs['handle']
2250
- _whatsapp.IncRef(self.handle)
2251
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2252
- self.handle = args[0].handle
2253
- _whatsapp.IncRef(self.handle)
2407
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
2408
+ @property
2409
+ def GroupJID(self):
2410
+ return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
2411
+ @GroupJID.setter
2412
+ def GroupJID(self, value):
2413
+ if isinstance(value, go.GoClass):
2414
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
2254
2415
  else:
2255
- self.handle = _whatsapp.whatsapp_Message_CTor()
2256
- _whatsapp.IncRef(self.handle)
2257
- if 0 < len(args):
2258
- self.Kind = args[0]
2259
- if "Kind" in kwargs:
2260
- self.Kind = kwargs["Kind"]
2261
- if 1 < len(args):
2262
- self.ID = args[1]
2263
- if "ID" in kwargs:
2264
- self.ID = kwargs["ID"]
2265
- if 2 < len(args):
2266
- self.JID = args[2]
2267
- if "JID" in kwargs:
2268
- self.JID = kwargs["JID"]
2269
- if 3 < len(args):
2270
- self.GroupJID = args[3]
2271
- if "GroupJID" in kwargs:
2272
- self.GroupJID = kwargs["GroupJID"]
2273
- if 4 < len(args):
2274
- self.OriginJID = args[4]
2275
- if "OriginJID" in kwargs:
2276
- self.OriginJID = kwargs["OriginJID"]
2277
- if 5 < len(args):
2278
- self.Body = args[5]
2279
- if "Body" in kwargs:
2280
- self.Body = kwargs["Body"]
2281
- if 6 < len(args):
2282
- self.Timestamp = args[6]
2283
- if "Timestamp" in kwargs:
2284
- self.Timestamp = kwargs["Timestamp"]
2285
- if 7 < len(args):
2286
- self.IsCarbon = args[7]
2287
- if "IsCarbon" in kwargs:
2288
- self.IsCarbon = kwargs["IsCarbon"]
2289
- if 8 < len(args):
2290
- self.IsForwarded = args[8]
2291
- if "IsForwarded" in kwargs:
2292
- self.IsForwarded = kwargs["IsForwarded"]
2293
- if 9 < len(args):
2294
- self.ReplyID = args[9]
2295
- if "ReplyID" in kwargs:
2296
- self.ReplyID = kwargs["ReplyID"]
2297
- if 10 < len(args):
2298
- self.ReplyBody = args[10]
2299
- if "ReplyBody" in kwargs:
2300
- self.ReplyBody = kwargs["ReplyBody"]
2301
- if 11 < len(args):
2302
- self.Attachments = args[11]
2303
- if "Attachments" in kwargs:
2304
- self.Attachments = kwargs["Attachments"]
2305
- if 12 < len(args):
2306
- self.Preview = args[12]
2307
- if "Preview" in kwargs:
2308
- self.Preview = kwargs["Preview"]
2309
- if 13 < len(args):
2310
- self.Location = args[13]
2311
- if "Location" in kwargs:
2312
- self.Location = kwargs["Location"]
2313
- if 14 < len(args):
2314
- self.Poll = args[14]
2315
- if "Poll" in kwargs:
2316
- self.Poll = kwargs["Poll"]
2317
- if 15 < len(args):
2318
- self.Album = args[15]
2319
- if "Album" in kwargs:
2320
- self.Album = kwargs["Album"]
2321
- if 16 < len(args):
2322
- self.GroupInvite = args[16]
2323
- if "GroupInvite" in kwargs:
2324
- self.GroupInvite = kwargs["GroupInvite"]
2325
- if 17 < len(args):
2326
- self.MentionJIDs = args[17]
2327
- if "MentionJIDs" in kwargs:
2328
- self.MentionJIDs = kwargs["MentionJIDs"]
2329
- if 18 < len(args):
2330
- self.Receipts = args[18]
2331
- if "Receipts" in kwargs:
2332
- self.Receipts = kwargs["Receipts"]
2333
- if 19 < len(args):
2334
- self.Reactions = args[19]
2335
- if "Reactions" in kwargs:
2336
- self.Reactions = kwargs["Reactions"]
2337
- if 20 < len(args):
2338
- self.IsHistory = args[20]
2339
- if "IsHistory" in kwargs:
2340
- self.IsHistory = kwargs["IsHistory"]
2341
- def __del__(self):
2342
- _whatsapp.DecRef(self.handle)
2343
- def __str__(self):
2344
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2345
- sv = 'whatsapp.Message{'
2346
- first = True
2347
- for v in pr:
2348
- if callable(v[1]):
2349
- continue
2350
- if first:
2351
- first = False
2352
- else:
2353
- sv += ', '
2354
- sv += v[0] + '=' + str(v[1])
2355
- return sv + '}'
2356
- def __repr__(self):
2357
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2358
- sv = 'whatsapp.Message ( '
2359
- for v in pr:
2360
- if not callable(v[1]):
2361
- sv += v[0] + '=' + str(v[1]) + ', '
2362
- return sv + ')'
2363
- @property
2364
- def Kind(self):
2365
- return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
2366
- @Kind.setter
2367
- def Kind(self, value):
2368
- if isinstance(value, go.GoClass):
2369
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
2370
- else:
2371
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
2372
- @property
2373
- def ID(self):
2374
- return _whatsapp.whatsapp_Message_ID_Get(self.handle)
2375
- @ID.setter
2376
- def ID(self, value):
2377
- if isinstance(value, go.GoClass):
2378
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
2379
- else:
2380
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
2381
- @property
2382
- def JID(self):
2383
- return _whatsapp.whatsapp_Message_JID_Get(self.handle)
2384
- @JID.setter
2385
- def JID(self, value):
2386
- if isinstance(value, go.GoClass):
2387
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
2388
- else:
2389
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
2390
- @property
2391
- def GroupJID(self):
2392
- return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
2393
- @GroupJID.setter
2394
- def GroupJID(self, value):
2395
- if isinstance(value, go.GoClass):
2396
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
2397
- else:
2398
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
2399
- @property
2400
- def OriginJID(self):
2401
- return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
2402
- @OriginJID.setter
2403
- def OriginJID(self, value):
2404
- if isinstance(value, go.GoClass):
2405
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
2406
- else:
2407
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
2408
- @property
2409
- def Body(self):
2410
- return _whatsapp.whatsapp_Message_Body_Get(self.handle)
2411
- @Body.setter
2412
- def Body(self, value):
2413
- if isinstance(value, go.GoClass):
2414
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
2415
- else:
2416
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
2416
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
2417
2417
  @property
2418
2418
  def Timestamp(self):
2419
- return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
2419
+ return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
2420
2420
  @Timestamp.setter
2421
2421
  def Timestamp(self, value):
2422
2422
  if isinstance(value, go.GoClass):
2423
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
2423
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
2424
2424
  else:
2425
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
2425
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
2426
2426
  @property
2427
2427
  def IsCarbon(self):
2428
- return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
2428
+ return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
2429
2429
  @IsCarbon.setter
2430
2430
  def IsCarbon(self, value):
2431
2431
  if isinstance(value, go.GoClass):
2432
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
2433
- else:
2434
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
2435
- @property
2436
- def IsForwarded(self):
2437
- return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
2438
- @IsForwarded.setter
2439
- def IsForwarded(self, value):
2440
- if isinstance(value, go.GoClass):
2441
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
2442
- else:
2443
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
2444
- @property
2445
- def ReplyID(self):
2446
- return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
2447
- @ReplyID.setter
2448
- def ReplyID(self, value):
2449
- if isinstance(value, go.GoClass):
2450
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
2451
- else:
2452
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
2453
- @property
2454
- def ReplyBody(self):
2455
- return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
2456
- @ReplyBody.setter
2457
- def ReplyBody(self, value):
2458
- if isinstance(value, go.GoClass):
2459
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
2460
- else:
2461
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
2462
- @property
2463
- def Attachments(self):
2464
- return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
2465
- @Attachments.setter
2466
- def Attachments(self, value):
2467
- if isinstance(value, go.GoClass):
2468
- _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
2469
- else:
2470
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2471
- @property
2472
- def Preview(self):
2473
- return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
2474
- @Preview.setter
2475
- def Preview(self, value):
2476
- if isinstance(value, go.GoClass):
2477
- _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
2478
- else:
2479
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2480
- @property
2481
- def Location(self):
2482
- return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
2483
- @Location.setter
2484
- def Location(self, value):
2485
- if isinstance(value, go.GoClass):
2486
- _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
2487
- else:
2488
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2489
- @property
2490
- def Poll(self):
2491
- return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
2492
- @Poll.setter
2493
- def Poll(self, value):
2494
- if isinstance(value, go.GoClass):
2495
- _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
2496
- else:
2497
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2498
- @property
2499
- def Album(self):
2500
- return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
2501
- @Album.setter
2502
- def Album(self, value):
2503
- if isinstance(value, go.GoClass):
2504
- _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
2505
- else:
2506
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2507
- @property
2508
- def GroupInvite(self):
2509
- return Group(handle=_whatsapp.whatsapp_Message_GroupInvite_Get(self.handle))
2510
- @GroupInvite.setter
2511
- def GroupInvite(self, value):
2512
- if isinstance(value, go.GoClass):
2513
- _whatsapp.whatsapp_Message_GroupInvite_Set(self.handle, value.handle)
2514
- else:
2515
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2516
- @property
2517
- def MentionJIDs(self):
2518
- return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2519
- @MentionJIDs.setter
2520
- def MentionJIDs(self, value):
2521
- if isinstance(value, go.GoClass):
2522
- _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
2523
- else:
2524
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2525
- @property
2526
- def Receipts(self):
2527
- return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
2528
- @Receipts.setter
2529
- def Receipts(self, value):
2530
- if isinstance(value, go.GoClass):
2531
- _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
2532
- else:
2533
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2534
- @property
2535
- def Reactions(self):
2536
- return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
2537
- @Reactions.setter
2538
- def Reactions(self, value):
2539
- if isinstance(value, go.GoClass):
2540
- _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2432
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
2541
2433
  else:
2542
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2543
- @property
2544
- def IsHistory(self):
2545
- return _whatsapp.whatsapp_Message_IsHistory_Get(self.handle)
2546
- @IsHistory.setter
2547
- def IsHistory(self, value):
2548
- if isinstance(value, go.GoClass):
2549
- _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value.handle)
2434
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
2435
+
2436
+ # Python type for struct whatsapp.Session
2437
+ class Session(go.GoClass):
2438
+ """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
2439
+ def __init__(self, *args, **kwargs):
2440
+ """
2441
+ handle=A Go-side object is always initialized with an explicit handle=arg
2442
+ otherwise parameters can be unnamed in order of field names or named fields
2443
+ in which case a new Go object is constructed first
2444
+ """
2445
+ if len(kwargs) == 1 and 'handle' in kwargs:
2446
+ self.handle = kwargs['handle']
2447
+ _whatsapp.IncRef(self.handle)
2448
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2449
+ self.handle = args[0].handle
2450
+ _whatsapp.IncRef(self.handle)
2550
2451
  else:
2551
- _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value)
2452
+ self.handle = _whatsapp.whatsapp_Session_CTor()
2453
+ _whatsapp.IncRef(self.handle)
2454
+ def __del__(self):
2455
+ _whatsapp.DecRef(self.handle)
2456
+ def __str__(self):
2457
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2458
+ sv = 'whatsapp.Session{'
2459
+ first = True
2460
+ for v in pr:
2461
+ if callable(v[1]):
2462
+ continue
2463
+ if first:
2464
+ first = False
2465
+ else:
2466
+ sv += ', '
2467
+ sv += v[0] + '=' + str(v[1])
2468
+ return sv + '}'
2469
+ def __repr__(self):
2470
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2471
+ sv = 'whatsapp.Session ( '
2472
+ for v in pr:
2473
+ if not callable(v[1]):
2474
+ sv += v[0] + '=' + str(v[1]) + ', '
2475
+ return sv + ')'
2476
+ def Login(self):
2477
+ """Login() str
2478
+
2479
+ Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
2480
+ or by initiating a pairing session for a new linked device. Callers are expected to have set an
2481
+ event handler in order to receive any incoming events from the underlying WhatsApp session.
2482
+ """
2483
+ return _whatsapp.whatsapp_Session_Login(self.handle)
2484
+ def Logout(self):
2485
+ """Logout() str
2486
+
2487
+ Logout disconnects and removes the current linked device locally and initiates a logout remotely.
2488
+ """
2489
+ return _whatsapp.whatsapp_Session_Logout(self.handle)
2490
+ def Disconnect(self):
2491
+ """Disconnect() str
2492
+
2493
+ Disconnects detaches the current connection to WhatsApp without removing any linked device state.
2494
+ """
2495
+ return _whatsapp.whatsapp_Session_Disconnect(self.handle)
2496
+ def PairPhone(self, phone):
2497
+ """PairPhone(str phone) str, str
2498
+
2499
+ PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
2500
+ user's primary device, as identified by the given phone number. This will return an error if the
2501
+ [Session] is already paired, or if the phone number given is empty or invalid.
2502
+ """
2503
+ return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
2504
+ def SendMessage(self, message):
2505
+ """SendMessage(object message) str
2506
+
2507
+ SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
2508
+ specified within. In general, different message kinds require different fields to be set; see the
2509
+ documentation for the [Message] type for more information.
2510
+ """
2511
+ return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
2512
+ def GenerateMessageID(self):
2513
+ """GenerateMessageID() str
2514
+
2515
+ GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
2516
+ """
2517
+ return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
2518
+ def SendChatState(self, state):
2519
+ """SendChatState(object state) str
2520
+
2521
+ SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
2522
+ contact specified within.
2523
+ """
2524
+ return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
2525
+ def SendReceipt(self, receipt):
2526
+ """SendReceipt(object receipt) str
2527
+
2528
+ SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
2529
+ """
2530
+ return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
2531
+ def SendPresence(self, presence, statusMessage):
2532
+ """SendPresence(int presence, str statusMessage) str
2533
+
2534
+ SendPresence sets the activity state and (optional) status message for the current session and
2535
+ user. An error is returned if setting availability fails for any reason.
2536
+ """
2537
+ return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
2538
+ def GetContacts(self, refresh):
2539
+ """GetContacts(bool refresh) []object, str
2540
+
2541
+ GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
2542
+ If `refresh` is `true`, FetchRoster will pull application state from the remote service and
2543
+ synchronize any contacts found with the adapter.
2544
+ """
2545
+ return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
2546
+ def GetGroups(self):
2547
+ """GetGroups() []object, str
2548
+
2549
+ GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
2550
+ information on present participants.
2551
+ """
2552
+ return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
2553
+ def CreateGroup(self, name, participants):
2554
+ """CreateGroup(str name, []str participants) object, str
2555
+
2556
+ CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
2557
+ participant JIDs given.
2558
+ """
2559
+ return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
2560
+ def LeaveGroup(self, resourceID):
2561
+ """LeaveGroup(str resourceID) str
2562
+
2563
+ LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
2564
+ """
2565
+ return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
2566
+ def GetAvatar(self, resourceID, avatarID):
2567
+ """GetAvatar(str resourceID, str avatarID) object, str
2568
+
2569
+ GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
2570
+ is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
2571
+ for the given ID has not changed.
2572
+ """
2573
+ return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
2574
+ def SetAvatar(self, resourceID, avatar):
2575
+ """SetAvatar(str resourceID, []int avatar) str, str
2576
+
2577
+ SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
2578
+ profile picture for our own user by providing an empty JID. The unique picture ID is returned,
2579
+ typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
2580
+ """
2581
+ return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
2582
+ def SetGroupName(self, resourceID, name):
2583
+ """SetGroupName(str resourceID, str name) str
2584
+
2585
+ SetGroupName updates the name of a WhatsApp group for the Group JID given.
2586
+ """
2587
+ return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
2588
+ def SetGroupTopic(self, resourceID, topic):
2589
+ """SetGroupTopic(str resourceID, str topic) str
2590
+
2591
+ SetGroupName updates the topic of a WhatsApp group for the Group JID given.
2592
+ """
2593
+ return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
2594
+ def UpdateGroupParticipants(self, resourceID, participants):
2595
+ """UpdateGroupParticipants(str resourceID, []object participants) []object, str
2596
+
2597
+ UpdateGroupParticipants processes changes to the given group's participants, including additions,
2598
+ removals, and changes to privileges. Participant JIDs given must be part of the authenticated
2599
+ session's roster at least, and must also be active group participants for other types of changes.
2600
+ """
2601
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
2602
+ def FindContact(self, phone):
2603
+ """FindContact(str phone) object, str
2604
+
2605
+ FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
2606
+ phone number, returning a concrete instance if found; typically, only the contact JID is set. No
2607
+ error is returned if no contact was found, but any unexpected errors will otherwise be returned
2608
+ directly.
2609
+ """
2610
+ return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
2611
+ def RequestMessageHistory(self, resourceID, oldestMessage):
2612
+ """RequestMessageHistory(str resourceID, object oldestMessage) str
2613
+
2614
+ RequestMessageHistory sends and asynchronous request for message history related to the given
2615
+ resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
2616
+ history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
2617
+ event handler. An error will be returned if requesting history fails for any reason.
2618
+ """
2619
+ return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
2620
+ def SetEventHandler(self, h, goRun=False):
2621
+ """SetEventHandler(callable h)
2622
+
2623
+ SetEventHandler assigns the given handler function for propagating internal events into the Python
2624
+ gateway. Note that the event handler function is not entirely safe to use directly, and all calls
2625
+ should instead be sent to the [Gateway] via its internal call channel.
2626
+ """
2627
+ _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
2552
2628
 
2553
- # Python type for struct whatsapp.PollOption
2554
- class PollOption(go.GoClass):
2555
- """A PollOption represents an individual choice within a broader poll.\n"""
2629
+ # Python type for struct whatsapp.Connect
2630
+ class Connect(go.GoClass):
2631
+ """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
2556
2632
  def __init__(self, *args, **kwargs):
2557
2633
  """
2558
2634
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2566,17 +2642,21 @@ class PollOption(go.GoClass):
2566
2642
  self.handle = args[0].handle
2567
2643
  _whatsapp.IncRef(self.handle)
2568
2644
  else:
2569
- self.handle = _whatsapp.whatsapp_PollOption_CTor()
2645
+ self.handle = _whatsapp.whatsapp_Connect_CTor()
2570
2646
  _whatsapp.IncRef(self.handle)
2571
2647
  if 0 < len(args):
2572
- self.Title = args[0]
2573
- if "Title" in kwargs:
2574
- self.Title = kwargs["Title"]
2648
+ self.JID = args[0]
2649
+ if "JID" in kwargs:
2650
+ self.JID = kwargs["JID"]
2651
+ if 1 < len(args):
2652
+ self.Error = args[1]
2653
+ if "Error" in kwargs:
2654
+ self.Error = kwargs["Error"]
2575
2655
  def __del__(self):
2576
2656
  _whatsapp.DecRef(self.handle)
2577
2657
  def __str__(self):
2578
2658
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2579
- sv = 'whatsapp.PollOption{'
2659
+ sv = 'whatsapp.Connect{'
2580
2660
  first = True
2581
2661
  for v in pr:
2582
2662
  if callable(v[1]):
@@ -2589,24 +2669,33 @@ class PollOption(go.GoClass):
2589
2669
  return sv + '}'
2590
2670
  def __repr__(self):
2591
2671
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2592
- sv = 'whatsapp.PollOption ( '
2672
+ sv = 'whatsapp.Connect ( '
2593
2673
  for v in pr:
2594
2674
  if not callable(v[1]):
2595
2675
  sv += v[0] + '=' + str(v[1]) + ', '
2596
2676
  return sv + ')'
2597
2677
  @property
2598
- def Title(self):
2599
- return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
2600
- @Title.setter
2601
- def Title(self, value):
2678
+ def JID(self):
2679
+ return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
2680
+ @JID.setter
2681
+ def JID(self, value):
2602
2682
  if isinstance(value, go.GoClass):
2603
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
2683
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
2604
2684
  else:
2605
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
2685
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
2686
+ @property
2687
+ def Error(self):
2688
+ return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
2689
+ @Error.setter
2690
+ def Error(self, value):
2691
+ if isinstance(value, go.GoClass):
2692
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
2693
+ else:
2694
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
2606
2695
 
2607
- # Python type for struct whatsapp.Album
2608
- class Album(go.GoClass):
2609
- """A Album message represents a collection of media files, typically images and videos.\n"""
2696
+ # Python type for struct whatsapp.EventPayload
2697
+ class EventPayload(go.GoClass):
2698
+ """EventPayload represents the collected payloads for all event types handled by the overarching\nsession adapter handler. Only specific fields will be populated in events emitted by internal\nhandlers, see documentation for specific types for more information.\n"""
2610
2699
  def __init__(self, *args, **kwargs):
2611
2700
  """
2612
2701
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2620,25 +2709,57 @@ class Album(go.GoClass):
2620
2709
  self.handle = args[0].handle
2621
2710
  _whatsapp.IncRef(self.handle)
2622
2711
  else:
2623
- self.handle = _whatsapp.whatsapp_Album_CTor()
2712
+ self.handle = _whatsapp.whatsapp_EventPayload_CTor()
2624
2713
  _whatsapp.IncRef(self.handle)
2625
2714
  if 0 < len(args):
2626
- self.IsAlbum = args[0]
2627
- if "IsAlbum" in kwargs:
2628
- self.IsAlbum = kwargs["IsAlbum"]
2715
+ self.QRCode = args[0]
2716
+ if "QRCode" in kwargs:
2717
+ self.QRCode = kwargs["QRCode"]
2629
2718
  if 1 < len(args):
2630
- self.ImageCount = args[1]
2631
- if "ImageCount" in kwargs:
2632
- self.ImageCount = kwargs["ImageCount"]
2719
+ self.PairDeviceID = args[1]
2720
+ if "PairDeviceID" in kwargs:
2721
+ self.PairDeviceID = kwargs["PairDeviceID"]
2633
2722
  if 2 < len(args):
2634
- self.VideoCount = args[2]
2635
- if "VideoCount" in kwargs:
2636
- self.VideoCount = kwargs["VideoCount"]
2723
+ self.Connect = args[2]
2724
+ if "Connect" in kwargs:
2725
+ self.Connect = kwargs["Connect"]
2726
+ if 3 < len(args):
2727
+ self.LoggedOut = args[3]
2728
+ if "LoggedOut" in kwargs:
2729
+ self.LoggedOut = kwargs["LoggedOut"]
2730
+ if 4 < len(args):
2731
+ self.Contact = args[4]
2732
+ if "Contact" in kwargs:
2733
+ self.Contact = kwargs["Contact"]
2734
+ if 5 < len(args):
2735
+ self.Presence = args[5]
2736
+ if "Presence" in kwargs:
2737
+ self.Presence = kwargs["Presence"]
2738
+ if 6 < len(args):
2739
+ self.Message = args[6]
2740
+ if "Message" in kwargs:
2741
+ self.Message = kwargs["Message"]
2742
+ if 7 < len(args):
2743
+ self.ChatState = args[7]
2744
+ if "ChatState" in kwargs:
2745
+ self.ChatState = kwargs["ChatState"]
2746
+ if 8 < len(args):
2747
+ self.Receipt = args[8]
2748
+ if "Receipt" in kwargs:
2749
+ self.Receipt = kwargs["Receipt"]
2750
+ if 9 < len(args):
2751
+ self.Group = args[9]
2752
+ if "Group" in kwargs:
2753
+ self.Group = kwargs["Group"]
2754
+ if 10 < len(args):
2755
+ self.Call = args[10]
2756
+ if "Call" in kwargs:
2757
+ self.Call = kwargs["Call"]
2637
2758
  def __del__(self):
2638
2759
  _whatsapp.DecRef(self.handle)
2639
2760
  def __str__(self):
2640
2761
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2641
- sv = 'whatsapp.Album{'
2762
+ sv = 'whatsapp.EventPayload{'
2642
2763
  first = True
2643
2764
  for v in pr:
2644
2765
  if callable(v[1]):
@@ -2651,42 +2772,114 @@ class Album(go.GoClass):
2651
2772
  return sv + '}'
2652
2773
  def __repr__(self):
2653
2774
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2654
- sv = 'whatsapp.Album ( '
2775
+ sv = 'whatsapp.EventPayload ( '
2655
2776
  for v in pr:
2656
2777
  if not callable(v[1]):
2657
2778
  sv += v[0] + '=' + str(v[1]) + ', '
2658
2779
  return sv + ')'
2659
2780
  @property
2660
- def IsAlbum(self):
2661
- return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
2662
- @IsAlbum.setter
2663
- def IsAlbum(self, value):
2781
+ def QRCode(self):
2782
+ return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
2783
+ @QRCode.setter
2784
+ def QRCode(self, value):
2664
2785
  if isinstance(value, go.GoClass):
2665
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
2786
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
2666
2787
  else:
2667
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
2788
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
2668
2789
  @property
2669
- def ImageCount(self):
2670
- return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
2671
- @ImageCount.setter
2672
- def ImageCount(self, value):
2790
+ def PairDeviceID(self):
2791
+ return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
2792
+ @PairDeviceID.setter
2793
+ def PairDeviceID(self, value):
2673
2794
  if isinstance(value, go.GoClass):
2674
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
2795
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
2675
2796
  else:
2676
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
2797
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
2677
2798
  @property
2678
- def VideoCount(self):
2679
- return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
2680
- @VideoCount.setter
2681
- def VideoCount(self, value):
2799
+ def Connect(self):
2800
+ return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
2801
+ @Connect.setter
2802
+ def Connect(self, value):
2682
2803
  if isinstance(value, go.GoClass):
2683
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
2804
+ _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
2684
2805
  else:
2685
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
2806
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2807
+ @property
2808
+ def LoggedOut(self):
2809
+ return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
2810
+ @LoggedOut.setter
2811
+ def LoggedOut(self, value):
2812
+ if isinstance(value, go.GoClass):
2813
+ _whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
2814
+ else:
2815
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2816
+ @property
2817
+ def Contact(self):
2818
+ return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
2819
+ @Contact.setter
2820
+ def Contact(self, value):
2821
+ if isinstance(value, go.GoClass):
2822
+ _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
2823
+ else:
2824
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2825
+ @property
2826
+ def Presence(self):
2827
+ return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
2828
+ @Presence.setter
2829
+ def Presence(self, value):
2830
+ if isinstance(value, go.GoClass):
2831
+ _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
2832
+ else:
2833
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2834
+ @property
2835
+ def Message(self):
2836
+ return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
2837
+ @Message.setter
2838
+ def Message(self, value):
2839
+ if isinstance(value, go.GoClass):
2840
+ _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
2841
+ else:
2842
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2843
+ @property
2844
+ def ChatState(self):
2845
+ return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
2846
+ @ChatState.setter
2847
+ def ChatState(self, value):
2848
+ if isinstance(value, go.GoClass):
2849
+ _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
2850
+ else:
2851
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2852
+ @property
2853
+ def Receipt(self):
2854
+ return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
2855
+ @Receipt.setter
2856
+ def Receipt(self, value):
2857
+ if isinstance(value, go.GoClass):
2858
+ _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
2859
+ else:
2860
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2861
+ @property
2862
+ def Group(self):
2863
+ return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
2864
+ @Group.setter
2865
+ def Group(self, value):
2866
+ if isinstance(value, go.GoClass):
2867
+ _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
2868
+ else:
2869
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2870
+ @property
2871
+ def Call(self):
2872
+ return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
2873
+ @Call.setter
2874
+ def Call(self, value):
2875
+ if isinstance(value, go.GoClass):
2876
+ _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
2877
+ else:
2878
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2686
2879
 
2687
- # Python type for struct whatsapp.Avatar
2688
- class Avatar(go.GoClass):
2689
- """A Avatar represents a small image set for a Contact or Group.\n"""
2880
+ # Python type for struct whatsapp.GroupParticipant
2881
+ class GroupParticipant(go.GoClass):
2882
+ """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can generally be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
2690
2883
  def __init__(self, *args, **kwargs):
2691
2884
  """
2692
2885
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2700,21 +2893,29 @@ class Avatar(go.GoClass):
2700
2893
  self.handle = args[0].handle
2701
2894
  _whatsapp.IncRef(self.handle)
2702
2895
  else:
2703
- self.handle = _whatsapp.whatsapp_Avatar_CTor()
2896
+ self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
2704
2897
  _whatsapp.IncRef(self.handle)
2705
2898
  if 0 < len(args):
2706
- self.ID = args[0]
2707
- if "ID" in kwargs:
2708
- self.ID = kwargs["ID"]
2899
+ self.JID = args[0]
2900
+ if "JID" in kwargs:
2901
+ self.JID = kwargs["JID"]
2709
2902
  if 1 < len(args):
2710
- self.URL = args[1]
2711
- if "URL" in kwargs:
2712
- self.URL = kwargs["URL"]
2903
+ self.Nickname = args[1]
2904
+ if "Nickname" in kwargs:
2905
+ self.Nickname = kwargs["Nickname"]
2906
+ if 2 < len(args):
2907
+ self.Affiliation = args[2]
2908
+ if "Affiliation" in kwargs:
2909
+ self.Affiliation = kwargs["Affiliation"]
2910
+ if 3 < len(args):
2911
+ self.Action = args[3]
2912
+ if "Action" in kwargs:
2913
+ self.Action = kwargs["Action"]
2713
2914
  def __del__(self):
2714
2915
  _whatsapp.DecRef(self.handle)
2715
2916
  def __str__(self):
2716
2917
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2717
- sv = 'whatsapp.Avatar{'
2918
+ sv = 'whatsapp.GroupParticipant{'
2718
2919
  first = True
2719
2920
  for v in pr:
2720
2921
  if callable(v[1]):
@@ -2727,33 +2928,51 @@ class Avatar(go.GoClass):
2727
2928
  return sv + '}'
2728
2929
  def __repr__(self):
2729
2930
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2730
- sv = 'whatsapp.Avatar ( '
2931
+ sv = 'whatsapp.GroupParticipant ( '
2731
2932
  for v in pr:
2732
2933
  if not callable(v[1]):
2733
2934
  sv += v[0] + '=' + str(v[1]) + ', '
2734
2935
  return sv + ')'
2735
2936
  @property
2736
- def ID(self):
2737
- return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
2738
- @ID.setter
2739
- def ID(self, value):
2937
+ def JID(self):
2938
+ return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
2939
+ @JID.setter
2940
+ def JID(self, value):
2740
2941
  if isinstance(value, go.GoClass):
2741
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
2942
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
2742
2943
  else:
2743
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
2944
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
2744
2945
  @property
2745
- def URL(self):
2746
- return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
2747
- @URL.setter
2748
- def URL(self, value):
2946
+ def Nickname(self):
2947
+ return _whatsapp.whatsapp_GroupParticipant_Nickname_Get(self.handle)
2948
+ @Nickname.setter
2949
+ def Nickname(self, value):
2749
2950
  if isinstance(value, go.GoClass):
2750
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
2951
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value.handle)
2751
2952
  else:
2752
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
2953
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value)
2954
+ @property
2955
+ def Affiliation(self):
2956
+ return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
2957
+ @Affiliation.setter
2958
+ def Affiliation(self, value):
2959
+ if isinstance(value, go.GoClass):
2960
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
2961
+ else:
2962
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
2963
+ @property
2964
+ def Action(self):
2965
+ return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
2966
+ @Action.setter
2967
+ def Action(self, value):
2968
+ if isinstance(value, go.GoClass):
2969
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
2970
+ else:
2971
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
2753
2972
 
2754
- # Python type for struct whatsapp.ChatState
2755
- class ChatState(go.GoClass):
2756
- """A ChatState represents the activity of a contact within a certain discussion, for instance,\nwhether the contact is currently composing a message. This is separate to the concept of a\nPresence, which is the contact's general state across all discussions.\n"""
2973
+ # Python type for struct whatsapp.LinkedDevice
2974
+ class LinkedDevice(go.GoClass):
2975
+ """A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
2757
2976
  def __init__(self, *args, **kwargs):
2758
2977
  """
2759
2978
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2767,25 +2986,17 @@ class ChatState(go.GoClass):
2767
2986
  self.handle = args[0].handle
2768
2987
  _whatsapp.IncRef(self.handle)
2769
2988
  else:
2770
- self.handle = _whatsapp.whatsapp_ChatState_CTor()
2989
+ self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
2771
2990
  _whatsapp.IncRef(self.handle)
2772
2991
  if 0 < len(args):
2773
- self.Kind = args[0]
2774
- if "Kind" in kwargs:
2775
- self.Kind = kwargs["Kind"]
2776
- if 1 < len(args):
2777
- self.JID = args[1]
2778
- if "JID" in kwargs:
2779
- self.JID = kwargs["JID"]
2780
- if 2 < len(args):
2781
- self.GroupJID = args[2]
2782
- if "GroupJID" in kwargs:
2783
- self.GroupJID = kwargs["GroupJID"]
2992
+ self.ID = args[0]
2993
+ if "ID" in kwargs:
2994
+ self.ID = kwargs["ID"]
2784
2995
  def __del__(self):
2785
2996
  _whatsapp.DecRef(self.handle)
2786
2997
  def __str__(self):
2787
2998
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2788
- sv = 'whatsapp.ChatState{'
2999
+ sv = 'whatsapp.LinkedDevice{'
2789
3000
  first = True
2790
3001
  for v in pr:
2791
3002
  if callable(v[1]):
@@ -2798,38 +3009,30 @@ class ChatState(go.GoClass):
2798
3009
  return sv + '}'
2799
3010
  def __repr__(self):
2800
3011
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2801
- sv = 'whatsapp.ChatState ( '
3012
+ sv = 'whatsapp.LinkedDevice ( '
2802
3013
  for v in pr:
2803
3014
  if not callable(v[1]):
2804
3015
  sv += v[0] + '=' + str(v[1]) + ', '
2805
- return sv + ')'
2806
- @property
2807
- def Kind(self):
2808
- return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
2809
- @Kind.setter
2810
- def Kind(self, value):
2811
- if isinstance(value, go.GoClass):
2812
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
2813
- else:
2814
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
2815
- @property
2816
- def JID(self):
2817
- return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
2818
- @JID.setter
2819
- def JID(self, value):
2820
- if isinstance(value, go.GoClass):
2821
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
2822
- else:
2823
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
3016
+ return sv + ')'
2824
3017
  @property
2825
- def GroupJID(self):
2826
- return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
2827
- @GroupJID.setter
2828
- def GroupJID(self, value):
3018
+ def ID(self):
3019
+ """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
3020
+ is currently equivalent to a password, and needs to be protected accordingly.
3021
+ """
3022
+ return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
3023
+ @ID.setter
3024
+ def ID(self, value):
2829
3025
  if isinstance(value, go.GoClass):
2830
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
3026
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
2831
3027
  else:
2832
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
3028
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
3029
+ def JID(self):
3030
+ """JID() object
3031
+
3032
+ JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
3033
+ may return invalid JIDs, and this function does not handle errors.
3034
+ """
3035
+ return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2833
3036
 
2834
3037
  # Python type for struct whatsapp.Location
2835
3038
  class Location(go.GoClass):
@@ -2965,9 +3168,9 @@ class Location(go.GoClass):
2965
3168
  else:
2966
3169
  _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
2967
3170
 
2968
- # Python type for struct whatsapp.LinkedDevice
2969
- class LinkedDevice(go.GoClass):
2970
- """A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
3171
+ # Python type for struct whatsapp.LoggedOut
3172
+ class LoggedOut(go.GoClass):
3173
+ """LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
2971
3174
  def __init__(self, *args, **kwargs):
2972
3175
  """
2973
3176
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2981,17 +3184,17 @@ class LinkedDevice(go.GoClass):
2981
3184
  self.handle = args[0].handle
2982
3185
  _whatsapp.IncRef(self.handle)
2983
3186
  else:
2984
- self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
3187
+ self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
2985
3188
  _whatsapp.IncRef(self.handle)
2986
3189
  if 0 < len(args):
2987
- self.ID = args[0]
2988
- if "ID" in kwargs:
2989
- self.ID = kwargs["ID"]
3190
+ self.Reason = args[0]
3191
+ if "Reason" in kwargs:
3192
+ self.Reason = kwargs["Reason"]
2990
3193
  def __del__(self):
2991
3194
  _whatsapp.DecRef(self.handle)
2992
3195
  def __str__(self):
2993
3196
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2994
- sv = 'whatsapp.LinkedDevice{'
3197
+ sv = 'whatsapp.LoggedOut{'
2995
3198
  first = True
2996
3199
  for v in pr:
2997
3200
  if callable(v[1]):
@@ -3004,30 +3207,20 @@ class LinkedDevice(go.GoClass):
3004
3207
  return sv + '}'
3005
3208
  def __repr__(self):
3006
3209
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3007
- sv = 'whatsapp.LinkedDevice ( '
3210
+ sv = 'whatsapp.LoggedOut ( '
3008
3211
  for v in pr:
3009
3212
  if not callable(v[1]):
3010
3213
  sv += v[0] + '=' + str(v[1]) + ', '
3011
3214
  return sv + ')'
3012
3215
  @property
3013
- def ID(self):
3014
- """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
3015
- is currently equivalent to a password, and needs to be protected accordingly.
3016
- """
3017
- return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
3018
- @ID.setter
3019
- def ID(self, value):
3216
+ def Reason(self):
3217
+ return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
3218
+ @Reason.setter
3219
+ def Reason(self, value):
3020
3220
  if isinstance(value, go.GoClass):
3021
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
3221
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
3022
3222
  else:
3023
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
3024
- def JID(self):
3025
- """JID() object
3026
-
3027
- JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
3028
- may return invalid JIDs, and this function does not handle errors.
3029
- """
3030
- return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
3223
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
3031
3224
 
3032
3225
  # Python type for struct whatsapp.Preview
3033
3226
  class Preview(go.GoClass):
@@ -3135,199 +3328,6 @@ class Preview(go.GoClass):
3135
3328
  else:
3136
3329
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3137
3330
 
3138
- # Python type for struct whatsapp.Session
3139
- class Session(go.GoClass):
3140
- """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
3141
- def __init__(self, *args, **kwargs):
3142
- """
3143
- handle=A Go-side object is always initialized with an explicit handle=arg
3144
- otherwise parameters can be unnamed in order of field names or named fields
3145
- in which case a new Go object is constructed first
3146
- """
3147
- if len(kwargs) == 1 and 'handle' in kwargs:
3148
- self.handle = kwargs['handle']
3149
- _whatsapp.IncRef(self.handle)
3150
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
3151
- self.handle = args[0].handle
3152
- _whatsapp.IncRef(self.handle)
3153
- else:
3154
- self.handle = _whatsapp.whatsapp_Session_CTor()
3155
- _whatsapp.IncRef(self.handle)
3156
- def __del__(self):
3157
- _whatsapp.DecRef(self.handle)
3158
- def __str__(self):
3159
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3160
- sv = 'whatsapp.Session{'
3161
- first = True
3162
- for v in pr:
3163
- if callable(v[1]):
3164
- continue
3165
- if first:
3166
- first = False
3167
- else:
3168
- sv += ', '
3169
- sv += v[0] + '=' + str(v[1])
3170
- return sv + '}'
3171
- def __repr__(self):
3172
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3173
- sv = 'whatsapp.Session ( '
3174
- for v in pr:
3175
- if not callable(v[1]):
3176
- sv += v[0] + '=' + str(v[1]) + ', '
3177
- return sv + ')'
3178
- def Login(self):
3179
- """Login() str
3180
-
3181
- Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
3182
- or by initiating a pairing session for a new linked device. Callers are expected to have set an
3183
- event handler in order to receive any incoming events from the underlying WhatsApp session.
3184
- """
3185
- return _whatsapp.whatsapp_Session_Login(self.handle)
3186
- def Logout(self):
3187
- """Logout() str
3188
-
3189
- Logout disconnects and removes the current linked device locally and initiates a logout remotely.
3190
- """
3191
- return _whatsapp.whatsapp_Session_Logout(self.handle)
3192
- def Disconnect(self):
3193
- """Disconnect() str
3194
-
3195
- Disconnects detaches the current connection to WhatsApp without removing any linked device state.
3196
- """
3197
- return _whatsapp.whatsapp_Session_Disconnect(self.handle)
3198
- def PairPhone(self, phone):
3199
- """PairPhone(str phone) str, str
3200
-
3201
- PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
3202
- user's primary device, as identified by the given phone number. This will return an error if the
3203
- [Session] is already paired, or if the phone number given is empty or invalid.
3204
- """
3205
- return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
3206
- def SendMessage(self, message):
3207
- """SendMessage(object message) str
3208
-
3209
- SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
3210
- specified within. In general, different message kinds require different fields to be set; see the
3211
- documentation for the [Message] type for more information.
3212
- """
3213
- return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
3214
- def GenerateMessageID(self):
3215
- """GenerateMessageID() str
3216
-
3217
- GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
3218
- """
3219
- return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
3220
- def SendChatState(self, state):
3221
- """SendChatState(object state) str
3222
-
3223
- SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
3224
- contact specified within.
3225
- """
3226
- return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
3227
- def SendReceipt(self, receipt):
3228
- """SendReceipt(object receipt) str
3229
-
3230
- SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
3231
- """
3232
- return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
3233
- def SendPresence(self, presence, statusMessage):
3234
- """SendPresence(int presence, str statusMessage) str
3235
-
3236
- SendPresence sets the activity state and (optional) status message for the current session and
3237
- user. An error is returned if setting availability fails for any reason.
3238
- """
3239
- return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
3240
- def GetContacts(self, refresh):
3241
- """GetContacts(bool refresh) []object, str
3242
-
3243
- GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
3244
- If `refresh` is `true`, FetchRoster will pull application state from the remote service and
3245
- synchronize any contacts found with the adapter.
3246
- """
3247
- return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
3248
- def GetGroups(self):
3249
- """GetGroups() []object, str
3250
-
3251
- GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
3252
- information on present participants.
3253
- """
3254
- return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
3255
- def CreateGroup(self, name, participants):
3256
- """CreateGroup(str name, []str participants) object, str
3257
-
3258
- CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
3259
- participant JIDs given.
3260
- """
3261
- return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
3262
- def LeaveGroup(self, resourceID):
3263
- """LeaveGroup(str resourceID) str
3264
-
3265
- LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
3266
- """
3267
- return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
3268
- def GetAvatar(self, resourceID, avatarID):
3269
- """GetAvatar(str resourceID, str avatarID) object, str
3270
-
3271
- GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
3272
- is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
3273
- for the given ID has not changed.
3274
- """
3275
- return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
3276
- def SetAvatar(self, resourceID, avatar):
3277
- """SetAvatar(str resourceID, []int avatar) str, str
3278
-
3279
- SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
3280
- profile picture for our own user by providing an empty JID. The unique picture ID is returned,
3281
- typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
3282
- """
3283
- return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
3284
- def SetGroupName(self, resourceID, name):
3285
- """SetGroupName(str resourceID, str name) str
3286
-
3287
- SetGroupName updates the name of a WhatsApp group for the Group JID given.
3288
- """
3289
- return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
3290
- def SetGroupTopic(self, resourceID, topic):
3291
- """SetGroupTopic(str resourceID, str topic) str
3292
-
3293
- SetGroupName updates the topic of a WhatsApp group for the Group JID given.
3294
- """
3295
- return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
3296
- def UpdateGroupParticipants(self, resourceID, participants):
3297
- """UpdateGroupParticipants(str resourceID, []object participants) []object, str
3298
-
3299
- UpdateGroupParticipants processes changes to the given group's participants, including additions,
3300
- removals, and changes to privileges. Participant JIDs given must be part of the authenticated
3301
- session's roster at least, and must also be active group participants for other types of changes.
3302
- """
3303
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
3304
- def FindContact(self, phone):
3305
- """FindContact(str phone) object, str
3306
-
3307
- FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
3308
- phone number, returning a concrete instance if found; typically, only the contact JID is set. No
3309
- error is returned if no contact was found, but any unexpected errors will otherwise be returned
3310
- directly.
3311
- """
3312
- return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
3313
- def RequestMessageHistory(self, resourceID, oldestMessage):
3314
- """RequestMessageHistory(str resourceID, object oldestMessage) str
3315
-
3316
- RequestMessageHistory sends and asynchronous request for message history related to the given
3317
- resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
3318
- history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
3319
- event handler. An error will be returned if requesting history fails for any reason.
3320
- """
3321
- return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
3322
- def SetEventHandler(self, h, goRun=False):
3323
- """SetEventHandler(callable h)
3324
-
3325
- SetEventHandler assigns the given handler function for propagating internal events into the Python
3326
- gateway. Note that the event handler function is not entirely safe to use directly, and all calls
3327
- should instead be sent to the [Gateway] via its internal call channel.
3328
- """
3329
- _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
3330
-
3331
3331
 
3332
3332
  # ---- Slices ---
3333
3333