slidge-whatsapp 0.3.1__cp312-cp312-manylinux_2_36_aarch64.whl → 0.3.4__cp312-cp312-manylinux_2_36_aarch64.whl

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

Potentially problematic release.


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

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