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