slidge-whatsapp 0.2.5__cp313-cp313-manylinux_2_36_aarch64.whl → 0.2.6__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 (320) hide show
  1. slidge_whatsapp/config.py +3 -0
  2. slidge_whatsapp/event.go +23 -24
  3. slidge_whatsapp/gateway.go +13 -9
  4. slidge_whatsapp/gateway.py +2 -2
  5. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.h +181 -181
  6. slidge_whatsapp/generated/_whatsapp.cpython-313-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +155 -155
  8. slidge_whatsapp/generated/whatsapp.c +1507 -1507
  9. slidge_whatsapp/generated/whatsapp.go +907 -907
  10. slidge_whatsapp/generated/whatsapp.py +1318 -1318
  11. slidge_whatsapp/generated/whatsapp_go.h +181 -181
  12. slidge_whatsapp/go.mod +15 -12
  13. slidge_whatsapp/go.sum +41 -29
  14. slidge_whatsapp/media/media.go +16 -10
  15. slidge_whatsapp/session.go +73 -66
  16. slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn.go +4 -4
  17. slidge_whatsapp/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +0 -5
  18. slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +3 -0
  19. slidge_whatsapp/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +40 -20
  20. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +14 -1
  21. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +2 -2
  22. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/fun.go +10 -2
  23. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib.go +1 -1
  24. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_unix.go +1 -1
  25. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/lib_windows.go +1 -1
  26. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -7
  27. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/callback.go +2 -1
  28. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +8510 -5090
  29. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +344 -150
  30. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3.go +57 -23
  31. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.c +4 -0
  32. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_unlock_notify.go +4 -0
  33. slidge_whatsapp/vendor/github.com/petermattis/goid/.gitignore +4 -0
  34. slidge_whatsapp/vendor/github.com/petermattis/goid/LICENSE +202 -0
  35. slidge_whatsapp/vendor/github.com/petermattis/goid/README.md +4 -0
  36. slidge_whatsapp/vendor/github.com/petermattis/goid/goid.go +35 -0
  37. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_gccgo.go +26 -0
  38. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.c +23 -0
  39. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.3.go +22 -0
  40. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.go +35 -0
  41. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.4.s +18 -0
  42. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.go +28 -0
  43. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_go1.5.s +44 -0
  44. slidge_whatsapp/vendor/github.com/petermattis/goid/goid_slow.go +24 -0
  45. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go +17 -0
  46. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +38 -0
  47. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.5.go +57 -0
  48. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.6.go +43 -0
  49. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.9.go +37 -0
  50. slidge_whatsapp/vendor/github.com/rs/zerolog/CONTRIBUTING.md +43 -0
  51. slidge_whatsapp/vendor/github.com/rs/zerolog/README.md +31 -0
  52. slidge_whatsapp/vendor/github.com/rs/zerolog/console.go +20 -5
  53. slidge_whatsapp/vendor/github.com/rs/zerolog/log/log.go +131 -0
  54. slidge_whatsapp/vendor/github.com/rs/zerolog/log.go +1 -1
  55. slidge_whatsapp/vendor/github.com/rs/zerolog/sampler.go +4 -1
  56. slidge_whatsapp/vendor/github.com/rs/zerolog/writer.go +9 -0
  57. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupCipher.go +17 -6
  58. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/GroupSessionBuilder.go +17 -7
  59. slidge_whatsapp/vendor/go.mau.fi/libsignal/groups/state/store/SenderKeyStore.go +4 -2
  60. slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/chain/ChainKey.go +1 -0
  61. slidge_whatsapp/vendor/go.mau.fi/libsignal/keys/identity/IdentityKey.go +1 -0
  62. slidge_whatsapp/vendor/go.mau.fi/libsignal/logger/DefaultLogger.go +2 -2
  63. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/FingerprintProtocol.pb.go +3 -2
  64. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/LocalStorageProtocol.pb.go +3 -2
  65. slidge_whatsapp/vendor/go.mau.fi/libsignal/serialize/WhisperTextProtocol.pb.go +3 -2
  66. slidge_whatsapp/vendor/go.mau.fi/libsignal/session/Session.go +41 -17
  67. slidge_whatsapp/vendor/go.mau.fi/libsignal/session/SessionCipher.go +64 -30
  68. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/IdentityKeyStore.go +5 -3
  69. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/MessageKeyStore.go +6 -4
  70. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/PreKeyStore.go +6 -4
  71. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SessionStore.go +8 -6
  72. slidge_whatsapp/vendor/go.mau.fi/libsignal/state/store/SignedPreKeyStore.go +7 -5
  73. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/connlog.go +257 -0
  74. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/database.go +309 -0
  75. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/iter.go +233 -0
  76. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/json.go +47 -0
  77. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/log.go +129 -0
  78. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/massinsert.go +164 -0
  79. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/queryhelper.go +137 -0
  80. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/reflectscan.go +30 -0
  81. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/transaction.go +180 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgrades.go +250 -0
  83. slidge_whatsapp/vendor/go.mau.fi/util/dbutil/upgradetable.go +331 -0
  84. slidge_whatsapp/vendor/go.mau.fi/util/exerrors/dualerror.go +33 -0
  85. slidge_whatsapp/vendor/go.mau.fi/util/exerrors/must.go +23 -0
  86. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/cors.go +32 -0
  87. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +64 -0
  88. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/json.go +41 -0
  89. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/middleware.go +30 -0
  90. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +37 -0
  91. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +88 -0
  92. slidge_whatsapp/vendor/go.mau.fi/util/exsync/returnonce.go +25 -0
  93. slidge_whatsapp/vendor/go.mau.fi/util/exsync/ringbuffer.go +139 -0
  94. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncmap.go +94 -0
  95. slidge_whatsapp/vendor/go.mau.fi/util/exsync/syncset.go +136 -0
  96. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/callermarshal.go +28 -0
  97. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/defaults.go +32 -0
  98. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/generics.go +45 -0
  99. slidge_whatsapp/vendor/go.mau.fi/util/exzerolog/writer.go +81 -0
  100. slidge_whatsapp/vendor/go.mau.fi/util/ptr/ptr.go +43 -0
  101. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +27 -26
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/encode.go +4 -3
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/keys.go +5 -4
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +27 -25
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +3 -2
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/broadcast.go +5 -4
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +60 -15
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +25 -9
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download-to-file.go +45 -19
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +52 -28
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +1 -0
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +59 -29
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +166 -146
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/keepalive.go +2 -2
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaconn.go +5 -3
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/mediaretry.go +2 -1
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +270 -111
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +118 -31
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +67 -36
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +7 -4
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair.go +42 -18
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/prekeys.go +9 -5
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +2 -1
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/privacysettings.go +10 -11
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.go +39 -9
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.go +354 -175
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.proto +5 -5
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.go +158 -15
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.proto +1 -0
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.go +29 -9
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.go +13 -9
  132. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.go +344 -31
  133. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.proto +26 -0
  134. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.pb.go → WACompanionReg.pb.go} +170 -84
  135. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/{WAWebProtobufsCompanionReg.proto → WACompanionReg.proto} +1 -1
  136. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.go +173 -9
  137. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.go +78 -16
  138. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.proto +5 -0
  139. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +6747 -2230
  140. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +294 -43
  141. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +456 -135
  142. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +14 -0
  143. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.go +162 -9
  144. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.proto +1 -0
  145. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.go +32 -9
  146. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.proto +1 -0
  147. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.go +192 -52
  148. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.proto +8 -0
  149. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.go +60 -9
  150. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.go +39 -9
  151. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.go +61 -9
  152. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +1051 -382
  153. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +32 -0
  154. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.go +27 -9
  155. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.go +59 -9
  156. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +382 -78
  157. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +8 -0
  158. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.go +555 -9
  159. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.proto +2 -0
  160. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +13 -3
  161. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/retry.go +29 -19
  162. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +244 -73
  163. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/sendfb.go +27 -16
  164. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +3 -1
  165. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +85 -43
  166. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/signal.go +75 -88
  167. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/container.go +79 -61
  168. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/lidmap.go +186 -0
  169. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +291 -167
  170. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/00-latest-schema.sql +153 -0
  171. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/03-message-secrets.sql +11 -0
  172. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/04-privacy-tokens.sql +8 -0
  173. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/05-account-jid-format.sql +2 -0
  174. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/06-facebook-uuid.sql +2 -0
  175. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/07-account-lid.sql +2 -0
  176. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/08-lid-mapping.sql +5 -0
  177. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/09-decryption-buffer.sql +10 -0
  178. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrades/upgrades.go +22 -0
  179. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +105 -56
  180. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/botmap.go +210 -0
  181. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +8 -0
  182. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/group.go +15 -6
  183. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +7 -8
  184. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/message.go +17 -0
  185. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/update.go +3 -2
  186. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/upload.go +1 -1
  187. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +45 -29
  188. slidge_whatsapp/vendor/golang.org/x/exp/LICENSE +27 -0
  189. slidge_whatsapp/vendor/golang.org/x/exp/PATENTS +22 -0
  190. slidge_whatsapp/vendor/golang.org/x/exp/constraints/constraints.go +54 -0
  191. slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/guts.go +50 -0
  192. slidge_whatsapp/vendor/golang.org/x/net/http/httpguts/httplex.go +347 -0
  193. slidge_whatsapp/vendor/golang.org/x/net/http2/.gitignore +2 -0
  194. slidge_whatsapp/vendor/golang.org/x/net/http2/ascii.go +53 -0
  195. slidge_whatsapp/vendor/golang.org/x/net/http2/ciphers.go +641 -0
  196. slidge_whatsapp/vendor/golang.org/x/net/http2/client_conn_pool.go +311 -0
  197. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +122 -0
  198. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +61 -0
  199. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +16 -0
  200. slidge_whatsapp/vendor/golang.org/x/net/http2/databuffer.go +149 -0
  201. slidge_whatsapp/vendor/golang.org/x/net/http2/errors.go +145 -0
  202. slidge_whatsapp/vendor/golang.org/x/net/http2/flow.go +120 -0
  203. slidge_whatsapp/vendor/golang.org/x/net/http2/frame.go +1702 -0
  204. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +170 -0
  205. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/encode.go +245 -0
  206. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/hpack.go +523 -0
  207. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/huffman.go +226 -0
  208. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/static_table.go +188 -0
  209. slidge_whatsapp/vendor/golang.org/x/net/http2/hpack/tables.go +403 -0
  210. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +432 -0
  211. slidge_whatsapp/vendor/golang.org/x/net/http2/pipe.go +184 -0
  212. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +3350 -0
  213. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +20 -0
  214. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +3287 -0
  215. slidge_whatsapp/vendor/golang.org/x/net/http2/unencrypted.go +32 -0
  216. slidge_whatsapp/vendor/golang.org/x/net/http2/write.go +381 -0
  217. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched.go +251 -0
  218. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_priority.go +451 -0
  219. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_random.go +77 -0
  220. slidge_whatsapp/vendor/golang.org/x/net/http2/writesched_roundrobin.go +119 -0
  221. slidge_whatsapp/vendor/golang.org/x/net/idna/go118.go +13 -0
  222. slidge_whatsapp/vendor/golang.org/x/net/idna/idna10.0.0.go +769 -0
  223. slidge_whatsapp/vendor/golang.org/x/net/idna/idna9.0.0.go +717 -0
  224. slidge_whatsapp/vendor/golang.org/x/net/idna/pre_go118.go +11 -0
  225. slidge_whatsapp/vendor/golang.org/x/net/idna/punycode.go +217 -0
  226. slidge_whatsapp/vendor/golang.org/x/net/idna/tables10.0.0.go +4559 -0
  227. slidge_whatsapp/vendor/golang.org/x/net/idna/tables11.0.0.go +4653 -0
  228. slidge_whatsapp/vendor/golang.org/x/net/idna/tables12.0.0.go +4733 -0
  229. slidge_whatsapp/vendor/golang.org/x/net/idna/tables13.0.0.go +4959 -0
  230. slidge_whatsapp/vendor/golang.org/x/net/idna/tables15.0.0.go +5144 -0
  231. slidge_whatsapp/vendor/golang.org/x/net/idna/tables9.0.0.go +4486 -0
  232. slidge_whatsapp/vendor/golang.org/x/net/idna/trie.go +51 -0
  233. slidge_whatsapp/vendor/golang.org/x/net/idna/trie12.0.0.go +30 -0
  234. slidge_whatsapp/vendor/golang.org/x/net/idna/trie13.0.0.go +30 -0
  235. slidge_whatsapp/vendor/golang.org/x/net/idna/trieval.go +119 -0
  236. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
  237. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
  238. slidge_whatsapp/vendor/golang.org/x/net/internal/httpcommon/request.go +467 -0
  239. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +148 -1
  240. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_linux.go +16 -26
  241. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +84 -0
  242. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +20 -0
  243. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +84 -0
  244. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +20 -0
  245. slidge_whatsapp/vendor/golang.org/x/sys/windows/security_windows.go +44 -5
  246. slidge_whatsapp/vendor/golang.org/x/sys/windows/syscall_windows.go +4 -2
  247. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +239 -0
  248. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +9 -0
  249. slidge_whatsapp/vendor/golang.org/x/text/LICENSE +27 -0
  250. slidge_whatsapp/vendor/golang.org/x/text/PATENTS +22 -0
  251. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule.go +336 -0
  252. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +11 -0
  253. slidge_whatsapp/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +14 -0
  254. slidge_whatsapp/vendor/golang.org/x/text/transform/transform.go +709 -0
  255. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bidi.go +359 -0
  256. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/bracket.go +335 -0
  257. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/core.go +1071 -0
  258. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/prop.go +206 -0
  259. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +1815 -0
  260. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +1887 -0
  261. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +1923 -0
  262. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +1955 -0
  263. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +2042 -0
  264. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +1781 -0
  265. slidge_whatsapp/vendor/golang.org/x/text/unicode/bidi/trieval.go +48 -0
  266. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/composition.go +512 -0
  267. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/forminfo.go +279 -0
  268. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/input.go +109 -0
  269. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/iter.go +458 -0
  270. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/normalize.go +610 -0
  271. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/readwriter.go +125 -0
  272. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +7657 -0
  273. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +7693 -0
  274. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +7710 -0
  275. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables13.0.0.go +7760 -0
  276. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +7907 -0
  277. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +7637 -0
  278. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/transform.go +88 -0
  279. slidge_whatsapp/vendor/golang.org/x/text/unicode/norm/trie.go +54 -0
  280. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  281. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +3 -0
  282. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +16 -0
  283. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/{strings_unsafe_go121.go → strings_unsafe.go} +0 -2
  284. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  285. slidge_whatsapp/vendor/google.golang.org/protobuf/proto/merge.go +6 -0
  286. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +2 -0
  287. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/{value_unsafe_go121.go → value_unsafe.go} +0 -2
  288. slidge_whatsapp/vendor/modules.txt +38 -13
  289. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/METADATA +1 -1
  290. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/RECORD +293 -180
  291. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/WHEEL +1 -1
  292. slidge_whatsapp/vendor/github.com/rs/zerolog/CNAME +0 -1
  293. slidge_whatsapp/vendor/github.com/rs/zerolog/_config.yml +0 -1
  294. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waAdv/WAAdv.pb.raw +0 -0
  295. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloApplication/WAArmadilloApplication.pb.raw +0 -0
  296. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waArmadilloXMA/WAArmadilloXMA.pb.raw +0 -0
  297. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCert/WACert.pb.raw +0 -23
  298. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waChatLockSettings/WAProtobufsChatLockSettings.pb.raw +0 -7
  299. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCommon/WACommon.pb.raw +0 -0
  300. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WAWebProtobufsCompanionReg.pb.raw +0 -0
  301. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waConsumerApplication/WAConsumerApplication.pb.raw +0 -0
  302. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waDeviceCapabilities/WAProtobufsDeviceCapabilities.pb.raw +0 -0
  303. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.raw +0 -0
  304. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.raw +0 -0
  305. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMediaTransport/WAMediaTransport.pb.raw +0 -0
  306. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMmsRetry/WAMmsRetry.pb.raw +0 -0
  307. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgApplication/WAMsgApplication.pb.raw +0 -0
  308. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMsgTransport/WAMsgTransport.pb.raw +0 -0
  309. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waMultiDevice/WAMultiDevice.pb.raw +0 -0
  310. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waServerSync/WAServerSync.pb.raw +0 -0
  311. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.raw +0 -0
  312. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waUserPassword/WAProtobufsUserPassword.pb.raw +0 -0
  313. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waVnameCert/WAWebProtobufsVnameCert.pb.raw +0 -0
  314. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.raw +0 -0
  315. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWeb/WAWebProtobufsWeb.pb.raw +0 -0
  316. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/upgrade.go +0 -296
  317. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe_go120.go +0 -94
  318. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +0 -98
  319. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.dist-info}/LICENSE +0 -0
  320. {slidge_whatsapp-0.2.5.dist-info → slidge_whatsapp-0.2.6.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.Avatar
1017
- class Avatar(go.GoClass):
1018
- """A Avatar represents a small image set for a Contact or Group.\n"""
1016
+ # Python type for struct whatsapp.Presence
1017
+ class Presence(go.GoClass):
1018
+ """Precence represents a contact's general state of activity, and is periodically updated as\ncontacts start or stop paying attention to their client of choice.\n"""
1019
1019
  def __init__(self, *args, **kwargs):
1020
1020
  """
1021
1021
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1029,21 +1029,25 @@ class Avatar(go.GoClass):
1029
1029
  self.handle = args[0].handle
1030
1030
  _whatsapp.IncRef(self.handle)
1031
1031
  else:
1032
- self.handle = _whatsapp.whatsapp_Avatar_CTor()
1032
+ self.handle = _whatsapp.whatsapp_Presence_CTor()
1033
1033
  _whatsapp.IncRef(self.handle)
1034
1034
  if 0 < len(args):
1035
- self.ID = args[0]
1036
- if "ID" in kwargs:
1037
- self.ID = kwargs["ID"]
1035
+ self.JID = args[0]
1036
+ if "JID" in kwargs:
1037
+ self.JID = kwargs["JID"]
1038
1038
  if 1 < len(args):
1039
- self.URL = args[1]
1040
- if "URL" in kwargs:
1041
- self.URL = kwargs["URL"]
1039
+ self.Kind = args[1]
1040
+ if "Kind" in kwargs:
1041
+ self.Kind = kwargs["Kind"]
1042
+ if 2 < len(args):
1043
+ self.LastSeen = args[2]
1044
+ if "LastSeen" in kwargs:
1045
+ self.LastSeen = kwargs["LastSeen"]
1042
1046
  def __del__(self):
1043
1047
  _whatsapp.DecRef(self.handle)
1044
1048
  def __str__(self):
1045
1049
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1046
- sv = 'whatsapp.Avatar{'
1050
+ sv = 'whatsapp.Presence{'
1047
1051
  first = True
1048
1052
  for v in pr:
1049
1053
  if callable(v[1]):
@@ -1056,33 +1060,42 @@ class Avatar(go.GoClass):
1056
1060
  return sv + '}'
1057
1061
  def __repr__(self):
1058
1062
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1059
- sv = 'whatsapp.Avatar ( '
1063
+ sv = 'whatsapp.Presence ( '
1060
1064
  for v in pr:
1061
1065
  if not callable(v[1]):
1062
1066
  sv += v[0] + '=' + str(v[1]) + ', '
1063
1067
  return sv + ')'
1064
1068
  @property
1065
- def ID(self):
1066
- return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
1067
- @ID.setter
1068
- def ID(self, value):
1069
+ def JID(self):
1070
+ return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
1071
+ @JID.setter
1072
+ def JID(self, value):
1069
1073
  if isinstance(value, go.GoClass):
1070
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
1074
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
1071
1075
  else:
1072
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
1076
+ _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
1073
1077
  @property
1074
- def URL(self):
1075
- return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
1076
- @URL.setter
1077
- def URL(self, value):
1078
+ def Kind(self):
1079
+ return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
1080
+ @Kind.setter
1081
+ def Kind(self, value):
1078
1082
  if isinstance(value, go.GoClass):
1079
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
1083
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
1080
1084
  else:
1081
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
1085
+ _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
1086
+ @property
1087
+ def LastSeen(self):
1088
+ return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
1089
+ @LastSeen.setter
1090
+ def LastSeen(self, value):
1091
+ if isinstance(value, go.GoClass):
1092
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
1093
+ else:
1094
+ _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
1082
1095
 
1083
- # Python type for struct whatsapp.Call
1084
- class Call(go.GoClass):
1085
- """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"""
1096
+ # Python type for struct whatsapp.Receipt
1097
+ class Receipt(go.GoClass):
1098
+ """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
1086
1099
  def __init__(self, *args, **kwargs):
1087
1100
  """
1088
1101
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1096,25 +1109,37 @@ class Call(go.GoClass):
1096
1109
  self.handle = args[0].handle
1097
1110
  _whatsapp.IncRef(self.handle)
1098
1111
  else:
1099
- self.handle = _whatsapp.whatsapp_Call_CTor()
1112
+ self.handle = _whatsapp.whatsapp_Receipt_CTor()
1100
1113
  _whatsapp.IncRef(self.handle)
1101
1114
  if 0 < len(args):
1102
- self.State = args[0]
1103
- if "State" in kwargs:
1104
- self.State = kwargs["State"]
1115
+ self.Kind = args[0]
1116
+ if "Kind" in kwargs:
1117
+ self.Kind = kwargs["Kind"]
1105
1118
  if 1 < len(args):
1106
- self.JID = args[1]
1119
+ self.MessageIDs = args[1]
1120
+ if "MessageIDs" in kwargs:
1121
+ self.MessageIDs = kwargs["MessageIDs"]
1122
+ if 2 < len(args):
1123
+ self.JID = args[2]
1107
1124
  if "JID" in kwargs:
1108
1125
  self.JID = kwargs["JID"]
1109
- if 2 < len(args):
1110
- self.Timestamp = args[2]
1126
+ if 3 < len(args):
1127
+ self.GroupJID = args[3]
1128
+ if "GroupJID" in kwargs:
1129
+ self.GroupJID = kwargs["GroupJID"]
1130
+ if 4 < len(args):
1131
+ self.Timestamp = args[4]
1111
1132
  if "Timestamp" in kwargs:
1112
1133
  self.Timestamp = kwargs["Timestamp"]
1134
+ if 5 < len(args):
1135
+ self.IsCarbon = args[5]
1136
+ if "IsCarbon" in kwargs:
1137
+ self.IsCarbon = kwargs["IsCarbon"]
1113
1138
  def __del__(self):
1114
1139
  _whatsapp.DecRef(self.handle)
1115
1140
  def __str__(self):
1116
1141
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1117
- sv = 'whatsapp.Call{'
1142
+ sv = 'whatsapp.Receipt{'
1118
1143
  first = True
1119
1144
  for v in pr:
1120
1145
  if callable(v[1]):
@@ -1127,42 +1152,69 @@ class Call(go.GoClass):
1127
1152
  return sv + '}'
1128
1153
  def __repr__(self):
1129
1154
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1130
- sv = 'whatsapp.Call ( '
1155
+ sv = 'whatsapp.Receipt ( '
1131
1156
  for v in pr:
1132
1157
  if not callable(v[1]):
1133
1158
  sv += v[0] + '=' + str(v[1]) + ', '
1134
1159
  return sv + ')'
1135
1160
  @property
1136
- def State(self):
1137
- return _whatsapp.whatsapp_Call_State_Get(self.handle)
1138
- @State.setter
1139
- def State(self, value):
1161
+ def Kind(self):
1162
+ return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
1163
+ @Kind.setter
1164
+ def Kind(self, value):
1140
1165
  if isinstance(value, go.GoClass):
1141
- _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
1166
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
1142
1167
  else:
1143
- _whatsapp.whatsapp_Call_State_Set(self.handle, value)
1168
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
1169
+ @property
1170
+ def MessageIDs(self):
1171
+ return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
1172
+ @MessageIDs.setter
1173
+ def MessageIDs(self, value):
1174
+ if isinstance(value, go.GoClass):
1175
+ _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
1176
+ else:
1177
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1144
1178
  @property
1145
1179
  def JID(self):
1146
- return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1180
+ return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
1147
1181
  @JID.setter
1148
1182
  def JID(self, value):
1149
1183
  if isinstance(value, go.GoClass):
1150
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1184
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
1151
1185
  else:
1152
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1186
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
1187
+ @property
1188
+ def GroupJID(self):
1189
+ return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
1190
+ @GroupJID.setter
1191
+ def GroupJID(self, value):
1192
+ if isinstance(value, go.GoClass):
1193
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
1194
+ else:
1195
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
1153
1196
  @property
1154
1197
  def Timestamp(self):
1155
- return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
1198
+ return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
1156
1199
  @Timestamp.setter
1157
1200
  def Timestamp(self, value):
1158
1201
  if isinstance(value, go.GoClass):
1159
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1202
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
1160
1203
  else:
1161
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1204
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
1205
+ @property
1206
+ def IsCarbon(self):
1207
+ return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
1208
+ @IsCarbon.setter
1209
+ def IsCarbon(self, value):
1210
+ if isinstance(value, go.GoClass):
1211
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
1212
+ else:
1213
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
1162
1214
 
1163
- # Python type for struct whatsapp.GroupParticipant
1164
- class GroupParticipant(go.GoClass):
1165
- """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"""
1215
+ # Python type for struct whatsapp.Session
1216
+ class Session(go.GoClass):
1217
+ """A Session represents a connection (active or not) between a linked device and WhatsApp. Active\nsessions need to be established by logging in, after which incoming events will be forwarded to\nthe adapter event handler, and outgoing events will be forwarded to WhatsApp.\n"""
1166
1218
  def __init__(self, *args, **kwargs):
1167
1219
  """
1168
1220
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1176,25 +1228,13 @@ class GroupParticipant(go.GoClass):
1176
1228
  self.handle = args[0].handle
1177
1229
  _whatsapp.IncRef(self.handle)
1178
1230
  else:
1179
- self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1231
+ self.handle = _whatsapp.whatsapp_Session_CTor()
1180
1232
  _whatsapp.IncRef(self.handle)
1181
- if 0 < len(args):
1182
- self.JID = args[0]
1183
- if "JID" in kwargs:
1184
- self.JID = kwargs["JID"]
1185
- if 1 < len(args):
1186
- self.Affiliation = args[1]
1187
- if "Affiliation" in kwargs:
1188
- self.Affiliation = kwargs["Affiliation"]
1189
- if 2 < len(args):
1190
- self.Action = args[2]
1191
- if "Action" in kwargs:
1192
- self.Action = kwargs["Action"]
1193
1233
  def __del__(self):
1194
1234
  _whatsapp.DecRef(self.handle)
1195
1235
  def __str__(self):
1196
1236
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1197
- sv = 'whatsapp.GroupParticipant{'
1237
+ sv = 'whatsapp.Session{'
1198
1238
  first = True
1199
1239
  for v in pr:
1200
1240
  if callable(v[1]):
@@ -1207,138 +1247,602 @@ class GroupParticipant(go.GoClass):
1207
1247
  return sv + '}'
1208
1248
  def __repr__(self):
1209
1249
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1210
- sv = 'whatsapp.GroupParticipant ( '
1250
+ sv = 'whatsapp.Session ( '
1211
1251
  for v in pr:
1212
1252
  if not callable(v[1]):
1213
1253
  sv += v[0] + '=' + str(v[1]) + ', '
1214
1254
  return sv + ')'
1215
- @property
1216
- def JID(self):
1217
- return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1218
- @JID.setter
1219
- def JID(self, value):
1220
- if isinstance(value, go.GoClass):
1221
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1222
- else:
1223
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1224
- @property
1225
- def Affiliation(self):
1226
- return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1227
- @Affiliation.setter
1228
- def Affiliation(self, value):
1229
- if isinstance(value, go.GoClass):
1230
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1231
- else:
1232
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1233
- @property
1234
- def Action(self):
1235
- return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1236
- @Action.setter
1237
- def Action(self, value):
1238
- if isinstance(value, go.GoClass):
1239
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1240
- else:
1241
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1242
-
1243
- # Python type for struct whatsapp.Message
1244
- class Message(go.GoClass):
1245
- """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"""
1246
- def __init__(self, *args, **kwargs):
1255
+ def Login(self):
1256
+ """Login() str
1257
+
1258
+ Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
1259
+ or by initiating a pairing session for a new linked device. Callers are expected to have set an
1260
+ event handler in order to receive any incoming events from the underlying WhatsApp session.
1247
1261
  """
1248
- handle=A Go-side object is always initialized with an explicit handle=arg
1249
- otherwise parameters can be unnamed in order of field names or named fields
1250
- in which case a new Go object is constructed first
1262
+ return _whatsapp.whatsapp_Session_Login(self.handle)
1263
+ def Logout(self):
1264
+ """Logout() str
1265
+
1266
+ Logout disconnects and removes the current linked device locally and initiates a logout remotely.
1251
1267
  """
1252
- if len(kwargs) == 1 and 'handle' in kwargs:
1253
- self.handle = kwargs['handle']
1254
- _whatsapp.IncRef(self.handle)
1255
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1256
- self.handle = args[0].handle
1257
- _whatsapp.IncRef(self.handle)
1258
- else:
1259
- self.handle = _whatsapp.whatsapp_Message_CTor()
1260
- _whatsapp.IncRef(self.handle)
1261
- if 0 < len(args):
1262
- self.Kind = args[0]
1263
- if "Kind" in kwargs:
1264
- self.Kind = kwargs["Kind"]
1265
- if 1 < len(args):
1266
- self.ID = args[1]
1267
- if "ID" in kwargs:
1268
- self.ID = kwargs["ID"]
1269
- if 2 < len(args):
1270
- self.JID = args[2]
1271
- if "JID" in kwargs:
1272
- self.JID = kwargs["JID"]
1273
- if 3 < len(args):
1274
- self.GroupJID = args[3]
1275
- if "GroupJID" in kwargs:
1276
- self.GroupJID = kwargs["GroupJID"]
1277
- if 4 < len(args):
1278
- self.OriginJID = args[4]
1279
- if "OriginJID" in kwargs:
1280
- self.OriginJID = kwargs["OriginJID"]
1281
- if 5 < len(args):
1282
- self.Body = args[5]
1283
- if "Body" in kwargs:
1284
- self.Body = kwargs["Body"]
1285
- if 6 < len(args):
1286
- self.Timestamp = args[6]
1287
- if "Timestamp" in kwargs:
1288
- self.Timestamp = kwargs["Timestamp"]
1289
- if 7 < len(args):
1290
- self.IsCarbon = args[7]
1291
- if "IsCarbon" in kwargs:
1292
- self.IsCarbon = kwargs["IsCarbon"]
1268
+ return _whatsapp.whatsapp_Session_Logout(self.handle)
1269
+ def Disconnect(self):
1270
+ """Disconnect() str
1271
+
1272
+ Disconnects detaches the current connection to WhatsApp without removing any linked device state.
1273
+ """
1274
+ return _whatsapp.whatsapp_Session_Disconnect(self.handle)
1275
+ def PairPhone(self, phone):
1276
+ """PairPhone(str phone) str, str
1277
+
1278
+ PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
1279
+ user's primary device, as identified by the given phone number. This will return an error if the
1280
+ [Session] is already paired, or if the phone number given is empty or invalid.
1281
+ """
1282
+ return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
1283
+ def SendMessage(self, message):
1284
+ """SendMessage(object message) str
1285
+
1286
+ SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
1287
+ specified within. In general, different message kinds require different fields to be set; see the
1288
+ documentation for the [Message] type for more information.
1289
+ """
1290
+ return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
1291
+ def GenerateMessageID(self):
1292
+ """GenerateMessageID() str
1293
+
1294
+ GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
1295
+ """
1296
+ return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
1297
+ def SendChatState(self, state):
1298
+ """SendChatState(object state) str
1299
+
1300
+ SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
1301
+ contact specified within.
1302
+ """
1303
+ return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
1304
+ def SendReceipt(self, receipt):
1305
+ """SendReceipt(object receipt) str
1306
+
1307
+ SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
1308
+ """
1309
+ return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
1310
+ def SendPresence(self, presence, statusMessage):
1311
+ """SendPresence(int presence, str statusMessage) str
1312
+
1313
+ SendPresence sets the activity state and (optional) status message for the current session and
1314
+ user. An error is returned if setting availability fails for any reason.
1315
+ """
1316
+ return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
1317
+ def GetContacts(self, refresh):
1318
+ """GetContacts(bool refresh) []object, str
1319
+
1320
+ GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
1321
+ If `refresh` is `true`, FetchRoster will pull application state from the remote service and
1322
+ synchronize any contacts found with the adapter.
1323
+ """
1324
+ return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
1325
+ def GetGroups(self):
1326
+ """GetGroups() []object, str
1327
+
1328
+ GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
1329
+ information on present participants.
1330
+ """
1331
+ return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
1332
+ def CreateGroup(self, name, participants):
1333
+ """CreateGroup(str name, []str participants) object, str
1334
+
1335
+ CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
1336
+ participant JIDs given.
1337
+ """
1338
+ return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
1339
+ def LeaveGroup(self, resourceID):
1340
+ """LeaveGroup(str resourceID) str
1341
+
1342
+ LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
1343
+ """
1344
+ return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
1345
+ def GetAvatar(self, resourceID, avatarID):
1346
+ """GetAvatar(str resourceID, str avatarID) object, str
1347
+
1348
+ GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
1349
+ is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
1350
+ for the given ID has not changed.
1351
+ """
1352
+ return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
1353
+ def SetAvatar(self, resourceID, avatar):
1354
+ """SetAvatar(str resourceID, []int avatar) str, str
1355
+
1356
+ SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
1357
+ profile picture for our own user by providing an empty JID. The unique picture ID is returned,
1358
+ typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
1359
+ """
1360
+ return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
1361
+ def SetGroupName(self, resourceID, name):
1362
+ """SetGroupName(str resourceID, str name) str
1363
+
1364
+ SetGroupName updates the name of a WhatsApp group for the Group JID given.
1365
+ """
1366
+ return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
1367
+ def SetGroupTopic(self, resourceID, topic):
1368
+ """SetGroupTopic(str resourceID, str topic) str
1369
+
1370
+ SetGroupName updates the topic of a WhatsApp group for the Group JID given.
1371
+ """
1372
+ return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
1373
+ def UpdateGroupParticipants(self, resourceID, participants):
1374
+ """UpdateGroupParticipants(str resourceID, []object participants) []object, str
1375
+
1376
+ UpdateGroupParticipants processes changes to the given group's participants, including additions,
1377
+ removals, and changes to privileges. Participant JIDs given must be part of the authenticated
1378
+ session's roster at least, and must also be active group participants for other types of changes.
1379
+ """
1380
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
1381
+ def FindContact(self, phone):
1382
+ """FindContact(str phone) object, str
1383
+
1384
+ FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
1385
+ phone number, returning a concrete instance if found; typically, only the contact JID is set. No
1386
+ error is returned if no contact was found, but any unexpected errors will otherwise be returned
1387
+ directly.
1388
+ """
1389
+ return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
1390
+ def RequestMessageHistory(self, resourceID, oldestMessage):
1391
+ """RequestMessageHistory(str resourceID, object oldestMessage) str
1392
+
1393
+ RequestMessageHistory sends and asynchronous request for message history related to the given
1394
+ resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
1395
+ history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
1396
+ event handler. An error will be returned if requesting history fails for any reason.
1397
+ """
1398
+ return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
1399
+ def SetEventHandler(self, h, goRun=False):
1400
+ """SetEventHandler(callable h)
1401
+
1402
+ SetEventHandler assigns the given handler function for propagating internal events into the Python
1403
+ gateway. Note that the event handler function is not entirely safe to use directly, and all calls
1404
+ should instead be sent to the [Gateway] via its internal call channel.
1405
+ """
1406
+ _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
1407
+
1408
+ # Python type for struct whatsapp.Call
1409
+ class Call(go.GoClass):
1410
+ """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"""
1411
+ def __init__(self, *args, **kwargs):
1412
+ """
1413
+ handle=A Go-side object is always initialized with an explicit handle=arg
1414
+ otherwise parameters can be unnamed in order of field names or named fields
1415
+ in which case a new Go object is constructed first
1416
+ """
1417
+ if len(kwargs) == 1 and 'handle' in kwargs:
1418
+ self.handle = kwargs['handle']
1419
+ _whatsapp.IncRef(self.handle)
1420
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1421
+ self.handle = args[0].handle
1422
+ _whatsapp.IncRef(self.handle)
1423
+ else:
1424
+ self.handle = _whatsapp.whatsapp_Call_CTor()
1425
+ _whatsapp.IncRef(self.handle)
1426
+ if 0 < len(args):
1427
+ self.State = args[0]
1428
+ if "State" in kwargs:
1429
+ self.State = kwargs["State"]
1430
+ if 1 < len(args):
1431
+ self.JID = args[1]
1432
+ if "JID" in kwargs:
1433
+ self.JID = kwargs["JID"]
1434
+ if 2 < len(args):
1435
+ self.Timestamp = args[2]
1436
+ if "Timestamp" in kwargs:
1437
+ self.Timestamp = kwargs["Timestamp"]
1438
+ def __del__(self):
1439
+ _whatsapp.DecRef(self.handle)
1440
+ def __str__(self):
1441
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1442
+ sv = 'whatsapp.Call{'
1443
+ first = True
1444
+ for v in pr:
1445
+ if callable(v[1]):
1446
+ continue
1447
+ if first:
1448
+ first = False
1449
+ else:
1450
+ sv += ', '
1451
+ sv += v[0] + '=' + str(v[1])
1452
+ return sv + '}'
1453
+ def __repr__(self):
1454
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1455
+ sv = 'whatsapp.Call ( '
1456
+ for v in pr:
1457
+ if not callable(v[1]):
1458
+ sv += v[0] + '=' + str(v[1]) + ', '
1459
+ return sv + ')'
1460
+ @property
1461
+ def State(self):
1462
+ return _whatsapp.whatsapp_Call_State_Get(self.handle)
1463
+ @State.setter
1464
+ def State(self, value):
1465
+ if isinstance(value, go.GoClass):
1466
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
1467
+ else:
1468
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value)
1469
+ @property
1470
+ def JID(self):
1471
+ return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1472
+ @JID.setter
1473
+ def JID(self, value):
1474
+ if isinstance(value, go.GoClass):
1475
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1476
+ else:
1477
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1478
+ @property
1479
+ def Timestamp(self):
1480
+ return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
1481
+ @Timestamp.setter
1482
+ def Timestamp(self, value):
1483
+ if isinstance(value, go.GoClass):
1484
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1485
+ else:
1486
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1487
+
1488
+ # Python type for struct whatsapp.EventPayload
1489
+ class EventPayload(go.GoClass):
1490
+ """EventPayload represents the collected payloads for all event types handled by the overarching\nsession adapter handler. Only specific fields will be populated in events emitted by internal\nhandlers, see documentation for specific types for more information.\n"""
1491
+ def __init__(self, *args, **kwargs):
1492
+ """
1493
+ handle=A Go-side object is always initialized with an explicit handle=arg
1494
+ otherwise parameters can be unnamed in order of field names or named fields
1495
+ in which case a new Go object is constructed first
1496
+ """
1497
+ if len(kwargs) == 1 and 'handle' in kwargs:
1498
+ self.handle = kwargs['handle']
1499
+ _whatsapp.IncRef(self.handle)
1500
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1501
+ self.handle = args[0].handle
1502
+ _whatsapp.IncRef(self.handle)
1503
+ else:
1504
+ self.handle = _whatsapp.whatsapp_EventPayload_CTor()
1505
+ _whatsapp.IncRef(self.handle)
1506
+ if 0 < len(args):
1507
+ self.QRCode = args[0]
1508
+ if "QRCode" in kwargs:
1509
+ self.QRCode = kwargs["QRCode"]
1510
+ if 1 < len(args):
1511
+ self.PairDeviceID = args[1]
1512
+ if "PairDeviceID" in kwargs:
1513
+ self.PairDeviceID = kwargs["PairDeviceID"]
1514
+ if 2 < len(args):
1515
+ self.Connect = args[2]
1516
+ if "Connect" in kwargs:
1517
+ self.Connect = kwargs["Connect"]
1518
+ if 3 < len(args):
1519
+ self.Contact = args[3]
1520
+ if "Contact" in kwargs:
1521
+ self.Contact = kwargs["Contact"]
1522
+ if 4 < len(args):
1523
+ self.Presence = args[4]
1524
+ if "Presence" in kwargs:
1525
+ self.Presence = kwargs["Presence"]
1526
+ if 5 < len(args):
1527
+ self.Message = args[5]
1528
+ if "Message" in kwargs:
1529
+ self.Message = kwargs["Message"]
1530
+ if 6 < len(args):
1531
+ self.ChatState = args[6]
1532
+ if "ChatState" in kwargs:
1533
+ self.ChatState = kwargs["ChatState"]
1534
+ if 7 < len(args):
1535
+ self.Receipt = args[7]
1536
+ if "Receipt" in kwargs:
1537
+ self.Receipt = kwargs["Receipt"]
1293
1538
  if 8 < len(args):
1294
- self.IsForwarded = args[8]
1295
- if "IsForwarded" in kwargs:
1296
- self.IsForwarded = kwargs["IsForwarded"]
1539
+ self.Group = args[8]
1540
+ if "Group" in kwargs:
1541
+ self.Group = kwargs["Group"]
1297
1542
  if 9 < len(args):
1298
- self.ReplyID = args[9]
1299
- if "ReplyID" in kwargs:
1300
- self.ReplyID = kwargs["ReplyID"]
1301
- if 10 < len(args):
1302
- self.ReplyBody = args[10]
1303
- if "ReplyBody" in kwargs:
1304
- self.ReplyBody = kwargs["ReplyBody"]
1305
- if 11 < len(args):
1306
- self.Attachments = args[11]
1307
- if "Attachments" in kwargs:
1308
- self.Attachments = kwargs["Attachments"]
1309
- if 12 < len(args):
1310
- self.Preview = args[12]
1311
- if "Preview" in kwargs:
1312
- self.Preview = kwargs["Preview"]
1313
- if 13 < len(args):
1314
- self.Location = args[13]
1315
- if "Location" in kwargs:
1316
- self.Location = kwargs["Location"]
1317
- if 14 < len(args):
1318
- self.Poll = args[14]
1319
- if "Poll" in kwargs:
1320
- self.Poll = kwargs["Poll"]
1321
- if 15 < len(args):
1322
- self.Album = args[15]
1323
- if "Album" in kwargs:
1324
- self.Album = kwargs["Album"]
1325
- if 16 < len(args):
1326
- self.MentionJIDs = args[16]
1327
- if "MentionJIDs" in kwargs:
1328
- self.MentionJIDs = kwargs["MentionJIDs"]
1329
- if 17 < len(args):
1330
- self.Receipts = args[17]
1331
- if "Receipts" in kwargs:
1332
- self.Receipts = kwargs["Receipts"]
1333
- if 18 < len(args):
1334
- self.Reactions = args[18]
1335
- if "Reactions" in kwargs:
1336
- self.Reactions = kwargs["Reactions"]
1543
+ self.Call = args[9]
1544
+ if "Call" in kwargs:
1545
+ self.Call = kwargs["Call"]
1546
+ def __del__(self):
1547
+ _whatsapp.DecRef(self.handle)
1548
+ def __str__(self):
1549
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1550
+ sv = 'whatsapp.EventPayload{'
1551
+ first = True
1552
+ for v in pr:
1553
+ if callable(v[1]):
1554
+ continue
1555
+ if first:
1556
+ first = False
1557
+ else:
1558
+ sv += ', '
1559
+ sv += v[0] + '=' + str(v[1])
1560
+ return sv + '}'
1561
+ def __repr__(self):
1562
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1563
+ sv = 'whatsapp.EventPayload ( '
1564
+ for v in pr:
1565
+ if not callable(v[1]):
1566
+ sv += v[0] + '=' + str(v[1]) + ', '
1567
+ return sv + ')'
1568
+ @property
1569
+ def QRCode(self):
1570
+ return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
1571
+ @QRCode.setter
1572
+ def QRCode(self, value):
1573
+ if isinstance(value, go.GoClass):
1574
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
1575
+ else:
1576
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
1577
+ @property
1578
+ def PairDeviceID(self):
1579
+ return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
1580
+ @PairDeviceID.setter
1581
+ def PairDeviceID(self, value):
1582
+ if isinstance(value, go.GoClass):
1583
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
1584
+ else:
1585
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
1586
+ @property
1587
+ def Connect(self):
1588
+ return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
1589
+ @Connect.setter
1590
+ def Connect(self, value):
1591
+ if isinstance(value, go.GoClass):
1592
+ _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
1593
+ else:
1594
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1595
+ @property
1596
+ def Contact(self):
1597
+ return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
1598
+ @Contact.setter
1599
+ def Contact(self, value):
1600
+ if isinstance(value, go.GoClass):
1601
+ _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
1602
+ else:
1603
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1604
+ @property
1605
+ def Presence(self):
1606
+ return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
1607
+ @Presence.setter
1608
+ def Presence(self, value):
1609
+ if isinstance(value, go.GoClass):
1610
+ _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
1611
+ else:
1612
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1613
+ @property
1614
+ def Message(self):
1615
+ return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
1616
+ @Message.setter
1617
+ def Message(self, value):
1618
+ if isinstance(value, go.GoClass):
1619
+ _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
1620
+ else:
1621
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1622
+ @property
1623
+ def ChatState(self):
1624
+ return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
1625
+ @ChatState.setter
1626
+ def ChatState(self, value):
1627
+ if isinstance(value, go.GoClass):
1628
+ _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
1629
+ else:
1630
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1631
+ @property
1632
+ def Receipt(self):
1633
+ return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
1634
+ @Receipt.setter
1635
+ def Receipt(self, value):
1636
+ if isinstance(value, go.GoClass):
1637
+ _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
1638
+ else:
1639
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1640
+ @property
1641
+ def Group(self):
1642
+ return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
1643
+ @Group.setter
1644
+ def Group(self, value):
1645
+ if isinstance(value, go.GoClass):
1646
+ _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
1647
+ else:
1648
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1649
+ @property
1650
+ def Call(self):
1651
+ return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
1652
+ @Call.setter
1653
+ def Call(self, value):
1654
+ if isinstance(value, go.GoClass):
1655
+ _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
1656
+ else:
1657
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1658
+
1659
+ # Python type for struct whatsapp.GroupSubject
1660
+ class GroupSubject(go.GoClass):
1661
+ """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1662
+ def __init__(self, *args, **kwargs):
1663
+ """
1664
+ handle=A Go-side object is always initialized with an explicit handle=arg
1665
+ otherwise parameters can be unnamed in order of field names or named fields
1666
+ in which case a new Go object is constructed first
1667
+ """
1668
+ if len(kwargs) == 1 and 'handle' in kwargs:
1669
+ self.handle = kwargs['handle']
1670
+ _whatsapp.IncRef(self.handle)
1671
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1672
+ self.handle = args[0].handle
1673
+ _whatsapp.IncRef(self.handle)
1674
+ else:
1675
+ self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1676
+ _whatsapp.IncRef(self.handle)
1677
+ if 0 < len(args):
1678
+ self.Subject = args[0]
1679
+ if "Subject" in kwargs:
1680
+ self.Subject = kwargs["Subject"]
1681
+ if 1 < len(args):
1682
+ self.SetAt = args[1]
1683
+ if "SetAt" in kwargs:
1684
+ self.SetAt = kwargs["SetAt"]
1685
+ if 2 < len(args):
1686
+ self.SetByJID = args[2]
1687
+ if "SetByJID" in kwargs:
1688
+ self.SetByJID = kwargs["SetByJID"]
1689
+ def __del__(self):
1690
+ _whatsapp.DecRef(self.handle)
1691
+ def __str__(self):
1692
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1693
+ sv = 'whatsapp.GroupSubject{'
1694
+ first = True
1695
+ for v in pr:
1696
+ if callable(v[1]):
1697
+ continue
1698
+ if first:
1699
+ first = False
1700
+ else:
1701
+ sv += ', '
1702
+ sv += v[0] + '=' + str(v[1])
1703
+ return sv + '}'
1704
+ def __repr__(self):
1705
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1706
+ sv = 'whatsapp.GroupSubject ( '
1707
+ for v in pr:
1708
+ if not callable(v[1]):
1709
+ sv += v[0] + '=' + str(v[1]) + ', '
1710
+ return sv + ')'
1711
+ @property
1712
+ def Subject(self):
1713
+ return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1714
+ @Subject.setter
1715
+ def Subject(self, value):
1716
+ if isinstance(value, go.GoClass):
1717
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1718
+ else:
1719
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1720
+ @property
1721
+ def SetAt(self):
1722
+ return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1723
+ @SetAt.setter
1724
+ def SetAt(self, value):
1725
+ if isinstance(value, go.GoClass):
1726
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1727
+ else:
1728
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1729
+ @property
1730
+ def SetByJID(self):
1731
+ return _whatsapp.whatsapp_GroupSubject_SetByJID_Get(self.handle)
1732
+ @SetByJID.setter
1733
+ def SetByJID(self, value):
1734
+ if isinstance(value, go.GoClass):
1735
+ _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value.handle)
1736
+ else:
1737
+ _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
1738
+
1739
+ # Python type for struct whatsapp.GroupParticipant
1740
+ class GroupParticipant(go.GoClass):
1741
+ """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can always be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1742
+ def __init__(self, *args, **kwargs):
1743
+ """
1744
+ handle=A Go-side object is always initialized with an explicit handle=arg
1745
+ otherwise parameters can be unnamed in order of field names or named fields
1746
+ in which case a new Go object is constructed first
1747
+ """
1748
+ if len(kwargs) == 1 and 'handle' in kwargs:
1749
+ self.handle = kwargs['handle']
1750
+ _whatsapp.IncRef(self.handle)
1751
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1752
+ self.handle = args[0].handle
1753
+ _whatsapp.IncRef(self.handle)
1754
+ else:
1755
+ self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1756
+ _whatsapp.IncRef(self.handle)
1757
+ if 0 < len(args):
1758
+ self.JID = args[0]
1759
+ if "JID" in kwargs:
1760
+ self.JID = kwargs["JID"]
1761
+ if 1 < len(args):
1762
+ self.Affiliation = args[1]
1763
+ if "Affiliation" in kwargs:
1764
+ self.Affiliation = kwargs["Affiliation"]
1765
+ if 2 < len(args):
1766
+ self.Action = args[2]
1767
+ if "Action" in kwargs:
1768
+ self.Action = kwargs["Action"]
1769
+ def __del__(self):
1770
+ _whatsapp.DecRef(self.handle)
1771
+ def __str__(self):
1772
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1773
+ sv = 'whatsapp.GroupParticipant{'
1774
+ first = True
1775
+ for v in pr:
1776
+ if callable(v[1]):
1777
+ continue
1778
+ if first:
1779
+ first = False
1780
+ else:
1781
+ sv += ', '
1782
+ sv += v[0] + '=' + str(v[1])
1783
+ return sv + '}'
1784
+ def __repr__(self):
1785
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1786
+ sv = 'whatsapp.GroupParticipant ( '
1787
+ for v in pr:
1788
+ if not callable(v[1]):
1789
+ sv += v[0] + '=' + str(v[1]) + ', '
1790
+ return sv + ')'
1791
+ @property
1792
+ def JID(self):
1793
+ return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1794
+ @JID.setter
1795
+ def JID(self, value):
1796
+ if isinstance(value, go.GoClass):
1797
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1798
+ else:
1799
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1800
+ @property
1801
+ def Affiliation(self):
1802
+ return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1803
+ @Affiliation.setter
1804
+ def Affiliation(self, value):
1805
+ if isinstance(value, go.GoClass):
1806
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1807
+ else:
1808
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1809
+ @property
1810
+ def Action(self):
1811
+ return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1812
+ @Action.setter
1813
+ def Action(self, value):
1814
+ if isinstance(value, go.GoClass):
1815
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1816
+ else:
1817
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1818
+
1819
+ # Python type for struct whatsapp.LinkedDevice
1820
+ class LinkedDevice(go.GoClass):
1821
+ """A LinkedDevice represents a unique pairing session between the gateway and WhatsApp. It is not\nunique to the underlying \"main\" device (or phone number), as multiple linked devices may be paired\nwith any main device.\n"""
1822
+ def __init__(self, *args, **kwargs):
1823
+ """
1824
+ handle=A Go-side object is always initialized with an explicit handle=arg
1825
+ otherwise parameters can be unnamed in order of field names or named fields
1826
+ in which case a new Go object is constructed first
1827
+ """
1828
+ if len(kwargs) == 1 and 'handle' in kwargs:
1829
+ self.handle = kwargs['handle']
1830
+ _whatsapp.IncRef(self.handle)
1831
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1832
+ self.handle = args[0].handle
1833
+ _whatsapp.IncRef(self.handle)
1834
+ else:
1835
+ self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
1836
+ _whatsapp.IncRef(self.handle)
1837
+ if 0 < len(args):
1838
+ self.ID = args[0]
1839
+ if "ID" in kwargs:
1840
+ self.ID = kwargs["ID"]
1337
1841
  def __del__(self):
1338
1842
  _whatsapp.DecRef(self.handle)
1339
1843
  def __str__(self):
1340
1844
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1341
- sv = 'whatsapp.Message{'
1845
+ sv = 'whatsapp.LinkedDevice{'
1342
1846
  first = True
1343
1847
  for v in pr:
1344
1848
  if callable(v[1]):
@@ -1351,186 +1855,34 @@ class Message(go.GoClass):
1351
1855
  return sv + '}'
1352
1856
  def __repr__(self):
1353
1857
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1354
- sv = 'whatsapp.Message ( '
1858
+ sv = 'whatsapp.LinkedDevice ( '
1355
1859
  for v in pr:
1356
1860
  if not callable(v[1]):
1357
1861
  sv += v[0] + '=' + str(v[1]) + ', '
1358
1862
  return sv + ')'
1359
1863
  @property
1360
- def Kind(self):
1361
- return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
1362
- @Kind.setter
1363
- def Kind(self, value):
1364
- if isinstance(value, go.GoClass):
1365
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
1366
- else:
1367
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
1368
- @property
1369
1864
  def ID(self):
1370
- return _whatsapp.whatsapp_Message_ID_Get(self.handle)
1865
+ """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
1866
+ is currently equivalent to a password, and needs to be protected accordingly.
1867
+ """
1868
+ return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
1371
1869
  @ID.setter
1372
1870
  def ID(self, value):
1373
1871
  if isinstance(value, go.GoClass):
1374
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
1872
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
1375
1873
  else:
1376
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
1377
- @property
1874
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
1378
1875
  def JID(self):
1379
- return _whatsapp.whatsapp_Message_JID_Get(self.handle)
1380
- @JID.setter
1381
- def JID(self, value):
1382
- if isinstance(value, go.GoClass):
1383
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
1384
- else:
1385
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
1386
- @property
1387
- def GroupJID(self):
1388
- return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
1389
- @GroupJID.setter
1390
- def GroupJID(self, value):
1391
- if isinstance(value, go.GoClass):
1392
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
1393
- else:
1394
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
1395
- @property
1396
- def OriginJID(self):
1397
- return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
1398
- @OriginJID.setter
1399
- def OriginJID(self, value):
1400
- if isinstance(value, go.GoClass):
1401
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
1402
- else:
1403
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
1404
- @property
1405
- def Body(self):
1406
- return _whatsapp.whatsapp_Message_Body_Get(self.handle)
1407
- @Body.setter
1408
- def Body(self, value):
1409
- if isinstance(value, go.GoClass):
1410
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
1411
- else:
1412
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
1413
- @property
1414
- def Timestamp(self):
1415
- return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
1416
- @Timestamp.setter
1417
- def Timestamp(self, value):
1418
- if isinstance(value, go.GoClass):
1419
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
1420
- else:
1421
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
1422
- @property
1423
- def IsCarbon(self):
1424
- return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
1425
- @IsCarbon.setter
1426
- def IsCarbon(self, value):
1427
- if isinstance(value, go.GoClass):
1428
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
1429
- else:
1430
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
1431
- @property
1432
- def IsForwarded(self):
1433
- return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
1434
- @IsForwarded.setter
1435
- def IsForwarded(self, value):
1436
- if isinstance(value, go.GoClass):
1437
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
1438
- else:
1439
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
1440
- @property
1441
- def ReplyID(self):
1442
- return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
1443
- @ReplyID.setter
1444
- def ReplyID(self, value):
1445
- if isinstance(value, go.GoClass):
1446
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
1447
- else:
1448
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
1449
- @property
1450
- def ReplyBody(self):
1451
- return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
1452
- @ReplyBody.setter
1453
- def ReplyBody(self, value):
1454
- if isinstance(value, go.GoClass):
1455
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
1456
- else:
1457
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
1458
- @property
1459
- def Attachments(self):
1460
- return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
1461
- @Attachments.setter
1462
- def Attachments(self, value):
1463
- if isinstance(value, go.GoClass):
1464
- _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
1465
- else:
1466
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1467
- @property
1468
- def Preview(self):
1469
- return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
1470
- @Preview.setter
1471
- def Preview(self, value):
1472
- if isinstance(value, go.GoClass):
1473
- _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
1474
- else:
1475
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1476
- @property
1477
- def Location(self):
1478
- return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
1479
- @Location.setter
1480
- def Location(self, value):
1481
- if isinstance(value, go.GoClass):
1482
- _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
1483
- else:
1484
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1485
- @property
1486
- def Poll(self):
1487
- return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
1488
- @Poll.setter
1489
- def Poll(self, value):
1490
- if isinstance(value, go.GoClass):
1491
- _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
1492
- else:
1493
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1494
- @property
1495
- def Album(self):
1496
- return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
1497
- @Album.setter
1498
- def Album(self, value):
1499
- if isinstance(value, go.GoClass):
1500
- _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
1501
- else:
1502
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1503
- @property
1504
- def MentionJIDs(self):
1505
- return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
1506
- @MentionJIDs.setter
1507
- def MentionJIDs(self, value):
1508
- if isinstance(value, go.GoClass):
1509
- _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
1510
- else:
1511
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1512
- @property
1513
- def Receipts(self):
1514
- return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
1515
- @Receipts.setter
1516
- def Receipts(self, value):
1517
- if isinstance(value, go.GoClass):
1518
- _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
1519
- else:
1520
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1521
- @property
1522
- def Reactions(self):
1523
- return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
1524
- @Reactions.setter
1525
- def Reactions(self, value):
1526
- if isinstance(value, go.GoClass):
1527
- _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
1528
- else:
1529
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1876
+ """JID() object
1877
+
1878
+ JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
1879
+ may return invalid JIDs, and this function does not handle errors.
1880
+ """
1881
+ return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
1530
1882
 
1531
- # Python type for struct whatsapp.PollOption
1532
- class PollOption(go.GoClass):
1533
- """A PollOption represents an individual choice within a broader poll.\n"""
1883
+ # Python type for struct whatsapp.Preview
1884
+ class Preview(go.GoClass):
1885
+ """A Preview represents a short description for a URL provided in a message body, as usually derived\nfrom the content of the page pointed at.\n"""
1534
1886
  def __init__(self, *args, **kwargs):
1535
1887
  """
1536
1888
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1544,17 +1896,33 @@ class PollOption(go.GoClass):
1544
1896
  self.handle = args[0].handle
1545
1897
  _whatsapp.IncRef(self.handle)
1546
1898
  else:
1547
- self.handle = _whatsapp.whatsapp_PollOption_CTor()
1899
+ self.handle = _whatsapp.whatsapp_Preview_CTor()
1548
1900
  _whatsapp.IncRef(self.handle)
1549
1901
  if 0 < len(args):
1550
- self.Title = args[0]
1902
+ self.Kind = args[0]
1903
+ if "Kind" in kwargs:
1904
+ self.Kind = kwargs["Kind"]
1905
+ if 1 < len(args):
1906
+ self.URL = args[1]
1907
+ if "URL" in kwargs:
1908
+ self.URL = kwargs["URL"]
1909
+ if 2 < len(args):
1910
+ self.Title = args[2]
1551
1911
  if "Title" in kwargs:
1552
1912
  self.Title = kwargs["Title"]
1913
+ if 3 < len(args):
1914
+ self.Description = args[3]
1915
+ if "Description" in kwargs:
1916
+ self.Description = kwargs["Description"]
1917
+ if 4 < len(args):
1918
+ self.Thumbnail = args[4]
1919
+ if "Thumbnail" in kwargs:
1920
+ self.Thumbnail = kwargs["Thumbnail"]
1553
1921
  def __del__(self):
1554
1922
  _whatsapp.DecRef(self.handle)
1555
1923
  def __str__(self):
1556
1924
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1557
- sv = 'whatsapp.PollOption{'
1925
+ sv = 'whatsapp.Preview{'
1558
1926
  first = True
1559
1927
  for v in pr:
1560
1928
  if callable(v[1]):
@@ -1567,24 +1935,60 @@ class PollOption(go.GoClass):
1567
1935
  return sv + '}'
1568
1936
  def __repr__(self):
1569
1937
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1570
- sv = 'whatsapp.PollOption ( '
1938
+ sv = 'whatsapp.Preview ( '
1571
1939
  for v in pr:
1572
1940
  if not callable(v[1]):
1573
1941
  sv += v[0] + '=' + str(v[1]) + ', '
1574
1942
  return sv + ')'
1575
1943
  @property
1944
+ def Kind(self):
1945
+ return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
1946
+ @Kind.setter
1947
+ def Kind(self, value):
1948
+ if isinstance(value, go.GoClass):
1949
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
1950
+ else:
1951
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
1952
+ @property
1953
+ def URL(self):
1954
+ return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
1955
+ @URL.setter
1956
+ def URL(self, value):
1957
+ if isinstance(value, go.GoClass):
1958
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
1959
+ else:
1960
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
1961
+ @property
1576
1962
  def Title(self):
1577
- return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
1963
+ return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
1578
1964
  @Title.setter
1579
1965
  def Title(self, value):
1580
1966
  if isinstance(value, go.GoClass):
1581
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
1967
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
1582
1968
  else:
1583
- _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
1969
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
1970
+ @property
1971
+ def Description(self):
1972
+ return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
1973
+ @Description.setter
1974
+ def Description(self, value):
1975
+ if isinstance(value, go.GoClass):
1976
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
1977
+ else:
1978
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
1979
+ @property
1980
+ def Thumbnail(self):
1981
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
1982
+ @Thumbnail.setter
1983
+ def Thumbnail(self, value):
1984
+ if isinstance(value, go.GoClass):
1985
+ _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
1986
+ else:
1987
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1584
1988
 
1585
- # Python type for struct whatsapp.Session
1586
- class Session(go.GoClass):
1587
- """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"""
1989
+ # Python type for struct whatsapp.Album
1990
+ class Album(go.GoClass):
1991
+ """A Album message represents a collection of media files, typically images and videos.\n"""
1588
1992
  def __init__(self, *args, **kwargs):
1589
1993
  """
1590
1994
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1598,13 +2002,25 @@ class Session(go.GoClass):
1598
2002
  self.handle = args[0].handle
1599
2003
  _whatsapp.IncRef(self.handle)
1600
2004
  else:
1601
- self.handle = _whatsapp.whatsapp_Session_CTor()
2005
+ self.handle = _whatsapp.whatsapp_Album_CTor()
1602
2006
  _whatsapp.IncRef(self.handle)
2007
+ if 0 < len(args):
2008
+ self.IsAlbum = args[0]
2009
+ if "IsAlbum" in kwargs:
2010
+ self.IsAlbum = kwargs["IsAlbum"]
2011
+ if 1 < len(args):
2012
+ self.ImageCount = args[1]
2013
+ if "ImageCount" in kwargs:
2014
+ self.ImageCount = kwargs["ImageCount"]
2015
+ if 2 < len(args):
2016
+ self.VideoCount = args[2]
2017
+ if "VideoCount" in kwargs:
2018
+ self.VideoCount = kwargs["VideoCount"]
1603
2019
  def __del__(self):
1604
2020
  _whatsapp.DecRef(self.handle)
1605
2021
  def __str__(self):
1606
2022
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1607
- sv = 'whatsapp.Session{'
2023
+ sv = 'whatsapp.Album{'
1608
2024
  first = True
1609
2025
  for v in pr:
1610
2026
  if callable(v[1]):
@@ -1617,167 +2033,42 @@ class Session(go.GoClass):
1617
2033
  return sv + '}'
1618
2034
  def __repr__(self):
1619
2035
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1620
- sv = 'whatsapp.Session ( '
2036
+ sv = 'whatsapp.Album ( '
1621
2037
  for v in pr:
1622
2038
  if not callable(v[1]):
1623
2039
  sv += v[0] + '=' + str(v[1]) + ', '
1624
2040
  return sv + ')'
1625
- def Login(self):
1626
- """Login() str
1627
-
1628
- Login attempts to authenticate the given [Session], either by re-using the [LinkedDevice] attached
1629
- or by initiating a pairing session for a new linked device. Callers are expected to have set an
1630
- event handler in order to receive any incoming events from the underlying WhatsApp session.
1631
- """
1632
- return _whatsapp.whatsapp_Session_Login(self.handle)
1633
- def Logout(self):
1634
- """Logout() str
1635
-
1636
- Logout disconnects and removes the current linked device locally and initiates a logout remotely.
1637
- """
1638
- return _whatsapp.whatsapp_Session_Logout(self.handle)
1639
- def Disconnect(self):
1640
- """Disconnect() str
1641
-
1642
- Disconnects detaches the current connection to WhatsApp without removing any linked device state.
1643
- """
1644
- return _whatsapp.whatsapp_Session_Disconnect(self.handle)
1645
- def PairPhone(self, phone):
1646
- """PairPhone(str phone) str, str
1647
-
1648
- PairPhone returns a one-time code from WhatsApp, used for pairing this [Session] against the
1649
- user's primary device, as identified by the given phone number. This will return an error if the
1650
- [Session] is already paired, or if the phone number given is empty or invalid.
1651
- """
1652
- return _whatsapp.whatsapp_Session_PairPhone(self.handle, phone)
1653
- def SendMessage(self, message):
1654
- """SendMessage(object message) str
1655
-
1656
- SendMessage processes the given Message and sends a WhatsApp message for the kind and contact JID
1657
- specified within. In general, different message kinds require different fields to be set; see the
1658
- documentation for the [Message] type for more information.
1659
- """
1660
- return _whatsapp.whatsapp_Session_SendMessage(self.handle, message.handle)
1661
- def GenerateMessageID(self):
1662
- """GenerateMessageID() str
1663
-
1664
- GenerateMessageID returns a valid, pseudo-random message ID for use in outgoing messages.
1665
- """
1666
- return _whatsapp.whatsapp_Session_GenerateMessageID(self.handle)
1667
- def SendChatState(self, state):
1668
- """SendChatState(object state) str
1669
-
1670
- SendChatState sends the given chat state notification (e.g. composing message) to WhatsApp for the
1671
- contact specified within.
1672
- """
1673
- return _whatsapp.whatsapp_Session_SendChatState(self.handle, state.handle)
1674
- def SendReceipt(self, receipt):
1675
- """SendReceipt(object receipt) str
1676
-
1677
- SendReceipt sends a read receipt to WhatsApp for the message IDs specified within.
1678
- """
1679
- return _whatsapp.whatsapp_Session_SendReceipt(self.handle, receipt.handle)
1680
- def SendPresence(self, presence, statusMessage):
1681
- """SendPresence(int presence, str statusMessage) str
1682
-
1683
- SendPresence sets the activity state and (optional) status message for the current session and
1684
- user. An error is returned if setting availability fails for any reason.
1685
- """
1686
- return _whatsapp.whatsapp_Session_SendPresence(self.handle, presence, statusMessage)
1687
- def GetContacts(self, refresh):
1688
- """GetContacts(bool refresh) []object, str
1689
-
1690
- GetContacts subscribes to the WhatsApp roster currently stored in the Session's internal state.
1691
- If `refresh` is `true`, FetchRoster will pull application state from the remote service and
1692
- synchronize any contacts found with the adapter.
1693
- """
1694
- return Slice_whatsapp_Contact(handle=_whatsapp.whatsapp_Session_GetContacts(self.handle, refresh))
1695
- def GetGroups(self):
1696
- """GetGroups() []object, str
1697
-
1698
- GetGroups returns a list of all group-chats currently joined in WhatsApp, along with additional
1699
- information on present participants.
1700
- """
1701
- return Slice_whatsapp_Group(handle=_whatsapp.whatsapp_Session_GetGroups(self.handle))
1702
- def CreateGroup(self, name, participants):
1703
- """CreateGroup(str name, []str participants) object, str
1704
-
1705
- CreateGroup attempts to create a new WhatsApp group for the given human-readable name and
1706
- participant JIDs given.
1707
- """
1708
- return Group(handle=_whatsapp.whatsapp_Session_CreateGroup(self.handle, name, participants.handle))
1709
- def LeaveGroup(self, resourceID):
1710
- """LeaveGroup(str resourceID) str
1711
-
1712
- LeaveGroup attempts to remove our own user from the given WhatsApp group, for the JID given.
1713
- """
1714
- return _whatsapp.whatsapp_Session_LeaveGroup(self.handle, resourceID)
1715
- def GetAvatar(self, resourceID, avatarID):
1716
- """GetAvatar(str resourceID, str avatarID) object, str
1717
-
1718
- GetAvatar fetches a profile picture for the Contact or Group JID given. If a non-empty `avatarID`
1719
- is also given, GetAvatar will return an empty [Avatar] instance with no error if the remote state
1720
- for the given ID has not changed.
1721
- """
1722
- return Avatar(handle=_whatsapp.whatsapp_Session_GetAvatar(self.handle, resourceID, avatarID))
1723
- def SetAvatar(self, resourceID, avatar):
1724
- """SetAvatar(str resourceID, []int avatar) str, str
1725
-
1726
- SetAvatar updates the profile picture for the Contact or Group JID given; it can also update the
1727
- profile picture for our own user by providing an empty JID. The unique picture ID is returned,
1728
- typically used as a cache reference or in providing to future calls for [Session.GetAvatar].
1729
- """
1730
- return _whatsapp.whatsapp_Session_SetAvatar(self.handle, resourceID, avatar.handle)
1731
- def SetGroupName(self, resourceID, name):
1732
- """SetGroupName(str resourceID, str name) str
1733
-
1734
- SetGroupName updates the name of a WhatsApp group for the Group JID given.
1735
- """
1736
- return _whatsapp.whatsapp_Session_SetGroupName(self.handle, resourceID, name)
1737
- def SetGroupTopic(self, resourceID, topic):
1738
- """SetGroupTopic(str resourceID, str topic) str
1739
-
1740
- SetGroupName updates the topic of a WhatsApp group for the Group JID given.
1741
- """
1742
- return _whatsapp.whatsapp_Session_SetGroupTopic(self.handle, resourceID, topic)
1743
- def UpdateGroupParticipants(self, resourceID, participants):
1744
- """UpdateGroupParticipants(str resourceID, []object participants) []object, str
1745
-
1746
- UpdateGroupParticipants processes changes to the given group's participants, including additions,
1747
- removals, and changes to privileges. Participant JIDs given must be part of the authenticated
1748
- session's roster at least, and must also be active group participants for other types of changes.
1749
- """
1750
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Session_UpdateGroupParticipants(self.handle, resourceID, participants.handle))
1751
- def FindContact(self, phone):
1752
- """FindContact(str phone) object, str
1753
-
1754
- FindContact attempts to check for a registered contact on WhatsApp corresponding to the given
1755
- phone number, returning a concrete instance if found; typically, only the contact JID is set. No
1756
- error is returned if no contact was found, but any unexpected errors will otherwise be returned
1757
- directly.
1758
- """
1759
- return Contact(handle=_whatsapp.whatsapp_Session_FindContact(self.handle, phone))
1760
- def RequestMessageHistory(self, resourceID, oldestMessage):
1761
- """RequestMessageHistory(str resourceID, object oldestMessage) str
1762
-
1763
- RequestMessageHistory sends and asynchronous request for message history related to the given
1764
- resource (e.g. Contact or Group JID), ending at the oldest message given. Messages returned from
1765
- history should then be handled as a `HistorySync` event of type `ON_DEMAND`, in the session-wide
1766
- event handler. An error will be returned if requesting history fails for any reason.
1767
- """
1768
- return _whatsapp.whatsapp_Session_RequestMessageHistory(self.handle, resourceID, oldestMessage.handle)
1769
- def SetEventHandler(self, h, goRun=False):
1770
- """SetEventHandler(callable h)
1771
-
1772
- SetEventHandler assigns the given handler function for propagating internal events into the Python
1773
- gateway. Note that the event handler function is not entirely safe to use directly, and all calls
1774
- should instead be sent to the [Gateway] via its internal call channel.
1775
- """
1776
- _whatsapp.whatsapp_Session_SetEventHandler(self.handle, h, goRun)
2041
+ @property
2042
+ def IsAlbum(self):
2043
+ return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
2044
+ @IsAlbum.setter
2045
+ def IsAlbum(self, value):
2046
+ if isinstance(value, go.GoClass):
2047
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
2048
+ else:
2049
+ _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
2050
+ @property
2051
+ def ImageCount(self):
2052
+ return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
2053
+ @ImageCount.setter
2054
+ def ImageCount(self, value):
2055
+ if isinstance(value, go.GoClass):
2056
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
2057
+ else:
2058
+ _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
2059
+ @property
2060
+ def VideoCount(self):
2061
+ return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
2062
+ @VideoCount.setter
2063
+ def VideoCount(self, value):
2064
+ if isinstance(value, go.GoClass):
2065
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
2066
+ else:
2067
+ _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
1777
2068
 
1778
- # Python type for struct whatsapp.Album
1779
- class Album(go.GoClass):
1780
- """A Album message represents a collection of media files, typically images and videos.\n"""
2069
+ # Python type for struct whatsapp.Attachment
2070
+ class Attachment(go.GoClass):
2071
+ """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
1781
2072
  def __init__(self, *args, **kwargs):
1782
2073
  """
1783
2074
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1791,25 +2082,29 @@ class Album(go.GoClass):
1791
2082
  self.handle = args[0].handle
1792
2083
  _whatsapp.IncRef(self.handle)
1793
2084
  else:
1794
- self.handle = _whatsapp.whatsapp_Album_CTor()
2085
+ self.handle = _whatsapp.whatsapp_Attachment_CTor()
1795
2086
  _whatsapp.IncRef(self.handle)
1796
2087
  if 0 < len(args):
1797
- self.IsAlbum = args[0]
1798
- if "IsAlbum" in kwargs:
1799
- self.IsAlbum = kwargs["IsAlbum"]
2088
+ self.MIME = args[0]
2089
+ if "MIME" in kwargs:
2090
+ self.MIME = kwargs["MIME"]
1800
2091
  if 1 < len(args):
1801
- self.ImageCount = args[1]
1802
- if "ImageCount" in kwargs:
1803
- self.ImageCount = kwargs["ImageCount"]
2092
+ self.Filename = args[1]
2093
+ if "Filename" in kwargs:
2094
+ self.Filename = kwargs["Filename"]
1804
2095
  if 2 < len(args):
1805
- self.VideoCount = args[2]
1806
- if "VideoCount" in kwargs:
1807
- self.VideoCount = kwargs["VideoCount"]
2096
+ self.Caption = args[2]
2097
+ if "Caption" in kwargs:
2098
+ self.Caption = kwargs["Caption"]
2099
+ if 3 < len(args):
2100
+ self.Data = args[3]
2101
+ if "Data" in kwargs:
2102
+ self.Data = kwargs["Data"]
1808
2103
  def __del__(self):
1809
2104
  _whatsapp.DecRef(self.handle)
1810
2105
  def __str__(self):
1811
2106
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1812
- sv = 'whatsapp.Album{'
2107
+ sv = 'whatsapp.Attachment{'
1813
2108
  first = True
1814
2109
  for v in pr:
1815
2110
  if callable(v[1]):
@@ -1822,38 +2117,53 @@ class Album(go.GoClass):
1822
2117
  return sv + '}'
1823
2118
  def __repr__(self):
1824
2119
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1825
- sv = 'whatsapp.Album ( '
2120
+ sv = 'whatsapp.Attachment ( '
1826
2121
  for v in pr:
1827
2122
  if not callable(v[1]):
1828
2123
  sv += v[0] + '=' + str(v[1]) + ', '
1829
2124
  return sv + ')'
1830
2125
  @property
1831
- def IsAlbum(self):
1832
- return _whatsapp.whatsapp_Album_IsAlbum_Get(self.handle)
1833
- @IsAlbum.setter
1834
- def IsAlbum(self, value):
2126
+ def MIME(self):
2127
+ return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
2128
+ @MIME.setter
2129
+ def MIME(self, value):
1835
2130
  if isinstance(value, go.GoClass):
1836
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value.handle)
2131
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
1837
2132
  else:
1838
- _whatsapp.whatsapp_Album_IsAlbum_Set(self.handle, value)
2133
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
1839
2134
  @property
1840
- def ImageCount(self):
1841
- return _whatsapp.whatsapp_Album_ImageCount_Get(self.handle)
1842
- @ImageCount.setter
1843
- def ImageCount(self, value):
2135
+ def Filename(self):
2136
+ return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
2137
+ @Filename.setter
2138
+ def Filename(self, value):
1844
2139
  if isinstance(value, go.GoClass):
1845
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value.handle)
2140
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
1846
2141
  else:
1847
- _whatsapp.whatsapp_Album_ImageCount_Set(self.handle, value)
2142
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
1848
2143
  @property
1849
- def VideoCount(self):
1850
- return _whatsapp.whatsapp_Album_VideoCount_Get(self.handle)
1851
- @VideoCount.setter
1852
- def VideoCount(self, value):
2144
+ def Caption(self):
2145
+ return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
2146
+ @Caption.setter
2147
+ def Caption(self, value):
1853
2148
  if isinstance(value, go.GoClass):
1854
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value.handle)
2149
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
1855
2150
  else:
1856
- _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
2151
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
2152
+ @property
2153
+ def Data(self):
2154
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
2155
+ @Data.setter
2156
+ def Data(self, value):
2157
+ if isinstance(value, go.GoClass):
2158
+ _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
2159
+ else:
2160
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2161
+ def GetSpec(self, ctx):
2162
+ """GetSpec(object ctx) object, str
2163
+
2164
+ GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
2165
+ """
2166
+ return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
1857
2167
 
1858
2168
  # Python type for struct whatsapp.ChatState
1859
2169
  class ChatState(go.GoClass):
@@ -1935,9 +2245,9 @@ class ChatState(go.GoClass):
1935
2245
  else:
1936
2246
  _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1937
2247
 
1938
- # Python type for struct whatsapp.Connect
1939
- class Connect(go.GoClass):
1940
- """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
2248
+ # Python type for struct whatsapp.Group
2249
+ class Group(go.GoClass):
2250
+ """A Group represents a named, many-to-many chat space which may be joined or left at will. All\nfields apart from the group JID are considered to be optional, and may not be set in cases where\ngroup information is being updated against previous assumed state. Groups in WhatsApp are\ngenerally invited to out-of-band with respect to overarching adaptor; see the documentation for\n[Session.GetGroups] for more information.\n"""
1941
2251
  def __init__(self, *args, **kwargs):
1942
2252
  """
1943
2253
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1951,96 +2261,33 @@ class Connect(go.GoClass):
1951
2261
  self.handle = args[0].handle
1952
2262
  _whatsapp.IncRef(self.handle)
1953
2263
  else:
1954
- self.handle = _whatsapp.whatsapp_Connect_CTor()
2264
+ self.handle = _whatsapp.whatsapp_Group_CTor()
1955
2265
  _whatsapp.IncRef(self.handle)
1956
2266
  if 0 < len(args):
1957
2267
  self.JID = args[0]
1958
2268
  if "JID" in kwargs:
1959
2269
  self.JID = kwargs["JID"]
1960
- if 1 < len(args):
1961
- self.Error = args[1]
1962
- if "Error" in kwargs:
1963
- self.Error = kwargs["Error"]
1964
- def __del__(self):
1965
- _whatsapp.DecRef(self.handle)
1966
- def __str__(self):
1967
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1968
- sv = 'whatsapp.Connect{'
1969
- first = True
1970
- for v in pr:
1971
- if callable(v[1]):
1972
- continue
1973
- if first:
1974
- first = False
1975
- else:
1976
- sv += ', '
1977
- sv += v[0] + '=' + str(v[1])
1978
- return sv + '}'
1979
- def __repr__(self):
1980
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1981
- sv = 'whatsapp.Connect ( '
1982
- for v in pr:
1983
- if not callable(v[1]):
1984
- sv += v[0] + '=' + str(v[1]) + ', '
1985
- return sv + ')'
1986
- @property
1987
- def JID(self):
1988
- return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
1989
- @JID.setter
1990
- def JID(self, value):
1991
- if isinstance(value, go.GoClass):
1992
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
1993
- else:
1994
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
1995
- @property
1996
- def Error(self):
1997
- return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
1998
- @Error.setter
1999
- def Error(self, value):
2000
- if isinstance(value, go.GoClass):
2001
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
2002
- else:
2003
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
2004
-
2005
- # Python type for struct whatsapp.Gateway
2006
- class Gateway(go.GoClass):
2007
- """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
2008
- def __init__(self, *args, **kwargs):
2009
- """
2010
- handle=A Go-side object is always initialized with an explicit handle=arg
2011
- otherwise parameters can be unnamed in order of field names or named fields
2012
- in which case a new Go object is constructed first
2013
- """
2014
- if len(kwargs) == 1 and 'handle' in kwargs:
2015
- self.handle = kwargs['handle']
2016
- _whatsapp.IncRef(self.handle)
2017
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2018
- self.handle = args[0].handle
2019
- _whatsapp.IncRef(self.handle)
2020
- else:
2021
- self.handle = _whatsapp.whatsapp_Gateway_CTor()
2022
- _whatsapp.IncRef(self.handle)
2023
- if 0 < len(args):
2024
- self.DBPath = args[0]
2025
- if "DBPath" in kwargs:
2026
- self.DBPath = kwargs["DBPath"]
2027
2270
  if 1 < len(args):
2028
2271
  self.Name = args[1]
2029
2272
  if "Name" in kwargs:
2030
2273
  self.Name = kwargs["Name"]
2031
2274
  if 2 < len(args):
2032
- self.LogLevel = args[2]
2033
- if "LogLevel" in kwargs:
2034
- self.LogLevel = kwargs["LogLevel"]
2275
+ self.Subject = args[2]
2276
+ if "Subject" in kwargs:
2277
+ self.Subject = kwargs["Subject"]
2035
2278
  if 3 < len(args):
2036
- self.TempDir = args[3]
2037
- if "TempDir" in kwargs:
2038
- self.TempDir = kwargs["TempDir"]
2279
+ self.Nickname = args[3]
2280
+ if "Nickname" in kwargs:
2281
+ self.Nickname = kwargs["Nickname"]
2282
+ if 4 < len(args):
2283
+ self.Participants = args[4]
2284
+ if "Participants" in kwargs:
2285
+ self.Participants = kwargs["Participants"]
2039
2286
  def __del__(self):
2040
2287
  _whatsapp.DecRef(self.handle)
2041
2288
  def __str__(self):
2042
2289
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2043
- sv = 'whatsapp.Gateway{'
2290
+ sv = 'whatsapp.Group{'
2044
2291
  first = True
2045
2292
  for v in pr:
2046
2293
  if callable(v[1]):
@@ -2053,132 +2300,56 @@ class Gateway(go.GoClass):
2053
2300
  return sv + '}'
2054
2301
  def __repr__(self):
2055
2302
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2056
- sv = 'whatsapp.Gateway ( '
2303
+ sv = 'whatsapp.Group ( '
2057
2304
  for v in pr:
2058
2305
  if not callable(v[1]):
2059
2306
  sv += v[0] + '=' + str(v[1]) + ', '
2060
2307
  return sv + ')'
2061
2308
  @property
2062
- def DBPath(self):
2063
- return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2064
- @DBPath.setter
2065
- def DBPath(self, value):
2309
+ def JID(self):
2310
+ return _whatsapp.whatsapp_Group_JID_Get(self.handle)
2311
+ @JID.setter
2312
+ def JID(self, value):
2066
2313
  if isinstance(value, go.GoClass):
2067
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
2314
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
2068
2315
  else:
2069
- _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
2316
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
2070
2317
  @property
2071
2318
  def Name(self):
2072
- return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2319
+ return _whatsapp.whatsapp_Group_Name_Get(self.handle)
2073
2320
  @Name.setter
2074
2321
  def Name(self, value):
2075
2322
  if isinstance(value, go.GoClass):
2076
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
2323
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
2077
2324
  else:
2078
- _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2325
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
2079
2326
  @property
2080
- def LogLevel(self):
2081
- return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2082
- @LogLevel.setter
2083
- def LogLevel(self, value):
2327
+ def Subject(self):
2328
+ return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
2329
+ @Subject.setter
2330
+ def Subject(self, value):
2084
2331
  if isinstance(value, go.GoClass):
2085
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2332
+ _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
2086
2333
  else:
2087
- _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2334
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2088
2335
  @property
2089
- def TempDir(self):
2090
- return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2091
- @TempDir.setter
2092
- def TempDir(self, value):
2093
- if isinstance(value, go.GoClass):
2094
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
2095
- else:
2096
- _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
2097
- def Init(self):
2098
- """Init() str
2099
-
2100
- Init performs initialization procedures for the Gateway, and is expected to be run before any
2101
- calls to [Gateway.Session].
2102
- """
2103
- return _whatsapp.whatsapp_Gateway_Init(self.handle)
2104
- def NewSession(self, device):
2105
- """NewSession(object device) object
2106
-
2107
- NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
2108
- a valid ID, a pair operation will be required, as described in [Session.Login].
2109
- """
2110
- return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
2111
- def CleanupSession(self, device):
2112
- """CleanupSession(object device) str
2113
-
2114
- CleanupSession will remove all invalid and obsolete references to the given device, and should be
2115
- used when pairing a new device or unregistering from the Gateway.
2116
- """
2117
- return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
2118
-
2119
- # Python type for struct whatsapp.LinkedDevice
2120
- class LinkedDevice(go.GoClass):
2121
- """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"""
2122
- def __init__(self, *args, **kwargs):
2123
- """
2124
- handle=A Go-side object is always initialized with an explicit handle=arg
2125
- otherwise parameters can be unnamed in order of field names or named fields
2126
- in which case a new Go object is constructed first
2127
- """
2128
- if len(kwargs) == 1 and 'handle' in kwargs:
2129
- self.handle = kwargs['handle']
2130
- _whatsapp.IncRef(self.handle)
2131
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2132
- self.handle = args[0].handle
2133
- _whatsapp.IncRef(self.handle)
2134
- else:
2135
- self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
2136
- _whatsapp.IncRef(self.handle)
2137
- if 0 < len(args):
2138
- self.ID = args[0]
2139
- if "ID" in kwargs:
2140
- self.ID = kwargs["ID"]
2141
- def __del__(self):
2142
- _whatsapp.DecRef(self.handle)
2143
- def __str__(self):
2144
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2145
- sv = 'whatsapp.LinkedDevice{'
2146
- first = True
2147
- for v in pr:
2148
- if callable(v[1]):
2149
- continue
2150
- if first:
2151
- first = False
2152
- else:
2153
- sv += ', '
2154
- sv += v[0] + '=' + str(v[1])
2155
- return sv + '}'
2156
- def __repr__(self):
2157
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2158
- sv = 'whatsapp.LinkedDevice ( '
2159
- for v in pr:
2160
- if not callable(v[1]):
2161
- sv += v[0] + '=' + str(v[1]) + ', '
2162
- return sv + ')'
2336
+ def Nickname(self):
2337
+ return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
2338
+ @Nickname.setter
2339
+ def Nickname(self, value):
2340
+ if isinstance(value, go.GoClass):
2341
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
2342
+ else:
2343
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
2163
2344
  @property
2164
- def ID(self):
2165
- """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
2166
- is currently equivalent to a password, and needs to be protected accordingly.
2167
- """
2168
- return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
2169
- @ID.setter
2170
- def ID(self, value):
2345
+ def Participants(self):
2346
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
2347
+ @Participants.setter
2348
+ def Participants(self, value):
2171
2349
  if isinstance(value, go.GoClass):
2172
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
2350
+ _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
2173
2351
  else:
2174
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
2175
- def JID(self):
2176
- """JID() object
2177
-
2178
- JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
2179
- may return invalid JIDs, and this function does not handle errors.
2180
- """
2181
- return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2352
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2182
2353
 
2183
2354
  # Python type for struct whatsapp.Location
2184
2355
  class Location(go.GoClass):
@@ -2314,239 +2485,37 @@ class Location(go.GoClass):
2314
2485
  else:
2315
2486
  _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
2316
2487
 
2317
- # Python type for struct whatsapp.Presence
2318
- class Presence(go.GoClass):
2319
- """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"""
2320
- def __init__(self, *args, **kwargs):
2321
- """
2322
- handle=A Go-side object is always initialized with an explicit handle=arg
2323
- otherwise parameters can be unnamed in order of field names or named fields
2324
- in which case a new Go object is constructed first
2325
- """
2326
- if len(kwargs) == 1 and 'handle' in kwargs:
2327
- self.handle = kwargs['handle']
2328
- _whatsapp.IncRef(self.handle)
2329
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2330
- self.handle = args[0].handle
2331
- _whatsapp.IncRef(self.handle)
2332
- else:
2333
- self.handle = _whatsapp.whatsapp_Presence_CTor()
2334
- _whatsapp.IncRef(self.handle)
2335
- if 0 < len(args):
2336
- self.JID = args[0]
2337
- if "JID" in kwargs:
2338
- self.JID = kwargs["JID"]
2339
- if 1 < len(args):
2340
- self.Kind = args[1]
2341
- if "Kind" in kwargs:
2342
- self.Kind = kwargs["Kind"]
2343
- if 2 < len(args):
2344
- self.LastSeen = args[2]
2345
- if "LastSeen" in kwargs:
2346
- self.LastSeen = kwargs["LastSeen"]
2347
- def __del__(self):
2348
- _whatsapp.DecRef(self.handle)
2349
- def __str__(self):
2350
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2351
- sv = 'whatsapp.Presence{'
2352
- first = True
2353
- for v in pr:
2354
- if callable(v[1]):
2355
- continue
2356
- if first:
2357
- first = False
2358
- else:
2359
- sv += ', '
2360
- sv += v[0] + '=' + str(v[1])
2361
- return sv + '}'
2362
- def __repr__(self):
2363
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2364
- sv = 'whatsapp.Presence ( '
2365
- for v in pr:
2366
- if not callable(v[1]):
2367
- sv += v[0] + '=' + str(v[1]) + ', '
2368
- return sv + ')'
2369
- @property
2370
- def JID(self):
2371
- return _whatsapp.whatsapp_Presence_JID_Get(self.handle)
2372
- @JID.setter
2373
- def JID(self, value):
2374
- if isinstance(value, go.GoClass):
2375
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value.handle)
2376
- else:
2377
- _whatsapp.whatsapp_Presence_JID_Set(self.handle, value)
2378
- @property
2379
- def Kind(self):
2380
- return _whatsapp.whatsapp_Presence_Kind_Get(self.handle)
2381
- @Kind.setter
2382
- def Kind(self, value):
2383
- if isinstance(value, go.GoClass):
2384
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value.handle)
2385
- else:
2386
- _whatsapp.whatsapp_Presence_Kind_Set(self.handle, value)
2387
- @property
2388
- def LastSeen(self):
2389
- return _whatsapp.whatsapp_Presence_LastSeen_Get(self.handle)
2390
- @LastSeen.setter
2391
- def LastSeen(self, value):
2392
- if isinstance(value, go.GoClass):
2393
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value.handle)
2394
- else:
2395
- _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
2396
-
2397
- # Python type for struct whatsapp.Preview
2398
- class Preview(go.GoClass):
2399
- """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"""
2400
- def __init__(self, *args, **kwargs):
2401
- """
2402
- handle=A Go-side object is always initialized with an explicit handle=arg
2403
- otherwise parameters can be unnamed in order of field names or named fields
2404
- in which case a new Go object is constructed first
2405
- """
2406
- if len(kwargs) == 1 and 'handle' in kwargs:
2407
- self.handle = kwargs['handle']
2408
- _whatsapp.IncRef(self.handle)
2409
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2410
- self.handle = args[0].handle
2411
- _whatsapp.IncRef(self.handle)
2412
- else:
2413
- self.handle = _whatsapp.whatsapp_Preview_CTor()
2414
- _whatsapp.IncRef(self.handle)
2415
- if 0 < len(args):
2416
- self.Kind = args[0]
2417
- if "Kind" in kwargs:
2418
- self.Kind = kwargs["Kind"]
2419
- if 1 < len(args):
2420
- self.URL = args[1]
2421
- if "URL" in kwargs:
2422
- self.URL = kwargs["URL"]
2423
- if 2 < len(args):
2424
- self.Title = args[2]
2425
- if "Title" in kwargs:
2426
- self.Title = kwargs["Title"]
2427
- if 3 < len(args):
2428
- self.Description = args[3]
2429
- if "Description" in kwargs:
2430
- self.Description = kwargs["Description"]
2431
- if 4 < len(args):
2432
- self.Thumbnail = args[4]
2433
- if "Thumbnail" in kwargs:
2434
- self.Thumbnail = kwargs["Thumbnail"]
2435
- def __del__(self):
2436
- _whatsapp.DecRef(self.handle)
2437
- def __str__(self):
2438
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2439
- sv = 'whatsapp.Preview{'
2440
- first = True
2441
- for v in pr:
2442
- if callable(v[1]):
2443
- continue
2444
- if first:
2445
- first = False
2446
- else:
2447
- sv += ', '
2448
- sv += v[0] + '=' + str(v[1])
2449
- return sv + '}'
2450
- def __repr__(self):
2451
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2452
- sv = 'whatsapp.Preview ( '
2453
- for v in pr:
2454
- if not callable(v[1]):
2455
- sv += v[0] + '=' + str(v[1]) + ', '
2456
- return sv + ')'
2457
- @property
2458
- def Kind(self):
2459
- return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
2460
- @Kind.setter
2461
- def Kind(self, value):
2462
- if isinstance(value, go.GoClass):
2463
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
2464
- else:
2465
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
2466
- @property
2467
- def URL(self):
2468
- return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
2469
- @URL.setter
2470
- def URL(self, value):
2471
- if isinstance(value, go.GoClass):
2472
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
2473
- else:
2474
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
2475
- @property
2476
- def Title(self):
2477
- return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
2478
- @Title.setter
2479
- def Title(self, value):
2480
- if isinstance(value, go.GoClass):
2481
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
2482
- else:
2483
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
2484
- @property
2485
- def Description(self):
2486
- return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
2487
- @Description.setter
2488
- def Description(self, value):
2489
- if isinstance(value, go.GoClass):
2490
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
2491
- else:
2492
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
2493
- @property
2494
- def Thumbnail(self):
2495
- return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
2496
- @Thumbnail.setter
2497
- def Thumbnail(self, value):
2498
- if isinstance(value, go.GoClass):
2499
- _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
2500
- else:
2501
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2502
-
2503
- # Python type for struct whatsapp.Receipt
2504
- class Receipt(go.GoClass):
2505
- """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"""
2488
+ # Python type for struct whatsapp.Poll
2489
+ class Poll(go.GoClass):
2490
+ """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
2506
2491
  def __init__(self, *args, **kwargs):
2507
2492
  """
2508
2493
  handle=A Go-side object is always initialized with an explicit handle=arg
2509
2494
  otherwise parameters can be unnamed in order of field names or named fields
2510
- in which case a new Go object is constructed first
2511
- """
2512
- if len(kwargs) == 1 and 'handle' in kwargs:
2513
- self.handle = kwargs['handle']
2514
- _whatsapp.IncRef(self.handle)
2515
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2516
- self.handle = args[0].handle
2517
- _whatsapp.IncRef(self.handle)
2518
- else:
2519
- self.handle = _whatsapp.whatsapp_Receipt_CTor()
2520
- _whatsapp.IncRef(self.handle)
2521
- if 0 < len(args):
2522
- self.Kind = args[0]
2523
- if "Kind" in kwargs:
2524
- self.Kind = kwargs["Kind"]
2525
- if 1 < len(args):
2526
- self.MessageIDs = args[1]
2527
- if "MessageIDs" in kwargs:
2528
- self.MessageIDs = kwargs["MessageIDs"]
2529
- if 2 < len(args):
2530
- self.JID = args[2]
2531
- if "JID" in kwargs:
2532
- self.JID = kwargs["JID"]
2533
- if 3 < len(args):
2534
- self.GroupJID = args[3]
2535
- if "GroupJID" in kwargs:
2536
- self.GroupJID = kwargs["GroupJID"]
2537
- if 4 < len(args):
2538
- self.Timestamp = args[4]
2539
- if "Timestamp" in kwargs:
2540
- self.Timestamp = kwargs["Timestamp"]
2541
- if 5 < len(args):
2542
- self.IsCarbon = args[5]
2543
- if "IsCarbon" in kwargs:
2544
- self.IsCarbon = kwargs["IsCarbon"]
2495
+ in which case a new Go object is constructed first
2496
+ """
2497
+ if len(kwargs) == 1 and 'handle' in kwargs:
2498
+ self.handle = kwargs['handle']
2499
+ _whatsapp.IncRef(self.handle)
2500
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2501
+ self.handle = args[0].handle
2502
+ _whatsapp.IncRef(self.handle)
2503
+ else:
2504
+ self.handle = _whatsapp.whatsapp_Poll_CTor()
2505
+ _whatsapp.IncRef(self.handle)
2506
+ if 0 < len(args):
2507
+ self.Title = args[0]
2508
+ if "Title" in kwargs:
2509
+ self.Title = kwargs["Title"]
2510
+ if 1 < len(args):
2511
+ self.Options = args[1]
2512
+ if "Options" in kwargs:
2513
+ self.Options = kwargs["Options"]
2545
2514
  def __del__(self):
2546
2515
  _whatsapp.DecRef(self.handle)
2547
2516
  def __str__(self):
2548
2517
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2549
- sv = 'whatsapp.Receipt{'
2518
+ sv = 'whatsapp.Poll{'
2550
2519
  first = True
2551
2520
  for v in pr:
2552
2521
  if callable(v[1]):
@@ -2559,69 +2528,33 @@ class Receipt(go.GoClass):
2559
2528
  return sv + '}'
2560
2529
  def __repr__(self):
2561
2530
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2562
- sv = 'whatsapp.Receipt ( '
2531
+ sv = 'whatsapp.Poll ( '
2563
2532
  for v in pr:
2564
2533
  if not callable(v[1]):
2565
2534
  sv += v[0] + '=' + str(v[1]) + ', '
2566
2535
  return sv + ')'
2567
2536
  @property
2568
- def Kind(self):
2569
- return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
2570
- @Kind.setter
2571
- def Kind(self, value):
2537
+ def Title(self):
2538
+ return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
2539
+ @Title.setter
2540
+ def Title(self, value):
2572
2541
  if isinstance(value, go.GoClass):
2573
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
2542
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
2574
2543
  else:
2575
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
2544
+ _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
2576
2545
  @property
2577
- def MessageIDs(self):
2578
- return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
2579
- @MessageIDs.setter
2580
- def MessageIDs(self, value):
2546
+ def Options(self):
2547
+ return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2548
+ @Options.setter
2549
+ def Options(self, value):
2581
2550
  if isinstance(value, go.GoClass):
2582
- _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
2551
+ _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
2583
2552
  else:
2584
2553
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2585
- @property
2586
- def JID(self):
2587
- return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
2588
- @JID.setter
2589
- def JID(self, value):
2590
- if isinstance(value, go.GoClass):
2591
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
2592
- else:
2593
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
2594
- @property
2595
- def GroupJID(self):
2596
- return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
2597
- @GroupJID.setter
2598
- def GroupJID(self, value):
2599
- if isinstance(value, go.GoClass):
2600
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
2601
- else:
2602
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
2603
- @property
2604
- def Timestamp(self):
2605
- return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
2606
- @Timestamp.setter
2607
- def Timestamp(self, value):
2608
- if isinstance(value, go.GoClass):
2609
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
2610
- else:
2611
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
2612
- @property
2613
- def IsCarbon(self):
2614
- return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
2615
- @IsCarbon.setter
2616
- def IsCarbon(self, value):
2617
- if isinstance(value, go.GoClass):
2618
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
2619
- else:
2620
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
2621
2554
 
2622
- # Python type for struct whatsapp.Attachment
2623
- class Attachment(go.GoClass):
2624
- """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
2555
+ # Python type for struct whatsapp.Gateway
2556
+ class Gateway(go.GoClass):
2557
+ """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
2625
2558
  def __init__(self, *args, **kwargs):
2626
2559
  """
2627
2560
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2635,29 +2568,29 @@ class Attachment(go.GoClass):
2635
2568
  self.handle = args[0].handle
2636
2569
  _whatsapp.IncRef(self.handle)
2637
2570
  else:
2638
- self.handle = _whatsapp.whatsapp_Attachment_CTor()
2571
+ self.handle = _whatsapp.whatsapp_Gateway_CTor()
2639
2572
  _whatsapp.IncRef(self.handle)
2640
2573
  if 0 < len(args):
2641
- self.MIME = args[0]
2642
- if "MIME" in kwargs:
2643
- self.MIME = kwargs["MIME"]
2574
+ self.DBPath = args[0]
2575
+ if "DBPath" in kwargs:
2576
+ self.DBPath = kwargs["DBPath"]
2644
2577
  if 1 < len(args):
2645
- self.Filename = args[1]
2646
- if "Filename" in kwargs:
2647
- self.Filename = kwargs["Filename"]
2578
+ self.Name = args[1]
2579
+ if "Name" in kwargs:
2580
+ self.Name = kwargs["Name"]
2648
2581
  if 2 < len(args):
2649
- self.Caption = args[2]
2650
- if "Caption" in kwargs:
2651
- self.Caption = kwargs["Caption"]
2582
+ self.LogLevel = args[2]
2583
+ if "LogLevel" in kwargs:
2584
+ self.LogLevel = kwargs["LogLevel"]
2652
2585
  if 3 < len(args):
2653
- self.Data = args[3]
2654
- if "Data" in kwargs:
2655
- self.Data = kwargs["Data"]
2586
+ self.TempDir = args[3]
2587
+ if "TempDir" in kwargs:
2588
+ self.TempDir = kwargs["TempDir"]
2656
2589
  def __del__(self):
2657
2590
  _whatsapp.DecRef(self.handle)
2658
2591
  def __str__(self):
2659
2592
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2660
- sv = 'whatsapp.Attachment{'
2593
+ sv = 'whatsapp.Gateway{'
2661
2594
  first = True
2662
2595
  for v in pr:
2663
2596
  if callable(v[1]):
@@ -2670,57 +2603,72 @@ class Attachment(go.GoClass):
2670
2603
  return sv + '}'
2671
2604
  def __repr__(self):
2672
2605
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2673
- sv = 'whatsapp.Attachment ( '
2606
+ sv = 'whatsapp.Gateway ( '
2674
2607
  for v in pr:
2675
2608
  if not callable(v[1]):
2676
2609
  sv += v[0] + '=' + str(v[1]) + ', '
2677
2610
  return sv + ')'
2678
2611
  @property
2679
- def MIME(self):
2680
- return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
2681
- @MIME.setter
2682
- def MIME(self, value):
2612
+ def DBPath(self):
2613
+ return _whatsapp.whatsapp_Gateway_DBPath_Get(self.handle)
2614
+ @DBPath.setter
2615
+ def DBPath(self, value):
2683
2616
  if isinstance(value, go.GoClass):
2684
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
2617
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value.handle)
2685
2618
  else:
2686
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
2619
+ _whatsapp.whatsapp_Gateway_DBPath_Set(self.handle, value)
2687
2620
  @property
2688
- def Filename(self):
2689
- return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
2690
- @Filename.setter
2691
- def Filename(self, value):
2621
+ def Name(self):
2622
+ return _whatsapp.whatsapp_Gateway_Name_Get(self.handle)
2623
+ @Name.setter
2624
+ def Name(self, value):
2692
2625
  if isinstance(value, go.GoClass):
2693
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
2626
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value.handle)
2694
2627
  else:
2695
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
2628
+ _whatsapp.whatsapp_Gateway_Name_Set(self.handle, value)
2696
2629
  @property
2697
- def Caption(self):
2698
- return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
2699
- @Caption.setter
2700
- def Caption(self, value):
2630
+ def LogLevel(self):
2631
+ return _whatsapp.whatsapp_Gateway_LogLevel_Get(self.handle)
2632
+ @LogLevel.setter
2633
+ def LogLevel(self, value):
2701
2634
  if isinstance(value, go.GoClass):
2702
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
2635
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value.handle)
2703
2636
  else:
2704
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
2637
+ _whatsapp.whatsapp_Gateway_LogLevel_Set(self.handle, value)
2705
2638
  @property
2706
- def Data(self):
2707
- return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
2708
- @Data.setter
2709
- def Data(self, value):
2639
+ def TempDir(self):
2640
+ return _whatsapp.whatsapp_Gateway_TempDir_Get(self.handle)
2641
+ @TempDir.setter
2642
+ def TempDir(self, value):
2710
2643
  if isinstance(value, go.GoClass):
2711
- _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
2644
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value.handle)
2712
2645
  else:
2713
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2714
- def GetSpec(self, ctx):
2715
- """GetSpec(object ctx) object, str
2646
+ _whatsapp.whatsapp_Gateway_TempDir_Set(self.handle, value)
2647
+ def Init(self):
2648
+ """Init() str
2716
2649
 
2717
- GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
2650
+ Init performs initialization procedures for the Gateway, and is expected to be run before any
2651
+ calls to [Gateway.Session].
2718
2652
  """
2719
- return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
2653
+ return _whatsapp.whatsapp_Gateway_Init(self.handle)
2654
+ def NewSession(self, device):
2655
+ """NewSession(object device) object
2656
+
2657
+ NewSession returns a new [Session] for the LinkedDevice given. If the linked device does not have
2658
+ a valid ID, a pair operation will be required, as described in [Session.Login].
2659
+ """
2660
+ return Session(handle=_whatsapp.whatsapp_Gateway_NewSession(self.handle, device.handle))
2661
+ def CleanupSession(self, device):
2662
+ """CleanupSession(object device) str
2663
+
2664
+ CleanupSession will remove all invalid and obsolete references to the given device, and should be
2665
+ used when pairing a new device or unregistering from the Gateway.
2666
+ """
2667
+ return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
2720
2668
 
2721
- # Python type for struct whatsapp.Group
2722
- class Group(go.GoClass):
2723
- """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"""
2669
+ # Python type for struct whatsapp.Message
2670
+ class Message(go.GoClass):
2671
+ """A Message represents one of many kinds of bidirectional communication payloads, for example, a\ntext message, a file (image, video) attachment, an emoji reaction, etc. Messages of different\nkinds are denoted as such, and re-use fields where the semantics overlap.\n"""
2724
2672
  def __init__(self, *args, **kwargs):
2725
2673
  """
2726
2674
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2734,33 +2682,89 @@ class Group(go.GoClass):
2734
2682
  self.handle = args[0].handle
2735
2683
  _whatsapp.IncRef(self.handle)
2736
2684
  else:
2737
- self.handle = _whatsapp.whatsapp_Group_CTor()
2685
+ self.handle = _whatsapp.whatsapp_Message_CTor()
2738
2686
  _whatsapp.IncRef(self.handle)
2739
2687
  if 0 < len(args):
2740
- self.JID = args[0]
2741
- if "JID" in kwargs:
2742
- self.JID = kwargs["JID"]
2688
+ self.Kind = args[0]
2689
+ if "Kind" in kwargs:
2690
+ self.Kind = kwargs["Kind"]
2743
2691
  if 1 < len(args):
2744
- self.Name = args[1]
2745
- if "Name" in kwargs:
2746
- self.Name = kwargs["Name"]
2692
+ self.ID = args[1]
2693
+ if "ID" in kwargs:
2694
+ self.ID = kwargs["ID"]
2747
2695
  if 2 < len(args):
2748
- self.Subject = args[2]
2749
- if "Subject" in kwargs:
2750
- self.Subject = kwargs["Subject"]
2696
+ self.JID = args[2]
2697
+ if "JID" in kwargs:
2698
+ self.JID = kwargs["JID"]
2751
2699
  if 3 < len(args):
2752
- self.Nickname = args[3]
2753
- if "Nickname" in kwargs:
2754
- self.Nickname = kwargs["Nickname"]
2700
+ self.GroupJID = args[3]
2701
+ if "GroupJID" in kwargs:
2702
+ self.GroupJID = kwargs["GroupJID"]
2755
2703
  if 4 < len(args):
2756
- self.Participants = args[4]
2757
- if "Participants" in kwargs:
2758
- self.Participants = kwargs["Participants"]
2704
+ self.OriginJID = args[4]
2705
+ if "OriginJID" in kwargs:
2706
+ self.OriginJID = kwargs["OriginJID"]
2707
+ if 5 < len(args):
2708
+ self.Body = args[5]
2709
+ if "Body" in kwargs:
2710
+ self.Body = kwargs["Body"]
2711
+ if 6 < len(args):
2712
+ self.Timestamp = args[6]
2713
+ if "Timestamp" in kwargs:
2714
+ self.Timestamp = kwargs["Timestamp"]
2715
+ if 7 < len(args):
2716
+ self.IsCarbon = args[7]
2717
+ if "IsCarbon" in kwargs:
2718
+ self.IsCarbon = kwargs["IsCarbon"]
2719
+ if 8 < len(args):
2720
+ self.IsForwarded = args[8]
2721
+ if "IsForwarded" in kwargs:
2722
+ self.IsForwarded = kwargs["IsForwarded"]
2723
+ if 9 < len(args):
2724
+ self.ReplyID = args[9]
2725
+ if "ReplyID" in kwargs:
2726
+ self.ReplyID = kwargs["ReplyID"]
2727
+ if 10 < len(args):
2728
+ self.ReplyBody = args[10]
2729
+ if "ReplyBody" in kwargs:
2730
+ self.ReplyBody = kwargs["ReplyBody"]
2731
+ if 11 < len(args):
2732
+ self.Attachments = args[11]
2733
+ if "Attachments" in kwargs:
2734
+ self.Attachments = kwargs["Attachments"]
2735
+ if 12 < len(args):
2736
+ self.Preview = args[12]
2737
+ if "Preview" in kwargs:
2738
+ self.Preview = kwargs["Preview"]
2739
+ if 13 < len(args):
2740
+ self.Location = args[13]
2741
+ if "Location" in kwargs:
2742
+ self.Location = kwargs["Location"]
2743
+ if 14 < len(args):
2744
+ self.Poll = args[14]
2745
+ if "Poll" in kwargs:
2746
+ self.Poll = kwargs["Poll"]
2747
+ if 15 < len(args):
2748
+ self.Album = args[15]
2749
+ if "Album" in kwargs:
2750
+ self.Album = kwargs["Album"]
2751
+ if 16 < len(args):
2752
+ self.MentionJIDs = args[16]
2753
+ if "MentionJIDs" in kwargs:
2754
+ self.MentionJIDs = kwargs["MentionJIDs"]
2755
+ if 17 < len(args):
2756
+ self.Receipts = args[17]
2757
+ if "Receipts" in kwargs:
2758
+ self.Receipts = kwargs["Receipts"]
2759
+ if 18 < len(args):
2760
+ self.Reactions = args[18]
2761
+ if "Reactions" in kwargs:
2762
+ self.Reactions = kwargs["Reactions"]
2759
2763
  def __del__(self):
2760
2764
  _whatsapp.DecRef(self.handle)
2761
2765
  def __str__(self):
2762
2766
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2763
- sv = 'whatsapp.Group{'
2767
+ sv = 'whatsapp.Message{'
2764
2768
  first = True
2765
2769
  for v in pr:
2766
2770
  if callable(v[1]):
@@ -2773,60 +2777,186 @@ class Group(go.GoClass):
2773
2777
  return sv + '}'
2774
2778
  def __repr__(self):
2775
2779
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2776
- sv = 'whatsapp.Group ( '
2780
+ sv = 'whatsapp.Message ( '
2777
2781
  for v in pr:
2778
2782
  if not callable(v[1]):
2779
2783
  sv += v[0] + '=' + str(v[1]) + ', '
2780
2784
  return sv + ')'
2781
2785
  @property
2786
+ def Kind(self):
2787
+ return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
2788
+ @Kind.setter
2789
+ def Kind(self, value):
2790
+ if isinstance(value, go.GoClass):
2791
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
2792
+ else:
2793
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
2794
+ @property
2795
+ def ID(self):
2796
+ return _whatsapp.whatsapp_Message_ID_Get(self.handle)
2797
+ @ID.setter
2798
+ def ID(self, value):
2799
+ if isinstance(value, go.GoClass):
2800
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
2801
+ else:
2802
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
2803
+ @property
2782
2804
  def JID(self):
2783
- return _whatsapp.whatsapp_Group_JID_Get(self.handle)
2805
+ return _whatsapp.whatsapp_Message_JID_Get(self.handle)
2784
2806
  @JID.setter
2785
2807
  def JID(self, value):
2786
2808
  if isinstance(value, go.GoClass):
2787
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
2809
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
2788
2810
  else:
2789
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
2811
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
2790
2812
  @property
2791
- def Name(self):
2792
- return _whatsapp.whatsapp_Group_Name_Get(self.handle)
2793
- @Name.setter
2794
- def Name(self, value):
2813
+ def GroupJID(self):
2814
+ return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
2815
+ @GroupJID.setter
2816
+ def GroupJID(self, value):
2795
2817
  if isinstance(value, go.GoClass):
2796
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
2818
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
2797
2819
  else:
2798
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
2820
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
2799
2821
  @property
2800
- def Subject(self):
2801
- return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
2802
- @Subject.setter
2803
- def Subject(self, value):
2822
+ def OriginJID(self):
2823
+ return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
2824
+ @OriginJID.setter
2825
+ def OriginJID(self, value):
2804
2826
  if isinstance(value, go.GoClass):
2805
- _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
2827
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
2828
+ else:
2829
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
2830
+ @property
2831
+ def Body(self):
2832
+ return _whatsapp.whatsapp_Message_Body_Get(self.handle)
2833
+ @Body.setter
2834
+ def Body(self, value):
2835
+ if isinstance(value, go.GoClass):
2836
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
2837
+ else:
2838
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
2839
+ @property
2840
+ def Timestamp(self):
2841
+ return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
2842
+ @Timestamp.setter
2843
+ def Timestamp(self, value):
2844
+ if isinstance(value, go.GoClass):
2845
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
2846
+ else:
2847
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
2848
+ @property
2849
+ def IsCarbon(self):
2850
+ return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
2851
+ @IsCarbon.setter
2852
+ def IsCarbon(self, value):
2853
+ if isinstance(value, go.GoClass):
2854
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
2855
+ else:
2856
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
2857
+ @property
2858
+ def IsForwarded(self):
2859
+ return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
2860
+ @IsForwarded.setter
2861
+ def IsForwarded(self, value):
2862
+ if isinstance(value, go.GoClass):
2863
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
2864
+ else:
2865
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
2866
+ @property
2867
+ def ReplyID(self):
2868
+ return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
2869
+ @ReplyID.setter
2870
+ def ReplyID(self, value):
2871
+ if isinstance(value, go.GoClass):
2872
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
2873
+ else:
2874
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
2875
+ @property
2876
+ def ReplyBody(self):
2877
+ return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
2878
+ @ReplyBody.setter
2879
+ def ReplyBody(self, value):
2880
+ if isinstance(value, go.GoClass):
2881
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
2882
+ else:
2883
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
2884
+ @property
2885
+ def Attachments(self):
2886
+ return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
2887
+ @Attachments.setter
2888
+ def Attachments(self, value):
2889
+ if isinstance(value, go.GoClass):
2890
+ _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
2806
2891
  else:
2807
2892
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2808
2893
  @property
2809
- def Nickname(self):
2810
- return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
2811
- @Nickname.setter
2812
- def Nickname(self, value):
2894
+ def Preview(self):
2895
+ return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
2896
+ @Preview.setter
2897
+ def Preview(self, value):
2813
2898
  if isinstance(value, go.GoClass):
2814
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
2899
+ _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
2815
2900
  else:
2816
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
2901
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2817
2902
  @property
2818
- def Participants(self):
2819
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
2820
- @Participants.setter
2821
- def Participants(self, value):
2903
+ def Location(self):
2904
+ return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
2905
+ @Location.setter
2906
+ def Location(self, value):
2822
2907
  if isinstance(value, go.GoClass):
2823
- _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
2908
+ _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
2909
+ else:
2910
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2911
+ @property
2912
+ def Poll(self):
2913
+ return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
2914
+ @Poll.setter
2915
+ def Poll(self, value):
2916
+ if isinstance(value, go.GoClass):
2917
+ _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
2918
+ else:
2919
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2920
+ @property
2921
+ def Album(self):
2922
+ return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
2923
+ @Album.setter
2924
+ def Album(self, value):
2925
+ if isinstance(value, go.GoClass):
2926
+ _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
2927
+ else:
2928
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2929
+ @property
2930
+ def MentionJIDs(self):
2931
+ return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2932
+ @MentionJIDs.setter
2933
+ def MentionJIDs(self, value):
2934
+ if isinstance(value, go.GoClass):
2935
+ _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
2936
+ else:
2937
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2938
+ @property
2939
+ def Receipts(self):
2940
+ return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
2941
+ @Receipts.setter
2942
+ def Receipts(self, value):
2943
+ if isinstance(value, go.GoClass):
2944
+ _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
2945
+ else:
2946
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2947
+ @property
2948
+ def Reactions(self):
2949
+ return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
2950
+ @Reactions.setter
2951
+ def Reactions(self, value):
2952
+ if isinstance(value, go.GoClass):
2953
+ _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2824
2954
  else:
2825
2955
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2826
2956
 
2827
- # Python type for struct whatsapp.GroupSubject
2828
- class GroupSubject(go.GoClass):
2829
- """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
2957
+ # Python type for struct whatsapp.PollOption
2958
+ class PollOption(go.GoClass):
2959
+ """A PollOption represents an individual choice within a broader poll.\n"""
2830
2960
  def __init__(self, *args, **kwargs):
2831
2961
  """
2832
2962
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2840,25 +2970,17 @@ class GroupSubject(go.GoClass):
2840
2970
  self.handle = args[0].handle
2841
2971
  _whatsapp.IncRef(self.handle)
2842
2972
  else:
2843
- self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
2973
+ self.handle = _whatsapp.whatsapp_PollOption_CTor()
2844
2974
  _whatsapp.IncRef(self.handle)
2845
2975
  if 0 < len(args):
2846
- self.Subject = args[0]
2847
- if "Subject" in kwargs:
2848
- self.Subject = kwargs["Subject"]
2849
- if 1 < len(args):
2850
- self.SetAt = args[1]
2851
- if "SetAt" in kwargs:
2852
- self.SetAt = kwargs["SetAt"]
2853
- if 2 < len(args):
2854
- self.SetByJID = args[2]
2855
- if "SetByJID" in kwargs:
2856
- self.SetByJID = kwargs["SetByJID"]
2976
+ self.Title = args[0]
2977
+ if "Title" in kwargs:
2978
+ self.Title = kwargs["Title"]
2857
2979
  def __del__(self):
2858
2980
  _whatsapp.DecRef(self.handle)
2859
2981
  def __str__(self):
2860
2982
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2861
- sv = 'whatsapp.GroupSubject{'
2983
+ sv = 'whatsapp.PollOption{'
2862
2984
  first = True
2863
2985
  for v in pr:
2864
2986
  if callable(v[1]):
@@ -2868,45 +2990,27 @@ class GroupSubject(go.GoClass):
2868
2990
  else:
2869
2991
  sv += ', '
2870
2992
  sv += v[0] + '=' + str(v[1])
2871
- return sv + '}'
2872
- def __repr__(self):
2873
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2874
- sv = 'whatsapp.GroupSubject ( '
2875
- for v in pr:
2876
- if not callable(v[1]):
2877
- sv += v[0] + '=' + str(v[1]) + ', '
2878
- return sv + ')'
2879
- @property
2880
- def Subject(self):
2881
- return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
2882
- @Subject.setter
2883
- def Subject(self, value):
2884
- if isinstance(value, go.GoClass):
2885
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
2886
- else:
2887
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
2888
- @property
2889
- def SetAt(self):
2890
- return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
2891
- @SetAt.setter
2892
- def SetAt(self, value):
2893
- if isinstance(value, go.GoClass):
2894
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
2895
- else:
2896
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
2993
+ return sv + '}'
2994
+ def __repr__(self):
2995
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2996
+ sv = 'whatsapp.PollOption ( '
2997
+ for v in pr:
2998
+ if not callable(v[1]):
2999
+ sv += v[0] + '=' + str(v[1]) + ', '
3000
+ return sv + ')'
2897
3001
  @property
2898
- def SetByJID(self):
2899
- return _whatsapp.whatsapp_GroupSubject_SetByJID_Get(self.handle)
2900
- @SetByJID.setter
2901
- def SetByJID(self, value):
3002
+ def Title(self):
3003
+ return _whatsapp.whatsapp_PollOption_Title_Get(self.handle)
3004
+ @Title.setter
3005
+ def Title(self, value):
2902
3006
  if isinstance(value, go.GoClass):
2903
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value.handle)
3007
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value.handle)
2904
3008
  else:
2905
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
3009
+ _whatsapp.whatsapp_PollOption_Title_Set(self.handle, value)
2906
3010
 
2907
- # Python type for struct whatsapp.Poll
2908
- class Poll(go.GoClass):
2909
- """A Poll represents a multiple-choice question, on which each choice might be voted for one or more\ntimes.\n"""
3011
+ # Python type for struct whatsapp.Avatar
3012
+ class Avatar(go.GoClass):
3013
+ """A Avatar represents a small image set for a Contact or Group.\n"""
2910
3014
  def __init__(self, *args, **kwargs):
2911
3015
  """
2912
3016
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2920,21 +3024,21 @@ class Poll(go.GoClass):
2920
3024
  self.handle = args[0].handle
2921
3025
  _whatsapp.IncRef(self.handle)
2922
3026
  else:
2923
- self.handle = _whatsapp.whatsapp_Poll_CTor()
3027
+ self.handle = _whatsapp.whatsapp_Avatar_CTor()
2924
3028
  _whatsapp.IncRef(self.handle)
2925
3029
  if 0 < len(args):
2926
- self.Title = args[0]
2927
- if "Title" in kwargs:
2928
- self.Title = kwargs["Title"]
3030
+ self.ID = args[0]
3031
+ if "ID" in kwargs:
3032
+ self.ID = kwargs["ID"]
2929
3033
  if 1 < len(args):
2930
- self.Options = args[1]
2931
- if "Options" in kwargs:
2932
- self.Options = kwargs["Options"]
3034
+ self.URL = args[1]
3035
+ if "URL" in kwargs:
3036
+ self.URL = kwargs["URL"]
2933
3037
  def __del__(self):
2934
3038
  _whatsapp.DecRef(self.handle)
2935
3039
  def __str__(self):
2936
3040
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2937
- sv = 'whatsapp.Poll{'
3041
+ sv = 'whatsapp.Avatar{'
2938
3042
  first = True
2939
3043
  for v in pr:
2940
3044
  if callable(v[1]):
@@ -2947,33 +3051,33 @@ class Poll(go.GoClass):
2947
3051
  return sv + '}'
2948
3052
  def __repr__(self):
2949
3053
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2950
- sv = 'whatsapp.Poll ( '
3054
+ sv = 'whatsapp.Avatar ( '
2951
3055
  for v in pr:
2952
3056
  if not callable(v[1]):
2953
3057
  sv += v[0] + '=' + str(v[1]) + ', '
2954
3058
  return sv + ')'
2955
3059
  @property
2956
- def Title(self):
2957
- return _whatsapp.whatsapp_Poll_Title_Get(self.handle)
2958
- @Title.setter
2959
- def Title(self, value):
3060
+ def ID(self):
3061
+ return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
3062
+ @ID.setter
3063
+ def ID(self, value):
2960
3064
  if isinstance(value, go.GoClass):
2961
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value.handle)
3065
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
2962
3066
  else:
2963
- _whatsapp.whatsapp_Poll_Title_Set(self.handle, value)
3067
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
2964
3068
  @property
2965
- def Options(self):
2966
- return Slice_whatsapp_PollOption(handle=_whatsapp.whatsapp_Poll_Options_Get(self.handle))
2967
- @Options.setter
2968
- def Options(self, value):
3069
+ def URL(self):
3070
+ return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
3071
+ @URL.setter
3072
+ def URL(self, value):
2969
3073
  if isinstance(value, go.GoClass):
2970
- _whatsapp.whatsapp_Poll_Options_Set(self.handle, value.handle)
3074
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
2971
3075
  else:
2972
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3076
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
2973
3077
 
2974
- # Python type for struct whatsapp.Contact
2975
- class Contact(go.GoClass):
2976
- """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"""
3078
+ # Python type for struct whatsapp.Connect
3079
+ class Connect(go.GoClass):
3080
+ """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
2977
3081
  def __init__(self, *args, **kwargs):
2978
3082
  """
2979
3083
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2987,21 +3091,21 @@ class Contact(go.GoClass):
2987
3091
  self.handle = args[0].handle
2988
3092
  _whatsapp.IncRef(self.handle)
2989
3093
  else:
2990
- self.handle = _whatsapp.whatsapp_Contact_CTor()
3094
+ self.handle = _whatsapp.whatsapp_Connect_CTor()
2991
3095
  _whatsapp.IncRef(self.handle)
2992
3096
  if 0 < len(args):
2993
3097
  self.JID = args[0]
2994
3098
  if "JID" in kwargs:
2995
3099
  self.JID = kwargs["JID"]
2996
3100
  if 1 < len(args):
2997
- self.Name = args[1]
2998
- if "Name" in kwargs:
2999
- self.Name = kwargs["Name"]
3101
+ self.Error = args[1]
3102
+ if "Error" in kwargs:
3103
+ self.Error = kwargs["Error"]
3000
3104
  def __del__(self):
3001
3105
  _whatsapp.DecRef(self.handle)
3002
3106
  def __str__(self):
3003
3107
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3004
- sv = 'whatsapp.Contact{'
3108
+ sv = 'whatsapp.Connect{'
3005
3109
  first = True
3006
3110
  for v in pr:
3007
3111
  if callable(v[1]):
@@ -3014,33 +3118,33 @@ class Contact(go.GoClass):
3014
3118
  return sv + '}'
3015
3119
  def __repr__(self):
3016
3120
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3017
- sv = 'whatsapp.Contact ( '
3121
+ sv = 'whatsapp.Connect ( '
3018
3122
  for v in pr:
3019
3123
  if not callable(v[1]):
3020
3124
  sv += v[0] + '=' + str(v[1]) + ', '
3021
3125
  return sv + ')'
3022
3126
  @property
3023
3127
  def JID(self):
3024
- return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
3128
+ return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
3025
3129
  @JID.setter
3026
3130
  def JID(self, value):
3027
3131
  if isinstance(value, go.GoClass):
3028
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
3132
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
3029
3133
  else:
3030
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
3134
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
3031
3135
  @property
3032
- def Name(self):
3033
- return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
3034
- @Name.setter
3035
- def Name(self, value):
3136
+ def Error(self):
3137
+ return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
3138
+ @Error.setter
3139
+ def Error(self, value):
3036
3140
  if isinstance(value, go.GoClass):
3037
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
3141
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
3038
3142
  else:
3039
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
3143
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
3040
3144
 
3041
- # Python type for struct whatsapp.EventPayload
3042
- class EventPayload(go.GoClass):
3043
- """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"""
3145
+ # Python type for struct whatsapp.Contact
3146
+ class Contact(go.GoClass):
3147
+ """A Contact represents any entity that be communicated with directly in WhatsApp. This typically\nrepresents people, but may represent a business or bot as well, but not a group-chat.\n"""
3044
3148
  def __init__(self, *args, **kwargs):
3045
3149
  """
3046
3150
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3054,53 +3158,21 @@ class EventPayload(go.GoClass):
3054
3158
  self.handle = args[0].handle
3055
3159
  _whatsapp.IncRef(self.handle)
3056
3160
  else:
3057
- self.handle = _whatsapp.whatsapp_EventPayload_CTor()
3161
+ self.handle = _whatsapp.whatsapp_Contact_CTor()
3058
3162
  _whatsapp.IncRef(self.handle)
3059
3163
  if 0 < len(args):
3060
- self.QRCode = args[0]
3061
- if "QRCode" in kwargs:
3062
- self.QRCode = kwargs["QRCode"]
3164
+ self.JID = args[0]
3165
+ if "JID" in kwargs:
3166
+ self.JID = kwargs["JID"]
3063
3167
  if 1 < len(args):
3064
- self.PairDeviceID = args[1]
3065
- if "PairDeviceID" in kwargs:
3066
- self.PairDeviceID = kwargs["PairDeviceID"]
3067
- if 2 < len(args):
3068
- self.Connect = args[2]
3069
- if "Connect" in kwargs:
3070
- self.Connect = kwargs["Connect"]
3071
- if 3 < len(args):
3072
- self.Contact = args[3]
3073
- if "Contact" in kwargs:
3074
- self.Contact = kwargs["Contact"]
3075
- if 4 < len(args):
3076
- self.Presence = args[4]
3077
- if "Presence" in kwargs:
3078
- self.Presence = kwargs["Presence"]
3079
- if 5 < len(args):
3080
- self.Message = args[5]
3081
- if "Message" in kwargs:
3082
- self.Message = kwargs["Message"]
3083
- if 6 < len(args):
3084
- self.ChatState = args[6]
3085
- if "ChatState" in kwargs:
3086
- self.ChatState = kwargs["ChatState"]
3087
- if 7 < len(args):
3088
- self.Receipt = args[7]
3089
- if "Receipt" in kwargs:
3090
- self.Receipt = kwargs["Receipt"]
3091
- if 8 < len(args):
3092
- self.Group = args[8]
3093
- if "Group" in kwargs:
3094
- self.Group = kwargs["Group"]
3095
- if 9 < len(args):
3096
- self.Call = args[9]
3097
- if "Call" in kwargs:
3098
- self.Call = kwargs["Call"]
3168
+ self.Name = args[1]
3169
+ if "Name" in kwargs:
3170
+ self.Name = kwargs["Name"]
3099
3171
  def __del__(self):
3100
3172
  _whatsapp.DecRef(self.handle)
3101
3173
  def __str__(self):
3102
3174
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3103
- sv = 'whatsapp.EventPayload{'
3175
+ sv = 'whatsapp.Contact{'
3104
3176
  first = True
3105
3177
  for v in pr:
3106
3178
  if callable(v[1]):
@@ -3113,101 +3185,29 @@ class EventPayload(go.GoClass):
3113
3185
  return sv + '}'
3114
3186
  def __repr__(self):
3115
3187
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3116
- sv = 'whatsapp.EventPayload ( '
3188
+ sv = 'whatsapp.Contact ( '
3117
3189
  for v in pr:
3118
3190
  if not callable(v[1]):
3119
3191
  sv += v[0] + '=' + str(v[1]) + ', '
3120
3192
  return sv + ')'
3121
3193
  @property
3122
- def QRCode(self):
3123
- return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
3124
- @QRCode.setter
3125
- def QRCode(self, value):
3126
- if isinstance(value, go.GoClass):
3127
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
3128
- else:
3129
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
3130
- @property
3131
- def PairDeviceID(self):
3132
- return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
3133
- @PairDeviceID.setter
3134
- def PairDeviceID(self, value):
3135
- if isinstance(value, go.GoClass):
3136
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
3137
- else:
3138
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
3139
- @property
3140
- def Connect(self):
3141
- return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
3142
- @Connect.setter
3143
- def Connect(self, value):
3144
- if isinstance(value, go.GoClass):
3145
- _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
3146
- else:
3147
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3148
- @property
3149
- def Contact(self):
3150
- return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
3151
- @Contact.setter
3152
- def Contact(self, value):
3153
- if isinstance(value, go.GoClass):
3154
- _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
3155
- else:
3156
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3157
- @property
3158
- def Presence(self):
3159
- return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
3160
- @Presence.setter
3161
- def Presence(self, value):
3162
- if isinstance(value, go.GoClass):
3163
- _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
3164
- else:
3165
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3166
- @property
3167
- def Message(self):
3168
- return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
3169
- @Message.setter
3170
- def Message(self, value):
3171
- if isinstance(value, go.GoClass):
3172
- _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
3173
- else:
3174
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3175
- @property
3176
- def ChatState(self):
3177
- return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
3178
- @ChatState.setter
3179
- def ChatState(self, value):
3180
- if isinstance(value, go.GoClass):
3181
- _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
3182
- else:
3183
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3184
- @property
3185
- def Receipt(self):
3186
- return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
3187
- @Receipt.setter
3188
- def Receipt(self, value):
3189
- if isinstance(value, go.GoClass):
3190
- _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
3191
- else:
3192
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3193
- @property
3194
- def Group(self):
3195
- return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
3196
- @Group.setter
3197
- def Group(self, value):
3194
+ def JID(self):
3195
+ return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
3196
+ @JID.setter
3197
+ def JID(self, value):
3198
3198
  if isinstance(value, go.GoClass):
3199
- _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
3199
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
3200
3200
  else:
3201
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3201
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
3202
3202
  @property
3203
- def Call(self):
3204
- return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
3205
- @Call.setter
3206
- def Call(self, value):
3203
+ def Name(self):
3204
+ return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
3205
+ @Name.setter
3206
+ def Name(self, value):
3207
3207
  if isinstance(value, go.GoClass):
3208
- _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
3208
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
3209
3209
  else:
3210
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3210
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
3211
3211
 
3212
3212
 
3213
3213
  # ---- Slices ---