slidge-whatsapp 0.3.0b0__cp311-cp311-manylinux_2_36_aarch64.whl → 0.3.4__cp311-cp311-manylinux_2_36_aarch64.whl

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

Potentially problematic release.


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

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