slidge-whatsapp 0.3.6__cp311-cp311-manylinux_2_41_aarch64.whl → 0.3.7__cp311-cp311-manylinux_2_41_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.

@@ -1013,9 +1013,9 @@ DefaultUserServer = "s.whatsapp.net"
1013
1013
 
1014
1014
  # ---- Structs ---
1015
1015
 
1016
- # Python type for struct whatsapp.Location
1017
- class Location(go.GoClass):
1018
- """A Location represents additional metadata given to location messages.\n"""
1016
+ # Python type for struct whatsapp.Connect
1017
+ class Connect(go.GoClass):
1018
+ """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\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,41 +1029,21 @@ class Location(go.GoClass):
1029
1029
  self.handle = args[0].handle
1030
1030
  _whatsapp.IncRef(self.handle)
1031
1031
  else:
1032
- self.handle = _whatsapp.whatsapp_Location_CTor()
1032
+ self.handle = _whatsapp.whatsapp_Connect_CTor()
1033
1033
  _whatsapp.IncRef(self.handle)
1034
1034
  if 0 < len(args):
1035
- self.Latitude = args[0]
1036
- if "Latitude" in kwargs:
1037
- self.Latitude = kwargs["Latitude"]
1035
+ self.JID = args[0]
1036
+ if "JID" in kwargs:
1037
+ self.JID = kwargs["JID"]
1038
1038
  if 1 < len(args):
1039
- self.Longitude = args[1]
1040
- if "Longitude" in kwargs:
1041
- self.Longitude = kwargs["Longitude"]
1042
- if 2 < len(args):
1043
- self.Accuracy = args[2]
1044
- if "Accuracy" in kwargs:
1045
- self.Accuracy = kwargs["Accuracy"]
1046
- if 3 < len(args):
1047
- self.IsLive = args[3]
1048
- if "IsLive" in kwargs:
1049
- self.IsLive = kwargs["IsLive"]
1050
- if 4 < len(args):
1051
- self.Name = args[4]
1052
- if "Name" in kwargs:
1053
- self.Name = kwargs["Name"]
1054
- if 5 < len(args):
1055
- self.Address = args[5]
1056
- if "Address" in kwargs:
1057
- self.Address = kwargs["Address"]
1058
- if 6 < len(args):
1059
- self.URL = args[6]
1060
- if "URL" in kwargs:
1061
- self.URL = kwargs["URL"]
1039
+ self.Error = args[1]
1040
+ if "Error" in kwargs:
1041
+ self.Error = kwargs["Error"]
1062
1042
  def __del__(self):
1063
1043
  _whatsapp.DecRef(self.handle)
1064
1044
  def __str__(self):
1065
1045
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1066
- sv = 'whatsapp.Location{'
1046
+ sv = 'whatsapp.Connect{'
1067
1047
  first = True
1068
1048
  for v in pr:
1069
1049
  if callable(v[1]):
@@ -1076,80 +1056,147 @@ class Location(go.GoClass):
1076
1056
  return sv + '}'
1077
1057
  def __repr__(self):
1078
1058
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1079
- sv = 'whatsapp.Location ( '
1059
+ sv = 'whatsapp.Connect ( '
1080
1060
  for v in pr:
1081
1061
  if not callable(v[1]):
1082
1062
  sv += v[0] + '=' + str(v[1]) + ', '
1083
1063
  return sv + ')'
1084
1064
  @property
1085
- def Latitude(self):
1086
- return _whatsapp.whatsapp_Location_Latitude_Get(self.handle)
1087
- @Latitude.setter
1088
- def Latitude(self, value):
1065
+ def JID(self):
1066
+ return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
1067
+ @JID.setter
1068
+ def JID(self, value):
1089
1069
  if isinstance(value, go.GoClass):
1090
- _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
1070
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
1091
1071
  else:
1092
- _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
1072
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
1093
1073
  @property
1094
- def Longitude(self):
1095
- return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
1096
- @Longitude.setter
1097
- def Longitude(self, value):
1074
+ def Error(self):
1075
+ return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
1076
+ @Error.setter
1077
+ def Error(self, value):
1098
1078
  if isinstance(value, go.GoClass):
1099
- _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
1079
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
1100
1080
  else:
1101
- _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
1102
- @property
1103
- def Accuracy(self):
1104
- return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
1105
- @Accuracy.setter
1106
- def Accuracy(self, value):
1107
- if isinstance(value, go.GoClass):
1108
- _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
1081
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
1082
+
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"""
1086
+ def __init__(self, *args, **kwargs):
1087
+ """
1088
+ handle=A Go-side object is always initialized with an explicit handle=arg
1089
+ otherwise parameters can be unnamed in order of field names or named fields
1090
+ in which case a new Go object is constructed first
1091
+ """
1092
+ if len(kwargs) == 1 and 'handle' in kwargs:
1093
+ self.handle = kwargs['handle']
1094
+ _whatsapp.IncRef(self.handle)
1095
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1096
+ self.handle = args[0].handle
1097
+ _whatsapp.IncRef(self.handle)
1109
1098
  else:
1110
- _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
1099
+ self.handle = _whatsapp.whatsapp_Gateway_CTor()
1100
+ _whatsapp.IncRef(self.handle)
1101
+ if 0 < len(args):
1102
+ self.DBPath = args[0]
1103
+ if "DBPath" in kwargs:
1104
+ self.DBPath = kwargs["DBPath"]
1105
+ if 1 < len(args):
1106
+ self.Name = args[1]
1107
+ if "Name" in kwargs:
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"]
1117
+ def __del__(self):
1118
+ _whatsapp.DecRef(self.handle)
1119
+ def __str__(self):
1120
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1121
+ sv = 'whatsapp.Gateway{'
1122
+ first = True
1123
+ for v in pr:
1124
+ if callable(v[1]):
1125
+ continue
1126
+ if first:
1127
+ first = False
1128
+ else:
1129
+ sv += ', '
1130
+ sv += v[0] + '=' + str(v[1])
1131
+ return sv + '}'
1132
+ def __repr__(self):
1133
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1134
+ sv = 'whatsapp.Gateway ( '
1135
+ for v in pr:
1136
+ if not callable(v[1]):
1137
+ sv += v[0] + '=' + str(v[1]) + ', '
1138
+ return sv + ')'
1111
1139
  @property
1112
- def IsLive(self):
1113
- return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
1114
- @IsLive.setter
1115
- def IsLive(self, value):
1140
+ def DBPath(self):
1141
+ return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
1142
+ @DBPath.setter
1143
+ def DBPath(self, value):
1116
1144
  if isinstance(value, go.GoClass):
1117
- _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
1145
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
1118
1146
  else:
1119
- _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
1147
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
1120
1148
  @property
1121
1149
  def Name(self):
1122
- """Optional fields given for named locations.
1123
- """
1124
- return _whatsapp.whatsapp_Location_Name_Get(self.handle)
1150
+ return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
1125
1151
  @Name.setter
1126
1152
  def Name(self, value):
1127
1153
  if isinstance(value, go.GoClass):
1128
- _whatsapp.whatsapp_Location_Name_Set(self.handle, value.handle)
1154
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
1129
1155
  else:
1130
- _whatsapp.whatsapp_Location_Name_Set(self.handle, value)
1156
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
1131
1157
  @property
1132
- def Address(self):
1133
- return _whatsapp.whatsapp_Location_Address_Get(self.handle)
1134
- @Address.setter
1135
- def Address(self, value):
1158
+ def LogLevel(self):
1159
+ return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
1160
+ @LogLevel.setter
1161
+ def LogLevel(self, value):
1136
1162
  if isinstance(value, go.GoClass):
1137
- _whatsapp.whatsapp_Location_Address_Set(self.handle, value.handle)
1163
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
1138
1164
  else:
1139
- _whatsapp.whatsapp_Location_Address_Set(self.handle, value)
1165
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
1140
1166
  @property
1141
- def URL(self):
1142
- return _whatsapp.whatsapp_Location_URL_Get(self.handle)
1143
- @URL.setter
1144
- def URL(self, value):
1167
+ def TempDir(self):
1168
+ return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
1169
+ @TempDir.setter
1170
+ def TempDir(self, value):
1145
1171
  if isinstance(value, go.GoClass):
1146
- _whatsapp.whatsapp_Location_URL_Set(self.handle, value.handle)
1172
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
1147
1173
  else:
1148
- _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
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)
1149
1196
 
1150
- # Python type for struct whatsapp.PollOption
1151
- class PollOption(go.GoClass):
1152
- """A PollOption represents an individual choice within a broader poll.\n"""
1197
+ # Python type for struct whatsapp.Poll
1198
+ class Poll(go.GoClass):
1199
+ """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
1153
1200
  def __init__(self, *args, **kwargs):
1154
1201
  """
1155
1202
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1163,17 +1210,21 @@ class PollOption(go.GoClass):
1163
1210
  self.handle = args[0].handle
1164
1211
  _whatsapp.IncRef(self.handle)
1165
1212
  else:
1166
- self.handle = _whatsapp.whatsapp_PollOption_CTor()
1213
+ self.handle = _whatsapp.whatsapp_Poll_CTor()
1167
1214
  _whatsapp.IncRef(self.handle)
1168
1215
  if 0 < len(args):
1169
1216
  self.Title = args[0]
1170
1217
  if "Title" in kwargs:
1171
1218
  self.Title = kwargs["Title"]
1219
+ if 1 < len(args):
1220
+ self.Options = args[1]
1221
+ if "Options" in kwargs:
1222
+ self.Options = kwargs["Options"]
1172
1223
  def __del__(self):
1173
1224
  _whatsapp.DecRef(self.handle)
1174
1225
  def __str__(self):
1175
1226
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1176
- sv = 'whatsapp.PollOption{'
1227
+ sv = 'whatsapp.Poll{'
1177
1228
  first = True
1178
1229
  for v in pr:
1179
1230
  if callable(v[1]):
@@ -1186,20 +1237,29 @@ class PollOption(go.GoClass):
1186
1237
  return sv + '}'
1187
1238
  def __repr__(self):
1188
1239
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1189
- sv = 'whatsapp.PollOption ( '
1240
+ sv = 'whatsapp.Poll ( '
1190
1241
  for v in pr:
1191
1242
  if not callable(v[1]):
1192
1243
  sv += v[0] + '=' + str(v[1]) + ', '
1193
1244
  return sv + ')'
1194
1245
  @property
1195
1246
  def Title(self):
1196
- return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
1247
+ return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
1197
1248
  @Title.setter
1198
1249
  def Title(self, value):
1199
1250
  if isinstance(value, go.GoClass):
1200
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
1251
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
1201
1252
  else:
1202
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
1253
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
1254
+ @property
1255
+ def Options(self):
1256
+ return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
1257
+ @Options.setter
1258
+ def Options(self, value):
1259
+ if isinstance(value, go.GoClass):
1260
+ _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
1261
+ else:
1262
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1203
1263
 
1204
1264
  # Python type for struct whatsapp.Presence
1205
1265
  class Presence(go.GoClass):
@@ -1281,9 +1341,9 @@ class Presence(go.GoClass):
1281
1341
  else:
1282
1342
  _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
1283
1343
 
1284
- # Python type for struct whatsapp.Preview
1285
- class Preview(go.GoClass):
1286
- """A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
1344
+ # Python type for struct whatsapp.ChatState
1345
+ class ChatState(go.GoClass):
1346
+ """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"""
1287
1347
  def __init__(self, *args, **kwargs):
1288
1348
  """
1289
1349
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1297,33 +1357,25 @@ class Preview(go.GoClass):
1297
1357
  self.handle = args[0].handle
1298
1358
  _whatsapp.IncRef(self.handle)
1299
1359
  else:
1300
- self.handle = _whatsapp.whatsapp_Preview_CTor()
1360
+ self.handle = _whatsapp.whatsapp_ChatState_CTor()
1301
1361
  _whatsapp.IncRef(self.handle)
1302
1362
  if 0 < len(args):
1303
1363
  self.Kind = args[0]
1304
1364
  if "Kind" in kwargs:
1305
1365
  self.Kind = kwargs["Kind"]
1306
1366
  if 1 < len(args):
1307
- self.URL = args[1]
1308
- if "URL" in kwargs:
1309
- self.URL = kwargs["URL"]
1367
+ self.JID = args[1]
1368
+ if "JID" in kwargs:
1369
+ self.JID = kwargs["JID"]
1310
1370
  if 2 < len(args):
1311
- self.Title = args[2]
1312
- if "Title" in kwargs:
1313
- self.Title = kwargs["Title"]
1314
- if 3 < len(args):
1315
- self.Description = args[3]
1316
- if "Description" in kwargs:
1317
- self.Description = kwargs["Description"]
1318
- if 4 < len(args):
1319
- self.Thumbnail = args[4]
1320
- if "Thumbnail" in kwargs:
1321
- self.Thumbnail = kwargs["Thumbnail"]
1371
+ self.GroupJID = args[2]
1372
+ if "GroupJID" in kwargs:
1373
+ self.GroupJID = kwargs["GroupJID"]
1322
1374
  def __del__(self):
1323
1375
  _whatsapp.DecRef(self.handle)
1324
1376
  def __str__(self):
1325
1377
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1326
- sv = 'whatsapp.Preview{'
1378
+ sv = 'whatsapp.ChatState{'
1327
1379
  first = True
1328
1380
  for v in pr:
1329
1381
  if callable(v[1]):
@@ -1336,60 +1388,42 @@ class Preview(go.GoClass):
1336
1388
  return sv + '}'
1337
1389
  def __repr__(self):
1338
1390
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1339
- sv = 'whatsapp.Preview ( '
1391
+ sv = 'whatsapp.ChatState ( '
1340
1392
  for v in pr:
1341
1393
  if not callable(v[1]):
1342
1394
  sv += v[0] + '=' + str(v[1]) + ', '
1343
1395
  return sv + ')'
1344
1396
  @property
1345
1397
  def Kind(self):
1346
- return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
1398
+ return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
1347
1399
  @Kind.setter
1348
1400
  def Kind(self, value):
1349
1401
  if isinstance(value, go.GoClass):
1350
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
1351
- else:
1352
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
1353
- @property
1354
- def URL(self):
1355
- return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
1356
- @URL.setter
1357
- def URL(self, value):
1358
- if isinstance(value, go.GoClass):
1359
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
1360
- else:
1361
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
1362
- @property
1363
- def Title(self):
1364
- return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
1365
- @Title.setter
1366
- def Title(self, value):
1367
- if isinstance(value, go.GoClass):
1368
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
1402
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
1369
1403
  else:
1370
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
1404
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
1371
1405
  @property
1372
- def Description(self):
1373
- return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
1374
- @Description.setter
1375
- def Description(self, value):
1406
+ def JID(self):
1407
+ return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
1408
+ @JID.setter
1409
+ def JID(self, value):
1376
1410
  if isinstance(value, go.GoClass):
1377
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
1411
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
1378
1412
  else:
1379
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
1413
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
1380
1414
  @property
1381
- def Thumbnail(self):
1382
- return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
1383
- @Thumbnail.setter
1384
- def Thumbnail(self, value):
1415
+ def GroupJID(self):
1416
+ return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
1417
+ @GroupJID.setter
1418
+ def GroupJID(self, value):
1385
1419
  if isinstance(value, go.GoClass):
1386
- _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
1420
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
1387
1421
  else:
1388
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1422
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1389
1423
 
1390
- # Python type for struct whatsapp.Receipt
1391
- class Receipt(go.GoClass):
1392
- """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"""
1424
+ # Python type for struct whatsapp.Group
1425
+ class Group(go.GoClass):
1426
+ """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"""
1393
1427
  def __init__(self, *args, **kwargs):
1394
1428
  """
1395
1429
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1403,37 +1437,37 @@ class Receipt(go.GoClass):
1403
1437
  self.handle = args[0].handle
1404
1438
  _whatsapp.IncRef(self.handle)
1405
1439
  else:
1406
- self.handle = _whatsapp.whatsapp_Receipt_CTor()
1440
+ self.handle = _whatsapp.whatsapp_Group_CTor()
1407
1441
  _whatsapp.IncRef(self.handle)
1408
1442
  if 0 < len(args):
1409
- self.Kind = args[0]
1410
- if "Kind" in kwargs:
1411
- self.Kind = kwargs["Kind"]
1412
- if 1 < len(args):
1413
- self.MessageIDs = args[1]
1414
- if "MessageIDs" in kwargs:
1415
- self.MessageIDs = kwargs["MessageIDs"]
1416
- if 2 < len(args):
1417
- self.JID = args[2]
1443
+ self.JID = args[0]
1418
1444
  if "JID" in kwargs:
1419
1445
  self.JID = kwargs["JID"]
1446
+ if 1 < len(args):
1447
+ self.Name = args[1]
1448
+ if "Name" in kwargs:
1449
+ self.Name = kwargs["Name"]
1450
+ if 2 < len(args):
1451
+ self.Subject = args[2]
1452
+ if "Subject" in kwargs:
1453
+ self.Subject = kwargs["Subject"]
1420
1454
  if 3 < len(args):
1421
- self.GroupJID = args[3]
1422
- if "GroupJID" in kwargs:
1423
- self.GroupJID = kwargs["GroupJID"]
1455
+ self.Nickname = args[3]
1456
+ if "Nickname" in kwargs:
1457
+ self.Nickname = kwargs["Nickname"]
1424
1458
  if 4 < len(args):
1425
- self.Timestamp = args[4]
1426
- if "Timestamp" in kwargs:
1427
- self.Timestamp = kwargs["Timestamp"]
1459
+ self.Participants = args[4]
1460
+ if "Participants" in kwargs:
1461
+ self.Participants = kwargs["Participants"]
1428
1462
  if 5 < len(args):
1429
- self.IsCarbon = args[5]
1430
- if "IsCarbon" in kwargs:
1431
- self.IsCarbon = kwargs["IsCarbon"]
1463
+ self.InviteCode = args[5]
1464
+ if "InviteCode" in kwargs:
1465
+ self.InviteCode = kwargs["InviteCode"]
1432
1466
  def __del__(self):
1433
1467
  _whatsapp.DecRef(self.handle)
1434
1468
  def __str__(self):
1435
1469
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1436
- sv = 'whatsapp.Receipt{'
1470
+ sv = 'whatsapp.Group{'
1437
1471
  first = True
1438
1472
  for v in pr:
1439
1473
  if callable(v[1]):
@@ -1446,69 +1480,69 @@ class Receipt(go.GoClass):
1446
1480
  return sv + '}'
1447
1481
  def __repr__(self):
1448
1482
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1449
- sv = 'whatsapp.Receipt ( '
1483
+ sv = 'whatsapp.Group ( '
1450
1484
  for v in pr:
1451
1485
  if not callable(v[1]):
1452
1486
  sv += v[0] + '=' + str(v[1]) + ', '
1453
1487
  return sv + ')'
1454
1488
  @property
1455
- def Kind(self):
1456
- return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
1457
- @Kind.setter
1458
- def Kind(self, value):
1489
+ def JID(self):
1490
+ return _whatsapp.whatsapp_Group_JID_Get(self.handle)
1491
+ @JID.setter
1492
+ def JID(self, value):
1459
1493
  if isinstance(value, go.GoClass):
1460
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
1494
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
1461
1495
  else:
1462
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
1496
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
1463
1497
  @property
1464
- def MessageIDs(self):
1465
- return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
1466
- @MessageIDs.setter
1467
- def MessageIDs(self, value):
1498
+ def Name(self):
1499
+ return _whatsapp.whatsapp_Group_Name_Get(self.handle)
1500
+ @Name.setter
1501
+ def Name(self, value):
1468
1502
  if isinstance(value, go.GoClass):
1469
- _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
1503
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
1470
1504
  else:
1471
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1505
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
1472
1506
  @property
1473
- def JID(self):
1474
- return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
1475
- @JID.setter
1476
- def JID(self, value):
1507
+ def Subject(self):
1508
+ return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
1509
+ @Subject.setter
1510
+ def Subject(self, value):
1477
1511
  if isinstance(value, go.GoClass):
1478
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
1512
+ _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
1479
1513
  else:
1480
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
1514
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1481
1515
  @property
1482
- def GroupJID(self):
1483
- return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
1484
- @GroupJID.setter
1485
- def GroupJID(self, value):
1516
+ def Nickname(self):
1517
+ return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
1518
+ @Nickname.setter
1519
+ def Nickname(self, value):
1486
1520
  if isinstance(value, go.GoClass):
1487
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
1521
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
1488
1522
  else:
1489
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
1523
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
1490
1524
  @property
1491
- def Timestamp(self):
1492
- return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
1493
- @Timestamp.setter
1494
- def Timestamp(self, value):
1525
+ def Participants(self):
1526
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
1527
+ @Participants.setter
1528
+ def Participants(self, value):
1495
1529
  if isinstance(value, go.GoClass):
1496
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
1530
+ _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
1497
1531
  else:
1498
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
1532
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1499
1533
  @property
1500
- def IsCarbon(self):
1501
- return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
1502
- @IsCarbon.setter
1503
- def IsCarbon(self, value):
1534
+ def InviteCode(self):
1535
+ return _whatsapp.whatsapp_Group_InviteCode_Get(self.handle)
1536
+ @InviteCode.setter
1537
+ def InviteCode(self, value):
1504
1538
  if isinstance(value, go.GoClass):
1505
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
1539
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value.handle)
1506
1540
  else:
1507
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
1541
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value)
1508
1542
 
1509
- # Python type for struct whatsapp.GroupParticipant
1510
- class GroupParticipant(go.GoClass):
1511
- """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"""
1543
+ # Python type for struct whatsapp.Message
1544
+ class Message(go.GoClass):
1545
+ """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"""
1512
1546
  def __init__(self, *args, **kwargs):
1513
1547
  """
1514
1548
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1522,110 +1556,97 @@ class GroupParticipant(go.GoClass):
1522
1556
  self.handle = args[0].handle
1523
1557
  _whatsapp.IncRef(self.handle)
1524
1558
  else:
1525
- self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1559
+ self.handle = _whatsapp.whatsapp_Message_CTor()
1526
1560
  _whatsapp.IncRef(self.handle)
1527
1561
  if 0 < len(args):
1528
- self.JID = args[0]
1529
- if "JID" in kwargs:
1530
- self.JID = kwargs["JID"]
1562
+ self.Kind = args[0]
1563
+ if "Kind" in kwargs:
1564
+ self.Kind = kwargs["Kind"]
1531
1565
  if 1 < len(args):
1532
- self.Nickname = args[1]
1533
- if "Nickname" in kwargs:
1534
- self.Nickname = kwargs["Nickname"]
1566
+ self.ID = args[1]
1567
+ if "ID" in kwargs:
1568
+ self.ID = kwargs["ID"]
1535
1569
  if 2 < len(args):
1536
- self.Affiliation = args[2]
1537
- if "Affiliation" in kwargs:
1538
- self.Affiliation = kwargs["Affiliation"]
1570
+ self.JID = args[2]
1571
+ if "JID" in kwargs:
1572
+ self.JID = kwargs["JID"]
1539
1573
  if 3 < len(args):
1540
- self.Action = args[3]
1541
- if "Action" in kwargs:
1542
- self.Action = kwargs["Action"]
1543
- def __del__(self):
1544
- _whatsapp.DecRef(self.handle)
1545
- def __str__(self):
1546
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1547
- sv = 'whatsapp.GroupParticipant{'
1548
- first = True
1549
- for v in pr:
1550
- if callable(v[1]):
1551
- continue
1552
- if first:
1553
- first = False
1554
- else:
1555
- sv += ', '
1556
- sv += v[0] + '=' + str(v[1])
1557
- return sv + '}'
1558
- def __repr__(self):
1559
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1560
- sv = 'whatsapp.GroupParticipant ( '
1561
- for v in pr:
1562
- if not callable(v[1]):
1563
- sv += v[0] + '=' + str(v[1]) + ', '
1564
- return sv + ')'
1565
- @property
1566
- def JID(self):
1567
- return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1568
- @JID.setter
1569
- def JID(self, value):
1570
- if isinstance(value, go.GoClass):
1571
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1572
- else:
1573
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1574
- @property
1575
- def Nickname(self):
1576
- return _whatsapp.whatsapp_GroupParticipant_Nickname_Get(self.handle)
1577
- @Nickname.setter
1578
- def Nickname(self, value):
1579
- if isinstance(value, go.GoClass):
1580
- _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value.handle)
1581
- else:
1582
- _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value)
1583
- @property
1584
- def Affiliation(self):
1585
- return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1586
- @Affiliation.setter
1587
- def Affiliation(self, value):
1588
- if isinstance(value, go.GoClass):
1589
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1590
- else:
1591
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1592
- @property
1593
- def Action(self):
1594
- return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1595
- @Action.setter
1596
- def Action(self, value):
1597
- if isinstance(value, go.GoClass):
1598
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1599
- else:
1600
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1601
-
1602
- # Python type for struct whatsapp.LoggedOut
1603
- class LoggedOut(go.GoClass):
1604
- """LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
1605
- def __init__(self, *args, **kwargs):
1606
- """
1607
- handle=A Go-side object is always initialized with an explicit handle=arg
1608
- otherwise parameters can be unnamed in order of field names or named fields
1609
- in which case a new Go object is constructed first
1610
- """
1611
- if len(kwargs) == 1 and 'handle' in kwargs:
1612
- self.handle = kwargs['handle']
1613
- _whatsapp.IncRef(self.handle)
1614
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1615
- self.handle = args[0].handle
1616
- _whatsapp.IncRef(self.handle)
1617
- else:
1618
- self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
1619
- _whatsapp.IncRef(self.handle)
1620
- if 0 < len(args):
1621
- self.Reason = args[0]
1622
- if "Reason" in kwargs:
1623
- self.Reason = kwargs["Reason"]
1574
+ self.GroupJID = args[3]
1575
+ if "GroupJID" in kwargs:
1576
+ self.GroupJID = kwargs["GroupJID"]
1577
+ if 4 < len(args):
1578
+ self.OriginJID = args[4]
1579
+ if "OriginJID" in kwargs:
1580
+ self.OriginJID = kwargs["OriginJID"]
1581
+ if 5 < len(args):
1582
+ self.Body = args[5]
1583
+ if "Body" in kwargs:
1584
+ self.Body = kwargs["Body"]
1585
+ if 6 < len(args):
1586
+ self.Timestamp = args[6]
1587
+ if "Timestamp" in kwargs:
1588
+ self.Timestamp = kwargs["Timestamp"]
1589
+ if 7 < len(args):
1590
+ self.IsCarbon = args[7]
1591
+ if "IsCarbon" in kwargs:
1592
+ self.IsCarbon = kwargs["IsCarbon"]
1593
+ if 8 < len(args):
1594
+ self.IsForwarded = args[8]
1595
+ if "IsForwarded" in kwargs:
1596
+ self.IsForwarded = kwargs["IsForwarded"]
1597
+ if 9 < len(args):
1598
+ self.ReplyID = args[9]
1599
+ if "ReplyID" in kwargs:
1600
+ self.ReplyID = kwargs["ReplyID"]
1601
+ if 10 < len(args):
1602
+ self.ReplyBody = args[10]
1603
+ if "ReplyBody" in kwargs:
1604
+ self.ReplyBody = kwargs["ReplyBody"]
1605
+ if 11 < len(args):
1606
+ self.Attachments = args[11]
1607
+ if "Attachments" in kwargs:
1608
+ self.Attachments = kwargs["Attachments"]
1609
+ if 12 < len(args):
1610
+ self.Preview = args[12]
1611
+ if "Preview" in kwargs:
1612
+ self.Preview = kwargs["Preview"]
1613
+ if 13 < len(args):
1614
+ self.Location = args[13]
1615
+ if "Location" in kwargs:
1616
+ self.Location = kwargs["Location"]
1617
+ if 14 < len(args):
1618
+ self.Poll = args[14]
1619
+ if "Poll" in kwargs:
1620
+ self.Poll = kwargs["Poll"]
1621
+ if 15 < len(args):
1622
+ self.Album = args[15]
1623
+ if "Album" in kwargs:
1624
+ self.Album = kwargs["Album"]
1625
+ if 16 < len(args):
1626
+ self.GroupInvite = args[16]
1627
+ if "GroupInvite" in kwargs:
1628
+ self.GroupInvite = kwargs["GroupInvite"]
1629
+ if 17 < len(args):
1630
+ self.MentionJIDs = args[17]
1631
+ if "MentionJIDs" in kwargs:
1632
+ self.MentionJIDs = kwargs["MentionJIDs"]
1633
+ if 18 < len(args):
1634
+ self.Receipts = args[18]
1635
+ if "Receipts" in kwargs:
1636
+ self.Receipts = kwargs["Receipts"]
1637
+ if 19 < len(args):
1638
+ self.Reactions = args[19]
1639
+ if "Reactions" in kwargs:
1640
+ self.Reactions = kwargs["Reactions"]
1641
+ if 20 < len(args):
1642
+ self.IsHistory = args[20]
1643
+ if "IsHistory" in kwargs:
1644
+ self.IsHistory = kwargs["IsHistory"]
1624
1645
  def __del__(self):
1625
1646
  _whatsapp.DecRef(self.handle)
1626
1647
  def __str__(self):
1627
1648
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1628
- sv = 'whatsapp.LoggedOut{'
1649
+ sv = 'whatsapp.Message{'
1629
1650
  first = True
1630
1651
  for v in pr:
1631
1652
  if callable(v[1]):
@@ -1638,171 +1659,204 @@ class LoggedOut(go.GoClass):
1638
1659
  return sv + '}'
1639
1660
  def __repr__(self):
1640
1661
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1641
- sv = 'whatsapp.LoggedOut ( '
1662
+ sv = 'whatsapp.Message ( '
1642
1663
  for v in pr:
1643
1664
  if not callable(v[1]):
1644
1665
  sv += v[0] + '=' + str(v[1]) + ', '
1645
1666
  return sv + ')'
1646
1667
  @property
1647
- def Reason(self):
1648
- return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
1649
- @Reason.setter
1650
- def Reason(self, value):
1668
+ def Kind(self):
1669
+ return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
1670
+ @Kind.setter
1671
+ def Kind(self, value):
1651
1672
  if isinstance(value, go.GoClass):
1652
- _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
1673
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
1653
1674
  else:
1654
- _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
1655
-
1656
- # Python type for struct whatsapp.Poll
1657
- class Poll(go.GoClass):
1658
- """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
1659
- def __init__(self, *args, **kwargs):
1660
- """
1661
- handle=A Go-side object is always initialized with an explicit handle=arg
1662
- otherwise parameters can be unnamed in order of field names or named fields
1663
- in which case a new Go object is constructed first
1664
- """
1665
- if len(kwargs) == 1 and 'handle' in kwargs:
1666
- self.handle = kwargs['handle']
1667
- _whatsapp.IncRef(self.handle)
1668
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1669
- self.handle = args[0].handle
1670
- _whatsapp.IncRef(self.handle)
1675
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
1676
+ @property
1677
+ def ID(self):
1678
+ return _whatsapp.whatsapp_Message_ID_Get(self.handle)
1679
+ @ID.setter
1680
+ def ID(self, value):
1681
+ if isinstance(value, go.GoClass):
1682
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
1671
1683
  else:
1672
- self.handle = _whatsapp.whatsapp_Poll_CTor()
1673
- _whatsapp.IncRef(self.handle)
1674
- if 0 < len(args):
1675
- self.Title = args[0]
1676
- if "Title" in kwargs:
1677
- self.Title = kwargs["Title"]
1678
- if 1 < len(args):
1679
- self.Options = args[1]
1680
- if "Options" in kwargs:
1681
- self.Options = kwargs["Options"]
1682
- def __del__(self):
1683
- _whatsapp.DecRef(self.handle)
1684
- def __str__(self):
1685
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1686
- sv = 'whatsapp.Poll{'
1687
- first = True
1688
- for v in pr:
1689
- if callable(v[1]):
1690
- continue
1691
- if first:
1692
- first = False
1693
- else:
1694
- sv += ', '
1695
- sv += v[0] + '=' + str(v[1])
1696
- return sv + '}'
1697
- def __repr__(self):
1698
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1699
- sv = 'whatsapp.Poll ( '
1700
- for v in pr:
1701
- if not callable(v[1]):
1702
- sv += v[0] + '=' + str(v[1]) + ', '
1703
- return sv + ')'
1684
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
1704
1685
  @property
1705
- def Title(self):
1706
- return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
1707
- @Title.setter
1708
- def Title(self, value):
1686
+ def JID(self):
1687
+ return _whatsapp.whatsapp_Message_JID_Get(self.handle)
1688
+ @JID.setter
1689
+ def JID(self, value):
1690
+ if isinstance(value, go.GoClass):
1691
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
1692
+ else:
1693
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
1694
+ @property
1695
+ def GroupJID(self):
1696
+ return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
1697
+ @GroupJID.setter
1698
+ def GroupJID(self, value):
1699
+ if isinstance(value, go.GoClass):
1700
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
1701
+ else:
1702
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
1703
+ @property
1704
+ def OriginJID(self):
1705
+ return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
1706
+ @OriginJID.setter
1707
+ def OriginJID(self, value):
1708
+ if isinstance(value, go.GoClass):
1709
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
1710
+ else:
1711
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
1712
+ @property
1713
+ def Body(self):
1714
+ return _whatsapp.whatsapp_Message_Body_Get(self.handle)
1715
+ @Body.setter
1716
+ def Body(self, value):
1717
+ if isinstance(value, go.GoClass):
1718
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
1719
+ else:
1720
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
1721
+ @property
1722
+ def Timestamp(self):
1723
+ return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
1724
+ @Timestamp.setter
1725
+ def Timestamp(self, value):
1726
+ if isinstance(value, go.GoClass):
1727
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
1728
+ else:
1729
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
1730
+ @property
1731
+ def IsCarbon(self):
1732
+ return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
1733
+ @IsCarbon.setter
1734
+ def IsCarbon(self, value):
1735
+ if isinstance(value, go.GoClass):
1736
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
1737
+ else:
1738
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
1739
+ @property
1740
+ def IsForwarded(self):
1741
+ return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
1742
+ @IsForwarded.setter
1743
+ def IsForwarded(self, value):
1744
+ if isinstance(value, go.GoClass):
1745
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
1746
+ else:
1747
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
1748
+ @property
1749
+ def ReplyID(self):
1750
+ return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
1751
+ @ReplyID.setter
1752
+ def ReplyID(self, value):
1753
+ if isinstance(value, go.GoClass):
1754
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
1755
+ else:
1756
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
1757
+ @property
1758
+ def ReplyBody(self):
1759
+ return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
1760
+ @ReplyBody.setter
1761
+ def ReplyBody(self, value):
1762
+ if isinstance(value, go.GoClass):
1763
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
1764
+ else:
1765
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
1766
+ @property
1767
+ def Attachments(self):
1768
+ return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
1769
+ @Attachments.setter
1770
+ def Attachments(self, value):
1771
+ if isinstance(value, go.GoClass):
1772
+ _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
1773
+ else:
1774
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1775
+ @property
1776
+ def Preview(self):
1777
+ return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
1778
+ @Preview.setter
1779
+ def Preview(self, value):
1780
+ if isinstance(value, go.GoClass):
1781
+ _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
1782
+ else:
1783
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1784
+ @property
1785
+ def Location(self):
1786
+ return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
1787
+ @Location.setter
1788
+ def Location(self, value):
1789
+ if isinstance(value, go.GoClass):
1790
+ _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
1791
+ else:
1792
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1793
+ @property
1794
+ def Poll(self):
1795
+ return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
1796
+ @Poll.setter
1797
+ def Poll(self, value):
1798
+ if isinstance(value, go.GoClass):
1799
+ _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
1800
+ else:
1801
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1802
+ @property
1803
+ def Album(self):
1804
+ return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
1805
+ @Album.setter
1806
+ def Album(self, value):
1709
1807
  if isinstance(value, go.GoClass):
1710
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
1808
+ _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
1711
1809
  else:
1712
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
1810
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1713
1811
  @property
1714
- def Options(self):
1715
- return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
1716
- @Options.setter
1717
- def Options(self, value):
1812
+ def GroupInvite(self):
1813
+ return Group(handle=_whatsapp.whatsapp_Message_GroupInvite_Get(self.handle))
1814
+ @GroupInvite.setter
1815
+ def GroupInvite(self, value):
1718
1816
  if isinstance(value, go.GoClass):
1719
- _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
1817
+ _whatsapp.whatsapp_Message_GroupInvite_Set(self.handle, value.handle)
1720
1818
  else:
1721
1819
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1722
-
1723
- # Python type for struct whatsapp.Call
1724
- class Call(go.GoClass):
1725
- """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"""
1726
- def __init__(self, *args, **kwargs):
1727
- """
1728
- handle=A Go-side object is always initialized with an explicit handle=arg
1729
- otherwise parameters can be unnamed in order of field names or named fields
1730
- in which case a new Go object is constructed first
1731
- """
1732
- if len(kwargs) == 1 and 'handle' in kwargs:
1733
- self.handle = kwargs['handle']
1734
- _whatsapp.IncRef(self.handle)
1735
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1736
- self.handle = args[0].handle
1737
- _whatsapp.IncRef(self.handle)
1820
+ @property
1821
+ def MentionJIDs(self):
1822
+ return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
1823
+ @MentionJIDs.setter
1824
+ def MentionJIDs(self, value):
1825
+ if isinstance(value, go.GoClass):
1826
+ _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
1738
1827
  else:
1739
- self.handle = _whatsapp.whatsapp_Call_CTor()
1740
- _whatsapp.IncRef(self.handle)
1741
- if 0 < len(args):
1742
- self.State = args[0]
1743
- if "State" in kwargs:
1744
- self.State = kwargs["State"]
1745
- if 1 < len(args):
1746
- self.JID = args[1]
1747
- if "JID" in kwargs:
1748
- self.JID = kwargs["JID"]
1749
- if 2 < len(args):
1750
- self.Timestamp = args[2]
1751
- if "Timestamp" in kwargs:
1752
- self.Timestamp = kwargs["Timestamp"]
1753
- def __del__(self):
1754
- _whatsapp.DecRef(self.handle)
1755
- def __str__(self):
1756
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1757
- sv = 'whatsapp.Call{'
1758
- first = True
1759
- for v in pr:
1760
- if callable(v[1]):
1761
- continue
1762
- if first:
1763
- first = False
1764
- else:
1765
- sv += ', '
1766
- sv += v[0] + '=' + str(v[1])
1767
- return sv + '}'
1768
- def __repr__(self):
1769
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1770
- sv = 'whatsapp.Call ( '
1771
- for v in pr:
1772
- if not callable(v[1]):
1773
- sv += v[0] + '=' + str(v[1]) + ', '
1774
- return sv + ')'
1828
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1775
1829
  @property
1776
- def State(self):
1777
- return _whatsapp.whatsapp_Call_State_Get(self.handle)
1778
- @State.setter
1779
- def State(self, value):
1830
+ def Receipts(self):
1831
+ return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
1832
+ @Receipts.setter
1833
+ def Receipts(self, value):
1780
1834
  if isinstance(value, go.GoClass):
1781
- _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
1835
+ _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
1782
1836
  else:
1783
- _whatsapp.whatsapp_Call_State_Set(self.handle, value)
1837
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1784
1838
  @property
1785
- def JID(self):
1786
- return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1787
- @JID.setter
1788
- def JID(self, value):
1839
+ def Reactions(self):
1840
+ return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
1841
+ @Reactions.setter
1842
+ def Reactions(self, value):
1789
1843
  if isinstance(value, go.GoClass):
1790
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1844
+ _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
1791
1845
  else:
1792
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1846
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1793
1847
  @property
1794
- def Timestamp(self):
1795
- return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
1796
- @Timestamp.setter
1797
- def Timestamp(self, value):
1848
+ def IsHistory(self):
1849
+ return _whatsapp.whatsapp_Message_IsHistory_Get(self.handle)
1850
+ @IsHistory.setter
1851
+ def IsHistory(self, value):
1798
1852
  if isinstance(value, go.GoClass):
1799
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1853
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value.handle)
1800
1854
  else:
1801
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1855
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value)
1802
1856
 
1803
- # Python type for struct whatsapp.ChatState
1804
- class ChatState(go.GoClass):
1805
- """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"""
1857
+ # Python type for struct whatsapp.PollOption
1858
+ class PollOption(go.GoClass):
1859
+ """A PollOption represents an individual choice within a broader poll.\n"""
1806
1860
  def __init__(self, *args, **kwargs):
1807
1861
  """
1808
1862
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1816,25 +1870,17 @@ class ChatState(go.GoClass):
1816
1870
  self.handle = args[0].handle
1817
1871
  _whatsapp.IncRef(self.handle)
1818
1872
  else:
1819
- self.handle = _whatsapp.whatsapp_ChatState_CTor()
1873
+ self.handle = _whatsapp.whatsapp_PollOption_CTor()
1820
1874
  _whatsapp.IncRef(self.handle)
1821
1875
  if 0 < len(args):
1822
- self.Kind = args[0]
1823
- if "Kind" in kwargs:
1824
- self.Kind = kwargs["Kind"]
1825
- if 1 < len(args):
1826
- self.JID = args[1]
1827
- if "JID" in kwargs:
1828
- self.JID = kwargs["JID"]
1829
- if 2 < len(args):
1830
- self.GroupJID = args[2]
1831
- if "GroupJID" in kwargs:
1832
- self.GroupJID = kwargs["GroupJID"]
1876
+ self.Title = args[0]
1877
+ if "Title" in kwargs:
1878
+ self.Title = kwargs["Title"]
1833
1879
  def __del__(self):
1834
1880
  _whatsapp.DecRef(self.handle)
1835
1881
  def __str__(self):
1836
1882
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1837
- sv = 'whatsapp.ChatState{'
1883
+ sv = 'whatsapp.PollOption{'
1838
1884
  first = True
1839
1885
  for v in pr:
1840
1886
  if callable(v[1]):
@@ -1847,42 +1893,24 @@ class ChatState(go.GoClass):
1847
1893
  return sv + '}'
1848
1894
  def __repr__(self):
1849
1895
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1850
- sv = 'whatsapp.ChatState ( '
1896
+ sv = 'whatsapp.PollOption ( '
1851
1897
  for v in pr:
1852
1898
  if not callable(v[1]):
1853
1899
  sv += v[0] + '=' + str(v[1]) + ', '
1854
1900
  return sv + ')'
1855
1901
  @property
1856
- def Kind(self):
1857
- return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
1858
- @Kind.setter
1859
- def Kind(self, value):
1860
- if isinstance(value, go.GoClass):
1861
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
1862
- else:
1863
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
1864
- @property
1865
- def JID(self):
1866
- return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
1867
- @JID.setter
1868
- def JID(self, value):
1869
- if isinstance(value, go.GoClass):
1870
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
1871
- else:
1872
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
1873
- @property
1874
- def GroupJID(self):
1875
- return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
1876
- @GroupJID.setter
1877
- def GroupJID(self, value):
1902
+ def Title(self):
1903
+ return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
1904
+ @Title.setter
1905
+ def Title(self, value):
1878
1906
  if isinstance(value, go.GoClass):
1879
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
1907
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
1880
1908
  else:
1881
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1909
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
1882
1910
 
1883
- # Python type for struct whatsapp.Connect
1884
- class Connect(go.GoClass):
1885
- """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
1911
+ # Python type for struct whatsapp.GroupParticipant
1912
+ class GroupParticipant(go.GoClass):
1913
+ """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"""
1886
1914
  def __init__(self, *args, **kwargs):
1887
1915
  """
1888
1916
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1896,21 +1924,29 @@ class Connect(go.GoClass):
1896
1924
  self.handle = args[0].handle
1897
1925
  _whatsapp.IncRef(self.handle)
1898
1926
  else:
1899
- self.handle = _whatsapp.whatsapp_Connect_CTor()
1927
+ self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1900
1928
  _whatsapp.IncRef(self.handle)
1901
1929
  if 0 < len(args):
1902
1930
  self.JID = args[0]
1903
1931
  if "JID" in kwargs:
1904
1932
  self.JID = kwargs["JID"]
1905
1933
  if 1 < len(args):
1906
- self.Error = args[1]
1907
- if "Error" in kwargs:
1908
- self.Error = kwargs["Error"]
1934
+ self.Nickname = args[1]
1935
+ if "Nickname" in kwargs:
1936
+ self.Nickname = kwargs["Nickname"]
1937
+ if 2 < len(args):
1938
+ self.Affiliation = args[2]
1939
+ if "Affiliation" in kwargs:
1940
+ self.Affiliation = kwargs["Affiliation"]
1941
+ if 3 < len(args):
1942
+ self.Action = args[3]
1943
+ if "Action" in kwargs:
1944
+ self.Action = kwargs["Action"]
1909
1945
  def __del__(self):
1910
1946
  _whatsapp.DecRef(self.handle)
1911
1947
  def __str__(self):
1912
1948
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1913
- sv = 'whatsapp.Connect{'
1949
+ sv = 'whatsapp.GroupParticipant{'
1914
1950
  first = True
1915
1951
  for v in pr:
1916
1952
  if callable(v[1]):
@@ -1923,33 +1959,51 @@ class Connect(go.GoClass):
1923
1959
  return sv + '}'
1924
1960
  def __repr__(self):
1925
1961
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1926
- sv = 'whatsapp.Connect ( '
1962
+ sv = 'whatsapp.GroupParticipant ( '
1927
1963
  for v in pr:
1928
1964
  if not callable(v[1]):
1929
1965
  sv += v[0] + '=' + str(v[1]) + ', '
1930
1966
  return sv + ')'
1931
1967
  @property
1932
1968
  def JID(self):
1933
- return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
1969
+ return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1934
1970
  @JID.setter
1935
1971
  def JID(self, value):
1936
1972
  if isinstance(value, go.GoClass):
1937
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
1973
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1938
1974
  else:
1939
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
1975
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1940
1976
  @property
1941
- def Error(self):
1942
- return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
1943
- @Error.setter
1944
- def Error(self, value):
1977
+ def Nickname(self):
1978
+ return _whatsapp.whatsapp_GroupParticipant_Nickname_Get(self.handle)
1979
+ @Nickname.setter
1980
+ def Nickname(self, value):
1945
1981
  if isinstance(value, go.GoClass):
1946
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
1982
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value.handle)
1947
1983
  else:
1948
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
1984
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value)
1985
+ @property
1986
+ def Affiliation(self):
1987
+ return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1988
+ @Affiliation.setter
1989
+ def Affiliation(self, value):
1990
+ if isinstance(value, go.GoClass):
1991
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1992
+ else:
1993
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1994
+ @property
1995
+ def Action(self):
1996
+ return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1997
+ @Action.setter
1998
+ def Action(self, value):
1999
+ if isinstance(value, go.GoClass):
2000
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
2001
+ else:
2002
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1949
2003
 
1950
- # Python type for struct whatsapp.Attachment
1951
- class Attachment(go.GoClass):
1952
- """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
2004
+ # Python type for struct whatsapp.LinkedDevice
2005
+ class LinkedDevice(go.GoClass):
2006
+ """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"""
1953
2007
  def __init__(self, *args, **kwargs):
1954
2008
  """
1955
2009
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1963,29 +2017,17 @@ class Attachment(go.GoClass):
1963
2017
  self.handle = args[0].handle
1964
2018
  _whatsapp.IncRef(self.handle)
1965
2019
  else:
1966
- self.handle = _whatsapp.whatsapp_Attachment_CTor()
2020
+ self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
1967
2021
  _whatsapp.IncRef(self.handle)
1968
2022
  if 0 < len(args):
1969
- self.MIME = args[0]
1970
- if "MIME" in kwargs:
1971
- self.MIME = kwargs["MIME"]
1972
- if 1 < len(args):
1973
- self.Filename = args[1]
1974
- if "Filename" in kwargs:
1975
- self.Filename = kwargs["Filename"]
1976
- if 2 < len(args):
1977
- self.Caption = args[2]
1978
- if "Caption" in kwargs:
1979
- self.Caption = kwargs["Caption"]
1980
- if 3 < len(args):
1981
- self.Data = args[3]
1982
- if "Data" in kwargs:
1983
- self.Data = kwargs["Data"]
2023
+ self.ID = args[0]
2024
+ if "ID" in kwargs:
2025
+ self.ID = kwargs["ID"]
1984
2026
  def __del__(self):
1985
2027
  _whatsapp.DecRef(self.handle)
1986
2028
  def __str__(self):
1987
2029
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1988
- sv = 'whatsapp.Attachment{'
2030
+ sv = 'whatsapp.LinkedDevice{'
1989
2031
  first = True
1990
2032
  for v in pr:
1991
2033
  if callable(v[1]):
@@ -1998,57 +2040,34 @@ class Attachment(go.GoClass):
1998
2040
  return sv + '}'
1999
2041
  def __repr__(self):
2000
2042
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2001
- sv = 'whatsapp.Attachment ( '
2043
+ sv = 'whatsapp.LinkedDevice ( '
2002
2044
  for v in pr:
2003
2045
  if not callable(v[1]):
2004
2046
  sv += v[0] + '=' + str(v[1]) + ', '
2005
2047
  return sv + ')'
2006
2048
  @property
2007
- def MIME(self):
2008
- return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
2009
- @MIME.setter
2010
- def MIME(self, value):
2011
- if isinstance(value, go.GoClass):
2012
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
2013
- else:
2014
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
2015
- @property
2016
- def Filename(self):
2017
- return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
2018
- @Filename.setter
2019
- def Filename(self, value):
2020
- if isinstance(value, go.GoClass):
2021
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
2022
- else:
2023
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
2024
- @property
2025
- def Caption(self):
2026
- return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
2027
- @Caption.setter
2028
- def Caption(self, value):
2029
- if isinstance(value, go.GoClass):
2030
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
2031
- else:
2032
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
2033
- @property
2034
- def Data(self):
2035
- return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
2036
- @Data.setter
2037
- def Data(self, value):
2049
+ def ID(self):
2050
+ """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
2051
+ is currently equivalent to a password, and needs to be protected accordingly.
2052
+ """
2053
+ return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
2054
+ @ID.setter
2055
+ def ID(self, value):
2038
2056
  if isinstance(value, go.GoClass):
2039
- _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
2057
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
2040
2058
  else:
2041
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2042
- def GetSpec(self, ctx):
2043
- """GetSpec(object ctx) object, str
2059
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
2060
+ def JID(self):
2061
+ """JID() object
2044
2062
 
2045
- GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
2063
+ JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
2064
+ may return invalid JIDs, and this function does not handle errors.
2046
2065
  """
2047
- return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
2066
+ return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2048
2067
 
2049
- # Python type for struct whatsapp.Avatar
2050
- class Avatar(go.GoClass):
2051
- """A Avatar represents a small image set for a Contact or Group.\n"""
2068
+ # Python type for struct whatsapp.Album
2069
+ class Album(go.GoClass):
2070
+ """A Album message represents a collection of media files, typically images and videos.\n"""
2052
2071
  def __init__(self, *args, **kwargs):
2053
2072
  """
2054
2073
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2062,21 +2081,25 @@ class Avatar(go.GoClass):
2062
2081
  self.handle = args[0].handle
2063
2082
  _whatsapp.IncRef(self.handle)
2064
2083
  else:
2065
- self.handle = _whatsapp.whatsapp_Avatar_CTor()
2084
+ self.handle = _whatsapp.whatsapp_Album_CTor()
2066
2085
  _whatsapp.IncRef(self.handle)
2067
2086
  if 0 < len(args):
2068
- self.ID = args[0]
2069
- if "ID" in kwargs:
2070
- self.ID = kwargs["ID"]
2087
+ self.IsAlbum = args[0]
2088
+ if "IsAlbum" in kwargs:
2089
+ self.IsAlbum = kwargs["IsAlbum"]
2071
2090
  if 1 < len(args):
2072
- self.URL = args[1]
2073
- if "URL" in kwargs:
2074
- self.URL = kwargs["URL"]
2091
+ self.ImageCount = args[1]
2092
+ if "ImageCount" in kwargs:
2093
+ self.ImageCount = kwargs["ImageCount"]
2094
+ if 2 < len(args):
2095
+ self.VideoCount = args[2]
2096
+ if "VideoCount" in kwargs:
2097
+ self.VideoCount = kwargs["VideoCount"]
2075
2098
  def __del__(self):
2076
2099
  _whatsapp.DecRef(self.handle)
2077
2100
  def __str__(self):
2078
2101
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2079
- sv = 'whatsapp.Avatar{'
2102
+ sv = 'whatsapp.Album{'
2080
2103
  first = True
2081
2104
  for v in pr:
2082
2105
  if callable(v[1]):
@@ -2089,33 +2112,42 @@ class Avatar(go.GoClass):
2089
2112
  return sv + '}'
2090
2113
  def __repr__(self):
2091
2114
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2092
- sv = 'whatsapp.Avatar ( '
2115
+ sv = 'whatsapp.Album ( '
2093
2116
  for v in pr:
2094
2117
  if not callable(v[1]):
2095
2118
  sv += v[0] + '=' + str(v[1]) + ', '
2096
2119
  return sv + ')'
2097
2120
  @property
2098
- def ID(self):
2099
- return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
2100
- @ID.setter
2101
- def ID(self, value):
2121
+ def IsAlbum(self):
2122
+ return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
2123
+ @IsAlbum.setter
2124
+ def IsAlbum(self, value):
2102
2125
  if isinstance(value, go.GoClass):
2103
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
2126
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
2104
2127
  else:
2105
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
2128
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
2106
2129
  @property
2107
- def URL(self):
2108
- return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
2109
- @URL.setter
2110
- def URL(self, value):
2130
+ def ImageCount(self):
2131
+ return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
2132
+ @ImageCount.setter
2133
+ def ImageCount(self, value):
2111
2134
  if isinstance(value, go.GoClass):
2112
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
2135
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
2113
2136
  else:
2114
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
2137
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
2138
+ @property
2139
+ def VideoCount(self):
2140
+ return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
2141
+ @VideoCount.setter
2142
+ def VideoCount(self, value):
2143
+ if isinstance(value, go.GoClass):
2144
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
2145
+ else:
2146
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
2115
2147
 
2116
- # Python type for struct whatsapp.Contact
2117
- class Contact(go.GoClass):
2118
- """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"""
2148
+ # Python type for struct whatsapp.Call
2149
+ class Call(go.GoClass):
2150
+ """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"""
2119
2151
  def __init__(self, *args, **kwargs):
2120
2152
  """
2121
2153
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2129,21 +2161,25 @@ class Contact(go.GoClass):
2129
2161
  self.handle = args[0].handle
2130
2162
  _whatsapp.IncRef(self.handle)
2131
2163
  else:
2132
- self.handle = _whatsapp.whatsapp_Contact_CTor()
2164
+ self.handle = _whatsapp.whatsapp_Call_CTor()
2133
2165
  _whatsapp.IncRef(self.handle)
2134
2166
  if 0 < len(args):
2135
- self.JID = args[0]
2167
+ self.State = args[0]
2168
+ if "State" in kwargs:
2169
+ self.State = kwargs["State"]
2170
+ if 1 < len(args):
2171
+ self.JID = args[1]
2136
2172
  if "JID" in kwargs:
2137
2173
  self.JID = kwargs["JID"]
2138
- if 1 < len(args):
2139
- self.Name = args[1]
2140
- if "Name" in kwargs:
2141
- self.Name = kwargs["Name"]
2174
+ if 2 < len(args):
2175
+ self.Timestamp = args[2]
2176
+ if "Timestamp" in kwargs:
2177
+ self.Timestamp = kwargs["Timestamp"]
2142
2178
  def __del__(self):
2143
2179
  _whatsapp.DecRef(self.handle)
2144
2180
  def __str__(self):
2145
2181
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2146
- sv = 'whatsapp.Contact{'
2182
+ sv = 'whatsapp.Call{'
2147
2183
  first = True
2148
2184
  for v in pr:
2149
2185
  if callable(v[1]):
@@ -2156,33 +2192,42 @@ class Contact(go.GoClass):
2156
2192
  return sv + '}'
2157
2193
  def __repr__(self):
2158
2194
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2159
- sv = 'whatsapp.Contact ( '
2195
+ sv = 'whatsapp.Call ( '
2160
2196
  for v in pr:
2161
2197
  if not callable(v[1]):
2162
2198
  sv += v[0] + '=' + str(v[1]) + ', '
2163
2199
  return sv + ')'
2164
2200
  @property
2201
+ def State(self):
2202
+ return _whatsapp.whatsapp_Call_State_Get(self.handle)
2203
+ @State.setter
2204
+ def State(self, value):
2205
+ if isinstance(value, go.GoClass):
2206
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
2207
+ else:
2208
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value)
2209
+ @property
2165
2210
  def JID(self):
2166
- return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
2211
+ return _whatsapp.whatsapp_Call_JID_Get(self.handle)
2167
2212
  @JID.setter
2168
2213
  def JID(self, value):
2169
2214
  if isinstance(value, go.GoClass):
2170
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
2215
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
2171
2216
  else:
2172
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
2217
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
2173
2218
  @property
2174
- def Name(self):
2175
- return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
2176
- @Name.setter
2177
- def Name(self, value):
2219
+ def Timestamp(self):
2220
+ return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
2221
+ @Timestamp.setter
2222
+ def Timestamp(self, value):
2178
2223
  if isinstance(value, go.GoClass):
2179
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
2224
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
2180
2225
  else:
2181
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
2226
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
2182
2227
 
2183
- # Python type for struct whatsapp.Gateway
2184
- class Gateway(go.GoClass):
2185
- """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
2228
+ # Python type for struct whatsapp.Contact
2229
+ class Contact(go.GoClass):
2230
+ """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"""
2186
2231
  def __init__(self, *args, **kwargs):
2187
2232
  """
2188
2233
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2196,29 +2241,21 @@ class Gateway(go.GoClass):
2196
2241
  self.handle = args[0].handle
2197
2242
  _whatsapp.IncRef(self.handle)
2198
2243
  else:
2199
- self.handle = _whatsapp.whatsapp_Gateway_CTor()
2244
+ self.handle = _whatsapp.whatsapp_Contact_CTor()
2200
2245
  _whatsapp.IncRef(self.handle)
2201
2246
  if 0 < len(args):
2202
- self.DBPath = args[0]
2203
- if "DBPath" in kwargs:
2204
- self.DBPath = kwargs["DBPath"]
2247
+ self.JID = args[0]
2248
+ if "JID" in kwargs:
2249
+ self.JID = kwargs["JID"]
2205
2250
  if 1 < len(args):
2206
2251
  self.Name = args[1]
2207
2252
  if "Name" in kwargs:
2208
2253
  self.Name = kwargs["Name"]
2209
- if 2 < len(args):
2210
- self.LogLevel = args[2]
2211
- if "LogLevel" in kwargs:
2212
- self.LogLevel = kwargs["LogLevel"]
2213
- if 3 < len(args):
2214
- self.TempDir = args[3]
2215
- if "TempDir" in kwargs:
2216
- self.TempDir = kwargs["TempDir"]
2217
2254
  def __del__(self):
2218
2255
  _whatsapp.DecRef(self.handle)
2219
2256
  def __str__(self):
2220
2257
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2221
- sv = 'whatsapp.Gateway{'
2258
+ sv = 'whatsapp.Contact{'
2222
2259
  first = True
2223
2260
  for v in pr:
2224
2261
  if callable(v[1]):
@@ -2231,72 +2268,33 @@ class Gateway(go.GoClass):
2231
2268
  return sv + '}'
2232
2269
  def __repr__(self):
2233
2270
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2234
- sv = 'whatsapp.Gateway ( '
2271
+ sv = 'whatsapp.Contact ( '
2235
2272
  for v in pr:
2236
2273
  if not callable(v[1]):
2237
2274
  sv += v[0] + '=' + str(v[1]) + ', '
2238
2275
  return sv + ')'
2239
2276
  @property
2240
- def DBPath(self):
2241
- return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2242
- @DBPath.setter
2243
- def DBPath(self, value):
2277
+ def JID(self):
2278
+ return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
2279
+ @JID.setter
2280
+ def JID(self, value):
2244
2281
  if isinstance(value, go.GoClass):
2245
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
2282
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
2246
2283
  else:
2247
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
2284
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
2248
2285
  @property
2249
2286
  def Name(self):
2250
- return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2251
- @Name.setter
2252
- def Name(self, value):
2253
- if isinstance(value, go.GoClass):
2254
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
2255
- else:
2256
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2257
- @property
2258
- def LogLevel(self):
2259
- return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2260
- @LogLevel.setter
2261
- def LogLevel(self, value):
2262
- if isinstance(value, go.GoClass):
2263
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2264
- else:
2265
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2266
- @property
2267
- def TempDir(self):
2268
- return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2269
- @TempDir.setter
2270
- def TempDir(self, value):
2271
- if isinstance(value, go.GoClass):
2272
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
2273
- else:
2274
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
2275
- def Init(self):
2276
- """Init() str
2277
-
2278
- Init performs initialization procedures for the Gateway, and is expected to be run before any
2279
- calls to [Gateway.Session].
2280
- """
2281
- return _whatsapp.whatsapp_Gateway_Init(self.handle)
2282
- def NewSession(self, device):
2283
- """NewSession(object device) object
2284
-
2285
- NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
2286
- a valid ID, a pair operation will be required, as described in [Session.Login].
2287
- """
2288
- return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
2289
- def CleanupSession(self, device):
2290
- """CleanupSession(object device) str
2291
-
2292
- CleanupSession will remove all invalid and obsolete references to the given device, and should be
2293
- used when pairing a new device or unregistering from the Gateway.
2294
- """
2295
- return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
2287
+ return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
2288
+ @Name.setter
2289
+ def Name(self, value):
2290
+ if isinstance(value, go.GoClass):
2291
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
2292
+ else:
2293
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
2296
2294
 
2297
- # Python type for struct whatsapp.GroupSubject
2298
- class GroupSubject(go.GoClass):
2299
- """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
2295
+ # Python type for struct whatsapp.EventPayload
2296
+ class EventPayload(go.GoClass):
2297
+ """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"""
2300
2298
  def __init__(self, *args, **kwargs):
2301
2299
  """
2302
2300
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2310,25 +2308,57 @@ class GroupSubject(go.GoClass):
2310
2308
  self.handle = args[0].handle
2311
2309
  _whatsapp.IncRef(self.handle)
2312
2310
  else:
2313
- self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
2311
+ self.handle = _whatsapp.whatsapp_EventPayload_CTor()
2314
2312
  _whatsapp.IncRef(self.handle)
2315
2313
  if 0 < len(args):
2316
- self.Subject = args[0]
2317
- if "Subject" in kwargs:
2318
- self.Subject = kwargs["Subject"]
2314
+ self.QRCode = args[0]
2315
+ if "QRCode" in kwargs:
2316
+ self.QRCode = kwargs["QRCode"]
2319
2317
  if 1 < len(args):
2320
- self.SetAt = args[1]
2321
- if "SetAt" in kwargs:
2322
- self.SetAt = kwargs["SetAt"]
2318
+ self.PairDeviceID = args[1]
2319
+ if "PairDeviceID" in kwargs:
2320
+ self.PairDeviceID = kwargs["PairDeviceID"]
2323
2321
  if 2 < len(args):
2324
- self.SetBy = args[2]
2325
- if "SetBy" in kwargs:
2326
- self.SetBy = kwargs["SetBy"]
2322
+ self.Connect = args[2]
2323
+ if "Connect" in kwargs:
2324
+ self.Connect = kwargs["Connect"]
2325
+ if 3 < len(args):
2326
+ self.LoggedOut = args[3]
2327
+ if "LoggedOut" in kwargs:
2328
+ self.LoggedOut = kwargs["LoggedOut"]
2329
+ if 4 < len(args):
2330
+ self.Contact = args[4]
2331
+ if "Contact" in kwargs:
2332
+ self.Contact = kwargs["Contact"]
2333
+ if 5 < len(args):
2334
+ self.Presence = args[5]
2335
+ if "Presence" in kwargs:
2336
+ self.Presence = kwargs["Presence"]
2337
+ if 6 < len(args):
2338
+ self.Message = args[6]
2339
+ if "Message" in kwargs:
2340
+ self.Message = kwargs["Message"]
2341
+ if 7 < len(args):
2342
+ self.ChatState = args[7]
2343
+ if "ChatState" in kwargs:
2344
+ self.ChatState = kwargs["ChatState"]
2345
+ if 8 < len(args):
2346
+ self.Receipt = args[8]
2347
+ if "Receipt" in kwargs:
2348
+ self.Receipt = kwargs["Receipt"]
2349
+ if 9 < len(args):
2350
+ self.Group = args[9]
2351
+ if "Group" in kwargs:
2352
+ self.Group = kwargs["Group"]
2353
+ if 10 < len(args):
2354
+ self.Call = args[10]
2355
+ if "Call" in kwargs:
2356
+ self.Call = kwargs["Call"]
2327
2357
  def __del__(self):
2328
2358
  _whatsapp.DecRef(self.handle)
2329
2359
  def __str__(self):
2330
2360
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2331
- sv = 'whatsapp.GroupSubject{'
2361
+ sv = 'whatsapp.EventPayload{'
2332
2362
  first = True
2333
2363
  for v in pr:
2334
2364
  if callable(v[1]):
@@ -2341,42 +2371,114 @@ class GroupSubject(go.GoClass):
2341
2371
  return sv + '}'
2342
2372
  def __repr__(self):
2343
2373
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2344
- sv = 'whatsapp.GroupSubject ( '
2374
+ sv = 'whatsapp.EventPayload ( '
2345
2375
  for v in pr:
2346
2376
  if not callable(v[1]):
2347
2377
  sv += v[0] + '=' + str(v[1]) + ', '
2348
2378
  return sv + ')'
2349
2379
  @property
2350
- def Subject(self):
2351
- return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
2352
- @Subject.setter
2353
- def Subject(self, value):
2380
+ def QRCode(self):
2381
+ return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
2382
+ @QRCode.setter
2383
+ def QRCode(self, value):
2354
2384
  if isinstance(value, go.GoClass):
2355
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
2385
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
2356
2386
  else:
2357
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
2387
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
2358
2388
  @property
2359
- def SetAt(self):
2360
- return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
2361
- @SetAt.setter
2362
- def SetAt(self, value):
2389
+ def PairDeviceID(self):
2390
+ return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
2391
+ @PairDeviceID.setter
2392
+ def PairDeviceID(self, value):
2363
2393
  if isinstance(value, go.GoClass):
2364
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
2394
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
2365
2395
  else:
2366
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
2396
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
2367
2397
  @property
2368
- def SetBy(self):
2369
- return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
2370
- @SetBy.setter
2371
- def SetBy(self, value):
2398
+ def Connect(self):
2399
+ return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
2400
+ @Connect.setter
2401
+ def Connect(self, value):
2372
2402
  if isinstance(value, go.GoClass):
2373
- _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
2403
+ _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
2374
2404
  else:
2375
- _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
2405
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2406
+ @property
2407
+ def LoggedOut(self):
2408
+ return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
2409
+ @LoggedOut.setter
2410
+ def LoggedOut(self, value):
2411
+ if isinstance(value, go.GoClass):
2412
+ _whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
2413
+ else:
2414
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2415
+ @property
2416
+ def Contact(self):
2417
+ return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
2418
+ @Contact.setter
2419
+ def Contact(self, value):
2420
+ if isinstance(value, go.GoClass):
2421
+ _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
2422
+ else:
2423
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2424
+ @property
2425
+ def Presence(self):
2426
+ return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
2427
+ @Presence.setter
2428
+ def Presence(self, value):
2429
+ if isinstance(value, go.GoClass):
2430
+ _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
2431
+ else:
2432
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2433
+ @property
2434
+ def Message(self):
2435
+ return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
2436
+ @Message.setter
2437
+ def Message(self, value):
2438
+ if isinstance(value, go.GoClass):
2439
+ _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
2440
+ else:
2441
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2442
+ @property
2443
+ def ChatState(self):
2444
+ return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
2445
+ @ChatState.setter
2446
+ def ChatState(self, value):
2447
+ if isinstance(value, go.GoClass):
2448
+ _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
2449
+ else:
2450
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2451
+ @property
2452
+ def Receipt(self):
2453
+ return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
2454
+ @Receipt.setter
2455
+ def Receipt(self, value):
2456
+ if isinstance(value, go.GoClass):
2457
+ _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
2458
+ else:
2459
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2460
+ @property
2461
+ def Group(self):
2462
+ return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
2463
+ @Group.setter
2464
+ def Group(self, value):
2465
+ if isinstance(value, go.GoClass):
2466
+ _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
2467
+ else:
2468
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2469
+ @property
2470
+ def Call(self):
2471
+ return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
2472
+ @Call.setter
2473
+ def Call(self, value):
2474
+ if isinstance(value, go.GoClass):
2475
+ _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
2476
+ else:
2477
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2376
2478
 
2377
- # Python type for struct whatsapp.LinkedDevice
2378
- class LinkedDevice(go.GoClass):
2379
- """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"""
2479
+ # Python type for struct whatsapp.Preview
2480
+ class Preview(go.GoClass):
2481
+ """A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
2380
2482
  def __init__(self, *args, **kwargs):
2381
2483
  """
2382
2484
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2390,17 +2492,33 @@ class LinkedDevice(go.GoClass):
2390
2492
  self.handle = args[0].handle
2391
2493
  _whatsapp.IncRef(self.handle)
2392
2494
  else:
2393
- self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
2495
+ self.handle = _whatsapp.whatsapp_Preview_CTor()
2394
2496
  _whatsapp.IncRef(self.handle)
2395
2497
  if 0 < len(args):
2396
- self.ID = args[0]
2397
- if "ID" in kwargs:
2398
- self.ID = kwargs["ID"]
2498
+ self.Kind = args[0]
2499
+ if "Kind" in kwargs:
2500
+ self.Kind = kwargs["Kind"]
2501
+ if 1 < len(args):
2502
+ self.URL = args[1]
2503
+ if "URL" in kwargs:
2504
+ self.URL = kwargs["URL"]
2505
+ if 2 < len(args):
2506
+ self.Title = args[2]
2507
+ if "Title" in kwargs:
2508
+ self.Title = kwargs["Title"]
2509
+ if 3 < len(args):
2510
+ self.Description = args[3]
2511
+ if "Description" in kwargs:
2512
+ self.Description = kwargs["Description"]
2513
+ if 4 < len(args):
2514
+ self.Thumbnail = args[4]
2515
+ if "Thumbnail" in kwargs:
2516
+ self.Thumbnail = kwargs["Thumbnail"]
2399
2517
  def __del__(self):
2400
2518
  _whatsapp.DecRef(self.handle)
2401
2519
  def __str__(self):
2402
2520
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2403
- sv = 'whatsapp.LinkedDevice{'
2521
+ sv = 'whatsapp.Preview{'
2404
2522
  first = True
2405
2523
  for v in pr:
2406
2524
  if callable(v[1]):
@@ -2413,34 +2531,60 @@ class LinkedDevice(go.GoClass):
2413
2531
  return sv + '}'
2414
2532
  def __repr__(self):
2415
2533
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2416
- sv = 'whatsapp.LinkedDevice ( '
2534
+ sv = 'whatsapp.Preview ( '
2417
2535
  for v in pr:
2418
2536
  if not callable(v[1]):
2419
2537
  sv += v[0] + '=' + str(v[1]) + ', '
2420
2538
  return sv + ')'
2421
2539
  @property
2422
- def ID(self):
2423
- """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
2424
- is currently equivalent to a password, and needs to be protected accordingly.
2425
- """
2426
- return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
2427
- @ID.setter
2428
- def ID(self, value):
2540
+ def Kind(self):
2541
+ return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
2542
+ @Kind.setter
2543
+ def Kind(self, value):
2544
+ if isinstance(value, go.GoClass):
2545
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
2546
+ else:
2547
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
2548
+ @property
2549
+ def URL(self):
2550
+ return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
2551
+ @URL.setter
2552
+ def URL(self, value):
2553
+ if isinstance(value, go.GoClass):
2554
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
2555
+ else:
2556
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
2557
+ @property
2558
+ def Title(self):
2559
+ return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
2560
+ @Title.setter
2561
+ def Title(self, value):
2562
+ if isinstance(value, go.GoClass):
2563
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
2564
+ else:
2565
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
2566
+ @property
2567
+ def Description(self):
2568
+ return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
2569
+ @Description.setter
2570
+ def Description(self, value):
2571
+ if isinstance(value, go.GoClass):
2572
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
2573
+ else:
2574
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
2575
+ @property
2576
+ def Thumbnail(self):
2577
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
2578
+ @Thumbnail.setter
2579
+ def Thumbnail(self, value):
2429
2580
  if isinstance(value, go.GoClass):
2430
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
2581
+ _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
2431
2582
  else:
2432
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
2433
- def JID(self):
2434
- """JID() object
2435
-
2436
- JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
2437
- may return invalid JIDs, and this function does not handle errors.
2438
- """
2439
- return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2583
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2440
2584
 
2441
- # Python type for struct whatsapp.Message
2442
- class Message(go.GoClass):
2443
- """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"""
2585
+ # Python type for struct whatsapp.Receipt
2586
+ class Receipt(go.GoClass):
2587
+ """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"""
2444
2588
  def __init__(self, *args, **kwargs):
2445
2589
  """
2446
2590
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2454,16 +2598,16 @@ class Message(go.GoClass):
2454
2598
  self.handle = args[0].handle
2455
2599
  _whatsapp.IncRef(self.handle)
2456
2600
  else:
2457
- self.handle = _whatsapp.whatsapp_Message_CTor()
2601
+ self.handle = _whatsapp.whatsapp_Receipt_CTor()
2458
2602
  _whatsapp.IncRef(self.handle)
2459
2603
  if 0 < len(args):
2460
2604
  self.Kind = args[0]
2461
2605
  if "Kind" in kwargs:
2462
2606
  self.Kind = kwargs["Kind"]
2463
2607
  if 1 < len(args):
2464
- self.ID = args[1]
2465
- if "ID" in kwargs:
2466
- self.ID = kwargs["ID"]
2608
+ self.MessageIDs = args[1]
2609
+ if "MessageIDs" in kwargs:
2610
+ self.MessageIDs = kwargs["MessageIDs"]
2467
2611
  if 2 < len(args):
2468
2612
  self.JID = args[2]
2469
2613
  if "JID" in kwargs:
@@ -2473,78 +2617,18 @@ class Message(go.GoClass):
2473
2617
  if "GroupJID" in kwargs:
2474
2618
  self.GroupJID = kwargs["GroupJID"]
2475
2619
  if 4 < len(args):
2476
- self.OriginJID = args[4]
2477
- if "OriginJID" in kwargs:
2478
- self.OriginJID = kwargs["OriginJID"]
2479
- if 5 < len(args):
2480
- self.Body = args[5]
2481
- if "Body" in kwargs:
2482
- self.Body = kwargs["Body"]
2483
- if 6 < len(args):
2484
- self.Timestamp = args[6]
2620
+ self.Timestamp = args[4]
2485
2621
  if "Timestamp" in kwargs:
2486
2622
  self.Timestamp = kwargs["Timestamp"]
2487
- if 7 < len(args):
2488
- self.IsCarbon = args[7]
2623
+ if 5 < len(args):
2624
+ self.IsCarbon = args[5]
2489
2625
  if "IsCarbon" in kwargs:
2490
2626
  self.IsCarbon = kwargs["IsCarbon"]
2491
- if 8 < len(args):
2492
- self.IsForwarded = args[8]
2493
- if "IsForwarded" in kwargs:
2494
- self.IsForwarded = kwargs["IsForwarded"]
2495
- if 9 < len(args):
2496
- self.ReplyID = args[9]
2497
- if "ReplyID" in kwargs:
2498
- self.ReplyID = kwargs["ReplyID"]
2499
- if 10 < len(args):
2500
- self.ReplyBody = args[10]
2501
- if "ReplyBody" in kwargs:
2502
- self.ReplyBody = kwargs["ReplyBody"]
2503
- if 11 < len(args):
2504
- self.Attachments = args[11]
2505
- if "Attachments" in kwargs:
2506
- self.Attachments = kwargs["Attachments"]
2507
- if 12 < len(args):
2508
- self.Preview = args[12]
2509
- if "Preview" in kwargs:
2510
- self.Preview = kwargs["Preview"]
2511
- if 13 < len(args):
2512
- self.Location = args[13]
2513
- if "Location" in kwargs:
2514
- self.Location = kwargs["Location"]
2515
- if 14 < len(args):
2516
- self.Poll = args[14]
2517
- if "Poll" in kwargs:
2518
- self.Poll = kwargs["Poll"]
2519
- if 15 < len(args):
2520
- self.Album = args[15]
2521
- if "Album" in kwargs:
2522
- self.Album = kwargs["Album"]
2523
- if 16 < len(args):
2524
- self.GroupInvite = args[16]
2525
- if "GroupInvite" in kwargs:
2526
- self.GroupInvite = kwargs["GroupInvite"]
2527
- if 17 < len(args):
2528
- self.MentionJIDs = args[17]
2529
- if "MentionJIDs" in kwargs:
2530
- self.MentionJIDs = kwargs["MentionJIDs"]
2531
- if 18 < len(args):
2532
- self.Receipts = args[18]
2533
- if "Receipts" in kwargs:
2534
- self.Receipts = kwargs["Receipts"]
2535
- if 19 < len(args):
2536
- self.Reactions = args[19]
2537
- if "Reactions" in kwargs:
2538
- self.Reactions = kwargs["Reactions"]
2539
- if 20 < len(args):
2540
- self.IsHistory = args[20]
2541
- if "IsHistory" in kwargs:
2542
- self.IsHistory = kwargs["IsHistory"]
2543
2627
  def __del__(self):
2544
2628
  _whatsapp.DecRef(self.handle)
2545
2629
  def __str__(self):
2546
2630
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2547
- sv = 'whatsapp.Message{'
2631
+ sv = 'whatsapp.Receipt{'
2548
2632
  first = True
2549
2633
  for v in pr:
2550
2634
  if callable(v[1]):
@@ -2557,200 +2641,119 @@ class Message(go.GoClass):
2557
2641
  return sv + '}'
2558
2642
  def __repr__(self):
2559
2643
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2560
- sv = 'whatsapp.Message ( '
2644
+ sv = 'whatsapp.Receipt ( '
2561
2645
  for v in pr:
2562
2646
  if not callable(v[1]):
2563
2647
  sv += v[0] + '=' + str(v[1]) + ', '
2564
2648
  return sv + ')'
2565
2649
  @property
2566
2650
  def Kind(self):
2567
- return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
2651
+ return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
2568
2652
  @Kind.setter
2569
2653
  def Kind(self, value):
2570
2654
  if isinstance(value, go.GoClass):
2571
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
2655
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
2572
2656
  else:
2573
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
2657
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
2574
2658
  @property
2575
- def ID(self):
2576
- return _whatsapp.whatsapp_Message_ID_Get(self.handle)
2577
- @ID.setter
2578
- def ID(self, value):
2659
+ def MessageIDs(self):
2660
+ return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
2661
+ @MessageIDs.setter
2662
+ def MessageIDs(self, value):
2579
2663
  if isinstance(value, go.GoClass):
2580
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
2664
+ _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
2581
2665
  else:
2582
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
2666
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2583
2667
  @property
2584
2668
  def JID(self):
2585
- return _whatsapp.whatsapp_Message_JID_Get(self.handle)
2669
+ return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
2586
2670
  @JID.setter
2587
2671
  def JID(self, value):
2588
2672
  if isinstance(value, go.GoClass):
2589
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
2673
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
2590
2674
  else:
2591
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
2675
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
2592
2676
  @property
2593
2677
  def GroupJID(self):
2594
- return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
2678
+ return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
2595
2679
  @GroupJID.setter
2596
2680
  def GroupJID(self, value):
2597
2681
  if isinstance(value, go.GoClass):
2598
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
2599
- else:
2600
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
2601
- @property
2602
- def OriginJID(self):
2603
- return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
2604
- @OriginJID.setter
2605
- def OriginJID(self, value):
2606
- if isinstance(value, go.GoClass):
2607
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
2608
- else:
2609
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
2610
- @property
2611
- def Body(self):
2612
- return _whatsapp.whatsapp_Message_Body_Get(self.handle)
2613
- @Body.setter
2614
- def Body(self, value):
2615
- if isinstance(value, go.GoClass):
2616
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
2617
- else:
2618
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
2619
- @property
2620
- def Timestamp(self):
2621
- return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
2622
- @Timestamp.setter
2623
- def Timestamp(self, value):
2624
- if isinstance(value, go.GoClass):
2625
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
2626
- else:
2627
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
2628
- @property
2629
- def IsCarbon(self):
2630
- return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
2631
- @IsCarbon.setter
2632
- def IsCarbon(self, value):
2633
- if isinstance(value, go.GoClass):
2634
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
2635
- else:
2636
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
2637
- @property
2638
- def IsForwarded(self):
2639
- return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
2640
- @IsForwarded.setter
2641
- def IsForwarded(self, value):
2642
- if isinstance(value, go.GoClass):
2643
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
2644
- else:
2645
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
2646
- @property
2647
- def ReplyID(self):
2648
- return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
2649
- @ReplyID.setter
2650
- def ReplyID(self, value):
2651
- if isinstance(value, go.GoClass):
2652
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
2653
- else:
2654
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
2655
- @property
2656
- def ReplyBody(self):
2657
- return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
2658
- @ReplyBody.setter
2659
- def ReplyBody(self, value):
2660
- if isinstance(value, go.GoClass):
2661
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
2662
- else:
2663
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
2664
- @property
2665
- def Attachments(self):
2666
- return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
2667
- @Attachments.setter
2668
- def Attachments(self, value):
2669
- if isinstance(value, go.GoClass):
2670
- _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
2671
- else:
2672
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2673
- @property
2674
- def Preview(self):
2675
- return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
2676
- @Preview.setter
2677
- def Preview(self, value):
2678
- if isinstance(value, go.GoClass):
2679
- _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
2680
- else:
2681
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2682
- @property
2683
- def Location(self):
2684
- return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
2685
- @Location.setter
2686
- def Location(self, value):
2687
- if isinstance(value, go.GoClass):
2688
- _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
2689
- else:
2690
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2691
- @property
2692
- def Poll(self):
2693
- return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
2694
- @Poll.setter
2695
- def Poll(self, value):
2696
- if isinstance(value, go.GoClass):
2697
- _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
2698
- else:
2699
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2700
- @property
2701
- def Album(self):
2702
- return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
2703
- @Album.setter
2704
- def Album(self, value):
2705
- if isinstance(value, go.GoClass):
2706
- _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
2707
- else:
2708
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2709
- @property
2710
- def GroupInvite(self):
2711
- return Group(handle=_whatsapp.whatsapp_Message_GroupInvite_Get(self.handle))
2712
- @GroupInvite.setter
2713
- def GroupInvite(self, value):
2714
- if isinstance(value, go.GoClass):
2715
- _whatsapp.whatsapp_Message_GroupInvite_Set(self.handle, value.handle)
2716
- else:
2717
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2718
- @property
2719
- def MentionJIDs(self):
2720
- return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2721
- @MentionJIDs.setter
2722
- def MentionJIDs(self, value):
2723
- if isinstance(value, go.GoClass):
2724
- _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
2682
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
2725
2683
  else:
2726
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2684
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
2727
2685
  @property
2728
- def Receipts(self):
2729
- return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
2730
- @Receipts.setter
2731
- def Receipts(self, value):
2686
+ def Timestamp(self):
2687
+ return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
2688
+ @Timestamp.setter
2689
+ def Timestamp(self, value):
2732
2690
  if isinstance(value, go.GoClass):
2733
- _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
2691
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
2734
2692
  else:
2735
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2693
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
2736
2694
  @property
2737
- def Reactions(self):
2738
- return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
2739
- @Reactions.setter
2740
- def Reactions(self, value):
2695
+ def IsCarbon(self):
2696
+ return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
2697
+ @IsCarbon.setter
2698
+ def IsCarbon(self, value):
2741
2699
  if isinstance(value, go.GoClass):
2742
- _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2700
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
2743
2701
  else:
2744
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2702
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
2703
+
2704
+ # Python type for struct whatsapp.LoggedOut
2705
+ class LoggedOut(go.GoClass):
2706
+ """LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
2707
+ def __init__(self, *args, **kwargs):
2708
+ """
2709
+ handle=A Go-side object is always initialized with an explicit handle=arg
2710
+ otherwise parameters can be unnamed in order of field names or named fields
2711
+ in which case a new Go object is constructed first
2712
+ """
2713
+ if len(kwargs) == 1 and 'handle' in kwargs:
2714
+ self.handle = kwargs['handle']
2715
+ _whatsapp.IncRef(self.handle)
2716
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2717
+ self.handle = args[0].handle
2718
+ _whatsapp.IncRef(self.handle)
2719
+ else:
2720
+ self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
2721
+ _whatsapp.IncRef(self.handle)
2722
+ if 0 < len(args):
2723
+ self.Reason = args[0]
2724
+ if "Reason" in kwargs:
2725
+ self.Reason = kwargs["Reason"]
2726
+ def __del__(self):
2727
+ _whatsapp.DecRef(self.handle)
2728
+ def __str__(self):
2729
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2730
+ sv = 'whatsapp.LoggedOut{'
2731
+ first = True
2732
+ for v in pr:
2733
+ if callable(v[1]):
2734
+ continue
2735
+ if first:
2736
+ first = False
2737
+ else:
2738
+ sv += ', '
2739
+ sv += v[0] + '=' + str(v[1])
2740
+ return sv + '}'
2741
+ def __repr__(self):
2742
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2743
+ sv = 'whatsapp.LoggedOut ( '
2744
+ for v in pr:
2745
+ if not callable(v[1]):
2746
+ sv += v[0] + '=' + str(v[1]) + ', '
2747
+ return sv + ')'
2745
2748
  @property
2746
- def IsHistory(self):
2747
- return _whatsapp.whatsapp_Message_IsHistory_Get(self.handle)
2748
- @IsHistory.setter
2749
- def IsHistory(self, value):
2749
+ def Reason(self):
2750
+ return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
2751
+ @Reason.setter
2752
+ def Reason(self, value):
2750
2753
  if isinstance(value, go.GoClass):
2751
- _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value.handle)
2754
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
2752
2755
  else:
2753
- _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value)
2756
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
2754
2757
 
2755
2758
  # Python type for struct whatsapp.Session
2756
2759
  class Session(go.GoClass):
@@ -2945,9 +2948,9 @@ class Session(go.GoClass):
2945
2948
  """
2946
2949
  _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
2947
2950
 
2948
- # Python type for struct whatsapp.Album
2949
- class Album(go.GoClass):
2950
- """A Album message represents a collection of media files, typically images and videos.\n"""
2951
+ # Python type for struct whatsapp.GroupSubject
2952
+ class GroupSubject(go.GoClass):
2953
+ """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
2951
2954
  def __init__(self, *args, **kwargs):
2952
2955
  """
2953
2956
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2961,25 +2964,25 @@ class Album(go.GoClass):
2961
2964
  self.handle = args[0].handle
2962
2965
  _whatsapp.IncRef(self.handle)
2963
2966
  else:
2964
- self.handle = _whatsapp.whatsapp_Album_CTor()
2967
+ self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
2965
2968
  _whatsapp.IncRef(self.handle)
2966
2969
  if 0 < len(args):
2967
- self.IsAlbum = args[0]
2968
- if "IsAlbum" in kwargs:
2969
- self.IsAlbum = kwargs["IsAlbum"]
2970
+ self.Subject = args[0]
2971
+ if "Subject" in kwargs:
2972
+ self.Subject = kwargs["Subject"]
2970
2973
  if 1 < len(args):
2971
- self.ImageCount = args[1]
2972
- if "ImageCount" in kwargs:
2973
- self.ImageCount = kwargs["ImageCount"]
2974
+ self.SetAt = args[1]
2975
+ if "SetAt" in kwargs:
2976
+ self.SetAt = kwargs["SetAt"]
2974
2977
  if 2 < len(args):
2975
- self.VideoCount = args[2]
2976
- if "VideoCount" in kwargs:
2977
- self.VideoCount = kwargs["VideoCount"]
2978
+ self.SetBy = args[2]
2979
+ if "SetBy" in kwargs:
2980
+ self.SetBy = kwargs["SetBy"]
2978
2981
  def __del__(self):
2979
2982
  _whatsapp.DecRef(self.handle)
2980
2983
  def __str__(self):
2981
2984
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2982
- sv = 'whatsapp.Album{'
2985
+ sv = 'whatsapp.GroupSubject{'
2983
2986
  first = True
2984
2987
  for v in pr:
2985
2988
  if callable(v[1]):
@@ -2992,42 +2995,42 @@ class Album(go.GoClass):
2992
2995
  return sv + '}'
2993
2996
  def __repr__(self):
2994
2997
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2995
- sv = 'whatsapp.Album ( '
2998
+ sv = 'whatsapp.GroupSubject ( '
2996
2999
  for v in pr:
2997
3000
  if not callable(v[1]):
2998
3001
  sv += v[0] + '=' + str(v[1]) + ', '
2999
3002
  return sv + ')'
3000
3003
  @property
3001
- def IsAlbum(self):
3002
- return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
3003
- @IsAlbum.setter
3004
- def IsAlbum(self, value):
3004
+ def Subject(self):
3005
+ return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
3006
+ @Subject.setter
3007
+ def Subject(self, value):
3005
3008
  if isinstance(value, go.GoClass):
3006
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
3009
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
3007
3010
  else:
3008
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
3011
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
3009
3012
  @property
3010
- def ImageCount(self):
3011
- return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
3012
- @ImageCount.setter
3013
- def ImageCount(self, value):
3013
+ def SetAt(self):
3014
+ return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
3015
+ @SetAt.setter
3016
+ def SetAt(self, value):
3014
3017
  if isinstance(value, go.GoClass):
3015
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
3018
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
3016
3019
  else:
3017
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
3020
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
3018
3021
  @property
3019
- def VideoCount(self):
3020
- return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
3021
- @VideoCount.setter
3022
- def VideoCount(self, value):
3022
+ def SetBy(self):
3023
+ return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
3024
+ @SetBy.setter
3025
+ def SetBy(self, value):
3023
3026
  if isinstance(value, go.GoClass):
3024
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
3027
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
3025
3028
  else:
3026
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
3029
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
3027
3030
 
3028
- # Python type for struct whatsapp.EventPayload
3029
- class EventPayload(go.GoClass):
3030
- """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"""
3031
+ # Python type for struct whatsapp.Location
3032
+ class Location(go.GoClass):
3033
+ """A Location represents additional metadata given to location messages.\n"""
3031
3034
  def __init__(self, *args, **kwargs):
3032
3035
  """
3033
3036
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3041,57 +3044,41 @@ class EventPayload(go.GoClass):
3041
3044
  self.handle = args[0].handle
3042
3045
  _whatsapp.IncRef(self.handle)
3043
3046
  else:
3044
- self.handle = _whatsapp.whatsapp_EventPayload_CTor()
3047
+ self.handle = _whatsapp.whatsapp_Location_CTor()
3045
3048
  _whatsapp.IncRef(self.handle)
3046
3049
  if 0 < len(args):
3047
- self.QRCode = args[0]
3048
- if "QRCode" in kwargs:
3049
- self.QRCode = kwargs["QRCode"]
3050
+ self.Latitude = args[0]
3051
+ if "Latitude" in kwargs:
3052
+ self.Latitude = kwargs["Latitude"]
3050
3053
  if 1 < len(args):
3051
- self.PairDeviceID = args[1]
3052
- if "PairDeviceID" in kwargs:
3053
- self.PairDeviceID = kwargs["PairDeviceID"]
3054
+ self.Longitude = args[1]
3055
+ if "Longitude" in kwargs:
3056
+ self.Longitude = kwargs["Longitude"]
3054
3057
  if 2 < len(args):
3055
- self.Connect = args[2]
3056
- if "Connect" in kwargs:
3057
- self.Connect = kwargs["Connect"]
3058
+ self.Accuracy = args[2]
3059
+ if "Accuracy" in kwargs:
3060
+ self.Accuracy = kwargs["Accuracy"]
3058
3061
  if 3 < len(args):
3059
- self.LoggedOut = args[3]
3060
- if "LoggedOut" in kwargs:
3061
- self.LoggedOut = kwargs["LoggedOut"]
3062
+ self.IsLive = args[3]
3063
+ if "IsLive" in kwargs:
3064
+ self.IsLive = kwargs["IsLive"]
3062
3065
  if 4 < len(args):
3063
- self.Contact = args[4]
3064
- if "Contact" in kwargs:
3065
- self.Contact = kwargs["Contact"]
3066
+ self.Name = args[4]
3067
+ if "Name" in kwargs:
3068
+ self.Name = kwargs["Name"]
3066
3069
  if 5 < len(args):
3067
- self.Presence = args[5]
3068
- if "Presence" in kwargs:
3069
- self.Presence = kwargs["Presence"]
3070
+ self.Address = args[5]
3071
+ if "Address" in kwargs:
3072
+ self.Address = kwargs["Address"]
3070
3073
  if 6 < len(args):
3071
- self.Message = args[6]
3072
- if "Message" in kwargs:
3073
- self.Message = kwargs["Message"]
3074
- if 7 < len(args):
3075
- self.ChatState = args[7]
3076
- if "ChatState" in kwargs:
3077
- self.ChatState = kwargs["ChatState"]
3078
- if 8 < len(args):
3079
- self.Receipt = args[8]
3080
- if "Receipt" in kwargs:
3081
- self.Receipt = kwargs["Receipt"]
3082
- if 9 < len(args):
3083
- self.Group = args[9]
3084
- if "Group" in kwargs:
3085
- self.Group = kwargs["Group"]
3086
- if 10 < len(args):
3087
- self.Call = args[10]
3088
- if "Call" in kwargs:
3089
- self.Call = kwargs["Call"]
3074
+ self.URL = args[6]
3075
+ if "URL" in kwargs:
3076
+ self.URL = kwargs["URL"]
3090
3077
  def __del__(self):
3091
3078
  _whatsapp.DecRef(self.handle)
3092
3079
  def __str__(self):
3093
3080
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3094
- sv = 'whatsapp.EventPayload{'
3081
+ sv = 'whatsapp.Location{'
3095
3082
  first = True
3096
3083
  for v in pr:
3097
3084
  if callable(v[1]):
@@ -3104,114 +3091,80 @@ class EventPayload(go.GoClass):
3104
3091
  return sv + '}'
3105
3092
  def __repr__(self):
3106
3093
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3107
- sv = 'whatsapp.EventPayload ( '
3094
+ sv = 'whatsapp.Location ( '
3108
3095
  for v in pr:
3109
3096
  if not callable(v[1]):
3110
- sv += v[0] + '=' + str(v[1]) + ', '
3111
- return sv + ')'
3112
- @property
3113
- def QRCode(self):
3114
- return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
3115
- @QRCode.setter
3116
- def QRCode(self, value):
3117
- if isinstance(value, go.GoClass):
3118
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
3119
- else:
3120
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
3121
- @property
3122
- def PairDeviceID(self):
3123
- return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
3124
- @PairDeviceID.setter
3125
- def PairDeviceID(self, value):
3126
- if isinstance(value, go.GoClass):
3127
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
3128
- else:
3129
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
3130
- @property
3131
- def Connect(self):
3132
- return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
3133
- @Connect.setter
3134
- def Connect(self, value):
3135
- if isinstance(value, go.GoClass):
3136
- _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
3137
- else:
3138
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3139
- @property
3140
- def LoggedOut(self):
3141
- return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
3142
- @LoggedOut.setter
3143
- def LoggedOut(self, value):
3144
- if isinstance(value, go.GoClass):
3145
- _whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
3146
- else:
3147
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3148
- @property
3149
- def Contact(self):
3150
- return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
3151
- @Contact.setter
3152
- def Contact(self, value):
3097
+ sv += v[0] + '=' + str(v[1]) + ', '
3098
+ return sv + ')'
3099
+ @property
3100
+ def Latitude(self):
3101
+ return _whatsapp.whatsapp_Location_Latitude_Get(self.handle)
3102
+ @Latitude.setter
3103
+ def Latitude(self, value):
3153
3104
  if isinstance(value, go.GoClass):
3154
- _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
3105
+ _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
3155
3106
  else:
3156
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3107
+ _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
3157
3108
  @property
3158
- def Presence(self):
3159
- return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
3160
- @Presence.setter
3161
- def Presence(self, value):
3109
+ def Longitude(self):
3110
+ return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
3111
+ @Longitude.setter
3112
+ def Longitude(self, value):
3162
3113
  if isinstance(value, go.GoClass):
3163
- _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
3114
+ _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
3164
3115
  else:
3165
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3116
+ _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
3166
3117
  @property
3167
- def Message(self):
3168
- return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
3169
- @Message.setter
3170
- def Message(self, value):
3118
+ def Accuracy(self):
3119
+ return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
3120
+ @Accuracy.setter
3121
+ def Accuracy(self, value):
3171
3122
  if isinstance(value, go.GoClass):
3172
- _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
3123
+ _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
3173
3124
  else:
3174
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3125
+ _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
3175
3126
  @property
3176
- def ChatState(self):
3177
- return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
3178
- @ChatState.setter
3179
- def ChatState(self, value):
3127
+ def IsLive(self):
3128
+ return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
3129
+ @IsLive.setter
3130
+ def IsLive(self, value):
3180
3131
  if isinstance(value, go.GoClass):
3181
- _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
3132
+ _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
3182
3133
  else:
3183
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3134
+ _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
3184
3135
  @property
3185
- def Receipt(self):
3186
- return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
3187
- @Receipt.setter
3188
- def Receipt(self, value):
3136
+ def Name(self):
3137
+ """Optional fields given for named locations.
3138
+ """
3139
+ return _whatsapp.whatsapp_Location_Name_Get(self.handle)
3140
+ @Name.setter
3141
+ def Name(self, value):
3189
3142
  if isinstance(value, go.GoClass):
3190
- _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
3143
+ _whatsapp.whatsapp_Location_Name_Set(self.handle, value.handle)
3191
3144
  else:
3192
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3145
+ _whatsapp.whatsapp_Location_Name_Set(self.handle, value)
3193
3146
  @property
3194
- def Group(self):
3195
- return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
3196
- @Group.setter
3197
- def Group(self, value):
3147
+ def Address(self):
3148
+ return _whatsapp.whatsapp_Location_Address_Get(self.handle)
3149
+ @Address.setter
3150
+ def Address(self, value):
3198
3151
  if isinstance(value, go.GoClass):
3199
- _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
3152
+ _whatsapp.whatsapp_Location_Address_Set(self.handle, value.handle)
3200
3153
  else:
3201
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3154
+ _whatsapp.whatsapp_Location_Address_Set(self.handle, value)
3202
3155
  @property
3203
- def Call(self):
3204
- return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
3205
- @Call.setter
3206
- def Call(self, value):
3156
+ def URL(self):
3157
+ return _whatsapp.whatsapp_Location_URL_Get(self.handle)
3158
+ @URL.setter
3159
+ def URL(self, value):
3207
3160
  if isinstance(value, go.GoClass):
3208
- _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
3161
+ _whatsapp.whatsapp_Location_URL_Set(self.handle, value.handle)
3209
3162
  else:
3210
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3163
+ _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
3211
3164
 
3212
- # Python type for struct whatsapp.Group
3213
- class Group(go.GoClass):
3214
- """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"""
3165
+ # Python type for struct whatsapp.Attachment
3166
+ class Attachment(go.GoClass):
3167
+ """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
3215
3168
  def __init__(self, *args, **kwargs):
3216
3169
  """
3217
3170
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3225,37 +3178,29 @@ class Group(go.GoClass):
3225
3178
  self.handle = args[0].handle
3226
3179
  _whatsapp.IncRef(self.handle)
3227
3180
  else:
3228
- self.handle = _whatsapp.whatsapp_Group_CTor()
3181
+ self.handle = _whatsapp.whatsapp_Attachment_CTor()
3229
3182
  _whatsapp.IncRef(self.handle)
3230
3183
  if 0 < len(args):
3231
- self.JID = args[0]
3232
- if "JID" in kwargs:
3233
- self.JID = kwargs["JID"]
3184
+ self.MIME = args[0]
3185
+ if "MIME" in kwargs:
3186
+ self.MIME = kwargs["MIME"]
3234
3187
  if 1 < len(args):
3235
- self.Name = args[1]
3236
- if "Name" in kwargs:
3237
- self.Name = kwargs["Name"]
3188
+ self.Filename = args[1]
3189
+ if "Filename" in kwargs:
3190
+ self.Filename = kwargs["Filename"]
3238
3191
  if 2 < len(args):
3239
- self.Subject = args[2]
3240
- if "Subject" in kwargs:
3241
- self.Subject = kwargs["Subject"]
3192
+ self.Caption = args[2]
3193
+ if "Caption" in kwargs:
3194
+ self.Caption = kwargs["Caption"]
3242
3195
  if 3 < len(args):
3243
- self.Nickname = args[3]
3244
- if "Nickname" in kwargs:
3245
- self.Nickname = kwargs["Nickname"]
3246
- if 4 < len(args):
3247
- self.Participants = args[4]
3248
- if "Participants" in kwargs:
3249
- self.Participants = kwargs["Participants"]
3250
- if 5 < len(args):
3251
- self.InviteCode = args[5]
3252
- if "InviteCode" in kwargs:
3253
- self.InviteCode = kwargs["InviteCode"]
3196
+ self.Data = args[3]
3197
+ if "Data" in kwargs:
3198
+ self.Data = kwargs["Data"]
3254
3199
  def __del__(self):
3255
3200
  _whatsapp.DecRef(self.handle)
3256
3201
  def __str__(self):
3257
3202
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3258
- sv = 'whatsapp.Group{'
3203
+ sv = 'whatsapp.Attachment{'
3259
3204
  first = True
3260
3205
  for v in pr:
3261
3206
  if callable(v[1]):
@@ -3268,65 +3213,120 @@ class Group(go.GoClass):
3268
3213
  return sv + '}'
3269
3214
  def __repr__(self):
3270
3215
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3271
- sv = 'whatsapp.Group ( '
3216
+ sv = 'whatsapp.Attachment ( '
3272
3217
  for v in pr:
3273
3218
  if not callable(v[1]):
3274
3219
  sv += v[0] + '=' + str(v[1]) + ', '
3275
3220
  return sv + ')'
3276
3221
  @property
3277
- def JID(self):
3278
- return _whatsapp.whatsapp_Group_JID_Get(self.handle)
3279
- @JID.setter
3280
- def JID(self, value):
3222
+ def MIME(self):
3223
+ return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
3224
+ @MIME.setter
3225
+ def MIME(self, value):
3281
3226
  if isinstance(value, go.GoClass):
3282
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
3227
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
3283
3228
  else:
3284
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
3229
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
3285
3230
  @property
3286
- def Name(self):
3287
- return _whatsapp.whatsapp_Group_Name_Get(self.handle)
3288
- @Name.setter
3289
- def Name(self, value):
3231
+ def Filename(self):
3232
+ return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
3233
+ @Filename.setter
3234
+ def Filename(self, value):
3290
3235
  if isinstance(value, go.GoClass):
3291
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
3236
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
3292
3237
  else:
3293
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
3238
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
3294
3239
  @property
3295
- def Subject(self):
3296
- return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
3297
- @Subject.setter
3298
- def Subject(self, value):
3240
+ def Caption(self):
3241
+ return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
3242
+ @Caption.setter
3243
+ def Caption(self, value):
3299
3244
  if isinstance(value, go.GoClass):
3300
- _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
3245
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
3301
3246
  else:
3302
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3247
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
3303
3248
  @property
3304
- def Nickname(self):
3305
- return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
3306
- @Nickname.setter
3307
- def Nickname(self, value):
3249
+ def Data(self):
3250
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
3251
+ @Data.setter
3252
+ def Data(self, value):
3308
3253
  if isinstance(value, go.GoClass):
3309
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
3254
+ _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
3310
3255
  else:
3311
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
3256
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3257
+ def GetSpec(self, ctx):
3258
+ """GetSpec(object ctx) object, str
3259
+
3260
+ GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
3261
+ """
3262
+ return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
3263
+
3264
+ # Python type for struct whatsapp.Avatar
3265
+ class Avatar(go.GoClass):
3266
+ """A Avatar represents a small image set for a Contact or Group.\n"""
3267
+ def __init__(self, *args, **kwargs):
3268
+ """
3269
+ handle=A Go-side object is always initialized with an explicit handle=arg
3270
+ otherwise parameters can be unnamed in order of field names or named fields
3271
+ in which case a new Go object is constructed first
3272
+ """
3273
+ if len(kwargs) == 1 and 'handle' in kwargs:
3274
+ self.handle = kwargs['handle']
3275
+ _whatsapp.IncRef(self.handle)
3276
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
3277
+ self.handle = args[0].handle
3278
+ _whatsapp.IncRef(self.handle)
3279
+ else:
3280
+ self.handle = _whatsapp.whatsapp_Avatar_CTor()
3281
+ _whatsapp.IncRef(self.handle)
3282
+ if 0 < len(args):
3283
+ self.ID = args[0]
3284
+ if "ID" in kwargs:
3285
+ self.ID = kwargs["ID"]
3286
+ if 1 < len(args):
3287
+ self.URL = args[1]
3288
+ if "URL" in kwargs:
3289
+ self.URL = kwargs["URL"]
3290
+ def __del__(self):
3291
+ _whatsapp.DecRef(self.handle)
3292
+ def __str__(self):
3293
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3294
+ sv = 'whatsapp.Avatar{'
3295
+ first = True
3296
+ for v in pr:
3297
+ if callable(v[1]):
3298
+ continue
3299
+ if first:
3300
+ first = False
3301
+ else:
3302
+ sv += ', '
3303
+ sv += v[0] + '=' + str(v[1])
3304
+ return sv + '}'
3305
+ def __repr__(self):
3306
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3307
+ sv = 'whatsapp.Avatar ( '
3308
+ for v in pr:
3309
+ if not callable(v[1]):
3310
+ sv += v[0] + '=' + str(v[1]) + ', '
3311
+ return sv + ')'
3312
3312
  @property
3313
- def Participants(self):
3314
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
3315
- @Participants.setter
3316
- def Participants(self, value):
3313
+ def ID(self):
3314
+ return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
3315
+ @ID.setter
3316
+ def ID(self, value):
3317
3317
  if isinstance(value, go.GoClass):
3318
- _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
3318
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
3319
3319
  else:
3320
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3320
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
3321
3321
  @property
3322
- def InviteCode(self):
3323
- return _whatsapp.whatsapp_Group_InviteCode_Get(self.handle)
3324
- @InviteCode.setter
3325
- def InviteCode(self, value):
3322
+ def URL(self):
3323
+ return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
3324
+ @URL.setter
3325
+ def URL(self, value):
3326
3326
  if isinstance(value, go.GoClass):
3327
- _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value.handle)
3327
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
3328
3328
  else:
3329
- _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value)
3329
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
3330
3330
 
3331
3331
 
3332
3332
  # ---- Slices ---