slidge-whatsapp 0.2.7__cp313-cp313-manylinux_2_36_aarch64.whl → 0.3.0b0__cp313-cp313-manylinux_2_36_aarch64.whl

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

Potentially problematic release.


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

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