slidge-whatsapp 0.2.5__cp311-cp311-manylinux_2_36_aarch64.whl → 0.2.7__cp311-cp311-manylinux_2_36_aarch64.whl

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

Potentially problematic release.


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

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