slidge-whatsapp 0.2.6__cp313-cp313-manylinux_2_36_aarch64.whl → 0.2.7__cp313-cp313-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 (87) hide show
  1. slidge_whatsapp/event.go +8 -2
  2. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +166 -166
  3. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
  4. slidge_whatsapp/generated/build.py +146 -146
  5. slidge_whatsapp/generated/whatsapp.c +1486 -1486
  6. slidge_whatsapp/generated/whatsapp.go +730 -730
  7. slidge_whatsapp/generated/whatsapp.py +1053 -1053
  8. slidge_whatsapp/generated/whatsapp_go.h +166 -166
  9. slidge_whatsapp/go.mod +6 -6
  10. slidge_whatsapp/go.sum +12 -18
  11. slidge_whatsapp/media/media.go +5 -1
  12. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +1 -6
  13. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +76 -0
  14. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +38 -6
  15. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/binary/encoder.go +1 -1
  16. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -1
  17. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +64 -27
  18. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +8 -6
  19. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +19 -12
  20. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +22 -6
  21. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +2 -2
  22. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +33 -17
  23. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +1 -0
  24. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +198 -48
  25. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +12 -7
  26. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/extra.go +7 -0
  27. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.pb.go +983 -0
  28. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/InstamadilloAddMessage.proto +85 -0
  29. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloAddMessage/extra.go +3 -0
  30. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.pb.go +197 -0
  31. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeActionLog/InstamadilloCoreTypeActionLog.proto +13 -0
  32. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.pb.go +279 -0
  33. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeAdminMessage/InstamadilloCoreTypeAdminMessage.proto +21 -0
  34. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.pb.go +137 -0
  35. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeCollection/InstamadilloCoreTypeCollection.proto +10 -0
  36. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.pb.go +313 -0
  37. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeLink/InstamadilloCoreTypeLink.proto +27 -0
  38. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.pb.go +1299 -0
  39. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeMedia/InstamadilloCoreTypeMedia.proto +112 -0
  40. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.pb.go +514 -0
  41. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloCoreTypeText/InstamadilloCoreTypeText.proto +47 -0
  42. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.pb.go +123 -0
  43. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/InstamadilloDeleteMessage.proto +7 -0
  44. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloDeleteMessage/extra.go +3 -0
  45. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.pb.go +720 -0
  46. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/InstamadilloSupplementMessage.proto +59 -0
  47. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloSupplementMessage/extra.go +3 -0
  48. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.pb.go +365 -0
  49. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloTransportPayload/InstamadilloTransportPayload.proto +33 -0
  50. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.pb.go +1238 -0
  51. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/instamadilloXmaContentRef/InstamadilloXmaContentRef.proto +105 -0
  52. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +16 -4
  53. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +3 -0
  54. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +16 -7
  55. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +1 -0
  56. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +2436 -1676
  57. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +85 -7
  58. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.pb.go +198 -0
  59. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waLidMigrationSyncPayload/WAWebProtobufLidMigrationSyncPayload.proto +14 -0
  60. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/extra.go +7 -6
  61. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +800 -0
  62. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +72 -0
  63. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +678 -441
  64. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +20 -0
  65. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +11 -3
  66. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
  67. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +13 -7
  68. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingfields.json +1 -0
  69. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/reportingtoken.go +176 -0
  70. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +10 -2
  71. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +32 -17
  72. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +1 -0
  73. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  74. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +9 -6
  75. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +4 -2
  76. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/10-chat-db-lid-migration-ts.sql +2 -0
  77. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +2 -0
  78. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +5 -2
  79. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +1 -0
  80. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +2 -0
  81. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +8 -8
  82. slidge_whatsapp/vendor/modules.txt +20 -6
  83. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/METADATA +1 -1
  84. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/RECORD +87 -54
  85. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/LICENSE +0 -0
  86. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/WHEEL +0 -0
  87. {slidge_whatsapp-0.2.6.dist-info → slidge_whatsapp-0.2.7.dist-info}/entry_points.txt +0 -0
@@ -1013,9 +1013,9 @@ DefaultUserServer = "s.whatsapp.net"
1013
1013
 
1014
1014
  # ---- Structs ---
1015
1015
 
1016
- # Python type for struct whatsapp.Presence
1017
- class Presence(go.GoClass):
1018
- """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"""
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,25 +1029,25 @@ class Presence(go.GoClass):
1029
1029
  self.handle = args[0].handle
1030
1030
  _whatsapp.IncRef(self.handle)
1031
1031
  else:
1032
- self.handle = _whatsapp.whatsapp_Presence_CTor()
1032
+ self.handle = _whatsapp.whatsapp_Album_CTor()
1033
1033
  _whatsapp.IncRef(self.handle)
1034
1034
  if 0 < len(args):
1035
- self.JID = args[0]
1036
- if "JID" in kwargs:
1037
- self.JID = kwargs["JID"]
1035
+ self.IsAlbum = args[0]
1036
+ if "IsAlbum" in kwargs:
1037
+ self.IsAlbum = kwargs["IsAlbum"]
1038
1038
  if 1 < len(args):
1039
- self.Kind = args[1]
1040
- if "Kind" in kwargs:
1041
- self.Kind = kwargs["Kind"]
1039
+ self.ImageCount = args[1]
1040
+ if "ImageCount" in kwargs:
1041
+ self.ImageCount = kwargs["ImageCount"]
1042
1042
  if 2 < len(args):
1043
- self.LastSeen = args[2]
1044
- if "LastSeen" in kwargs:
1045
- self.LastSeen = kwargs["LastSeen"]
1043
+ self.VideoCount = args[2]
1044
+ if "VideoCount" in kwargs:
1045
+ self.VideoCount = kwargs["VideoCount"]
1046
1046
  def __del__(self):
1047
1047
  _whatsapp.DecRef(self.handle)
1048
1048
  def __str__(self):
1049
1049
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1050
- sv = 'whatsapp.Presence{'
1050
+ sv = 'whatsapp.Album{'
1051
1051
  first = True
1052
1052
  for v in pr:
1053
1053
  if callable(v[1]):
@@ -1060,42 +1060,42 @@ class Presence(go.GoClass):
1060
1060
  return sv + '}'
1061
1061
  def __repr__(self):
1062
1062
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1063
- sv = 'whatsapp.Presence ( '
1063
+ sv = 'whatsapp.Album ( '
1064
1064
  for v in pr:
1065
1065
  if not callable(v[1]):
1066
1066
  sv += v[0] + '=' + str(v[1]) + ', '
1067
1067
  return sv + ')'
1068
1068
  @property
1069
- def JID(self):
1070
- return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
1071
- @JID.setter
1072
- def JID(self, value):
1069
+ def IsAlbum(self):
1070
+ return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
1071
+ @IsAlbum.setter
1072
+ def IsAlbum(self, value):
1073
1073
  if isinstance(value, go.GoClass):
1074
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
1074
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
1075
1075
  else:
1076
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
1076
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
1077
1077
  @property
1078
- def Kind(self):
1079
- return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
1080
- @Kind.setter
1081
- def Kind(self, value):
1078
+ def ImageCount(self):
1079
+ return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
1080
+ @ImageCount.setter
1081
+ def ImageCount(self, value):
1082
1082
  if isinstance(value, go.GoClass):
1083
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
1083
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
1084
1084
  else:
1085
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
1085
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
1086
1086
  @property
1087
- def LastSeen(self):
1088
- return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
1089
- @LastSeen.setter
1090
- def LastSeen(self, value):
1087
+ def VideoCount(self):
1088
+ return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
1089
+ @VideoCount.setter
1090
+ def VideoCount(self, value):
1091
1091
  if isinstance(value, go.GoClass):
1092
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
1092
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
1093
1093
  else:
1094
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
1094
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
1095
1095
 
1096
- # Python type for struct whatsapp.Receipt
1097
- class Receipt(go.GoClass):
1098
- """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"""
1096
+ # Python type for struct whatsapp.Contact
1097
+ class Contact(go.GoClass):
1098
+ """A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
1099
1099
  def __init__(self, *args, **kwargs):
1100
1100
  """
1101
1101
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1109,37 +1109,21 @@ class Receipt(go.GoClass):
1109
1109
  self.handle = args[0].handle
1110
1110
  _whatsapp.IncRef(self.handle)
1111
1111
  else:
1112
- self.handle = _whatsapp.whatsapp_Receipt_CTor()
1112
+ self.handle = _whatsapp.whatsapp_Contact_CTor()
1113
1113
  _whatsapp.IncRef(self.handle)
1114
1114
  if 0 < len(args):
1115
- self.Kind = args[0]
1116
- if "Kind" in kwargs:
1117
- self.Kind = kwargs["Kind"]
1118
- if 1 < len(args):
1119
- self.MessageIDs = args[1]
1120
- if "MessageIDs" in kwargs:
1121
- self.MessageIDs = kwargs["MessageIDs"]
1122
- if 2 < len(args):
1123
- self.JID = args[2]
1115
+ self.JID = args[0]
1124
1116
  if "JID" in kwargs:
1125
1117
  self.JID = kwargs["JID"]
1126
- if 3 < len(args):
1127
- self.GroupJID = args[3]
1128
- if "GroupJID" in kwargs:
1129
- self.GroupJID = kwargs["GroupJID"]
1130
- if 4 < len(args):
1131
- self.Timestamp = args[4]
1132
- if "Timestamp" in kwargs:
1133
- self.Timestamp = kwargs["Timestamp"]
1134
- if 5 < len(args):
1135
- self.IsCarbon = args[5]
1136
- if "IsCarbon" in kwargs:
1137
- self.IsCarbon = kwargs["IsCarbon"]
1118
+ if 1 < len(args):
1119
+ self.Name = args[1]
1120
+ if "Name" in kwargs:
1121
+ self.Name = kwargs["Name"]
1138
1122
  def __del__(self):
1139
1123
  _whatsapp.DecRef(self.handle)
1140
1124
  def __str__(self):
1141
1125
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1142
- sv = 'whatsapp.Receipt{'
1126
+ sv = 'whatsapp.Contact{'
1143
1127
  first = True
1144
1128
  for v in pr:
1145
1129
  if callable(v[1]):
@@ -1152,69 +1136,33 @@ class Receipt(go.GoClass):
1152
1136
  return sv + '}'
1153
1137
  def __repr__(self):
1154
1138
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1155
- sv = 'whatsapp.Receipt ( '
1139
+ sv = 'whatsapp.Contact ( '
1156
1140
  for v in pr:
1157
1141
  if not callable(v[1]):
1158
1142
  sv += v[0] + '=' + str(v[1]) + ', '
1159
1143
  return sv + ')'
1160
1144
  @property
1161
- def Kind(self):
1162
- return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
1163
- @Kind.setter
1164
- def Kind(self, value):
1165
- if isinstance(value, go.GoClass):
1166
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
1167
- else:
1168
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
1169
- @property
1170
- def MessageIDs(self):
1171
- return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
1172
- @MessageIDs.setter
1173
- def MessageIDs(self, value):
1174
- if isinstance(value, go.GoClass):
1175
- _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
1176
- else:
1177
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1178
- @property
1179
1145
  def JID(self):
1180
- return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
1146
+ return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
1181
1147
  @JID.setter
1182
1148
  def JID(self, value):
1183
1149
  if isinstance(value, go.GoClass):
1184
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
1185
- else:
1186
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
1187
- @property
1188
- def GroupJID(self):
1189
- return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
1190
- @GroupJID.setter
1191
- def GroupJID(self, value):
1192
- if isinstance(value, go.GoClass):
1193
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
1194
- else:
1195
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
1196
- @property
1197
- def Timestamp(self):
1198
- return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
1199
- @Timestamp.setter
1200
- def Timestamp(self, value):
1201
- if isinstance(value, go.GoClass):
1202
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
1150
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
1203
1151
  else:
1204
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
1152
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
1205
1153
  @property
1206
- def IsCarbon(self):
1207
- return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
1208
- @IsCarbon.setter
1209
- def IsCarbon(self, value):
1154
+ def Name(self):
1155
+ return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
1156
+ @Name.setter
1157
+ def Name(self, value):
1210
1158
  if isinstance(value, go.GoClass):
1211
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
1159
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
1212
1160
  else:
1213
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
1161
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
1214
1162
 
1215
- # Python type for struct whatsapp.Session
1216
- class Session(go.GoClass):
1217
- """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
1163
+ # Python type for struct whatsapp.Message
1164
+ class Message(go.GoClass):
1165
+ """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"""
1218
1166
  def __init__(self, *args, **kwargs):
1219
1167
  """
1220
1168
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1228,13 +1176,89 @@ class Session(go.GoClass):
1228
1176
  self.handle = args[0].handle
1229
1177
  _whatsapp.IncRef(self.handle)
1230
1178
  else:
1231
- self.handle = _whatsapp.whatsapp_Session_CTor()
1179
+ self.handle = _whatsapp.whatsapp_Message_CTor()
1232
1180
  _whatsapp.IncRef(self.handle)
1181
+ if 0 < len(args):
1182
+ self.Kind = args[0]
1183
+ if "Kind" in kwargs:
1184
+ self.Kind = kwargs["Kind"]
1185
+ if 1 < len(args):
1186
+ self.ID = args[1]
1187
+ if "ID" in kwargs:
1188
+ self.ID = kwargs["ID"]
1189
+ if 2 < len(args):
1190
+ self.JID = args[2]
1191
+ if "JID" in kwargs:
1192
+ self.JID = kwargs["JID"]
1193
+ if 3 < len(args):
1194
+ self.GroupJID = args[3]
1195
+ if "GroupJID" in kwargs:
1196
+ self.GroupJID = kwargs["GroupJID"]
1197
+ if 4 < len(args):
1198
+ self.OriginJID = args[4]
1199
+ if "OriginJID" in kwargs:
1200
+ self.OriginJID = kwargs["OriginJID"]
1201
+ if 5 < len(args):
1202
+ self.Body = args[5]
1203
+ if "Body" in kwargs:
1204
+ self.Body = kwargs["Body"]
1205
+ if 6 < len(args):
1206
+ self.Timestamp = args[6]
1207
+ if "Timestamp" in kwargs:
1208
+ self.Timestamp = kwargs["Timestamp"]
1209
+ if 7 < len(args):
1210
+ self.IsCarbon = args[7]
1211
+ if "IsCarbon" in kwargs:
1212
+ self.IsCarbon = kwargs["IsCarbon"]
1213
+ if 8 < len(args):
1214
+ self.IsForwarded = args[8]
1215
+ if "IsForwarded" in kwargs:
1216
+ self.IsForwarded = kwargs["IsForwarded"]
1217
+ if 9 < len(args):
1218
+ self.ReplyID = args[9]
1219
+ if "ReplyID" in kwargs:
1220
+ self.ReplyID = kwargs["ReplyID"]
1221
+ if 10 < len(args):
1222
+ self.ReplyBody = args[10]
1223
+ if "ReplyBody" in kwargs:
1224
+ self.ReplyBody = kwargs["ReplyBody"]
1225
+ if 11 < len(args):
1226
+ self.Attachments = args[11]
1227
+ if "Attachments" in kwargs:
1228
+ self.Attachments = kwargs["Attachments"]
1229
+ if 12 < len(args):
1230
+ self.Preview = args[12]
1231
+ if "Preview" in kwargs:
1232
+ self.Preview = kwargs["Preview"]
1233
+ if 13 < len(args):
1234
+ self.Location = args[13]
1235
+ if "Location" in kwargs:
1236
+ self.Location = kwargs["Location"]
1237
+ if 14 < len(args):
1238
+ self.Poll = args[14]
1239
+ if "Poll" in kwargs:
1240
+ self.Poll = kwargs["Poll"]
1241
+ if 15 < len(args):
1242
+ self.Album = args[15]
1243
+ if "Album" in kwargs:
1244
+ self.Album = kwargs["Album"]
1245
+ if 16 < len(args):
1246
+ self.MentionJIDs = args[16]
1247
+ if "MentionJIDs" in kwargs:
1248
+ self.MentionJIDs = kwargs["MentionJIDs"]
1249
+ if 17 < len(args):
1250
+ self.Receipts = args[17]
1251
+ if "Receipts" in kwargs:
1252
+ self.Receipts = kwargs["Receipts"]
1253
+ if 18 < len(args):
1254
+ self.Reactions = args[18]
1255
+ if "Reactions" in kwargs:
1256
+ self.Reactions = kwargs["Reactions"]
1233
1257
  def __del__(self):
1234
1258
  _whatsapp.DecRef(self.handle)
1235
1259
  def __str__(self):
1236
1260
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1237
- sv = 'whatsapp.Session{'
1261
+ sv = 'whatsapp.Message{'
1238
1262
  first = True
1239
1263
  for v in pr:
1240
1264
  if callable(v[1]):
@@ -1247,21 +1271,233 @@ class Session(go.GoClass):
1247
1271
  return sv + '}'
1248
1272
  def __repr__(self):
1249
1273
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1250
- sv = 'whatsapp.Session ( '
1274
+ sv = 'whatsapp.Message ( '
1251
1275
  for v in pr:
1252
1276
  if not callable(v[1]):
1253
1277
  sv += v[0] + '=' + str(v[1]) + ', '
1254
1278
  return sv + ')'
1255
- def Login(self):
1256
- """Login() str
1257
-
1258
- Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
1259
- or by initiating a pairing session for a new linked device. Callers are expected to have set an
1260
- event handler in order to receive any incoming events from the underlying WhatsApp session.
1261
- """
1262
- return _whatsapp.whatsapp_Session_Login(self.handle)
1263
- def Logout(self):
1264
- """Logout() str
1279
+ @property
1280
+ def Kind(self):
1281
+ return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
1282
+ @Kind.setter
1283
+ def Kind(self, value):
1284
+ if isinstance(value, go.GoClass):
1285
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
1286
+ else:
1287
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
1288
+ @property
1289
+ def ID(self):
1290
+ return _whatsapp.whatsapp_Message_ID_Get(self.handle)
1291
+ @ID.setter
1292
+ def ID(self, value):
1293
+ if isinstance(value, go.GoClass):
1294
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
1295
+ else:
1296
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
1297
+ @property
1298
+ def JID(self):
1299
+ return _whatsapp.whatsapp_Message_JID_Get(self.handle)
1300
+ @JID.setter
1301
+ def JID(self, value):
1302
+ if isinstance(value, go.GoClass):
1303
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
1304
+ else:
1305
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
1306
+ @property
1307
+ def GroupJID(self):
1308
+ return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
1309
+ @GroupJID.setter
1310
+ def GroupJID(self, value):
1311
+ if isinstance(value, go.GoClass):
1312
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
1313
+ else:
1314
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
1315
+ @property
1316
+ def OriginJID(self):
1317
+ return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
1318
+ @OriginJID.setter
1319
+ def OriginJID(self, value):
1320
+ if isinstance(value, go.GoClass):
1321
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
1322
+ else:
1323
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
1324
+ @property
1325
+ def Body(self):
1326
+ return _whatsapp.whatsapp_Message_Body_Get(self.handle)
1327
+ @Body.setter
1328
+ def Body(self, value):
1329
+ if isinstance(value, go.GoClass):
1330
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
1331
+ else:
1332
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
1333
+ @property
1334
+ def Timestamp(self):
1335
+ return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
1336
+ @Timestamp.setter
1337
+ def Timestamp(self, value):
1338
+ if isinstance(value, go.GoClass):
1339
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
1340
+ else:
1341
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
1342
+ @property
1343
+ def IsCarbon(self):
1344
+ return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
1345
+ @IsCarbon.setter
1346
+ def IsCarbon(self, value):
1347
+ if isinstance(value, go.GoClass):
1348
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
1349
+ else:
1350
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
1351
+ @property
1352
+ def IsForwarded(self):
1353
+ return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
1354
+ @IsForwarded.setter
1355
+ def IsForwarded(self, value):
1356
+ if isinstance(value, go.GoClass):
1357
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
1358
+ else:
1359
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
1360
+ @property
1361
+ def ReplyID(self):
1362
+ return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
1363
+ @ReplyID.setter
1364
+ def ReplyID(self, value):
1365
+ if isinstance(value, go.GoClass):
1366
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
1367
+ else:
1368
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
1369
+ @property
1370
+ def ReplyBody(self):
1371
+ return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
1372
+ @ReplyBody.setter
1373
+ def ReplyBody(self, value):
1374
+ if isinstance(value, go.GoClass):
1375
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
1376
+ else:
1377
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
1378
+ @property
1379
+ def Attachments(self):
1380
+ return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
1381
+ @Attachments.setter
1382
+ def Attachments(self, value):
1383
+ if isinstance(value, go.GoClass):
1384
+ _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
1385
+ else:
1386
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1387
+ @property
1388
+ def Preview(self):
1389
+ return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
1390
+ @Preview.setter
1391
+ def Preview(self, value):
1392
+ if isinstance(value, go.GoClass):
1393
+ _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
1394
+ else:
1395
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1396
+ @property
1397
+ def Location(self):
1398
+ return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
1399
+ @Location.setter
1400
+ def Location(self, value):
1401
+ if isinstance(value, go.GoClass):
1402
+ _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
1403
+ else:
1404
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1405
+ @property
1406
+ def Poll(self):
1407
+ return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
1408
+ @Poll.setter
1409
+ def Poll(self, value):
1410
+ if isinstance(value, go.GoClass):
1411
+ _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
1412
+ else:
1413
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1414
+ @property
1415
+ def Album(self):
1416
+ return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
1417
+ @Album.setter
1418
+ def Album(self, value):
1419
+ if isinstance(value, go.GoClass):
1420
+ _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
1421
+ else:
1422
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1423
+ @property
1424
+ def MentionJIDs(self):
1425
+ return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
1426
+ @MentionJIDs.setter
1427
+ def MentionJIDs(self, value):
1428
+ if isinstance(value, go.GoClass):
1429
+ _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
1430
+ else:
1431
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1432
+ @property
1433
+ def Receipts(self):
1434
+ return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
1435
+ @Receipts.setter
1436
+ def Receipts(self, value):
1437
+ if isinstance(value, go.GoClass):
1438
+ _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
1439
+ else:
1440
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1441
+ @property
1442
+ def Reactions(self):
1443
+ return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
1444
+ @Reactions.setter
1445
+ def Reactions(self, value):
1446
+ if isinstance(value, go.GoClass):
1447
+ _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
1448
+ else:
1449
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1450
+
1451
+ # Python type for struct whatsapp.Session
1452
+ class Session(go.GoClass):
1453
+ """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
1454
+ def __init__(self, *args, **kwargs):
1455
+ """
1456
+ handle=A Go-side object is always initialized with an explicit handle=arg
1457
+ otherwise parameters can be unnamed in order of field names or named fields
1458
+ in which case a new Go object is constructed first
1459
+ """
1460
+ if len(kwargs) == 1 and 'handle' in kwargs:
1461
+ self.handle = kwargs['handle']
1462
+ _whatsapp.IncRef(self.handle)
1463
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1464
+ self.handle = args[0].handle
1465
+ _whatsapp.IncRef(self.handle)
1466
+ else:
1467
+ self.handle = _whatsapp.whatsapp_Session_CTor()
1468
+ _whatsapp.IncRef(self.handle)
1469
+ def __del__(self):
1470
+ _whatsapp.DecRef(self.handle)
1471
+ def __str__(self):
1472
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1473
+ sv = 'whatsapp.Session{'
1474
+ first = True
1475
+ for v in pr:
1476
+ if callable(v[1]):
1477
+ continue
1478
+ if first:
1479
+ first = False
1480
+ else:
1481
+ sv += ', '
1482
+ sv += v[0] + '=' + str(v[1])
1483
+ return sv + '}'
1484
+ def __repr__(self):
1485
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1486
+ sv = 'whatsapp.Session ( '
1487
+ for v in pr:
1488
+ if not callable(v[1]):
1489
+ sv += v[0] + '=' + str(v[1]) + ', '
1490
+ return sv + ')'
1491
+ def Login(self):
1492
+ """Login() str
1493
+
1494
+ Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
1495
+ or by initiating a pairing session for a new linked device. Callers are expected to have set an
1496
+ event handler in order to receive any incoming events from the underlying WhatsApp session.
1497
+ """
1498
+ return _whatsapp.whatsapp_Session_Login(self.handle)
1499
+ def Logout(self):
1500
+ """Logout() str
1265
1501
 
1266
1502
  Logout disconnects and removes the current linked device locally and initiates a logout remotely.
1267
1503
  """
@@ -1485,9 +1721,9 @@ class Call(go.GoClass):
1485
1721
  else:
1486
1722
  _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1487
1723
 
1488
- # Python type for struct whatsapp.EventPayload
1489
- class EventPayload(go.GoClass):
1490
- """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"""
1724
+ # Python type for struct whatsapp.ChatState
1725
+ class ChatState(go.GoClass):
1726
+ """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"""
1491
1727
  def __init__(self, *args, **kwargs):
1492
1728
  """
1493
1729
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1501,53 +1737,25 @@ class EventPayload(go.GoClass):
1501
1737
  self.handle = args[0].handle
1502
1738
  _whatsapp.IncRef(self.handle)
1503
1739
  else:
1504
- self.handle = _whatsapp.whatsapp_EventPayload_CTor()
1740
+ self.handle = _whatsapp.whatsapp_ChatState_CTor()
1505
1741
  _whatsapp.IncRef(self.handle)
1506
1742
  if 0 < len(args):
1507
- self.QRCode = args[0]
1508
- if "QRCode" in kwargs:
1509
- self.QRCode = kwargs["QRCode"]
1743
+ self.Kind = args[0]
1744
+ if "Kind" in kwargs:
1745
+ self.Kind = kwargs["Kind"]
1510
1746
  if 1 < len(args):
1511
- self.PairDeviceID = args[1]
1512
- if "PairDeviceID" in kwargs:
1513
- self.PairDeviceID = kwargs["PairDeviceID"]
1747
+ self.JID = args[1]
1748
+ if "JID" in kwargs:
1749
+ self.JID = kwargs["JID"]
1514
1750
  if 2 < len(args):
1515
- self.Connect = args[2]
1516
- if "Connect" in kwargs:
1517
- self.Connect = kwargs["Connect"]
1518
- if 3 < len(args):
1519
- self.Contact = args[3]
1520
- if "Contact" in kwargs:
1521
- self.Contact = kwargs["Contact"]
1522
- if 4 < len(args):
1523
- self.Presence = args[4]
1524
- if "Presence" in kwargs:
1525
- self.Presence = kwargs["Presence"]
1526
- if 5 < len(args):
1527
- self.Message = args[5]
1528
- if "Message" in kwargs:
1529
- self.Message = kwargs["Message"]
1530
- if 6 < len(args):
1531
- self.ChatState = args[6]
1532
- if "ChatState" in kwargs:
1533
- self.ChatState = kwargs["ChatState"]
1534
- if 7 < len(args):
1535
- self.Receipt = args[7]
1536
- if "Receipt" in kwargs:
1537
- self.Receipt = kwargs["Receipt"]
1538
- if 8 < len(args):
1539
- self.Group = args[8]
1540
- if "Group" in kwargs:
1541
- self.Group = kwargs["Group"]
1542
- if 9 < len(args):
1543
- self.Call = args[9]
1544
- if "Call" in kwargs:
1545
- self.Call = kwargs["Call"]
1751
+ self.GroupJID = args[2]
1752
+ if "GroupJID" in kwargs:
1753
+ self.GroupJID = kwargs["GroupJID"]
1546
1754
  def __del__(self):
1547
1755
  _whatsapp.DecRef(self.handle)
1548
1756
  def __str__(self):
1549
1757
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1550
- sv = 'whatsapp.EventPayload{'
1758
+ sv = 'whatsapp.ChatState{'
1551
1759
  first = True
1552
1760
  for v in pr:
1553
1761
  if callable(v[1]):
@@ -1560,105 +1768,42 @@ class EventPayload(go.GoClass):
1560
1768
  return sv + '}'
1561
1769
  def __repr__(self):
1562
1770
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1563
- sv = 'whatsapp.EventPayload ( '
1771
+ sv = 'whatsapp.ChatState ( '
1564
1772
  for v in pr:
1565
1773
  if not callable(v[1]):
1566
1774
  sv += v[0] + '=' + str(v[1]) + ', '
1567
1775
  return sv + ')'
1568
1776
  @property
1569
- def QRCode(self):
1570
- return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
1571
- @QRCode.setter
1572
- def QRCode(self, value):
1573
- if isinstance(value, go.GoClass):
1574
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
1575
- else:
1576
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
1577
- @property
1578
- def PairDeviceID(self):
1579
- return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
1580
- @PairDeviceID.setter
1581
- def PairDeviceID(self, value):
1582
- if isinstance(value, go.GoClass):
1583
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
1584
- else:
1585
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
1586
- @property
1587
- def Connect(self):
1588
- return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
1589
- @Connect.setter
1590
- def Connect(self, value):
1591
- if isinstance(value, go.GoClass):
1592
- _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
1593
- else:
1594
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1595
- @property
1596
- def Contact(self):
1597
- return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
1598
- @Contact.setter
1599
- def Contact(self, value):
1600
- if isinstance(value, go.GoClass):
1601
- _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
1602
- else:
1603
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1604
- @property
1605
- def Presence(self):
1606
- return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
1607
- @Presence.setter
1608
- def Presence(self, value):
1609
- if isinstance(value, go.GoClass):
1610
- _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
1611
- else:
1612
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1613
- @property
1614
- def Message(self):
1615
- return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
1616
- @Message.setter
1617
- def Message(self, value):
1618
- if isinstance(value, go.GoClass):
1619
- _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
1620
- else:
1621
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1622
- @property
1623
- def ChatState(self):
1624
- return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
1625
- @ChatState.setter
1626
- def ChatState(self, value):
1627
- if isinstance(value, go.GoClass):
1628
- _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
1629
- else:
1630
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1631
- @property
1632
- def Receipt(self):
1633
- return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
1634
- @Receipt.setter
1635
- def Receipt(self, value):
1777
+ def Kind(self):
1778
+ return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
1779
+ @Kind.setter
1780
+ def Kind(self, value):
1636
1781
  if isinstance(value, go.GoClass):
1637
- _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
1782
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
1638
1783
  else:
1639
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1784
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
1640
1785
  @property
1641
- def Group(self):
1642
- return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
1643
- @Group.setter
1644
- def Group(self, value):
1786
+ def JID(self):
1787
+ return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
1788
+ @JID.setter
1789
+ def JID(self, value):
1645
1790
  if isinstance(value, go.GoClass):
1646
- _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
1791
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
1647
1792
  else:
1648
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1793
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
1649
1794
  @property
1650
- def Call(self):
1651
- return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
1652
- @Call.setter
1653
- def Call(self, value):
1795
+ def GroupJID(self):
1796
+ return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
1797
+ @GroupJID.setter
1798
+ def GroupJID(self, value):
1654
1799
  if isinstance(value, go.GoClass):
1655
- _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
1800
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
1656
1801
  else:
1657
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1802
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1658
1803
 
1659
- # Python type for struct whatsapp.GroupSubject
1660
- class GroupSubject(go.GoClass):
1661
- """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1804
+ # Python type for struct whatsapp.Connect
1805
+ class Connect(go.GoClass):
1806
+ """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
1662
1807
  def __init__(self, *args, **kwargs):
1663
1808
  """
1664
1809
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1672,25 +1817,21 @@ class GroupSubject(go.GoClass):
1672
1817
  self.handle = args[0].handle
1673
1818
  _whatsapp.IncRef(self.handle)
1674
1819
  else:
1675
- self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1820
+ self.handle = _whatsapp.whatsapp_Connect_CTor()
1676
1821
  _whatsapp.IncRef(self.handle)
1677
1822
  if 0 < len(args):
1678
- self.Subject = args[0]
1679
- if "Subject" in kwargs:
1680
- self.Subject = kwargs["Subject"]
1823
+ self.JID = args[0]
1824
+ if "JID" in kwargs:
1825
+ self.JID = kwargs["JID"]
1681
1826
  if 1 < len(args):
1682
- self.SetAt = args[1]
1683
- if "SetAt" in kwargs:
1684
- self.SetAt = kwargs["SetAt"]
1685
- if 2 < len(args):
1686
- self.SetByJID = args[2]
1687
- if "SetByJID" in kwargs:
1688
- self.SetByJID = kwargs["SetByJID"]
1827
+ self.Error = args[1]
1828
+ if "Error" in kwargs:
1829
+ self.Error = kwargs["Error"]
1689
1830
  def __del__(self):
1690
1831
  _whatsapp.DecRef(self.handle)
1691
1832
  def __str__(self):
1692
1833
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1693
- sv = 'whatsapp.GroupSubject{'
1834
+ sv = 'whatsapp.Connect{'
1694
1835
  first = True
1695
1836
  for v in pr:
1696
1837
  if callable(v[1]):
@@ -1703,42 +1844,33 @@ class GroupSubject(go.GoClass):
1703
1844
  return sv + '}'
1704
1845
  def __repr__(self):
1705
1846
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1706
- sv = 'whatsapp.GroupSubject ( '
1847
+ sv = 'whatsapp.Connect ( '
1707
1848
  for v in pr:
1708
1849
  if not callable(v[1]):
1709
1850
  sv += v[0] + '=' + str(v[1]) + ', '
1710
1851
  return sv + ')'
1711
1852
  @property
1712
- def Subject(self):
1713
- return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1714
- @Subject.setter
1715
- def Subject(self, value):
1716
- if isinstance(value, go.GoClass):
1717
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1718
- else:
1719
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1720
- @property
1721
- def SetAt(self):
1722
- return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1723
- @SetAt.setter
1724
- def SetAt(self, value):
1853
+ def JID(self):
1854
+ return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
1855
+ @JID.setter
1856
+ def JID(self, value):
1725
1857
  if isinstance(value, go.GoClass):
1726
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1858
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
1727
1859
  else:
1728
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1860
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
1729
1861
  @property
1730
- def SetByJID(self):
1731
- return _whatsapp.whatsapp_GroupSubject_SetByJID_Get(self.handle)
1732
- @SetByJID.setter
1733
- def SetByJID(self, value):
1862
+ def Error(self):
1863
+ return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
1864
+ @Error.setter
1865
+ def Error(self, value):
1734
1866
  if isinstance(value, go.GoClass):
1735
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value.handle)
1867
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
1736
1868
  else:
1737
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
1869
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
1738
1870
 
1739
- # Python type for struct whatsapp.GroupParticipant
1740
- class GroupParticipant(go.GoClass):
1741
- """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can always be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1871
+ # Python type for struct whatsapp.Group
1872
+ class Group(go.GoClass):
1873
+ """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"""
1742
1874
  def __init__(self, *args, **kwargs):
1743
1875
  """
1744
1876
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1752,25 +1884,33 @@ class GroupParticipant(go.GoClass):
1752
1884
  self.handle = args[0].handle
1753
1885
  _whatsapp.IncRef(self.handle)
1754
1886
  else:
1755
- self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1887
+ self.handle = _whatsapp.whatsapp_Group_CTor()
1756
1888
  _whatsapp.IncRef(self.handle)
1757
1889
  if 0 < len(args):
1758
1890
  self.JID = args[0]
1759
1891
  if "JID" in kwargs:
1760
1892
  self.JID = kwargs["JID"]
1761
1893
  if 1 < len(args):
1762
- self.Affiliation = args[1]
1763
- if "Affiliation" in kwargs:
1764
- self.Affiliation = kwargs["Affiliation"]
1894
+ self.Name = args[1]
1895
+ if "Name" in kwargs:
1896
+ self.Name = kwargs["Name"]
1765
1897
  if 2 < len(args):
1766
- self.Action = args[2]
1767
- if "Action" in kwargs:
1768
- self.Action = kwargs["Action"]
1898
+ self.Subject = args[2]
1899
+ if "Subject" in kwargs:
1900
+ self.Subject = kwargs["Subject"]
1901
+ if 3 < len(args):
1902
+ self.Nickname = args[3]
1903
+ if "Nickname" in kwargs:
1904
+ self.Nickname = kwargs["Nickname"]
1905
+ if 4 < len(args):
1906
+ self.Participants = args[4]
1907
+ if "Participants" in kwargs:
1908
+ self.Participants = kwargs["Participants"]
1769
1909
  def __del__(self):
1770
1910
  _whatsapp.DecRef(self.handle)
1771
1911
  def __str__(self):
1772
1912
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1773
- sv = 'whatsapp.GroupParticipant{'
1913
+ sv = 'whatsapp.Group{'
1774
1914
  first = True
1775
1915
  for v in pr:
1776
1916
  if callable(v[1]):
@@ -1783,49 +1923,147 @@ class GroupParticipant(go.GoClass):
1783
1923
  return sv + '}'
1784
1924
  def __repr__(self):
1785
1925
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1786
- sv = 'whatsapp.GroupParticipant ( '
1926
+ sv = 'whatsapp.Group ( '
1787
1927
  for v in pr:
1788
1928
  if not callable(v[1]):
1789
1929
  sv += v[0] + '=' + str(v[1]) + ', '
1790
1930
  return sv + ')'
1791
1931
  @property
1792
1932
  def JID(self):
1793
- return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1933
+ return _whatsapp.whatsapp_Group_JID_Get(self.handle)
1794
1934
  @JID.setter
1795
1935
  def JID(self, value):
1796
1936
  if isinstance(value, go.GoClass):
1797
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1937
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
1798
1938
  else:
1799
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1939
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
1800
1940
  @property
1801
- def Affiliation(self):
1802
- return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1803
- @Affiliation.setter
1804
- def Affiliation(self, value):
1941
+ def Name(self):
1942
+ return _whatsapp.whatsapp_Group_Name_Get(self.handle)
1943
+ @Name.setter
1944
+ def Name(self, value):
1805
1945
  if isinstance(value, go.GoClass):
1806
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1946
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
1807
1947
  else:
1808
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1948
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
1809
1949
  @property
1810
- def Action(self):
1811
- return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1812
- @Action.setter
1813
- def Action(self, value):
1950
+ def Subject(self):
1951
+ return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
1952
+ @Subject.setter
1953
+ def Subject(self, value):
1814
1954
  if isinstance(value, go.GoClass):
1815
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1955
+ _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
1816
1956
  else:
1817
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1818
-
1819
- # Python type for struct whatsapp.LinkedDevice
1820
- class LinkedDevice(go.GoClass):
1821
- """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"""
1822
- def __init__(self, *args, **kwargs):
1823
- """
1824
- handle=A Go-side object is always initialized with an explicit handle=arg
1825
- otherwise parameters can be unnamed in order of field names or named fields
1826
- in which case a new Go object is constructed first
1827
- """
1828
- if len(kwargs) == 1 and 'handle' in kwargs:
1957
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1958
+ @property
1959
+ def Nickname(self):
1960
+ return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
1961
+ @Nickname.setter
1962
+ def Nickname(self, value):
1963
+ if isinstance(value, go.GoClass):
1964
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
1965
+ else:
1966
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
1967
+ @property
1968
+ def Participants(self):
1969
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
1970
+ @Participants.setter
1971
+ def Participants(self, value):
1972
+ if isinstance(value, go.GoClass):
1973
+ _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
1974
+ else:
1975
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1976
+
1977
+ # Python type for struct whatsapp.GroupParticipant
1978
+ class GroupParticipant(go.GoClass):
1979
+ """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can always be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1980
+ def __init__(self, *args, **kwargs):
1981
+ """
1982
+ handle=A Go-side object is always initialized with an explicit handle=arg
1983
+ otherwise parameters can be unnamed in order of field names or named fields
1984
+ in which case a new Go object is constructed first
1985
+ """
1986
+ if len(kwargs) == 1 and 'handle' in kwargs:
1987
+ self.handle = kwargs['handle']
1988
+ _whatsapp.IncRef(self.handle)
1989
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1990
+ self.handle = args[0].handle
1991
+ _whatsapp.IncRef(self.handle)
1992
+ else:
1993
+ self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1994
+ _whatsapp.IncRef(self.handle)
1995
+ if 0 < len(args):
1996
+ self.JID = args[0]
1997
+ if "JID" in kwargs:
1998
+ self.JID = kwargs["JID"]
1999
+ if 1 < len(args):
2000
+ self.Affiliation = args[1]
2001
+ if "Affiliation" in kwargs:
2002
+ self.Affiliation = kwargs["Affiliation"]
2003
+ if 2 < len(args):
2004
+ self.Action = args[2]
2005
+ if "Action" in kwargs:
2006
+ self.Action = kwargs["Action"]
2007
+ def __del__(self):
2008
+ _whatsapp.DecRef(self.handle)
2009
+ def __str__(self):
2010
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2011
+ sv = 'whatsapp.GroupParticipant{'
2012
+ first = True
2013
+ for v in pr:
2014
+ if callable(v[1]):
2015
+ continue
2016
+ if first:
2017
+ first = False
2018
+ else:
2019
+ sv += ', '
2020
+ sv += v[0] + '=' + str(v[1])
2021
+ return sv + '}'
2022
+ def __repr__(self):
2023
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2024
+ sv = 'whatsapp.GroupParticipant ( '
2025
+ for v in pr:
2026
+ if not callable(v[1]):
2027
+ sv += v[0] + '=' + str(v[1]) + ', '
2028
+ return sv + ')'
2029
+ @property
2030
+ def JID(self):
2031
+ return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
2032
+ @JID.setter
2033
+ def JID(self, value):
2034
+ if isinstance(value, go.GoClass):
2035
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
2036
+ else:
2037
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
2038
+ @property
2039
+ def Affiliation(self):
2040
+ return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
2041
+ @Affiliation.setter
2042
+ def Affiliation(self, value):
2043
+ if isinstance(value, go.GoClass):
2044
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
2045
+ else:
2046
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
2047
+ @property
2048
+ def Action(self):
2049
+ return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
2050
+ @Action.setter
2051
+ def Action(self, value):
2052
+ if isinstance(value, go.GoClass):
2053
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
2054
+ else:
2055
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
2056
+
2057
+ # Python type for struct whatsapp.LinkedDevice
2058
+ class LinkedDevice(go.GoClass):
2059
+ """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"""
2060
+ def __init__(self, *args, **kwargs):
2061
+ """
2062
+ handle=A Go-side object is always initialized with an explicit handle=arg
2063
+ otherwise parameters can be unnamed in order of field names or named fields
2064
+ in which case a new Go object is constructed first
2065
+ """
2066
+ if len(kwargs) == 1 and 'handle' in kwargs:
1829
2067
  self.handle = kwargs['handle']
1830
2068
  _whatsapp.IncRef(self.handle)
1831
2069
  elif len(args) == 1 and isinstance(args[0], go.GoClass):
@@ -1880,9 +2118,9 @@ class LinkedDevice(go.GoClass):
1880
2118
  """
1881
2119
  return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
1882
2120
 
1883
- # Python type for struct whatsapp.Preview
1884
- class Preview(go.GoClass):
1885
- """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"""
2121
+ # Python type for struct whatsapp.Poll
2122
+ class Poll(go.GoClass):
2123
+ """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
1886
2124
  def __init__(self, *args, **kwargs):
1887
2125
  """
1888
2126
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1896,33 +2134,21 @@ class Preview(go.GoClass):
1896
2134
  self.handle = args[0].handle
1897
2135
  _whatsapp.IncRef(self.handle)
1898
2136
  else:
1899
- self.handle = _whatsapp.whatsapp_Preview_CTor()
2137
+ self.handle = _whatsapp.whatsapp_Poll_CTor()
1900
2138
  _whatsapp.IncRef(self.handle)
1901
2139
  if 0 < len(args):
1902
- self.Kind = args[0]
1903
- if "Kind" in kwargs:
1904
- self.Kind = kwargs["Kind"]
1905
- if 1 < len(args):
1906
- self.URL = args[1]
1907
- if "URL" in kwargs:
1908
- self.URL = kwargs["URL"]
1909
- if 2 < len(args):
1910
- self.Title = args[2]
2140
+ self.Title = args[0]
1911
2141
  if "Title" in kwargs:
1912
2142
  self.Title = kwargs["Title"]
1913
- if 3 < len(args):
1914
- self.Description = args[3]
1915
- if "Description" in kwargs:
1916
- self.Description = kwargs["Description"]
1917
- if 4 < len(args):
1918
- self.Thumbnail = args[4]
1919
- if "Thumbnail" in kwargs:
1920
- self.Thumbnail = kwargs["Thumbnail"]
2143
+ if 1 < len(args):
2144
+ self.Options = args[1]
2145
+ if "Options" in kwargs:
2146
+ self.Options = kwargs["Options"]
1921
2147
  def __del__(self):
1922
2148
  _whatsapp.DecRef(self.handle)
1923
2149
  def __str__(self):
1924
2150
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1925
- sv = 'whatsapp.Preview{'
2151
+ sv = 'whatsapp.Poll{'
1926
2152
  first = True
1927
2153
  for v in pr:
1928
2154
  if callable(v[1]):
@@ -1935,60 +2161,33 @@ class Preview(go.GoClass):
1935
2161
  return sv + '}'
1936
2162
  def __repr__(self):
1937
2163
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1938
- sv = 'whatsapp.Preview ( '
2164
+ sv = 'whatsapp.Poll ( '
1939
2165
  for v in pr:
1940
2166
  if not callable(v[1]):
1941
2167
  sv += v[0] + '=' + str(v[1]) + ', '
1942
2168
  return sv + ')'
1943
2169
  @property
1944
- def Kind(self):
1945
- return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
1946
- @Kind.setter
1947
- def Kind(self, value):
1948
- if isinstance(value, go.GoClass):
1949
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
1950
- else:
1951
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
1952
- @property
1953
- def URL(self):
1954
- return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
1955
- @URL.setter
1956
- def URL(self, value):
1957
- if isinstance(value, go.GoClass):
1958
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
1959
- else:
1960
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
1961
- @property
1962
2170
  def Title(self):
1963
- return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
2171
+ return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
1964
2172
  @Title.setter
1965
2173
  def Title(self, value):
1966
2174
  if isinstance(value, go.GoClass):
1967
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
1968
- else:
1969
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
1970
- @property
1971
- def Description(self):
1972
- return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
1973
- @Description.setter
1974
- def Description(self, value):
1975
- if isinstance(value, go.GoClass):
1976
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
2175
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
1977
2176
  else:
1978
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
2177
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
1979
2178
  @property
1980
- def Thumbnail(self):
1981
- return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
1982
- @Thumbnail.setter
1983
- def Thumbnail(self, value):
2179
+ def Options(self):
2180
+ return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2181
+ @Options.setter
2182
+ def Options(self, value):
1984
2183
  if isinstance(value, go.GoClass):
1985
- _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
2184
+ _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
1986
2185
  else:
1987
2186
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1988
2187
 
1989
- # Python type for struct whatsapp.Album
1990
- class Album(go.GoClass):
1991
- """A Album message represents a collection of media files, typically images and videos.\n"""
2188
+ # Python type for struct whatsapp.PollOption
2189
+ class PollOption(go.GoClass):
2190
+ """A PollOption represents an individual choice within a broader poll.\n"""
1992
2191
  def __init__(self, *args, **kwargs):
1993
2192
  """
1994
2193
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2002,25 +2201,17 @@ class Album(go.GoClass):
2002
2201
  self.handle = args[0].handle
2003
2202
  _whatsapp.IncRef(self.handle)
2004
2203
  else:
2005
- self.handle = _whatsapp.whatsapp_Album_CTor()
2204
+ self.handle = _whatsapp.whatsapp_PollOption_CTor()
2006
2205
  _whatsapp.IncRef(self.handle)
2007
2206
  if 0 < len(args):
2008
- self.IsAlbum = args[0]
2009
- if "IsAlbum" in kwargs:
2010
- self.IsAlbum = kwargs["IsAlbum"]
2011
- if 1 < len(args):
2012
- self.ImageCount = args[1]
2013
- if "ImageCount" in kwargs:
2014
- self.ImageCount = kwargs["ImageCount"]
2015
- if 2 < len(args):
2016
- self.VideoCount = args[2]
2017
- if "VideoCount" in kwargs:
2018
- self.VideoCount = kwargs["VideoCount"]
2207
+ self.Title = args[0]
2208
+ if "Title" in kwargs:
2209
+ self.Title = kwargs["Title"]
2019
2210
  def __del__(self):
2020
2211
  _whatsapp.DecRef(self.handle)
2021
2212
  def __str__(self):
2022
2213
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2023
- sv = 'whatsapp.Album{'
2214
+ sv = 'whatsapp.PollOption{'
2024
2215
  first = True
2025
2216
  for v in pr:
2026
2217
  if callable(v[1]):
@@ -2033,42 +2224,24 @@ class Album(go.GoClass):
2033
2224
  return sv + '}'
2034
2225
  def __repr__(self):
2035
2226
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2036
- sv = 'whatsapp.Album ( '
2227
+ sv = 'whatsapp.PollOption ( '
2037
2228
  for v in pr:
2038
2229
  if not callable(v[1]):
2039
2230
  sv += v[0] + '=' + str(v[1]) + ', '
2040
2231
  return sv + ')'
2041
2232
  @property
2042
- def IsAlbum(self):
2043
- return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
2044
- @IsAlbum.setter
2045
- def IsAlbum(self, value):
2046
- if isinstance(value, go.GoClass):
2047
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
2048
- else:
2049
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
2050
- @property
2051
- def ImageCount(self):
2052
- return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
2053
- @ImageCount.setter
2054
- def ImageCount(self, value):
2055
- if isinstance(value, go.GoClass):
2056
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
2057
- else:
2058
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
2059
- @property
2060
- def VideoCount(self):
2061
- return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
2062
- @VideoCount.setter
2063
- def VideoCount(self, value):
2233
+ def Title(self):
2234
+ return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
2235
+ @Title.setter
2236
+ def Title(self, value):
2064
2237
  if isinstance(value, go.GoClass):
2065
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
2238
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
2066
2239
  else:
2067
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
2240
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
2068
2241
 
2069
- # Python type for struct whatsapp.Attachment
2070
- class Attachment(go.GoClass):
2071
- """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
2242
+ # Python type for struct whatsapp.Presence
2243
+ class Presence(go.GoClass):
2244
+ """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"""
2072
2245
  def __init__(self, *args, **kwargs):
2073
2246
  """
2074
2247
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2082,14 +2255,94 @@ class Attachment(go.GoClass):
2082
2255
  self.handle = args[0].handle
2083
2256
  _whatsapp.IncRef(self.handle)
2084
2257
  else:
2085
- self.handle = _whatsapp.whatsapp_Attachment_CTor()
2258
+ self.handle = _whatsapp.whatsapp_Presence_CTor()
2086
2259
  _whatsapp.IncRef(self.handle)
2087
2260
  if 0 < len(args):
2088
- self.MIME = args[0]
2089
- if "MIME" in kwargs:
2090
- self.MIME = kwargs["MIME"]
2091
- if 1 < len(args):
2092
- self.Filename = args[1]
2261
+ self.JID = args[0]
2262
+ if "JID" in kwargs:
2263
+ self.JID = kwargs["JID"]
2264
+ if 1 < len(args):
2265
+ self.Kind = args[1]
2266
+ if "Kind" in kwargs:
2267
+ self.Kind = kwargs["Kind"]
2268
+ if 2 < len(args):
2269
+ self.LastSeen = args[2]
2270
+ if "LastSeen" in kwargs:
2271
+ self.LastSeen = kwargs["LastSeen"]
2272
+ def __del__(self):
2273
+ _whatsapp.DecRef(self.handle)
2274
+ def __str__(self):
2275
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2276
+ sv = 'whatsapp.Presence{'
2277
+ first = True
2278
+ for v in pr:
2279
+ if callable(v[1]):
2280
+ continue
2281
+ if first:
2282
+ first = False
2283
+ else:
2284
+ sv += ', '
2285
+ sv += v[0] + '=' + str(v[1])
2286
+ return sv + '}'
2287
+ def __repr__(self):
2288
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2289
+ sv = 'whatsapp.Presence ( '
2290
+ for v in pr:
2291
+ if not callable(v[1]):
2292
+ sv += v[0] + '=' + str(v[1]) + ', '
2293
+ return sv + ')'
2294
+ @property
2295
+ def JID(self):
2296
+ return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
2297
+ @JID.setter
2298
+ def JID(self, value):
2299
+ if isinstance(value, go.GoClass):
2300
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
2301
+ else:
2302
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
2303
+ @property
2304
+ def Kind(self):
2305
+ return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
2306
+ @Kind.setter
2307
+ def Kind(self, value):
2308
+ if isinstance(value, go.GoClass):
2309
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
2310
+ else:
2311
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
2312
+ @property
2313
+ def LastSeen(self):
2314
+ return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
2315
+ @LastSeen.setter
2316
+ def LastSeen(self, value):
2317
+ if isinstance(value, go.GoClass):
2318
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
2319
+ else:
2320
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
2321
+
2322
+ # Python type for struct whatsapp.Attachment
2323
+ class Attachment(go.GoClass):
2324
+ """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
2325
+ def __init__(self, *args, **kwargs):
2326
+ """
2327
+ handle=A Go-side object is always initialized with an explicit handle=arg
2328
+ otherwise parameters can be unnamed in order of field names or named fields
2329
+ in which case a new Go object is constructed first
2330
+ """
2331
+ if len(kwargs) == 1 and 'handle' in kwargs:
2332
+ self.handle = kwargs['handle']
2333
+ _whatsapp.IncRef(self.handle)
2334
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2335
+ self.handle = args[0].handle
2336
+ _whatsapp.IncRef(self.handle)
2337
+ else:
2338
+ self.handle = _whatsapp.whatsapp_Attachment_CTor()
2339
+ _whatsapp.IncRef(self.handle)
2340
+ if 0 < len(args):
2341
+ self.MIME = args[0]
2342
+ if "MIME" in kwargs:
2343
+ self.MIME = kwargs["MIME"]
2344
+ if 1 < len(args):
2345
+ self.Filename = args[1]
2093
2346
  if "Filename" in kwargs:
2094
2347
  self.Filename = kwargs["Filename"]
2095
2348
  if 2 < len(args):
@@ -2165,9 +2418,9 @@ class Attachment(go.GoClass):
2165
2418
  """
2166
2419
  return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
2167
2420
 
2168
- # Python type for struct whatsapp.ChatState
2169
- class ChatState(go.GoClass):
2170
- """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"""
2421
+ # Python type for struct whatsapp.Avatar
2422
+ class Avatar(go.GoClass):
2423
+ """A Avatar represents a small image set for a Contact or Group.\n"""
2171
2424
  def __init__(self, *args, **kwargs):
2172
2425
  """
2173
2426
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2181,25 +2434,21 @@ class ChatState(go.GoClass):
2181
2434
  self.handle = args[0].handle
2182
2435
  _whatsapp.IncRef(self.handle)
2183
2436
  else:
2184
- self.handle = _whatsapp.whatsapp_ChatState_CTor()
2437
+ self.handle = _whatsapp.whatsapp_Avatar_CTor()
2185
2438
  _whatsapp.IncRef(self.handle)
2186
2439
  if 0 < len(args):
2187
- self.Kind = args[0]
2188
- if "Kind" in kwargs:
2189
- self.Kind = kwargs["Kind"]
2440
+ self.ID = args[0]
2441
+ if "ID" in kwargs:
2442
+ self.ID = kwargs["ID"]
2190
2443
  if 1 < len(args):
2191
- self.JID = args[1]
2192
- if "JID" in kwargs:
2193
- self.JID = kwargs["JID"]
2194
- if 2 < len(args):
2195
- self.GroupJID = args[2]
2196
- if "GroupJID" in kwargs:
2197
- self.GroupJID = kwargs["GroupJID"]
2444
+ self.URL = args[1]
2445
+ if "URL" in kwargs:
2446
+ self.URL = kwargs["URL"]
2198
2447
  def __del__(self):
2199
2448
  _whatsapp.DecRef(self.handle)
2200
2449
  def __str__(self):
2201
2450
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2202
- sv = 'whatsapp.ChatState{'
2451
+ sv = 'whatsapp.Avatar{'
2203
2452
  first = True
2204
2453
  for v in pr:
2205
2454
  if callable(v[1]):
@@ -2212,42 +2461,33 @@ class ChatState(go.GoClass):
2212
2461
  return sv + '}'
2213
2462
  def __repr__(self):
2214
2463
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2215
- sv = 'whatsapp.ChatState ( '
2464
+ sv = 'whatsapp.Avatar ( '
2216
2465
  for v in pr:
2217
2466
  if not callable(v[1]):
2218
2467
  sv += v[0] + '=' + str(v[1]) + ', '
2219
2468
  return sv + ')'
2220
2469
  @property
2221
- def Kind(self):
2222
- return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
2223
- @Kind.setter
2224
- def Kind(self, value):
2225
- if isinstance(value, go.GoClass):
2226
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
2227
- else:
2228
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
2229
- @property
2230
- def JID(self):
2231
- return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
2232
- @JID.setter
2233
- def JID(self, value):
2470
+ def ID(self):
2471
+ return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
2472
+ @ID.setter
2473
+ def ID(self, value):
2234
2474
  if isinstance(value, go.GoClass):
2235
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
2475
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
2236
2476
  else:
2237
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
2477
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
2238
2478
  @property
2239
- def GroupJID(self):
2240
- return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
2241
- @GroupJID.setter
2242
- def GroupJID(self, value):
2479
+ def URL(self):
2480
+ return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
2481
+ @URL.setter
2482
+ def URL(self, value):
2243
2483
  if isinstance(value, go.GoClass):
2244
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
2484
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
2245
2485
  else:
2246
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
2486
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
2247
2487
 
2248
- # Python type for struct whatsapp.Group
2249
- class Group(go.GoClass):
2250
- """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"""
2488
+ # Python type for struct whatsapp.EventPayload
2489
+ class EventPayload(go.GoClass):
2490
+ """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"""
2251
2491
  def __init__(self, *args, **kwargs):
2252
2492
  """
2253
2493
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2261,33 +2501,53 @@ class Group(go.GoClass):
2261
2501
  self.handle = args[0].handle
2262
2502
  _whatsapp.IncRef(self.handle)
2263
2503
  else:
2264
- self.handle = _whatsapp.whatsapp_Group_CTor()
2504
+ self.handle = _whatsapp.whatsapp_EventPayload_CTor()
2265
2505
  _whatsapp.IncRef(self.handle)
2266
2506
  if 0 < len(args):
2267
- self.JID = args[0]
2268
- if "JID" in kwargs:
2269
- self.JID = kwargs["JID"]
2507
+ self.QRCode = args[0]
2508
+ if "QRCode" in kwargs:
2509
+ self.QRCode = kwargs["QRCode"]
2270
2510
  if 1 < len(args):
2271
- self.Name = args[1]
2272
- if "Name" in kwargs:
2273
- self.Name = kwargs["Name"]
2511
+ self.PairDeviceID = args[1]
2512
+ if "PairDeviceID" in kwargs:
2513
+ self.PairDeviceID = kwargs["PairDeviceID"]
2274
2514
  if 2 < len(args):
2275
- self.Subject = args[2]
2276
- if "Subject" in kwargs:
2277
- self.Subject = kwargs["Subject"]
2515
+ self.Connect = args[2]
2516
+ if "Connect" in kwargs:
2517
+ self.Connect = kwargs["Connect"]
2278
2518
  if 3 < len(args):
2279
- self.Nickname = args[3]
2280
- if "Nickname" in kwargs:
2281
- self.Nickname = kwargs["Nickname"]
2519
+ self.Contact = args[3]
2520
+ if "Contact" in kwargs:
2521
+ self.Contact = kwargs["Contact"]
2282
2522
  if 4 < len(args):
2283
- self.Participants = args[4]
2284
- if "Participants" in kwargs:
2285
- self.Participants = kwargs["Participants"]
2523
+ self.Presence = args[4]
2524
+ if "Presence" in kwargs:
2525
+ self.Presence = kwargs["Presence"]
2526
+ if 5 < len(args):
2527
+ self.Message = args[5]
2528
+ if "Message" in kwargs:
2529
+ self.Message = kwargs["Message"]
2530
+ if 6 < len(args):
2531
+ self.ChatState = args[6]
2532
+ if "ChatState" in kwargs:
2533
+ self.ChatState = kwargs["ChatState"]
2534
+ if 7 < len(args):
2535
+ self.Receipt = args[7]
2536
+ if "Receipt" in kwargs:
2537
+ self.Receipt = kwargs["Receipt"]
2538
+ if 8 < len(args):
2539
+ self.Group = args[8]
2540
+ if "Group" in kwargs:
2541
+ self.Group = kwargs["Group"]
2542
+ if 9 < len(args):
2543
+ self.Call = args[9]
2544
+ if "Call" in kwargs:
2545
+ self.Call = kwargs["Call"]
2286
2546
  def __del__(self):
2287
2547
  _whatsapp.DecRef(self.handle)
2288
2548
  def __str__(self):
2289
2549
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2290
- sv = 'whatsapp.Group{'
2550
+ sv = 'whatsapp.EventPayload{'
2291
2551
  first = True
2292
2552
  for v in pr:
2293
2553
  if callable(v[1]):
@@ -2300,54 +2560,99 @@ class Group(go.GoClass):
2300
2560
  return sv + '}'
2301
2561
  def __repr__(self):
2302
2562
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2303
- sv = 'whatsapp.Group ( '
2563
+ sv = 'whatsapp.EventPayload ( '
2304
2564
  for v in pr:
2305
2565
  if not callable(v[1]):
2306
2566
  sv += v[0] + '=' + str(v[1]) + ', '
2307
2567
  return sv + ')'
2308
2568
  @property
2309
- def JID(self):
2310
- return _whatsapp.whatsapp_Group_JID_Get(self.handle)
2311
- @JID.setter
2312
- def JID(self, value):
2569
+ def QRCode(self):
2570
+ return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
2571
+ @QRCode.setter
2572
+ def QRCode(self, value):
2313
2573
  if isinstance(value, go.GoClass):
2314
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
2574
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
2315
2575
  else:
2316
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
2576
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
2317
2577
  @property
2318
- def Name(self):
2319
- return _whatsapp.whatsapp_Group_Name_Get(self.handle)
2320
- @Name.setter
2321
- def Name(self, value):
2578
+ def PairDeviceID(self):
2579
+ return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
2580
+ @PairDeviceID.setter
2581
+ def PairDeviceID(self, value):
2322
2582
  if isinstance(value, go.GoClass):
2323
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
2583
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
2324
2584
  else:
2325
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
2585
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
2326
2586
  @property
2327
- def Subject(self):
2328
- return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
2329
- @Subject.setter
2330
- def Subject(self, value):
2587
+ def Connect(self):
2588
+ return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
2589
+ @Connect.setter
2590
+ def Connect(self, value):
2331
2591
  if isinstance(value, go.GoClass):
2332
- _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
2592
+ _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
2333
2593
  else:
2334
2594
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2335
2595
  @property
2336
- def Nickname(self):
2337
- return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
2338
- @Nickname.setter
2339
- def Nickname(self, value):
2596
+ def Contact(self):
2597
+ return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
2598
+ @Contact.setter
2599
+ def Contact(self, value):
2340
2600
  if isinstance(value, go.GoClass):
2341
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
2601
+ _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
2342
2602
  else:
2343
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
2603
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2344
2604
  @property
2345
- def Participants(self):
2346
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
2347
- @Participants.setter
2348
- def Participants(self, value):
2605
+ def Presence(self):
2606
+ return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
2607
+ @Presence.setter
2608
+ def Presence(self, value):
2349
2609
  if isinstance(value, go.GoClass):
2350
- _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
2610
+ _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
2611
+ else:
2612
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2613
+ @property
2614
+ def Message(self):
2615
+ return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
2616
+ @Message.setter
2617
+ def Message(self, value):
2618
+ if isinstance(value, go.GoClass):
2619
+ _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
2620
+ else:
2621
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2622
+ @property
2623
+ def ChatState(self):
2624
+ return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
2625
+ @ChatState.setter
2626
+ def ChatState(self, value):
2627
+ if isinstance(value, go.GoClass):
2628
+ _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
2629
+ else:
2630
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2631
+ @property
2632
+ def Receipt(self):
2633
+ return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
2634
+ @Receipt.setter
2635
+ def Receipt(self, value):
2636
+ if isinstance(value, go.GoClass):
2637
+ _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
2638
+ else:
2639
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2640
+ @property
2641
+ def Group(self):
2642
+ return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
2643
+ @Group.setter
2644
+ def Group(self, value):
2645
+ if isinstance(value, go.GoClass):
2646
+ _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
2647
+ else:
2648
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2649
+ @property
2650
+ def Call(self):
2651
+ return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
2652
+ @Call.setter
2653
+ def Call(self, value):
2654
+ if isinstance(value, go.GoClass):
2655
+ _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
2351
2656
  else:
2352
2657
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2353
2658
 
@@ -2485,9 +2790,9 @@ class Location(go.GoClass):
2485
2790
  else:
2486
2791
  _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
2487
2792
 
2488
- # Python type for struct whatsapp.Poll
2489
- class Poll(go.GoClass):
2490
- """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
2793
+ # Python type for struct whatsapp.Receipt
2794
+ class Receipt(go.GoClass):
2795
+ """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"""
2491
2796
  def __init__(self, *args, **kwargs):
2492
2797
  """
2493
2798
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2501,21 +2806,37 @@ class Poll(go.GoClass):
2501
2806
  self.handle = args[0].handle
2502
2807
  _whatsapp.IncRef(self.handle)
2503
2808
  else:
2504
- self.handle = _whatsapp.whatsapp_Poll_CTor()
2809
+ self.handle = _whatsapp.whatsapp_Receipt_CTor()
2505
2810
  _whatsapp.IncRef(self.handle)
2506
2811
  if 0 < len(args):
2507
- self.Title = args[0]
2508
- if "Title" in kwargs:
2509
- self.Title = kwargs["Title"]
2812
+ self.Kind = args[0]
2813
+ if "Kind" in kwargs:
2814
+ self.Kind = kwargs["Kind"]
2510
2815
  if 1 < len(args):
2511
- self.Options = args[1]
2512
- if "Options" in kwargs:
2513
- self.Options = kwargs["Options"]
2816
+ self.MessageIDs = args[1]
2817
+ if "MessageIDs" in kwargs:
2818
+ self.MessageIDs = kwargs["MessageIDs"]
2819
+ if 2 < len(args):
2820
+ self.JID = args[2]
2821
+ if "JID" in kwargs:
2822
+ self.JID = kwargs["JID"]
2823
+ if 3 < len(args):
2824
+ self.GroupJID = args[3]
2825
+ if "GroupJID" in kwargs:
2826
+ self.GroupJID = kwargs["GroupJID"]
2827
+ if 4 < len(args):
2828
+ self.Timestamp = args[4]
2829
+ if "Timestamp" in kwargs:
2830
+ self.Timestamp = kwargs["Timestamp"]
2831
+ if 5 < len(args):
2832
+ self.IsCarbon = args[5]
2833
+ if "IsCarbon" in kwargs:
2834
+ self.IsCarbon = kwargs["IsCarbon"]
2514
2835
  def __del__(self):
2515
2836
  _whatsapp.DecRef(self.handle)
2516
2837
  def __str__(self):
2517
2838
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2518
- sv = 'whatsapp.Poll{'
2839
+ sv = 'whatsapp.Receipt{'
2519
2840
  first = True
2520
2841
  for v in pr:
2521
2842
  if callable(v[1]):
@@ -2528,489 +2849,69 @@ class Poll(go.GoClass):
2528
2849
  return sv + '}'
2529
2850
  def __repr__(self):
2530
2851
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2531
- sv = 'whatsapp.Poll ( '
2852
+ sv = 'whatsapp.Receipt ( '
2532
2853
  for v in pr:
2533
2854
  if not callable(v[1]):
2534
2855
  sv += v[0] + '=' + str(v[1]) + ', '
2535
2856
  return sv + ')'
2536
2857
  @property
2537
- def Title(self):
2538
- return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
2539
- @Title.setter
2540
- def Title(self, value):
2858
+ def Kind(self):
2859
+ return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
2860
+ @Kind.setter
2861
+ def Kind(self, value):
2541
2862
  if isinstance(value, go.GoClass):
2542
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
2863
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
2543
2864
  else:
2544
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
2865
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
2545
2866
  @property
2546
- def Options(self):
2547
- return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2548
- @Options.setter
2549
- def Options(self, value):
2867
+ def MessageIDs(self):
2868
+ return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
2869
+ @MessageIDs.setter
2870
+ def MessageIDs(self, value):
2550
2871
  if isinstance(value, go.GoClass):
2551
- _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
2872
+ _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
2552
2873
  else:
2553
2874
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2554
-
2555
- # Python type for struct whatsapp.Gateway
2556
- class Gateway(go.GoClass):
2557
- """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
2558
- def __init__(self, *args, **kwargs):
2559
- """
2560
- handle=A Go-side object is always initialized with an explicit handle=arg
2561
- otherwise parameters can be unnamed in order of field names or named fields
2562
- in which case a new Go object is constructed first
2563
- """
2564
- if len(kwargs) == 1 and 'handle' in kwargs:
2565
- self.handle = kwargs['handle']
2566
- _whatsapp.IncRef(self.handle)
2567
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2568
- self.handle = args[0].handle
2569
- _whatsapp.IncRef(self.handle)
2570
- else:
2571
- self.handle = _whatsapp.whatsapp_Gateway_CTor()
2572
- _whatsapp.IncRef(self.handle)
2573
- if 0 < len(args):
2574
- self.DBPath = args[0]
2575
- if "DBPath" in kwargs:
2576
- self.DBPath = kwargs["DBPath"]
2577
- if 1 < len(args):
2578
- self.Name = args[1]
2579
- if "Name" in kwargs:
2580
- self.Name = kwargs["Name"]
2581
- if 2 < len(args):
2582
- self.LogLevel = args[2]
2583
- if "LogLevel" in kwargs:
2584
- self.LogLevel = kwargs["LogLevel"]
2585
- if 3 < len(args):
2586
- self.TempDir = args[3]
2587
- if "TempDir" in kwargs:
2588
- self.TempDir = kwargs["TempDir"]
2589
- def __del__(self):
2590
- _whatsapp.DecRef(self.handle)
2591
- def __str__(self):
2592
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2593
- sv = 'whatsapp.Gateway{'
2594
- first = True
2595
- for v in pr:
2596
- if callable(v[1]):
2597
- continue
2598
- if first:
2599
- first = False
2600
- else:
2601
- sv += ', '
2602
- sv += v[0] + '=' + str(v[1])
2603
- return sv + '}'
2604
- def __repr__(self):
2605
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2606
- sv = 'whatsapp.Gateway ( '
2607
- for v in pr:
2608
- if not callable(v[1]):
2609
- sv += v[0] + '=' + str(v[1]) + ', '
2610
- return sv + ')'
2611
- @property
2612
- def DBPath(self):
2613
- return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2614
- @DBPath.setter
2615
- def DBPath(self, value):
2616
- if isinstance(value, go.GoClass):
2617
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
2618
- else:
2619
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
2620
2875
  @property
2621
- def Name(self):
2622
- return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2623
- @Name.setter
2624
- def Name(self, value):
2876
+ def JID(self):
2877
+ return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
2878
+ @JID.setter
2879
+ def JID(self, value):
2625
2880
  if isinstance(value, go.GoClass):
2626
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
2881
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
2627
2882
  else:
2628
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2883
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
2629
2884
  @property
2630
- def LogLevel(self):
2631
- return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2632
- @LogLevel.setter
2633
- def LogLevel(self, value):
2885
+ def GroupJID(self):
2886
+ return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
2887
+ @GroupJID.setter
2888
+ def GroupJID(self, value):
2634
2889
  if isinstance(value, go.GoClass):
2635
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2890
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
2636
2891
  else:
2637
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2892
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
2638
2893
  @property
2639
- def TempDir(self):
2640
- return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2641
- @TempDir.setter
2642
- def TempDir(self, value):
2894
+ def Timestamp(self):
2895
+ return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
2896
+ @Timestamp.setter
2897
+ def Timestamp(self, value):
2643
2898
  if isinstance(value, go.GoClass):
2644
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
2645
- else:
2646
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
2647
- def Init(self):
2648
- """Init() str
2649
-
2650
- Init performs initialization procedures for the Gateway, and is expected to be run before any
2651
- calls to [Gateway.Session].
2652
- """
2653
- return _whatsapp.whatsapp_Gateway_Init(self.handle)
2654
- def NewSession(self, device):
2655
- """NewSession(object device) object
2656
-
2657
- NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
2658
- a valid ID, a pair operation will be required, as described in [Session.Login].
2659
- """
2660
- return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
2661
- def CleanupSession(self, device):
2662
- """CleanupSession(object device) str
2663
-
2664
- CleanupSession will remove all invalid and obsolete references to the given device, and should be
2665
- used when pairing a new device or unregistering from the Gateway.
2666
- """
2667
- return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
2668
-
2669
- # Python type for struct whatsapp.Message
2670
- class Message(go.GoClass):
2671
- """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"""
2672
- def __init__(self, *args, **kwargs):
2673
- """
2674
- handle=A Go-side object is always initialized with an explicit handle=arg
2675
- otherwise parameters can be unnamed in order of field names or named fields
2676
- in which case a new Go object is constructed first
2677
- """
2678
- if len(kwargs) == 1 and 'handle' in kwargs:
2679
- self.handle = kwargs['handle']
2680
- _whatsapp.IncRef(self.handle)
2681
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2682
- self.handle = args[0].handle
2683
- _whatsapp.IncRef(self.handle)
2899
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
2684
2900
  else:
2685
- self.handle = _whatsapp.whatsapp_Message_CTor()
2686
- _whatsapp.IncRef(self.handle)
2687
- if 0 < len(args):
2688
- self.Kind = args[0]
2689
- if "Kind" in kwargs:
2690
- self.Kind = kwargs["Kind"]
2691
- if 1 < len(args):
2692
- self.ID = args[1]
2693
- if "ID" in kwargs:
2694
- self.ID = kwargs["ID"]
2695
- if 2 < len(args):
2696
- self.JID = args[2]
2697
- if "JID" in kwargs:
2698
- self.JID = kwargs["JID"]
2699
- if 3 < len(args):
2700
- self.GroupJID = args[3]
2701
- if "GroupJID" in kwargs:
2702
- self.GroupJID = kwargs["GroupJID"]
2703
- if 4 < len(args):
2704
- self.OriginJID = args[4]
2705
- if "OriginJID" in kwargs:
2706
- self.OriginJID = kwargs["OriginJID"]
2707
- if 5 < len(args):
2708
- self.Body = args[5]
2709
- if "Body" in kwargs:
2710
- self.Body = kwargs["Body"]
2711
- if 6 < len(args):
2712
- self.Timestamp = args[6]
2713
- if "Timestamp" in kwargs:
2714
- self.Timestamp = kwargs["Timestamp"]
2715
- if 7 < len(args):
2716
- self.IsCarbon = args[7]
2717
- if "IsCarbon" in kwargs:
2718
- self.IsCarbon = kwargs["IsCarbon"]
2719
- if 8 < len(args):
2720
- self.IsForwarded = args[8]
2721
- if "IsForwarded" in kwargs:
2722
- self.IsForwarded = kwargs["IsForwarded"]
2723
- if 9 < len(args):
2724
- self.ReplyID = args[9]
2725
- if "ReplyID" in kwargs:
2726
- self.ReplyID = kwargs["ReplyID"]
2727
- if 10 < len(args):
2728
- self.ReplyBody = args[10]
2729
- if "ReplyBody" in kwargs:
2730
- self.ReplyBody = kwargs["ReplyBody"]
2731
- if 11 < len(args):
2732
- self.Attachments = args[11]
2733
- if "Attachments" in kwargs:
2734
- self.Attachments = kwargs["Attachments"]
2735
- if 12 < len(args):
2736
- self.Preview = args[12]
2737
- if "Preview" in kwargs:
2738
- self.Preview = kwargs["Preview"]
2739
- if 13 < len(args):
2740
- self.Location = args[13]
2741
- if "Location" in kwargs:
2742
- self.Location = kwargs["Location"]
2743
- if 14 < len(args):
2744
- self.Poll = args[14]
2745
- if "Poll" in kwargs:
2746
- self.Poll = kwargs["Poll"]
2747
- if 15 < len(args):
2748
- self.Album = args[15]
2749
- if "Album" in kwargs:
2750
- self.Album = kwargs["Album"]
2751
- if 16 < len(args):
2752
- self.MentionJIDs = args[16]
2753
- if "MentionJIDs" in kwargs:
2754
- self.MentionJIDs = kwargs["MentionJIDs"]
2755
- if 17 < len(args):
2756
- self.Receipts = args[17]
2757
- if "Receipts" in kwargs:
2758
- self.Receipts = kwargs["Receipts"]
2759
- if 18 < len(args):
2760
- self.Reactions = args[18]
2761
- if "Reactions" in kwargs:
2762
- self.Reactions = kwargs["Reactions"]
2763
- def __del__(self):
2764
- _whatsapp.DecRef(self.handle)
2765
- def __str__(self):
2766
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2767
- sv = 'whatsapp.Message{'
2768
- first = True
2769
- for v in pr:
2770
- if callable(v[1]):
2771
- continue
2772
- if first:
2773
- first = False
2774
- else:
2775
- sv += ', '
2776
- sv += v[0] + '=' + str(v[1])
2777
- return sv + '}'
2778
- def __repr__(self):
2779
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2780
- sv = 'whatsapp.Message ( '
2781
- for v in pr:
2782
- if not callable(v[1]):
2783
- sv += v[0] + '=' + str(v[1]) + ', '
2784
- return sv + ')'
2785
- @property
2786
- def Kind(self):
2787
- return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
2788
- @Kind.setter
2789
- def Kind(self, value):
2790
- if isinstance(value, go.GoClass):
2791
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
2792
- else:
2793
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
2794
- @property
2795
- def ID(self):
2796
- return _whatsapp.whatsapp_Message_ID_Get(self.handle)
2797
- @ID.setter
2798
- def ID(self, value):
2799
- if isinstance(value, go.GoClass):
2800
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
2801
- else:
2802
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
2803
- @property
2804
- def JID(self):
2805
- return _whatsapp.whatsapp_Message_JID_Get(self.handle)
2806
- @JID.setter
2807
- def JID(self, value):
2808
- if isinstance(value, go.GoClass):
2809
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
2810
- else:
2811
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
2812
- @property
2813
- def GroupJID(self):
2814
- return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
2815
- @GroupJID.setter
2816
- def GroupJID(self, value):
2817
- if isinstance(value, go.GoClass):
2818
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
2819
- else:
2820
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
2821
- @property
2822
- def OriginJID(self):
2823
- return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
2824
- @OriginJID.setter
2825
- def OriginJID(self, value):
2826
- if isinstance(value, go.GoClass):
2827
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
2828
- else:
2829
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
2830
- @property
2831
- def Body(self):
2832
- return _whatsapp.whatsapp_Message_Body_Get(self.handle)
2833
- @Body.setter
2834
- def Body(self, value):
2835
- if isinstance(value, go.GoClass):
2836
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
2837
- else:
2838
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
2839
- @property
2840
- def Timestamp(self):
2841
- return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
2842
- @Timestamp.setter
2843
- def Timestamp(self, value):
2844
- if isinstance(value, go.GoClass):
2845
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
2846
- else:
2847
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
2848
- @property
2849
- def IsCarbon(self):
2850
- return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
2851
- @IsCarbon.setter
2852
- def IsCarbon(self, value):
2853
- if isinstance(value, go.GoClass):
2854
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
2855
- else:
2856
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
2857
- @property
2858
- def IsForwarded(self):
2859
- return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
2860
- @IsForwarded.setter
2861
- def IsForwarded(self, value):
2862
- if isinstance(value, go.GoClass):
2863
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
2864
- else:
2865
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
2866
- @property
2867
- def ReplyID(self):
2868
- return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
2869
- @ReplyID.setter
2870
- def ReplyID(self, value):
2871
- if isinstance(value, go.GoClass):
2872
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
2873
- else:
2874
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
2875
- @property
2876
- def ReplyBody(self):
2877
- return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
2878
- @ReplyBody.setter
2879
- def ReplyBody(self, value):
2880
- if isinstance(value, go.GoClass):
2881
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
2882
- else:
2883
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
2884
- @property
2885
- def Attachments(self):
2886
- return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
2887
- @Attachments.setter
2888
- def Attachments(self, value):
2889
- if isinstance(value, go.GoClass):
2890
- _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
2891
- else:
2892
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2893
- @property
2894
- def Preview(self):
2895
- return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
2896
- @Preview.setter
2897
- def Preview(self, value):
2898
- if isinstance(value, go.GoClass):
2899
- _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
2900
- else:
2901
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2902
- @property
2903
- def Location(self):
2904
- return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
2905
- @Location.setter
2906
- def Location(self, value):
2907
- if isinstance(value, go.GoClass):
2908
- _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
2909
- else:
2910
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2911
- @property
2912
- def Poll(self):
2913
- return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
2914
- @Poll.setter
2915
- def Poll(self, value):
2916
- if isinstance(value, go.GoClass):
2917
- _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
2918
- else:
2919
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2920
- @property
2921
- def Album(self):
2922
- return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
2923
- @Album.setter
2924
- def Album(self, value):
2925
- if isinstance(value, go.GoClass):
2926
- _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
2927
- else:
2928
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2929
- @property
2930
- def MentionJIDs(self):
2931
- return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2932
- @MentionJIDs.setter
2933
- def MentionJIDs(self, value):
2934
- if isinstance(value, go.GoClass):
2935
- _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
2936
- else:
2937
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2938
- @property
2939
- def Receipts(self):
2940
- return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
2941
- @Receipts.setter
2942
- def Receipts(self, value):
2943
- if isinstance(value, go.GoClass):
2944
- _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
2945
- else:
2946
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2947
- @property
2948
- def Reactions(self):
2949
- return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
2950
- @Reactions.setter
2951
- def Reactions(self, value):
2952
- if isinstance(value, go.GoClass):
2953
- _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2954
- else:
2955
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2956
-
2957
- # Python type for struct whatsapp.PollOption
2958
- class PollOption(go.GoClass):
2959
- """A PollOption represents an individual choice within a broader poll.\n"""
2960
- def __init__(self, *args, **kwargs):
2961
- """
2962
- handle=A Go-side object is always initialized with an explicit handle=arg
2963
- otherwise parameters can be unnamed in order of field names or named fields
2964
- in which case a new Go object is constructed first
2965
- """
2966
- if len(kwargs) == 1 and 'handle' in kwargs:
2967
- self.handle = kwargs['handle']
2968
- _whatsapp.IncRef(self.handle)
2969
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2970
- self.handle = args[0].handle
2971
- _whatsapp.IncRef(self.handle)
2972
- else:
2973
- self.handle = _whatsapp.whatsapp_PollOption_CTor()
2974
- _whatsapp.IncRef(self.handle)
2975
- if 0 < len(args):
2976
- self.Title = args[0]
2977
- if "Title" in kwargs:
2978
- self.Title = kwargs["Title"]
2979
- def __del__(self):
2980
- _whatsapp.DecRef(self.handle)
2981
- def __str__(self):
2982
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2983
- sv = 'whatsapp.PollOption{'
2984
- first = True
2985
- for v in pr:
2986
- if callable(v[1]):
2987
- continue
2988
- if first:
2989
- first = False
2990
- else:
2991
- sv += ', '
2992
- sv += v[0] + '=' + str(v[1])
2993
- return sv + '}'
2994
- def __repr__(self):
2995
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2996
- sv = 'whatsapp.PollOption ( '
2997
- for v in pr:
2998
- if not callable(v[1]):
2999
- sv += v[0] + '=' + str(v[1]) + ', '
3000
- return sv + ')'
2901
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
3001
2902
  @property
3002
- def Title(self):
3003
- return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
3004
- @Title.setter
3005
- def Title(self, value):
2903
+ def IsCarbon(self):
2904
+ return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
2905
+ @IsCarbon.setter
2906
+ def IsCarbon(self, value):
3006
2907
  if isinstance(value, go.GoClass):
3007
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
2908
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
3008
2909
  else:
3009
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
2910
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
3010
2911
 
3011
- # Python type for struct whatsapp.Avatar
3012
- class Avatar(go.GoClass):
3013
- """A Avatar represents a small image set for a Contact or Group.\n"""
2912
+ # Python type for struct whatsapp.Gateway
2913
+ class Gateway(go.GoClass):
2914
+ """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
3014
2915
  def __init__(self, *args, **kwargs):
3015
2916
  """
3016
2917
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3024,21 +2925,29 @@ class Avatar(go.GoClass):
3024
2925
  self.handle = args[0].handle
3025
2926
  _whatsapp.IncRef(self.handle)
3026
2927
  else:
3027
- self.handle = _whatsapp.whatsapp_Avatar_CTor()
2928
+ self.handle = _whatsapp.whatsapp_Gateway_CTor()
3028
2929
  _whatsapp.IncRef(self.handle)
3029
2930
  if 0 < len(args):
3030
- self.ID = args[0]
3031
- if "ID" in kwargs:
3032
- self.ID = kwargs["ID"]
2931
+ self.DBPath = args[0]
2932
+ if "DBPath" in kwargs:
2933
+ self.DBPath = kwargs["DBPath"]
3033
2934
  if 1 < len(args):
3034
- self.URL = args[1]
3035
- if "URL" in kwargs:
3036
- self.URL = kwargs["URL"]
2935
+ self.Name = args[1]
2936
+ if "Name" in kwargs:
2937
+ self.Name = kwargs["Name"]
2938
+ if 2 < len(args):
2939
+ self.LogLevel = args[2]
2940
+ if "LogLevel" in kwargs:
2941
+ self.LogLevel = kwargs["LogLevel"]
2942
+ if 3 < len(args):
2943
+ self.TempDir = args[3]
2944
+ if "TempDir" in kwargs:
2945
+ self.TempDir = kwargs["TempDir"]
3037
2946
  def __del__(self):
3038
2947
  _whatsapp.DecRef(self.handle)
3039
2948
  def __str__(self):
3040
2949
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3041
- sv = 'whatsapp.Avatar{'
2950
+ sv = 'whatsapp.Gateway{'
3042
2951
  first = True
3043
2952
  for v in pr:
3044
2953
  if callable(v[1]):
@@ -3051,33 +2960,72 @@ class Avatar(go.GoClass):
3051
2960
  return sv + '}'
3052
2961
  def __repr__(self):
3053
2962
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3054
- sv = 'whatsapp.Avatar ( '
2963
+ sv = 'whatsapp.Gateway ( '
3055
2964
  for v in pr:
3056
2965
  if not callable(v[1]):
3057
2966
  sv += v[0] + '=' + str(v[1]) + ', '
3058
2967
  return sv + ')'
3059
2968
  @property
3060
- def ID(self):
3061
- return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
3062
- @ID.setter
3063
- def ID(self, value):
2969
+ def DBPath(self):
2970
+ return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2971
+ @DBPath.setter
2972
+ def DBPath(self, value):
3064
2973
  if isinstance(value, go.GoClass):
3065
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
2974
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
3066
2975
  else:
3067
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
2976
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
3068
2977
  @property
3069
- def URL(self):
3070
- return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
3071
- @URL.setter
3072
- def URL(self, value):
2978
+ def Name(self):
2979
+ return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2980
+ @Name.setter
2981
+ def Name(self, value):
3073
2982
  if isinstance(value, go.GoClass):
3074
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
2983
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
3075
2984
  else:
3076
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
2985
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2986
+ @property
2987
+ def LogLevel(self):
2988
+ return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2989
+ @LogLevel.setter
2990
+ def LogLevel(self, value):
2991
+ if isinstance(value, go.GoClass):
2992
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2993
+ else:
2994
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2995
+ @property
2996
+ def TempDir(self):
2997
+ return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2998
+ @TempDir.setter
2999
+ def TempDir(self, value):
3000
+ if isinstance(value, go.GoClass):
3001
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
3002
+ else:
3003
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
3004
+ def Init(self):
3005
+ """Init() str
3006
+
3007
+ Init performs initialization procedures for the Gateway, and is expected to be run before any
3008
+ calls to [Gateway.Session].
3009
+ """
3010
+ return _whatsapp.whatsapp_Gateway_Init(self.handle)
3011
+ def NewSession(self, device):
3012
+ """NewSession(object device) object
3013
+
3014
+ NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
3015
+ a valid ID, a pair operation will be required, as described in [Session.Login].
3016
+ """
3017
+ return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
3018
+ def CleanupSession(self, device):
3019
+ """CleanupSession(object device) str
3020
+
3021
+ CleanupSession will remove all invalid and obsolete references to the given device, and should be
3022
+ used when pairing a new device or unregistering from the Gateway.
3023
+ """
3024
+ return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
3077
3025
 
3078
- # Python type for struct whatsapp.Connect
3079
- class Connect(go.GoClass):
3080
- """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
3026
+ # Python type for struct whatsapp.GroupSubject
3027
+ class GroupSubject(go.GoClass):
3028
+ """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
3081
3029
  def __init__(self, *args, **kwargs):
3082
3030
  """
3083
3031
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3091,21 +3039,25 @@ class Connect(go.GoClass):
3091
3039
  self.handle = args[0].handle
3092
3040
  _whatsapp.IncRef(self.handle)
3093
3041
  else:
3094
- self.handle = _whatsapp.whatsapp_Connect_CTor()
3042
+ self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
3095
3043
  _whatsapp.IncRef(self.handle)
3096
3044
  if 0 < len(args):
3097
- self.JID = args[0]
3098
- if "JID" in kwargs:
3099
- self.JID = kwargs["JID"]
3045
+ self.Subject = args[0]
3046
+ if "Subject" in kwargs:
3047
+ self.Subject = kwargs["Subject"]
3100
3048
  if 1 < len(args):
3101
- self.Error = args[1]
3102
- if "Error" in kwargs:
3103
- self.Error = kwargs["Error"]
3049
+ self.SetAt = args[1]
3050
+ if "SetAt" in kwargs:
3051
+ self.SetAt = kwargs["SetAt"]
3052
+ if 2 < len(args):
3053
+ self.SetByJID = args[2]
3054
+ if "SetByJID" in kwargs:
3055
+ self.SetByJID = kwargs["SetByJID"]
3104
3056
  def __del__(self):
3105
3057
  _whatsapp.DecRef(self.handle)
3106
3058
  def __str__(self):
3107
3059
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3108
- sv = 'whatsapp.Connect{'
3060
+ sv = 'whatsapp.GroupSubject{'
3109
3061
  first = True
3110
3062
  for v in pr:
3111
3063
  if callable(v[1]):
@@ -3118,33 +3070,42 @@ class Connect(go.GoClass):
3118
3070
  return sv + '}'
3119
3071
  def __repr__(self):
3120
3072
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3121
- sv = 'whatsapp.Connect ( '
3073
+ sv = 'whatsapp.GroupSubject ( '
3122
3074
  for v in pr:
3123
3075
  if not callable(v[1]):
3124
3076
  sv += v[0] + '=' + str(v[1]) + ', '
3125
3077
  return sv + ')'
3126
3078
  @property
3127
- def JID(self):
3128
- return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
3129
- @JID.setter
3130
- def JID(self, value):
3079
+ def Subject(self):
3080
+ return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
3081
+ @Subject.setter
3082
+ def Subject(self, value):
3131
3083
  if isinstance(value, go.GoClass):
3132
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
3084
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
3133
3085
  else:
3134
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
3086
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
3135
3087
  @property
3136
- def Error(self):
3137
- return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
3138
- @Error.setter
3139
- def Error(self, value):
3088
+ def SetAt(self):
3089
+ return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
3090
+ @SetAt.setter
3091
+ def SetAt(self, value):
3140
3092
  if isinstance(value, go.GoClass):
3141
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
3093
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
3142
3094
  else:
3143
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
3095
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
3096
+ @property
3097
+ def SetByJID(self):
3098
+ return _whatsapp.whatsapp_GroupSubject_SetByJID_Get(self.handle)
3099
+ @SetByJID.setter
3100
+ def SetByJID(self, value):
3101
+ if isinstance(value, go.GoClass):
3102
+ _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value.handle)
3103
+ else:
3104
+ _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
3144
3105
 
3145
- # Python type for struct whatsapp.Contact
3146
- class Contact(go.GoClass):
3147
- """A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
3106
+ # Python type for struct whatsapp.Preview
3107
+ class Preview(go.GoClass):
3108
+ """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"""
3148
3109
  def __init__(self, *args, **kwargs):
3149
3110
  """
3150
3111
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3158,21 +3119,33 @@ class Contact(go.GoClass):
3158
3119
  self.handle = args[0].handle
3159
3120
  _whatsapp.IncRef(self.handle)
3160
3121
  else:
3161
- self.handle = _whatsapp.whatsapp_Contact_CTor()
3122
+ self.handle = _whatsapp.whatsapp_Preview_CTor()
3162
3123
  _whatsapp.IncRef(self.handle)
3163
3124
  if 0 < len(args):
3164
- self.JID = args[0]
3165
- if "JID" in kwargs:
3166
- self.JID = kwargs["JID"]
3125
+ self.Kind = args[0]
3126
+ if "Kind" in kwargs:
3127
+ self.Kind = kwargs["Kind"]
3167
3128
  if 1 < len(args):
3168
- self.Name = args[1]
3169
- if "Name" in kwargs:
3170
- self.Name = kwargs["Name"]
3129
+ self.URL = args[1]
3130
+ if "URL" in kwargs:
3131
+ self.URL = kwargs["URL"]
3132
+ if 2 < len(args):
3133
+ self.Title = args[2]
3134
+ if "Title" in kwargs:
3135
+ self.Title = kwargs["Title"]
3136
+ if 3 < len(args):
3137
+ self.Description = args[3]
3138
+ if "Description" in kwargs:
3139
+ self.Description = kwargs["Description"]
3140
+ if 4 < len(args):
3141
+ self.Thumbnail = args[4]
3142
+ if "Thumbnail" in kwargs:
3143
+ self.Thumbnail = kwargs["Thumbnail"]
3171
3144
  def __del__(self):
3172
3145
  _whatsapp.DecRef(self.handle)
3173
3146
  def __str__(self):
3174
3147
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3175
- sv = 'whatsapp.Contact{'
3148
+ sv = 'whatsapp.Preview{'
3176
3149
  first = True
3177
3150
  for v in pr:
3178
3151
  if callable(v[1]):
@@ -3185,29 +3158,56 @@ class Contact(go.GoClass):
3185
3158
  return sv + '}'
3186
3159
  def __repr__(self):
3187
3160
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3188
- sv = 'whatsapp.Contact ( '
3161
+ sv = 'whatsapp.Preview ( '
3189
3162
  for v in pr:
3190
3163
  if not callable(v[1]):
3191
3164
  sv += v[0] + '=' + str(v[1]) + ', '
3192
3165
  return sv + ')'
3193
3166
  @property
3194
- def JID(self):
3195
- return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
3196
- @JID.setter
3197
- def JID(self, value):
3167
+ def Kind(self):
3168
+ return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
3169
+ @Kind.setter
3170
+ def Kind(self, value):
3198
3171
  if isinstance(value, go.GoClass):
3199
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
3172
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
3200
3173
  else:
3201
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
3174
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
3202
3175
  @property
3203
- def Name(self):
3204
- return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
3205
- @Name.setter
3206
- def Name(self, value):
3176
+ def URL(self):
3177
+ return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
3178
+ @URL.setter
3179
+ def URL(self, value):
3207
3180
  if isinstance(value, go.GoClass):
3208
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
3181
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
3209
3182
  else:
3210
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
3183
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
3184
+ @property
3185
+ def Title(self):
3186
+ return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
3187
+ @Title.setter
3188
+ def Title(self, value):
3189
+ if isinstance(value, go.GoClass):
3190
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
3191
+ else:
3192
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
3193
+ @property
3194
+ def Description(self):
3195
+ return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
3196
+ @Description.setter
3197
+ def Description(self, value):
3198
+ if isinstance(value, go.GoClass):
3199
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
3200
+ else:
3201
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
3202
+ @property
3203
+ def Thumbnail(self):
3204
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
3205
+ @Thumbnail.setter
3206
+ def Thumbnail(self, value):
3207
+ if isinstance(value, go.GoClass):
3208
+ _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
3209
+ else:
3210
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3211
3211
 
3212
3212
 
3213
3213
  # ---- Slices ---