slidge-whatsapp 0.2.7__cp312-cp312-manylinux_2_36_aarch64.whl → 0.3.0__cp312-cp312-manylinux_2_36_aarch64.whl

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

Potentially problematic release.


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

Files changed (212) hide show
  1. slidge_whatsapp/contact.py +15 -3
  2. slidge_whatsapp/event.go +144 -48
  3. slidge_whatsapp/gateway.go +7 -63
  4. slidge_whatsapp/gateway.py +2 -3
  5. slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.h +146 -129
  6. slidge_whatsapp/generated/_whatsapp.cpython-312-aarch64-linux-gnu.so +0 -0
  7. slidge_whatsapp/generated/build.py +114 -100
  8. slidge_whatsapp/generated/whatsapp.c +1309 -1037
  9. slidge_whatsapp/generated/whatsapp.go +779 -668
  10. slidge_whatsapp/generated/whatsapp.py +1168 -1043
  11. slidge_whatsapp/generated/whatsapp_go.h +146 -129
  12. slidge_whatsapp/go.mod +18 -15
  13. slidge_whatsapp/go.sum +38 -26
  14. slidge_whatsapp/group.py +34 -30
  15. slidge_whatsapp/media/media.go +1 -1
  16. slidge_whatsapp/session.go +34 -17
  17. slidge_whatsapp/session.py +46 -14
  18. slidge_whatsapp/vendor/github.com/beeper/argo-go/LICENSE +9 -0
  19. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockreader.go +329 -0
  20. slidge_whatsapp/vendor/github.com/beeper/argo-go/block/blockwriter.go +417 -0
  21. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/decoder.go +652 -0
  22. slidge_whatsapp/vendor/github.com/beeper/argo-go/codec/encoder.go +985 -0
  23. slidge_whatsapp/vendor/github.com/beeper/argo-go/header/header.go +135 -0
  24. slidge_whatsapp/vendor/github.com/beeper/argo-go/internal/util/util.go +133 -0
  25. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/label.go +384 -0
  26. slidge_whatsapp/vendor/github.com/beeper/argo-go/label/wiremarkers.go +37 -0
  27. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/bitset/bitset.go +197 -0
  28. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/buf/buf.go +420 -0
  29. slidge_whatsapp/vendor/github.com/beeper/argo-go/pkg/varint/varint.go +246 -0
  30. slidge_whatsapp/vendor/github.com/beeper/argo-go/wire/wire.go +614 -0
  31. slidge_whatsapp/vendor/github.com/beeper/argo-go/wirecodec/decode.go +341 -0
  32. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/LICENSE +21 -0
  33. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/list.go +95 -0
  34. slidge_whatsapp/vendor/github.com/elliotchance/orderedmap/v3/orderedmap.go +187 -0
  35. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz.go +1 -0
  36. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_cgo.go +3 -0
  37. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/fitz_nocgo.go +4 -5
  38. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_darwin.go +11 -1
  39. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_linux.go +10 -0
  40. slidge_whatsapp/vendor/github.com/gen2brain/go-fitz/purego_windows.go +12 -0
  41. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/.gitignore +0 -2
  42. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/CHANGELOG.md +30 -0
  43. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/COPYRIGHT.txt +6 -1
  44. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/README.md +14 -17
  45. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi.go +1 -1
  46. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi2.go +7 -0
  47. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/LICENSE +21 -0
  48. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_amd64/libffi.8.dylib +0 -0
  49. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/darwin_arm64/libffi.8.dylib +0 -0
  50. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/assets/libffi/windows_amd64/libffi-8.dll +0 -0
  51. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif.go +15 -0
  52. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/cif_arm64.go +16 -0
  53. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed.go +49 -0
  54. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_amd64.go +10 -0
  55. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_darwin_arm64.go +10 -0
  56. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/embed_windows_amd64.go +10 -0
  57. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/ffi.go +51 -13
  58. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/init.go +22 -9
  59. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/README.md +2 -0
  60. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c +3096 -1651
  61. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.h +188 -128
  62. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3_opt_userauth.go +13 -140
  63. slidge_whatsapp/vendor/github.com/mattn/go-sqlite3/sqlite3ext.h +4 -0
  64. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.23.go +2 -2
  65. slidge_whatsapp/vendor/github.com/petermattis/goid/runtime_go1.25.go +37 -0
  66. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/LICENSE +19 -0
  67. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/argmap.go +37 -0
  68. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/collections.go +148 -0
  69. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/comment.go +31 -0
  70. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/decode.go +216 -0
  71. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/definition.go +110 -0
  72. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/directive.go +43 -0
  73. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/document.go +89 -0
  74. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/dumper.go +159 -0
  75. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/fragment.go +41 -0
  76. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/operation.go +32 -0
  77. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/path.go +72 -0
  78. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/selection.go +41 -0
  79. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/source.go +19 -0
  80. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/type.go +68 -0
  81. slidge_whatsapp/vendor/github.com/vektah/gqlparser/v2/ast/value.go +122 -0
  82. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/handleerrors.go +60 -26
  83. slidge_whatsapp/vendor/go.mau.fi/util/exhttp/networkerror.go +2 -1
  84. slidge_whatsapp/vendor/go.mau.fi/util/exstrings/stringutil.go +28 -0
  85. slidge_whatsapp/vendor/go.mau.fi/util/exsync/event.go +19 -3
  86. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/.pre-commit-config.yaml +3 -3
  87. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/decode.go +1 -1
  88. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate/hash.go +1 -1
  89. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/appstate.go +5 -1
  90. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo-wire-type-store.argo +63 -0
  91. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/argo.go +62 -0
  92. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/argo/name-to-queryids.json +306 -0
  93. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/armadillomessage.go +3 -2
  94. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/call.go +1 -0
  95. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/client.go +15 -18
  96. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/connectionevents.go +5 -0
  97. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/download.go +4 -0
  98. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/errors.go +3 -0
  99. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/group.go +97 -25
  100. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/internals.go +22 -10
  101. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/message.go +10 -9
  102. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/msgsecret.go +2 -14
  103. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/newsletter.go +83 -7
  104. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/notification.go +5 -1
  105. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/pair-code.go +2 -2
  106. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/presence.go +15 -6
  107. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.pb.go +5156 -0
  108. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waBotMetadata/WABotMetadata.proto +516 -0
  109. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.pb.go +30 -3
  110. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waCompanionReg/WACompanionReg.proto +3 -0
  111. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.pb.go +8532 -11526
  112. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waE2E/WAWebProtobufsE2E.proto +132 -438
  113. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.pb.go +52 -23
  114. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waHistorySync/WAWebProtobufsHistorySync.proto +3 -0
  115. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.pb.go +225 -73
  116. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waStatusAttributions/WAStatusAttributions.proto +21 -5
  117. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.pb.go +884 -441
  118. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waSyncAction/WASyncAction.proto +40 -0
  119. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.pb.go +60 -38
  120. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/proto/waWa6/WAWebProtobufsWa6.proto +3 -0
  121. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/receipt.go +8 -1
  122. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/send.go +6 -4
  123. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/clientpayload.go +1 -1
  124. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/noop.go +3 -2
  125. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/sqlstore/store.go +25 -5
  126. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/store/store.go +3 -1
  127. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/call.go +1 -0
  128. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/events/events.go +8 -0
  129. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/jid.go +2 -1
  130. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/types/user.go +2 -0
  131. slidge_whatsapp/vendor/go.mau.fi/whatsmeow/user.go +12 -8
  132. slidge_whatsapp/vendor/golang.org/x/crypto/curve25519/curve25519.go +1 -1
  133. slidge_whatsapp/vendor/golang.org/x/net/http2/config.go +44 -2
  134. slidge_whatsapp/vendor/golang.org/x/net/http2/gotrack.go +14 -3
  135. slidge_whatsapp/vendor/golang.org/x/net/http2/http2.go +7 -29
  136. slidge_whatsapp/vendor/golang.org/x/net/http2/server.go +53 -71
  137. slidge_whatsapp/vendor/golang.org/x/net/http2/transport.go +20 -74
  138. slidge_whatsapp/vendor/golang.org/x/sys/unix/affinity_linux.go +1 -3
  139. slidge_whatsapp/vendor/golang.org/x/sys/unix/mkerrors.sh +3 -0
  140. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_darwin.go +1 -55
  141. slidge_whatsapp/vendor/golang.org/x/sys/unix/syscall_solaris.go +1 -1
  142. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux.go +47 -16
  143. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +3 -0
  144. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +3 -0
  145. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +3 -0
  146. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +3 -0
  147. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +3 -0
  148. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +3 -0
  149. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +3 -0
  150. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +3 -0
  151. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +3 -0
  152. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +3 -0
  153. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +3 -0
  154. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +3 -0
  155. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +3 -0
  156. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +3 -0
  157. slidge_whatsapp/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +3 -0
  158. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +4 -4
  159. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +1 -0
  160. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +1 -0
  161. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +1 -0
  162. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +1 -0
  163. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +1 -0
  164. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +1 -0
  165. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +1 -0
  166. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +1 -0
  167. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +1 -0
  168. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +1 -0
  169. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +1 -0
  170. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +1 -0
  171. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +1 -0
  172. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +1 -0
  173. slidge_whatsapp/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +1 -0
  174. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux.go +168 -12
  175. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +17 -1
  176. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +16 -0
  177. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +18 -2
  178. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +16 -0
  179. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go +16 -0
  180. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +17 -1
  181. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +16 -0
  182. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +16 -0
  183. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +17 -1
  184. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go +18 -2
  185. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +16 -0
  186. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +16 -0
  187. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +16 -0
  188. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +16 -0
  189. slidge_whatsapp/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go +16 -0
  190. slidge_whatsapp/vendor/golang.org/x/sys/windows/types_windows.go +6 -0
  191. slidge_whatsapp/vendor/golang.org/x/sys/windows/zsyscall_windows.go +483 -483
  192. slidge_whatsapp/vendor/google.golang.org/protobuf/encoding/protowire/wire.go +25 -1
  193. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/editiondefaults/editions_defaults.binpb +0 -0
  194. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/editions.go +10 -5
  195. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/filedesc/presence.go +33 -0
  196. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/api_gen.go +6 -0
  197. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +68 -22
  198. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/codec_message_opaque.go +2 -1
  199. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/message_opaque.go +8 -37
  200. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/impl/presence.go +0 -3
  201. slidge_whatsapp/vendor/google.golang.org/protobuf/internal/version/version.go +1 -1
  202. slidge_whatsapp/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +8 -0
  203. slidge_whatsapp/vendor/modules.txt +43 -23
  204. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/METADATA +5 -4
  205. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/RECORD +208 -161
  206. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/WHEEL +1 -1
  207. slidge_whatsapp/vendor/github.com/jupiterrider/ffi/abi_amd64.go +0 -7
  208. slidge_whatsapp/vendor/golang.org/x/net/http2/config_go124.go +0 -61
  209. slidge_whatsapp/vendor/golang.org/x/net/http2/config_pre_go124.go +0 -16
  210. slidge_whatsapp/vendor/golang.org/x/net/http2/timer.go +0 -20
  211. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info}/entry_points.txt +0 -0
  212. {slidge_whatsapp-0.2.7.dist-info → slidge_whatsapp-0.3.0.dist-info/licenses}/LICENSE +0 -0
@@ -1013,6 +1013,270 @@ DefaultUserServer = "s.whatsapp.net"
1013
1013
 
1014
1014
  # ---- Structs ---
1015
1015
 
1016
+ # Python type for struct whatsapp.ChatState
1017
+ class ChatState(go.GoClass):
1018
+ """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"""
1019
+ def __init__(self, *args, **kwargs):
1020
+ """
1021
+ handle=A Go-side object is always initialized with an explicit handle=arg
1022
+ otherwise parameters can be unnamed in order of field names or named fields
1023
+ in which case a new Go object is constructed first
1024
+ """
1025
+ if len(kwargs) == 1 and 'handle' in kwargs:
1026
+ self.handle = kwargs['handle']
1027
+ _whatsapp.IncRef(self.handle)
1028
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1029
+ self.handle = args[0].handle
1030
+ _whatsapp.IncRef(self.handle)
1031
+ else:
1032
+ self.handle = _whatsapp.whatsapp_ChatState_CTor()
1033
+ _whatsapp.IncRef(self.handle)
1034
+ if 0 < len(args):
1035
+ self.Kind = args[0]
1036
+ if "Kind" in kwargs:
1037
+ self.Kind = kwargs["Kind"]
1038
+ if 1 < len(args):
1039
+ self.JID = args[1]
1040
+ if "JID" in kwargs:
1041
+ self.JID = kwargs["JID"]
1042
+ if 2 < len(args):
1043
+ self.GroupJID = args[2]
1044
+ if "GroupJID" in kwargs:
1045
+ self.GroupJID = kwargs["GroupJID"]
1046
+ def __del__(self):
1047
+ _whatsapp.DecRef(self.handle)
1048
+ def __str__(self):
1049
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1050
+ sv = 'whatsapp.ChatState{'
1051
+ first = True
1052
+ for v in pr:
1053
+ if callable(v[1]):
1054
+ continue
1055
+ if first:
1056
+ first = False
1057
+ else:
1058
+ sv += ', '
1059
+ sv += v[0] + '=' + str(v[1])
1060
+ return sv + '}'
1061
+ def __repr__(self):
1062
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1063
+ sv = 'whatsapp.ChatState ( '
1064
+ for v in pr:
1065
+ if not callable(v[1]):
1066
+ sv += v[0] + '=' + str(v[1]) + ', '
1067
+ return sv + ')'
1068
+ @property
1069
+ def Kind(self):
1070
+ return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
1071
+ @Kind.setter
1072
+ def Kind(self, value):
1073
+ if isinstance(value, go.GoClass):
1074
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
1075
+ else:
1076
+ _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
1077
+ @property
1078
+ def JID(self):
1079
+ return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
1080
+ @JID.setter
1081
+ def JID(self, value):
1082
+ if isinstance(value, go.GoClass):
1083
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
1084
+ else:
1085
+ _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
1086
+ @property
1087
+ def GroupJID(self):
1088
+ return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
1089
+ @GroupJID.setter
1090
+ def GroupJID(self, value):
1091
+ if isinstance(value, go.GoClass):
1092
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
1093
+ else:
1094
+ _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
1095
+
1096
+ # Python type for struct whatsapp.EventPayload
1097
+ class EventPayload(go.GoClass):
1098
+ """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"""
1099
+ def __init__(self, *args, **kwargs):
1100
+ """
1101
+ handle=A Go-side object is always initialized with an explicit handle=arg
1102
+ otherwise parameters can be unnamed in order of field names or named fields
1103
+ in which case a new Go object is constructed first
1104
+ """
1105
+ if len(kwargs) == 1 and 'handle' in kwargs:
1106
+ self.handle = kwargs['handle']
1107
+ _whatsapp.IncRef(self.handle)
1108
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1109
+ self.handle = args[0].handle
1110
+ _whatsapp.IncRef(self.handle)
1111
+ else:
1112
+ self.handle = _whatsapp.whatsapp_EventPayload_CTor()
1113
+ _whatsapp.IncRef(self.handle)
1114
+ if 0 < len(args):
1115
+ self.QRCode = args[0]
1116
+ if "QRCode" in kwargs:
1117
+ self.QRCode = kwargs["QRCode"]
1118
+ if 1 < len(args):
1119
+ self.PairDeviceID = args[1]
1120
+ if "PairDeviceID" in kwargs:
1121
+ self.PairDeviceID = kwargs["PairDeviceID"]
1122
+ if 2 < len(args):
1123
+ self.Connect = args[2]
1124
+ if "Connect" in kwargs:
1125
+ self.Connect = kwargs["Connect"]
1126
+ if 3 < len(args):
1127
+ self.LoggedOut = args[3]
1128
+ if "LoggedOut" in kwargs:
1129
+ self.LoggedOut = kwargs["LoggedOut"]
1130
+ if 4 < len(args):
1131
+ self.Contact = args[4]
1132
+ if "Contact" in kwargs:
1133
+ self.Contact = kwargs["Contact"]
1134
+ if 5 < len(args):
1135
+ self.Presence = args[5]
1136
+ if "Presence" in kwargs:
1137
+ self.Presence = kwargs["Presence"]
1138
+ if 6 < len(args):
1139
+ self.Message = args[6]
1140
+ if "Message" in kwargs:
1141
+ self.Message = kwargs["Message"]
1142
+ if 7 < len(args):
1143
+ self.ChatState = args[7]
1144
+ if "ChatState" in kwargs:
1145
+ self.ChatState = kwargs["ChatState"]
1146
+ if 8 < len(args):
1147
+ self.Receipt = args[8]
1148
+ if "Receipt" in kwargs:
1149
+ self.Receipt = kwargs["Receipt"]
1150
+ if 9 < len(args):
1151
+ self.Group = args[9]
1152
+ if "Group" in kwargs:
1153
+ self.Group = kwargs["Group"]
1154
+ if 10 < len(args):
1155
+ self.Call = args[10]
1156
+ if "Call" in kwargs:
1157
+ self.Call = kwargs["Call"]
1158
+ def __del__(self):
1159
+ _whatsapp.DecRef(self.handle)
1160
+ def __str__(self):
1161
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1162
+ sv = 'whatsapp.EventPayload{'
1163
+ first = True
1164
+ for v in pr:
1165
+ if callable(v[1]):
1166
+ continue
1167
+ if first:
1168
+ first = False
1169
+ else:
1170
+ sv += ', '
1171
+ sv += v[0] + '=' + str(v[1])
1172
+ return sv + '}'
1173
+ def __repr__(self):
1174
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1175
+ sv = 'whatsapp.EventPayload ( '
1176
+ for v in pr:
1177
+ if not callable(v[1]):
1178
+ sv += v[0] + '=' + str(v[1]) + ', '
1179
+ return sv + ')'
1180
+ @property
1181
+ def QRCode(self):
1182
+ return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
1183
+ @QRCode.setter
1184
+ def QRCode(self, value):
1185
+ if isinstance(value, go.GoClass):
1186
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
1187
+ else:
1188
+ _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
1189
+ @property
1190
+ def PairDeviceID(self):
1191
+ return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
1192
+ @PairDeviceID.setter
1193
+ def PairDeviceID(self, value):
1194
+ if isinstance(value, go.GoClass):
1195
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
1196
+ else:
1197
+ _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
1198
+ @property
1199
+ def Connect(self):
1200
+ return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
1201
+ @Connect.setter
1202
+ def Connect(self, value):
1203
+ if isinstance(value, go.GoClass):
1204
+ _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
1205
+ else:
1206
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1207
+ @property
1208
+ def LoggedOut(self):
1209
+ return LoggedOut(handle=_whatsapp.whatsapp_EventPayload_LoggedOut_Get(self.handle))
1210
+ @LoggedOut.setter
1211
+ def LoggedOut(self, value):
1212
+ if isinstance(value, go.GoClass):
1213
+ _whatsapp.whatsapp_EventPayload_LoggedOut_Set(self.handle, value.handle)
1214
+ else:
1215
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1216
+ @property
1217
+ def Contact(self):
1218
+ return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
1219
+ @Contact.setter
1220
+ def Contact(self, value):
1221
+ if isinstance(value, go.GoClass):
1222
+ _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
1223
+ else:
1224
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1225
+ @property
1226
+ def Presence(self):
1227
+ return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
1228
+ @Presence.setter
1229
+ def Presence(self, value):
1230
+ if isinstance(value, go.GoClass):
1231
+ _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
1232
+ else:
1233
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1234
+ @property
1235
+ def Message(self):
1236
+ return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
1237
+ @Message.setter
1238
+ def Message(self, value):
1239
+ if isinstance(value, go.GoClass):
1240
+ _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
1241
+ else:
1242
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1243
+ @property
1244
+ def ChatState(self):
1245
+ return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
1246
+ @ChatState.setter
1247
+ def ChatState(self, value):
1248
+ if isinstance(value, go.GoClass):
1249
+ _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
1250
+ else:
1251
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1252
+ @property
1253
+ def Receipt(self):
1254
+ return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
1255
+ @Receipt.setter
1256
+ def Receipt(self, value):
1257
+ if isinstance(value, go.GoClass):
1258
+ _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
1259
+ else:
1260
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1261
+ @property
1262
+ def Group(self):
1263
+ return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
1264
+ @Group.setter
1265
+ def Group(self, value):
1266
+ if isinstance(value, go.GoClass):
1267
+ _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
1268
+ else:
1269
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1270
+ @property
1271
+ def Call(self):
1272
+ return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
1273
+ @Call.setter
1274
+ def Call(self, value):
1275
+ if isinstance(value, go.GoClass):
1276
+ _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
1277
+ else:
1278
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1279
+
1016
1280
  # Python type for struct whatsapp.Gateway
1017
1281
  class Gateway(go.GoClass):
1018
1282
  """A Gateway represents a persistent process for establishing individual sessions between linked\ndevices and WhatsApp.\n"""
@@ -1127,143 +1391,9 @@ class Gateway(go.GoClass):
1127
1391
  """
1128
1392
  return _whatsapp.whatsapp_Gateway_CleanupSession(self.handle, device.handle)
1129
1393
 
1130
- # Python type for struct whatsapp.Location
1131
- class Location(go.GoClass):
1132
- """A Location represents additional metadata given to location messages.\n"""
1133
- def __init__(self, *args, **kwargs):
1134
- """
1135
- handle=A Go-side object is always initialized with an explicit handle=arg
1136
- otherwise parameters can be unnamed in order of field names or named fields
1137
- in which case a new Go object is constructed first
1138
- """
1139
- if len(kwargs) == 1 and 'handle' in kwargs:
1140
- self.handle = kwargs['handle']
1141
- _whatsapp.IncRef(self.handle)
1142
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1143
- self.handle = args[0].handle
1144
- _whatsapp.IncRef(self.handle)
1145
- else:
1146
- self.handle = _whatsapp.whatsapp_Location_CTor()
1147
- _whatsapp.IncRef(self.handle)
1148
- if 0 < len(args):
1149
- self.Latitude = args[0]
1150
- if "Latitude" in kwargs:
1151
- self.Latitude = kwargs["Latitude"]
1152
- if 1 < len(args):
1153
- self.Longitude = args[1]
1154
- if "Longitude" in kwargs:
1155
- self.Longitude = kwargs["Longitude"]
1156
- if 2 < len(args):
1157
- self.Accuracy = args[2]
1158
- if "Accuracy" in kwargs:
1159
- self.Accuracy = kwargs["Accuracy"]
1160
- if 3 < len(args):
1161
- self.IsLive = args[3]
1162
- if "IsLive" in kwargs:
1163
- self.IsLive = kwargs["IsLive"]
1164
- if 4 < len(args):
1165
- self.Name = args[4]
1166
- if "Name" in kwargs:
1167
- self.Name = kwargs["Name"]
1168
- if 5 < len(args):
1169
- self.Address = args[5]
1170
- if "Address" in kwargs:
1171
- self.Address = kwargs["Address"]
1172
- if 6 < len(args):
1173
- self.URL = args[6]
1174
- if "URL" in kwargs:
1175
- self.URL = kwargs["URL"]
1176
- def __del__(self):
1177
- _whatsapp.DecRef(self.handle)
1178
- def __str__(self):
1179
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1180
- sv = 'whatsapp.Location{'
1181
- first = True
1182
- for v in pr:
1183
- if callable(v[1]):
1184
- continue
1185
- if first:
1186
- first = False
1187
- else:
1188
- sv += ', '
1189
- sv += v[0] + '=' + str(v[1])
1190
- return sv + '}'
1191
- def __repr__(self):
1192
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1193
- sv = 'whatsapp.Location ( '
1194
- for v in pr:
1195
- if not callable(v[1]):
1196
- sv += v[0] + '=' + str(v[1]) + ', '
1197
- return sv + ')'
1198
- @property
1199
- def Latitude(self):
1200
- return _whatsapp.whatsapp_Location_Latitude_Get(self.handle)
1201
- @Latitude.setter
1202
- def Latitude(self, value):
1203
- if isinstance(value, go.GoClass):
1204
- _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
1205
- else:
1206
- _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
1207
- @property
1208
- def Longitude(self):
1209
- return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
1210
- @Longitude.setter
1211
- def Longitude(self, value):
1212
- if isinstance(value, go.GoClass):
1213
- _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
1214
- else:
1215
- _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
1216
- @property
1217
- def Accuracy(self):
1218
- return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
1219
- @Accuracy.setter
1220
- def Accuracy(self, value):
1221
- if isinstance(value, go.GoClass):
1222
- _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
1223
- else:
1224
- _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
1225
- @property
1226
- def IsLive(self):
1227
- return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
1228
- @IsLive.setter
1229
- def IsLive(self, value):
1230
- if isinstance(value, go.GoClass):
1231
- _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
1232
- else:
1233
- _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
1234
- @property
1235
- def Name(self):
1236
- """Optional fields given for named locations.
1237
- """
1238
- return _whatsapp.whatsapp_Location_Name_Get(self.handle)
1239
- @Name.setter
1240
- def Name(self, value):
1241
- if isinstance(value, go.GoClass):
1242
- _whatsapp.whatsapp_Location_Name_Set(self.handle, value.handle)
1243
- else:
1244
- _whatsapp.whatsapp_Location_Name_Set(self.handle, value)
1245
- @property
1246
- def Address(self):
1247
- return _whatsapp.whatsapp_Location_Address_Get(self.handle)
1248
- @Address.setter
1249
- def Address(self, value):
1250
- if isinstance(value, go.GoClass):
1251
- _whatsapp.whatsapp_Location_Address_Set(self.handle, value.handle)
1252
- else:
1253
- _whatsapp.whatsapp_Location_Address_Set(self.handle, value)
1254
- @property
1255
- def URL(self):
1256
- return _whatsapp.whatsapp_Location_URL_Get(self.handle)
1257
- @URL.setter
1258
- def URL(self, value):
1259
- if isinstance(value, go.GoClass):
1260
- _whatsapp.whatsapp_Location_URL_Set(self.handle, value.handle)
1261
- else:
1262
- _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
1263
-
1264
- # Python type for struct whatsapp.PollOption
1265
- class PollOption(go.GoClass):
1266
- """A PollOption represents an individual choice within a broader poll.\n"""
1394
+ # Python type for struct whatsapp.PollOption
1395
+ class PollOption(go.GoClass):
1396
+ """A PollOption represents an individual choice within a broader poll.\n"""
1267
1397
  def __init__(self, *args, **kwargs):
1268
1398
  """
1269
1399
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1588,9 +1718,9 @@ class Album(go.GoClass):
1588
1718
  else:
1589
1719
  _whatsapp.whatsapp_Album_VideoCount_Set(self.handle, value)
1590
1720
 
1591
- # Python type for struct whatsapp.Avatar
1592
- class Avatar(go.GoClass):
1593
- """A Avatar represents a small image set for a Contact or Group.\n"""
1721
+ # Python type for struct whatsapp.Call
1722
+ class Call(go.GoClass):
1723
+ """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"""
1594
1724
  def __init__(self, *args, **kwargs):
1595
1725
  """
1596
1726
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1604,21 +1734,25 @@ class Avatar(go.GoClass):
1604
1734
  self.handle = args[0].handle
1605
1735
  _whatsapp.IncRef(self.handle)
1606
1736
  else:
1607
- self.handle = _whatsapp.whatsapp_Avatar_CTor()
1737
+ self.handle = _whatsapp.whatsapp_Call_CTor()
1608
1738
  _whatsapp.IncRef(self.handle)
1609
1739
  if 0 < len(args):
1610
- self.ID = args[0]
1611
- if "ID" in kwargs:
1612
- self.ID = kwargs["ID"]
1740
+ self.State = args[0]
1741
+ if "State" in kwargs:
1742
+ self.State = kwargs["State"]
1613
1743
  if 1 < len(args):
1614
- self.URL = args[1]
1615
- if "URL" in kwargs:
1616
- self.URL = kwargs["URL"]
1744
+ self.JID = args[1]
1745
+ if "JID" in kwargs:
1746
+ self.JID = kwargs["JID"]
1747
+ if 2 < len(args):
1748
+ self.Timestamp = args[2]
1749
+ if "Timestamp" in kwargs:
1750
+ self.Timestamp = kwargs["Timestamp"]
1617
1751
  def __del__(self):
1618
1752
  _whatsapp.DecRef(self.handle)
1619
1753
  def __str__(self):
1620
1754
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1621
- sv = 'whatsapp.Avatar{'
1755
+ sv = 'whatsapp.Call{'
1622
1756
  first = True
1623
1757
  for v in pr:
1624
1758
  if callable(v[1]):
@@ -1631,33 +1765,42 @@ class Avatar(go.GoClass):
1631
1765
  return sv + '}'
1632
1766
  def __repr__(self):
1633
1767
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1634
- sv = 'whatsapp.Avatar ( '
1768
+ sv = 'whatsapp.Call ( '
1635
1769
  for v in pr:
1636
1770
  if not callable(v[1]):
1637
1771
  sv += v[0] + '=' + str(v[1]) + ', '
1638
1772
  return sv + ')'
1639
1773
  @property
1640
- def ID(self):
1641
- return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
1642
- @ID.setter
1643
- def ID(self, value):
1774
+ def State(self):
1775
+ return _whatsapp.whatsapp_Call_State_Get(self.handle)
1776
+ @State.setter
1777
+ def State(self, value):
1644
1778
  if isinstance(value, go.GoClass):
1645
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
1779
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
1646
1780
  else:
1647
- _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
1781
+ _whatsapp.whatsapp_Call_State_Set(self.handle, value)
1648
1782
  @property
1649
- def URL(self):
1650
- return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
1651
- @URL.setter
1652
- def URL(self, value):
1783
+ def JID(self):
1784
+ return _whatsapp.whatsapp_Call_JID_Get(self.handle)
1785
+ @JID.setter
1786
+ def JID(self, value):
1653
1787
  if isinstance(value, go.GoClass):
1654
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
1788
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
1655
1789
  else:
1656
- _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
1790
+ _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
1791
+ @property
1792
+ def Timestamp(self):
1793
+ return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
1794
+ @Timestamp.setter
1795
+ def Timestamp(self, value):
1796
+ if isinstance(value, go.GoClass):
1797
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
1798
+ else:
1799
+ _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
1657
1800
 
1658
- # Python type for struct whatsapp.Contact
1659
- class Contact(go.GoClass):
1660
- """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"""
1801
+ # Python type for struct whatsapp.GroupParticipant
1802
+ class GroupParticipant(go.GoClass):
1803
+ """A GroupParticipant represents a contact who is currently joined in a given group. Participants in\nWhatsApp can generally be derived back to their individual [Contact]; there are no anonymous groups\nin WhatsApp.\n"""
1661
1804
  def __init__(self, *args, **kwargs):
1662
1805
  """
1663
1806
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1671,21 +1814,29 @@ class Contact(go.GoClass):
1671
1814
  self.handle = args[0].handle
1672
1815
  _whatsapp.IncRef(self.handle)
1673
1816
  else:
1674
- self.handle = _whatsapp.whatsapp_Contact_CTor()
1817
+ self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
1675
1818
  _whatsapp.IncRef(self.handle)
1676
1819
  if 0 < len(args):
1677
1820
  self.JID = args[0]
1678
1821
  if "JID" in kwargs:
1679
1822
  self.JID = kwargs["JID"]
1680
1823
  if 1 < len(args):
1681
- self.Name = args[1]
1682
- if "Name" in kwargs:
1683
- self.Name = kwargs["Name"]
1824
+ self.Nickname = args[1]
1825
+ if "Nickname" in kwargs:
1826
+ self.Nickname = kwargs["Nickname"]
1827
+ if 2 < len(args):
1828
+ self.Affiliation = args[2]
1829
+ if "Affiliation" in kwargs:
1830
+ self.Affiliation = kwargs["Affiliation"]
1831
+ if 3 < len(args):
1832
+ self.Action = args[3]
1833
+ if "Action" in kwargs:
1834
+ self.Action = kwargs["Action"]
1684
1835
  def __del__(self):
1685
1836
  _whatsapp.DecRef(self.handle)
1686
1837
  def __str__(self):
1687
1838
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1688
- sv = 'whatsapp.Contact{'
1839
+ sv = 'whatsapp.GroupParticipant{'
1689
1840
  first = True
1690
1841
  for v in pr:
1691
1842
  if callable(v[1]):
@@ -1698,33 +1849,51 @@ class Contact(go.GoClass):
1698
1849
  return sv + '}'
1699
1850
  def __repr__(self):
1700
1851
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1701
- sv = 'whatsapp.Contact ( '
1852
+ sv = 'whatsapp.GroupParticipant ( '
1702
1853
  for v in pr:
1703
1854
  if not callable(v[1]):
1704
1855
  sv += v[0] + '=' + str(v[1]) + ', '
1705
1856
  return sv + ')'
1706
1857
  @property
1707
1858
  def JID(self):
1708
- return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
1859
+ return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
1709
1860
  @JID.setter
1710
1861
  def JID(self, value):
1711
1862
  if isinstance(value, go.GoClass):
1712
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
1863
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
1713
1864
  else:
1714
- _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
1865
+ _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
1715
1866
  @property
1716
- def Name(self):
1717
- return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
1718
- @Name.setter
1719
- def Name(self, value):
1867
+ def Nickname(self):
1868
+ return _whatsapp.whatsapp_GroupParticipant_Nickname_Get(self.handle)
1869
+ @Nickname.setter
1870
+ def Nickname(self, value):
1720
1871
  if isinstance(value, go.GoClass):
1721
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
1872
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value.handle)
1722
1873
  else:
1723
- _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
1874
+ _whatsapp.whatsapp_GroupParticipant_Nickname_Set(self.handle, value)
1875
+ @property
1876
+ def Affiliation(self):
1877
+ return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
1878
+ @Affiliation.setter
1879
+ def Affiliation(self, value):
1880
+ if isinstance(value, go.GoClass):
1881
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
1882
+ else:
1883
+ _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
1884
+ @property
1885
+ def Action(self):
1886
+ return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
1887
+ @Action.setter
1888
+ def Action(self, value):
1889
+ if isinstance(value, go.GoClass):
1890
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
1891
+ else:
1892
+ _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
1724
1893
 
1725
- # Python type for struct whatsapp.EventPayload
1726
- class EventPayload(go.GoClass):
1727
- """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"""
1894
+ # Python type for struct whatsapp.GroupSubject
1895
+ class GroupSubject(go.GoClass):
1896
+ """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
1728
1897
  def __init__(self, *args, **kwargs):
1729
1898
  """
1730
1899
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1738,53 +1907,25 @@ class EventPayload(go.GoClass):
1738
1907
  self.handle = args[0].handle
1739
1908
  _whatsapp.IncRef(self.handle)
1740
1909
  else:
1741
- self.handle = _whatsapp.whatsapp_EventPayload_CTor()
1910
+ self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
1742
1911
  _whatsapp.IncRef(self.handle)
1743
1912
  if 0 < len(args):
1744
- self.QRCode = args[0]
1745
- if "QRCode" in kwargs:
1746
- self.QRCode = kwargs["QRCode"]
1913
+ self.Subject = args[0]
1914
+ if "Subject" in kwargs:
1915
+ self.Subject = kwargs["Subject"]
1747
1916
  if 1 < len(args):
1748
- self.PairDeviceID = args[1]
1749
- if "PairDeviceID" in kwargs:
1750
- self.PairDeviceID = kwargs["PairDeviceID"]
1917
+ self.SetAt = args[1]
1918
+ if "SetAt" in kwargs:
1919
+ self.SetAt = kwargs["SetAt"]
1751
1920
  if 2 < len(args):
1752
- self.Connect = args[2]
1753
- if "Connect" in kwargs:
1754
- self.Connect = kwargs["Connect"]
1755
- if 3 < len(args):
1756
- self.Contact = args[3]
1757
- if "Contact" in kwargs:
1758
- self.Contact = kwargs["Contact"]
1759
- if 4 < len(args):
1760
- self.Presence = args[4]
1761
- if "Presence" in kwargs:
1762
- self.Presence = kwargs["Presence"]
1763
- if 5 < len(args):
1764
- self.Message = args[5]
1765
- if "Message" in kwargs:
1766
- self.Message = kwargs["Message"]
1767
- if 6 < len(args):
1768
- self.ChatState = args[6]
1769
- if "ChatState" in kwargs:
1770
- self.ChatState = kwargs["ChatState"]
1771
- if 7 < len(args):
1772
- self.Receipt = args[7]
1773
- if "Receipt" in kwargs:
1774
- self.Receipt = kwargs["Receipt"]
1775
- if 8 < len(args):
1776
- self.Group = args[8]
1777
- if "Group" in kwargs:
1778
- self.Group = kwargs["Group"]
1779
- if 9 < len(args):
1780
- self.Call = args[9]
1781
- if "Call" in kwargs:
1782
- self.Call = kwargs["Call"]
1921
+ self.SetBy = args[2]
1922
+ if "SetBy" in kwargs:
1923
+ self.SetBy = kwargs["SetBy"]
1783
1924
  def __del__(self):
1784
1925
  _whatsapp.DecRef(self.handle)
1785
1926
  def __str__(self):
1786
1927
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1787
- sv = 'whatsapp.EventPayload{'
1928
+ sv = 'whatsapp.GroupSubject{'
1788
1929
  first = True
1789
1930
  for v in pr:
1790
1931
  if callable(v[1]):
@@ -1797,105 +1938,42 @@ class EventPayload(go.GoClass):
1797
1938
  return sv + '}'
1798
1939
  def __repr__(self):
1799
1940
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1800
- sv = 'whatsapp.EventPayload ( '
1941
+ sv = 'whatsapp.GroupSubject ( '
1801
1942
  for v in pr:
1802
1943
  if not callable(v[1]):
1803
1944
  sv += v[0] + '=' + str(v[1]) + ', '
1804
1945
  return sv + ')'
1805
1946
  @property
1806
- def QRCode(self):
1807
- return _whatsapp.whatsapp_EventPayload_QRCode_Get(self.handle)
1808
- @QRCode.setter
1809
- def QRCode(self, value):
1810
- if isinstance(value, go.GoClass):
1811
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value.handle)
1812
- else:
1813
- _whatsapp.whatsapp_EventPayload_QRCode_Set(self.handle, value)
1814
- @property
1815
- def PairDeviceID(self):
1816
- return _whatsapp.whatsapp_EventPayload_PairDeviceID_Get(self.handle)
1817
- @PairDeviceID.setter
1818
- def PairDeviceID(self, value):
1819
- if isinstance(value, go.GoClass):
1820
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value.handle)
1821
- else:
1822
- _whatsapp.whatsapp_EventPayload_PairDeviceID_Set(self.handle, value)
1823
- @property
1824
- def Connect(self):
1825
- return Connect(handle=_whatsapp.whatsapp_EventPayload_Connect_Get(self.handle))
1826
- @Connect.setter
1827
- def Connect(self, value):
1828
- if isinstance(value, go.GoClass):
1829
- _whatsapp.whatsapp_EventPayload_Connect_Set(self.handle, value.handle)
1830
- else:
1831
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1832
- @property
1833
- def Contact(self):
1834
- return Contact(handle=_whatsapp.whatsapp_EventPayload_Contact_Get(self.handle))
1835
- @Contact.setter
1836
- def Contact(self, value):
1837
- if isinstance(value, go.GoClass):
1838
- _whatsapp.whatsapp_EventPayload_Contact_Set(self.handle, value.handle)
1839
- else:
1840
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1841
- @property
1842
- def Presence(self):
1843
- return Presence(handle=_whatsapp.whatsapp_EventPayload_Presence_Get(self.handle))
1844
- @Presence.setter
1845
- def Presence(self, value):
1846
- if isinstance(value, go.GoClass):
1847
- _whatsapp.whatsapp_EventPayload_Presence_Set(self.handle, value.handle)
1848
- else:
1849
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1850
- @property
1851
- def Message(self):
1852
- return Message(handle=_whatsapp.whatsapp_EventPayload_Message_Get(self.handle))
1853
- @Message.setter
1854
- def Message(self, value):
1855
- if isinstance(value, go.GoClass):
1856
- _whatsapp.whatsapp_EventPayload_Message_Set(self.handle, value.handle)
1857
- else:
1858
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1859
- @property
1860
- def ChatState(self):
1861
- return ChatState(handle=_whatsapp.whatsapp_EventPayload_ChatState_Get(self.handle))
1862
- @ChatState.setter
1863
- def ChatState(self, value):
1864
- if isinstance(value, go.GoClass):
1865
- _whatsapp.whatsapp_EventPayload_ChatState_Set(self.handle, value.handle)
1866
- else:
1867
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1868
- @property
1869
- def Receipt(self):
1870
- return Receipt(handle=_whatsapp.whatsapp_EventPayload_Receipt_Get(self.handle))
1871
- @Receipt.setter
1872
- def Receipt(self, value):
1947
+ def Subject(self):
1948
+ return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
1949
+ @Subject.setter
1950
+ def Subject(self, value):
1873
1951
  if isinstance(value, go.GoClass):
1874
- _whatsapp.whatsapp_EventPayload_Receipt_Set(self.handle, value.handle)
1952
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
1875
1953
  else:
1876
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1954
+ _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
1877
1955
  @property
1878
- def Group(self):
1879
- return Group(handle=_whatsapp.whatsapp_EventPayload_Group_Get(self.handle))
1880
- @Group.setter
1881
- def Group(self, value):
1956
+ def SetAt(self):
1957
+ return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
1958
+ @SetAt.setter
1959
+ def SetAt(self, value):
1882
1960
  if isinstance(value, go.GoClass):
1883
- _whatsapp.whatsapp_EventPayload_Group_Set(self.handle, value.handle)
1961
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
1884
1962
  else:
1885
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1963
+ _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
1886
1964
  @property
1887
- def Call(self):
1888
- return Call(handle=_whatsapp.whatsapp_EventPayload_Call_Get(self.handle))
1889
- @Call.setter
1890
- def Call(self, value):
1965
+ def SetBy(self):
1966
+ return _whatsapp.whatsapp_GroupSubject_SetBy_Get(self.handle)
1967
+ @SetBy.setter
1968
+ def SetBy(self, value):
1891
1969
  if isinstance(value, go.GoClass):
1892
- _whatsapp.whatsapp_EventPayload_Call_Set(self.handle, value.handle)
1970
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value.handle)
1893
1971
  else:
1894
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1972
+ _whatsapp.whatsapp_GroupSubject_SetBy_Set(self.handle, value)
1895
1973
 
1896
- # Python type for struct whatsapp.Group
1897
- class Group(go.GoClass):
1898
- """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"""
1974
+ # Python type for struct whatsapp.Message
1975
+ class Message(go.GoClass):
1976
+ """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"""
1899
1977
  def __init__(self, *args, **kwargs):
1900
1978
  """
1901
1979
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1909,33 +1987,97 @@ class Group(go.GoClass):
1909
1987
  self.handle = args[0].handle
1910
1988
  _whatsapp.IncRef(self.handle)
1911
1989
  else:
1912
- self.handle = _whatsapp.whatsapp_Group_CTor()
1990
+ self.handle = _whatsapp.whatsapp_Message_CTor()
1913
1991
  _whatsapp.IncRef(self.handle)
1914
1992
  if 0 < len(args):
1915
- self.JID = args[0]
1916
- if "JID" in kwargs:
1917
- self.JID = kwargs["JID"]
1993
+ self.Kind = args[0]
1994
+ if "Kind" in kwargs:
1995
+ self.Kind = kwargs["Kind"]
1918
1996
  if 1 < len(args):
1919
- self.Name = args[1]
1920
- if "Name" in kwargs:
1921
- self.Name = kwargs["Name"]
1997
+ self.ID = args[1]
1998
+ if "ID" in kwargs:
1999
+ self.ID = kwargs["ID"]
1922
2000
  if 2 < len(args):
1923
- self.Subject = args[2]
1924
- if "Subject" in kwargs:
1925
- self.Subject = kwargs["Subject"]
2001
+ self.JID = args[2]
2002
+ if "JID" in kwargs:
2003
+ self.JID = kwargs["JID"]
1926
2004
  if 3 < len(args):
1927
- self.Nickname = args[3]
1928
- if "Nickname" in kwargs:
1929
- self.Nickname = kwargs["Nickname"]
2005
+ self.GroupJID = args[3]
2006
+ if "GroupJID" in kwargs:
2007
+ self.GroupJID = kwargs["GroupJID"]
1930
2008
  if 4 < len(args):
1931
- self.Participants = args[4]
1932
- if "Participants" in kwargs:
1933
- self.Participants = kwargs["Participants"]
2009
+ self.OriginJID = args[4]
2010
+ if "OriginJID" in kwargs:
2011
+ self.OriginJID = kwargs["OriginJID"]
2012
+ if 5 < len(args):
2013
+ self.Body = args[5]
2014
+ if "Body" in kwargs:
2015
+ self.Body = kwargs["Body"]
2016
+ if 6 < len(args):
2017
+ self.Timestamp = args[6]
2018
+ if "Timestamp" in kwargs:
2019
+ self.Timestamp = kwargs["Timestamp"]
2020
+ if 7 < len(args):
2021
+ self.IsCarbon = args[7]
2022
+ if "IsCarbon" in kwargs:
2023
+ self.IsCarbon = kwargs["IsCarbon"]
2024
+ if 8 < len(args):
2025
+ self.IsForwarded = args[8]
2026
+ if "IsForwarded" in kwargs:
2027
+ self.IsForwarded = kwargs["IsForwarded"]
2028
+ if 9 < len(args):
2029
+ self.ReplyID = args[9]
2030
+ if "ReplyID" in kwargs:
2031
+ self.ReplyID = kwargs["ReplyID"]
2032
+ if 10 < len(args):
2033
+ self.ReplyBody = args[10]
2034
+ if "ReplyBody" in kwargs:
2035
+ self.ReplyBody = kwargs["ReplyBody"]
2036
+ if 11 < len(args):
2037
+ self.Attachments = args[11]
2038
+ if "Attachments" in kwargs:
2039
+ self.Attachments = kwargs["Attachments"]
2040
+ if 12 < len(args):
2041
+ self.Preview = args[12]
2042
+ if "Preview" in kwargs:
2043
+ self.Preview = kwargs["Preview"]
2044
+ if 13 < len(args):
2045
+ self.Location = args[13]
2046
+ if "Location" in kwargs:
2047
+ self.Location = kwargs["Location"]
2048
+ if 14 < len(args):
2049
+ self.Poll = args[14]
2050
+ if "Poll" in kwargs:
2051
+ self.Poll = kwargs["Poll"]
2052
+ if 15 < len(args):
2053
+ self.Album = args[15]
2054
+ if "Album" in kwargs:
2055
+ self.Album = kwargs["Album"]
2056
+ if 16 < len(args):
2057
+ self.GroupInvite = args[16]
2058
+ if "GroupInvite" in kwargs:
2059
+ self.GroupInvite = kwargs["GroupInvite"]
2060
+ if 17 < len(args):
2061
+ self.MentionJIDs = args[17]
2062
+ if "MentionJIDs" in kwargs:
2063
+ self.MentionJIDs = kwargs["MentionJIDs"]
2064
+ if 18 < len(args):
2065
+ self.Receipts = args[18]
2066
+ if "Receipts" in kwargs:
2067
+ self.Receipts = kwargs["Receipts"]
2068
+ if 19 < len(args):
2069
+ self.Reactions = args[19]
2070
+ if "Reactions" in kwargs:
2071
+ self.Reactions = kwargs["Reactions"]
2072
+ if 20 < len(args):
2073
+ self.IsHistory = args[20]
2074
+ if "IsHistory" in kwargs:
2075
+ self.IsHistory = kwargs["IsHistory"]
1934
2076
  def __del__(self):
1935
2077
  _whatsapp.DecRef(self.handle)
1936
2078
  def __str__(self):
1937
2079
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1938
- sv = 'whatsapp.Group{'
2080
+ sv = 'whatsapp.Message{'
1939
2081
  first = True
1940
2082
  for v in pr:
1941
2083
  if callable(v[1]):
@@ -1948,60 +2090,422 @@ class Group(go.GoClass):
1948
2090
  return sv + '}'
1949
2091
  def __repr__(self):
1950
2092
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1951
- sv = 'whatsapp.Group ( '
2093
+ sv = 'whatsapp.Message ( '
1952
2094
  for v in pr:
1953
2095
  if not callable(v[1]):
1954
2096
  sv += v[0] + '=' + str(v[1]) + ', '
1955
2097
  return sv + ')'
1956
2098
  @property
1957
- def JID(self):
1958
- return _whatsapp.whatsapp_Group_JID_Get(self.handle)
1959
- @JID.setter
1960
- def JID(self, value):
2099
+ def Kind(self):
2100
+ return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
2101
+ @Kind.setter
2102
+ def Kind(self, value):
1961
2103
  if isinstance(value, go.GoClass):
1962
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
2104
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
1963
2105
  else:
1964
- _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
2106
+ _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
1965
2107
  @property
1966
- def Name(self):
1967
- return _whatsapp.whatsapp_Group_Name_Get(self.handle)
1968
- @Name.setter
1969
- def Name(self, value):
2108
+ def ID(self):
2109
+ return _whatsapp.whatsapp_Message_ID_Get(self.handle)
2110
+ @ID.setter
2111
+ def ID(self, value):
1970
2112
  if isinstance(value, go.GoClass):
1971
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
2113
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
1972
2114
  else:
1973
- _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
2115
+ _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
1974
2116
  @property
1975
- def Subject(self):
1976
- return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
1977
- @Subject.setter
1978
- def Subject(self, value):
2117
+ def JID(self):
2118
+ return _whatsapp.whatsapp_Message_JID_Get(self.handle)
2119
+ @JID.setter
2120
+ def JID(self, value):
2121
+ if isinstance(value, go.GoClass):
2122
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
2123
+ else:
2124
+ _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
2125
+ @property
2126
+ def GroupJID(self):
2127
+ return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
2128
+ @GroupJID.setter
2129
+ def GroupJID(self, value):
2130
+ if isinstance(value, go.GoClass):
2131
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
2132
+ else:
2133
+ _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
2134
+ @property
2135
+ def OriginJID(self):
2136
+ return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
2137
+ @OriginJID.setter
2138
+ def OriginJID(self, value):
2139
+ if isinstance(value, go.GoClass):
2140
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
2141
+ else:
2142
+ _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
2143
+ @property
2144
+ def Body(self):
2145
+ return _whatsapp.whatsapp_Message_Body_Get(self.handle)
2146
+ @Body.setter
2147
+ def Body(self, value):
2148
+ if isinstance(value, go.GoClass):
2149
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
2150
+ else:
2151
+ _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
2152
+ @property
2153
+ def Timestamp(self):
2154
+ return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
2155
+ @Timestamp.setter
2156
+ def Timestamp(self, value):
2157
+ if isinstance(value, go.GoClass):
2158
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
2159
+ else:
2160
+ _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
2161
+ @property
2162
+ def IsCarbon(self):
2163
+ return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
2164
+ @IsCarbon.setter
2165
+ def IsCarbon(self, value):
2166
+ if isinstance(value, go.GoClass):
2167
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
2168
+ else:
2169
+ _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
2170
+ @property
2171
+ def IsForwarded(self):
2172
+ return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
2173
+ @IsForwarded.setter
2174
+ def IsForwarded(self, value):
2175
+ if isinstance(value, go.GoClass):
2176
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
2177
+ else:
2178
+ _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
2179
+ @property
2180
+ def ReplyID(self):
2181
+ return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
2182
+ @ReplyID.setter
2183
+ def ReplyID(self, value):
2184
+ if isinstance(value, go.GoClass):
2185
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
2186
+ else:
2187
+ _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
2188
+ @property
2189
+ def ReplyBody(self):
2190
+ return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
2191
+ @ReplyBody.setter
2192
+ def ReplyBody(self, value):
2193
+ if isinstance(value, go.GoClass):
2194
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
2195
+ else:
2196
+ _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
2197
+ @property
2198
+ def Attachments(self):
2199
+ return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
2200
+ @Attachments.setter
2201
+ def Attachments(self, value):
2202
+ if isinstance(value, go.GoClass):
2203
+ _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
2204
+ else:
2205
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2206
+ @property
2207
+ def Preview(self):
2208
+ return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
2209
+ @Preview.setter
2210
+ def Preview(self, value):
2211
+ if isinstance(value, go.GoClass):
2212
+ _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
2213
+ else:
2214
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2215
+ @property
2216
+ def Location(self):
2217
+ return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
2218
+ @Location.setter
2219
+ def Location(self, value):
2220
+ if isinstance(value, go.GoClass):
2221
+ _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
2222
+ else:
2223
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2224
+ @property
2225
+ def Poll(self):
2226
+ return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
2227
+ @Poll.setter
2228
+ def Poll(self, value):
2229
+ if isinstance(value, go.GoClass):
2230
+ _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
2231
+ else:
2232
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2233
+ @property
2234
+ def Album(self):
2235
+ return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
2236
+ @Album.setter
2237
+ def Album(self, value):
2238
+ if isinstance(value, go.GoClass):
2239
+ _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
2240
+ else:
2241
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2242
+ @property
2243
+ def GroupInvite(self):
2244
+ return Group(handle=_whatsapp.whatsapp_Message_GroupInvite_Get(self.handle))
2245
+ @GroupInvite.setter
2246
+ def GroupInvite(self, value):
2247
+ if isinstance(value, go.GoClass):
2248
+ _whatsapp.whatsapp_Message_GroupInvite_Set(self.handle, value.handle)
2249
+ else:
2250
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2251
+ @property
2252
+ def MentionJIDs(self):
2253
+ return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2254
+ @MentionJIDs.setter
2255
+ def MentionJIDs(self, value):
2256
+ if isinstance(value, go.GoClass):
2257
+ _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
2258
+ else:
2259
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2260
+ @property
2261
+ def Receipts(self):
2262
+ return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
2263
+ @Receipts.setter
2264
+ def Receipts(self, value):
2265
+ if isinstance(value, go.GoClass):
2266
+ _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
2267
+ else:
2268
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2269
+ @property
2270
+ def Reactions(self):
2271
+ return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
2272
+ @Reactions.setter
2273
+ def Reactions(self, value):
2274
+ if isinstance(value, go.GoClass):
2275
+ _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2276
+ else:
2277
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2278
+ @property
2279
+ def IsHistory(self):
2280
+ return _whatsapp.whatsapp_Message_IsHistory_Get(self.handle)
2281
+ @IsHistory.setter
2282
+ def IsHistory(self, value):
2283
+ if isinstance(value, go.GoClass):
2284
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value.handle)
2285
+ else:
2286
+ _whatsapp.whatsapp_Message_IsHistory_Set(self.handle, value)
2287
+
2288
+ # Python type for struct whatsapp.Receipt
2289
+ class Receipt(go.GoClass):
2290
+ """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
2291
+ def __init__(self, *args, **kwargs):
2292
+ """
2293
+ handle=A Go-side object is always initialized with an explicit handle=arg
2294
+ otherwise parameters can be unnamed in order of field names or named fields
2295
+ in which case a new Go object is constructed first
2296
+ """
2297
+ if len(kwargs) == 1 and 'handle' in kwargs:
2298
+ self.handle = kwargs['handle']
2299
+ _whatsapp.IncRef(self.handle)
2300
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2301
+ self.handle = args[0].handle
2302
+ _whatsapp.IncRef(self.handle)
2303
+ else:
2304
+ self.handle = _whatsapp.whatsapp_Receipt_CTor()
2305
+ _whatsapp.IncRef(self.handle)
2306
+ if 0 < len(args):
2307
+ self.Kind = args[0]
2308
+ if "Kind" in kwargs:
2309
+ self.Kind = kwargs["Kind"]
2310
+ if 1 < len(args):
2311
+ self.MessageIDs = args[1]
2312
+ if "MessageIDs" in kwargs:
2313
+ self.MessageIDs = kwargs["MessageIDs"]
2314
+ if 2 < len(args):
2315
+ self.JID = args[2]
2316
+ if "JID" in kwargs:
2317
+ self.JID = kwargs["JID"]
2318
+ if 3 < len(args):
2319
+ self.GroupJID = args[3]
2320
+ if "GroupJID" in kwargs:
2321
+ self.GroupJID = kwargs["GroupJID"]
2322
+ if 4 < len(args):
2323
+ self.Timestamp = args[4]
2324
+ if "Timestamp" in kwargs:
2325
+ self.Timestamp = kwargs["Timestamp"]
2326
+ if 5 < len(args):
2327
+ self.IsCarbon = args[5]
2328
+ if "IsCarbon" in kwargs:
2329
+ self.IsCarbon = kwargs["IsCarbon"]
2330
+ def __del__(self):
2331
+ _whatsapp.DecRef(self.handle)
2332
+ def __str__(self):
2333
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2334
+ sv = 'whatsapp.Receipt{'
2335
+ first = True
2336
+ for v in pr:
2337
+ if callable(v[1]):
2338
+ continue
2339
+ if first:
2340
+ first = False
2341
+ else:
2342
+ sv += ', '
2343
+ sv += v[0] + '=' + str(v[1])
2344
+ return sv + '}'
2345
+ def __repr__(self):
2346
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2347
+ sv = 'whatsapp.Receipt ( '
2348
+ for v in pr:
2349
+ if not callable(v[1]):
2350
+ sv += v[0] + '=' + str(v[1]) + ', '
2351
+ return sv + ')'
2352
+ @property
2353
+ def Kind(self):
2354
+ return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
2355
+ @Kind.setter
2356
+ def Kind(self, value):
2357
+ if isinstance(value, go.GoClass):
2358
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
2359
+ else:
2360
+ _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
2361
+ @property
2362
+ def MessageIDs(self):
2363
+ return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
2364
+ @MessageIDs.setter
2365
+ def MessageIDs(self, value):
2366
+ if isinstance(value, go.GoClass):
2367
+ _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
2368
+ else:
2369
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2370
+ @property
2371
+ def JID(self):
2372
+ return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
2373
+ @JID.setter
2374
+ def JID(self, value):
2375
+ if isinstance(value, go.GoClass):
2376
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
2377
+ else:
2378
+ _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
2379
+ @property
2380
+ def GroupJID(self):
2381
+ return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
2382
+ @GroupJID.setter
2383
+ def GroupJID(self, value):
2384
+ if isinstance(value, go.GoClass):
2385
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
2386
+ else:
2387
+ _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
2388
+ @property
2389
+ def Timestamp(self):
2390
+ return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
2391
+ @Timestamp.setter
2392
+ def Timestamp(self, value):
2393
+ if isinstance(value, go.GoClass):
2394
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
2395
+ else:
2396
+ _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
2397
+ @property
2398
+ def IsCarbon(self):
2399
+ return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
2400
+ @IsCarbon.setter
2401
+ def IsCarbon(self, value):
2402
+ if isinstance(value, go.GoClass):
2403
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
2404
+ else:
2405
+ _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
2406
+
2407
+ # Python type for struct whatsapp.Attachment
2408
+ class Attachment(go.GoClass):
2409
+ """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
2410
+ def __init__(self, *args, **kwargs):
2411
+ """
2412
+ handle=A Go-side object is always initialized with an explicit handle=arg
2413
+ otherwise parameters can be unnamed in order of field names or named fields
2414
+ in which case a new Go object is constructed first
2415
+ """
2416
+ if len(kwargs) == 1 and 'handle' in kwargs:
2417
+ self.handle = kwargs['handle']
2418
+ _whatsapp.IncRef(self.handle)
2419
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
2420
+ self.handle = args[0].handle
2421
+ _whatsapp.IncRef(self.handle)
2422
+ else:
2423
+ self.handle = _whatsapp.whatsapp_Attachment_CTor()
2424
+ _whatsapp.IncRef(self.handle)
2425
+ if 0 < len(args):
2426
+ self.MIME = args[0]
2427
+ if "MIME" in kwargs:
2428
+ self.MIME = kwargs["MIME"]
2429
+ if 1 < len(args):
2430
+ self.Filename = args[1]
2431
+ if "Filename" in kwargs:
2432
+ self.Filename = kwargs["Filename"]
2433
+ if 2 < len(args):
2434
+ self.Caption = args[2]
2435
+ if "Caption" in kwargs:
2436
+ self.Caption = kwargs["Caption"]
2437
+ if 3 < len(args):
2438
+ self.Data = args[3]
2439
+ if "Data" in kwargs:
2440
+ self.Data = kwargs["Data"]
2441
+ def __del__(self):
2442
+ _whatsapp.DecRef(self.handle)
2443
+ def __str__(self):
2444
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2445
+ sv = 'whatsapp.Attachment{'
2446
+ first = True
2447
+ for v in pr:
2448
+ if callable(v[1]):
2449
+ continue
2450
+ if first:
2451
+ first = False
2452
+ else:
2453
+ sv += ', '
2454
+ sv += v[0] + '=' + str(v[1])
2455
+ return sv + '}'
2456
+ def __repr__(self):
2457
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2458
+ sv = 'whatsapp.Attachment ( '
2459
+ for v in pr:
2460
+ if not callable(v[1]):
2461
+ sv += v[0] + '=' + str(v[1]) + ', '
2462
+ return sv + ')'
2463
+ @property
2464
+ def MIME(self):
2465
+ return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
2466
+ @MIME.setter
2467
+ def MIME(self, value):
1979
2468
  if isinstance(value, go.GoClass):
1980
- _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
2469
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
1981
2470
  else:
1982
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2471
+ _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
1983
2472
  @property
1984
- def Nickname(self):
1985
- return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
1986
- @Nickname.setter
1987
- def Nickname(self, value):
2473
+ def Filename(self):
2474
+ return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
2475
+ @Filename.setter
2476
+ def Filename(self, value):
1988
2477
  if isinstance(value, go.GoClass):
1989
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
2478
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
1990
2479
  else:
1991
- _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
2480
+ _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
1992
2481
  @property
1993
- def Participants(self):
1994
- return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
1995
- @Participants.setter
1996
- def Participants(self, value):
2482
+ def Caption(self):
2483
+ return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
2484
+ @Caption.setter
2485
+ def Caption(self, value):
1997
2486
  if isinstance(value, go.GoClass):
1998
- _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
2487
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
2488
+ else:
2489
+ _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
2490
+ @property
2491
+ def Data(self):
2492
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
2493
+ @Data.setter
2494
+ def Data(self, value):
2495
+ if isinstance(value, go.GoClass):
2496
+ _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
1999
2497
  else:
2000
2498
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2499
+ def GetSpec(self, ctx):
2500
+ """GetSpec(object ctx) object, str
2501
+
2502
+ GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
2503
+ """
2504
+ return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
2001
2505
 
2002
- # Python type for struct whatsapp.GroupParticipant
2003
- class GroupParticipant(go.GoClass):
2004
- """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"""
2506
+ # Python type for struct whatsapp.Avatar
2507
+ class Avatar(go.GoClass):
2508
+ """A Avatar represents a small image set for a Contact or Group.\n"""
2005
2509
  def __init__(self, *args, **kwargs):
2006
2510
  """
2007
2511
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2015,25 +2519,21 @@ class GroupParticipant(go.GoClass):
2015
2519
  self.handle = args[0].handle
2016
2520
  _whatsapp.IncRef(self.handle)
2017
2521
  else:
2018
- self.handle = _whatsapp.whatsapp_GroupParticipant_CTor()
2522
+ self.handle = _whatsapp.whatsapp_Avatar_CTor()
2019
2523
  _whatsapp.IncRef(self.handle)
2020
2524
  if 0 < len(args):
2021
- self.JID = args[0]
2022
- if "JID" in kwargs:
2023
- self.JID = kwargs["JID"]
2525
+ self.ID = args[0]
2526
+ if "ID" in kwargs:
2527
+ self.ID = kwargs["ID"]
2024
2528
  if 1 < len(args):
2025
- self.Affiliation = args[1]
2026
- if "Affiliation" in kwargs:
2027
- self.Affiliation = kwargs["Affiliation"]
2028
- if 2 < len(args):
2029
- self.Action = args[2]
2030
- if "Action" in kwargs:
2031
- self.Action = kwargs["Action"]
2529
+ self.URL = args[1]
2530
+ if "URL" in kwargs:
2531
+ self.URL = kwargs["URL"]
2032
2532
  def __del__(self):
2033
2533
  _whatsapp.DecRef(self.handle)
2034
2534
  def __str__(self):
2035
2535
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2036
- sv = 'whatsapp.GroupParticipant{'
2536
+ sv = 'whatsapp.Avatar{'
2037
2537
  first = True
2038
2538
  for v in pr:
2039
2539
  if callable(v[1]):
@@ -2046,42 +2546,33 @@ class GroupParticipant(go.GoClass):
2046
2546
  return sv + '}'
2047
2547
  def __repr__(self):
2048
2548
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2049
- sv = 'whatsapp.GroupParticipant ( '
2549
+ sv = 'whatsapp.Avatar ( '
2050
2550
  for v in pr:
2051
2551
  if not callable(v[1]):
2052
2552
  sv += v[0] + '=' + str(v[1]) + ', '
2053
2553
  return sv + ')'
2054
2554
  @property
2055
- def JID(self):
2056
- return _whatsapp.whatsapp_GroupParticipant_JID_Get(self.handle)
2057
- @JID.setter
2058
- def JID(self, value):
2059
- if isinstance(value, go.GoClass):
2060
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value.handle)
2061
- else:
2062
- _whatsapp.whatsapp_GroupParticipant_JID_Set(self.handle, value)
2063
- @property
2064
- def Affiliation(self):
2065
- return _whatsapp.whatsapp_GroupParticipant_Affiliation_Get(self.handle)
2066
- @Affiliation.setter
2067
- def Affiliation(self, value):
2555
+ def ID(self):
2556
+ return _whatsapp.whatsapp_Avatar_ID_Get(self.handle)
2557
+ @ID.setter
2558
+ def ID(self, value):
2068
2559
  if isinstance(value, go.GoClass):
2069
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value.handle)
2560
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value.handle)
2070
2561
  else:
2071
- _whatsapp.whatsapp_GroupParticipant_Affiliation_Set(self.handle, value)
2562
+ _whatsapp.whatsapp_Avatar_ID_Set(self.handle, value)
2072
2563
  @property
2073
- def Action(self):
2074
- return _whatsapp.whatsapp_GroupParticipant_Action_Get(self.handle)
2075
- @Action.setter
2076
- def Action(self, value):
2564
+ def URL(self):
2565
+ return _whatsapp.whatsapp_Avatar_URL_Get(self.handle)
2566
+ @URL.setter
2567
+ def URL(self, value):
2077
2568
  if isinstance(value, go.GoClass):
2078
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value.handle)
2569
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value.handle)
2079
2570
  else:
2080
- _whatsapp.whatsapp_GroupParticipant_Action_Set(self.handle, value)
2571
+ _whatsapp.whatsapp_Avatar_URL_Set(self.handle, value)
2081
2572
 
2082
- # Python type for struct whatsapp.GroupSubject
2083
- class GroupSubject(go.GoClass):
2084
- """A GroupSubject represents the user-defined group description and attached metadata thereof, for a\ngiven [Group].\n"""
2573
+ # Python type for struct whatsapp.Connect
2574
+ class Connect(go.GoClass):
2575
+ """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
2085
2576
  def __init__(self, *args, **kwargs):
2086
2577
  """
2087
2578
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2095,25 +2586,21 @@ class GroupSubject(go.GoClass):
2095
2586
  self.handle = args[0].handle
2096
2587
  _whatsapp.IncRef(self.handle)
2097
2588
  else:
2098
- self.handle = _whatsapp.whatsapp_GroupSubject_CTor()
2589
+ self.handle = _whatsapp.whatsapp_Connect_CTor()
2099
2590
  _whatsapp.IncRef(self.handle)
2100
2591
  if 0 < len(args):
2101
- self.Subject = args[0]
2102
- if "Subject" in kwargs:
2103
- self.Subject = kwargs["Subject"]
2592
+ self.JID = args[0]
2593
+ if "JID" in kwargs:
2594
+ self.JID = kwargs["JID"]
2104
2595
  if 1 < len(args):
2105
- self.SetAt = args[1]
2106
- if "SetAt" in kwargs:
2107
- self.SetAt = kwargs["SetAt"]
2108
- if 2 < len(args):
2109
- self.SetByJID = args[2]
2110
- if "SetByJID" in kwargs:
2111
- self.SetByJID = kwargs["SetByJID"]
2596
+ self.Error = args[1]
2597
+ if "Error" in kwargs:
2598
+ self.Error = kwargs["Error"]
2112
2599
  def __del__(self):
2113
2600
  _whatsapp.DecRef(self.handle)
2114
2601
  def __str__(self):
2115
2602
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2116
- sv = 'whatsapp.GroupSubject{'
2603
+ sv = 'whatsapp.Connect{'
2117
2604
  first = True
2118
2605
  for v in pr:
2119
2606
  if callable(v[1]):
@@ -2126,42 +2613,33 @@ class GroupSubject(go.GoClass):
2126
2613
  return sv + '}'
2127
2614
  def __repr__(self):
2128
2615
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2129
- sv = 'whatsapp.GroupSubject ( '
2616
+ sv = 'whatsapp.Connect ( '
2130
2617
  for v in pr:
2131
2618
  if not callable(v[1]):
2132
2619
  sv += v[0] + '=' + str(v[1]) + ', '
2133
2620
  return sv + ')'
2134
2621
  @property
2135
- def Subject(self):
2136
- return _whatsapp.whatsapp_GroupSubject_Subject_Get(self.handle)
2137
- @Subject.setter
2138
- def Subject(self, value):
2139
- if isinstance(value, go.GoClass):
2140
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value.handle)
2141
- else:
2142
- _whatsapp.whatsapp_GroupSubject_Subject_Set(self.handle, value)
2143
- @property
2144
- def SetAt(self):
2145
- return _whatsapp.whatsapp_GroupSubject_SetAt_Get(self.handle)
2146
- @SetAt.setter
2147
- def SetAt(self, value):
2622
+ def JID(self):
2623
+ return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
2624
+ @JID.setter
2625
+ def JID(self, value):
2148
2626
  if isinstance(value, go.GoClass):
2149
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value.handle)
2627
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
2150
2628
  else:
2151
- _whatsapp.whatsapp_GroupSubject_SetAt_Set(self.handle, value)
2629
+ _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
2152
2630
  @property
2153
- def SetByJID(self):
2154
- return _whatsapp.whatsapp_GroupSubject_SetByJID_Get(self.handle)
2155
- @SetByJID.setter
2156
- def SetByJID(self, value):
2631
+ def Error(self):
2632
+ return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
2633
+ @Error.setter
2634
+ def Error(self, value):
2157
2635
  if isinstance(value, go.GoClass):
2158
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value.handle)
2636
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
2159
2637
  else:
2160
- _whatsapp.whatsapp_GroupSubject_SetByJID_Set(self.handle, value)
2638
+ _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
2161
2639
 
2162
- # Python type for struct whatsapp.Message
2163
- class Message(go.GoClass):
2164
- """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"""
2640
+ # Python type for struct whatsapp.Group
2641
+ class Group(go.GoClass):
2642
+ """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"""
2165
2643
  def __init__(self, *args, **kwargs):
2166
2644
  """
2167
2645
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2175,89 +2653,37 @@ class Message(go.GoClass):
2175
2653
  self.handle = args[0].handle
2176
2654
  _whatsapp.IncRef(self.handle)
2177
2655
  else:
2178
- self.handle = _whatsapp.whatsapp_Message_CTor()
2656
+ self.handle = _whatsapp.whatsapp_Group_CTor()
2179
2657
  _whatsapp.IncRef(self.handle)
2180
2658
  if 0 < len(args):
2181
- self.Kind = args[0]
2182
- if "Kind" in kwargs:
2183
- self.Kind = kwargs["Kind"]
2184
- if 1 < len(args):
2185
- self.ID = args[1]
2186
- if "ID" in kwargs:
2187
- self.ID = kwargs["ID"]
2188
- if 2 < len(args):
2189
- self.JID = args[2]
2659
+ self.JID = args[0]
2190
2660
  if "JID" in kwargs:
2191
2661
  self.JID = kwargs["JID"]
2192
- if 3 < len(args):
2193
- self.GroupJID = args[3]
2194
- if "GroupJID" in kwargs:
2195
- self.GroupJID = kwargs["GroupJID"]
2196
- if 4 < len(args):
2197
- self.OriginJID = args[4]
2198
- if "OriginJID" in kwargs:
2199
- self.OriginJID = kwargs["OriginJID"]
2200
- if 5 < len(args):
2201
- self.Body = args[5]
2202
- if "Body" in kwargs:
2203
- self.Body = kwargs["Body"]
2204
- if 6 < len(args):
2205
- self.Timestamp = args[6]
2206
- if "Timestamp" in kwargs:
2207
- self.Timestamp = kwargs["Timestamp"]
2208
- if 7 < len(args):
2209
- self.IsCarbon = args[7]
2210
- if "IsCarbon" in kwargs:
2211
- self.IsCarbon = kwargs["IsCarbon"]
2212
- if 8 < len(args):
2213
- self.IsForwarded = args[8]
2214
- if "IsForwarded" in kwargs:
2215
- self.IsForwarded = kwargs["IsForwarded"]
2216
- if 9 < len(args):
2217
- self.ReplyID = args[9]
2218
- if "ReplyID" in kwargs:
2219
- self.ReplyID = kwargs["ReplyID"]
2220
- if 10 < len(args):
2221
- self.ReplyBody = args[10]
2222
- if "ReplyBody" in kwargs:
2223
- self.ReplyBody = kwargs["ReplyBody"]
2224
- if 11 < len(args):
2225
- self.Attachments = args[11]
2226
- if "Attachments" in kwargs:
2227
- self.Attachments = kwargs["Attachments"]
2228
- if 12 < len(args):
2229
- self.Preview = args[12]
2230
- if "Preview" in kwargs:
2231
- self.Preview = kwargs["Preview"]
2232
- if 13 < len(args):
2233
- self.Location = args[13]
2234
- if "Location" in kwargs:
2235
- self.Location = kwargs["Location"]
2236
- if 14 < len(args):
2237
- self.Poll = args[14]
2238
- if "Poll" in kwargs:
2239
- self.Poll = kwargs["Poll"]
2240
- if 15 < len(args):
2241
- self.Album = args[15]
2242
- if "Album" in kwargs:
2243
- self.Album = kwargs["Album"]
2244
- if 16 < len(args):
2245
- self.MentionJIDs = args[16]
2246
- if "MentionJIDs" in kwargs:
2247
- self.MentionJIDs = kwargs["MentionJIDs"]
2248
- if 17 < len(args):
2249
- self.Receipts = args[17]
2250
- if "Receipts" in kwargs:
2251
- self.Receipts = kwargs["Receipts"]
2252
- if 18 < len(args):
2253
- self.Reactions = args[18]
2254
- if "Reactions" in kwargs:
2255
- self.Reactions = kwargs["Reactions"]
2662
+ if 1 < len(args):
2663
+ self.Name = args[1]
2664
+ if "Name" in kwargs:
2665
+ self.Name = kwargs["Name"]
2666
+ if 2 < len(args):
2667
+ self.Subject = args[2]
2668
+ if "Subject" in kwargs:
2669
+ self.Subject = kwargs["Subject"]
2670
+ if 3 < len(args):
2671
+ self.Nickname = args[3]
2672
+ if "Nickname" in kwargs:
2673
+ self.Nickname = kwargs["Nickname"]
2674
+ if 4 < len(args):
2675
+ self.Participants = args[4]
2676
+ if "Participants" in kwargs:
2677
+ self.Participants = kwargs["Participants"]
2678
+ if 5 < len(args):
2679
+ self.InviteCode = args[5]
2680
+ if "InviteCode" in kwargs:
2681
+ self.InviteCode = kwargs["InviteCode"]
2256
2682
  def __del__(self):
2257
2683
  _whatsapp.DecRef(self.handle)
2258
2684
  def __str__(self):
2259
2685
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2260
- sv = 'whatsapp.Message{'
2686
+ sv = 'whatsapp.Group{'
2261
2687
  first = True
2262
2688
  for v in pr:
2263
2689
  if callable(v[1]):
@@ -2270,186 +2696,69 @@ class Message(go.GoClass):
2270
2696
  return sv + '}'
2271
2697
  def __repr__(self):
2272
2698
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2273
- sv = 'whatsapp.Message ( '
2699
+ sv = 'whatsapp.Group ( '
2274
2700
  for v in pr:
2275
2701
  if not callable(v[1]):
2276
2702
  sv += v[0] + '=' + str(v[1]) + ', '
2277
2703
  return sv + ')'
2278
2704
  @property
2279
- def Kind(self):
2280
- return _whatsapp.whatsapp_Message_Kind_Get(self.handle)
2281
- @Kind.setter
2282
- def Kind(self, value):
2283
- if isinstance(value, go.GoClass):
2284
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value.handle)
2285
- else:
2286
- _whatsapp.whatsapp_Message_Kind_Set(self.handle, value)
2287
- @property
2288
- def ID(self):
2289
- return _whatsapp.whatsapp_Message_ID_Get(self.handle)
2290
- @ID.setter
2291
- def ID(self, value):
2292
- if isinstance(value, go.GoClass):
2293
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value.handle)
2294
- else:
2295
- _whatsapp.whatsapp_Message_ID_Set(self.handle, value)
2296
- @property
2297
2705
  def JID(self):
2298
- return _whatsapp.whatsapp_Message_JID_Get(self.handle)
2706
+ return _whatsapp.whatsapp_Group_JID_Get(self.handle)
2299
2707
  @JID.setter
2300
2708
  def JID(self, value):
2301
2709
  if isinstance(value, go.GoClass):
2302
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value.handle)
2303
- else:
2304
- _whatsapp.whatsapp_Message_JID_Set(self.handle, value)
2305
- @property
2306
- def GroupJID(self):
2307
- return _whatsapp.whatsapp_Message_GroupJID_Get(self.handle)
2308
- @GroupJID.setter
2309
- def GroupJID(self, value):
2310
- if isinstance(value, go.GoClass):
2311
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value.handle)
2312
- else:
2313
- _whatsapp.whatsapp_Message_GroupJID_Set(self.handle, value)
2314
- @property
2315
- def OriginJID(self):
2316
- return _whatsapp.whatsapp_Message_OriginJID_Get(self.handle)
2317
- @OriginJID.setter
2318
- def OriginJID(self, value):
2319
- if isinstance(value, go.GoClass):
2320
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value.handle)
2321
- else:
2322
- _whatsapp.whatsapp_Message_OriginJID_Set(self.handle, value)
2323
- @property
2324
- def Body(self):
2325
- return _whatsapp.whatsapp_Message_Body_Get(self.handle)
2326
- @Body.setter
2327
- def Body(self, value):
2328
- if isinstance(value, go.GoClass):
2329
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value.handle)
2330
- else:
2331
- _whatsapp.whatsapp_Message_Body_Set(self.handle, value)
2332
- @property
2333
- def Timestamp(self):
2334
- return _whatsapp.whatsapp_Message_Timestamp_Get(self.handle)
2335
- @Timestamp.setter
2336
- def Timestamp(self, value):
2337
- if isinstance(value, go.GoClass):
2338
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value.handle)
2339
- else:
2340
- _whatsapp.whatsapp_Message_Timestamp_Set(self.handle, value)
2341
- @property
2342
- def IsCarbon(self):
2343
- return _whatsapp.whatsapp_Message_IsCarbon_Get(self.handle)
2344
- @IsCarbon.setter
2345
- def IsCarbon(self, value):
2346
- if isinstance(value, go.GoClass):
2347
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value.handle)
2348
- else:
2349
- _whatsapp.whatsapp_Message_IsCarbon_Set(self.handle, value)
2350
- @property
2351
- def IsForwarded(self):
2352
- return _whatsapp.whatsapp_Message_IsForwarded_Get(self.handle)
2353
- @IsForwarded.setter
2354
- def IsForwarded(self, value):
2355
- if isinstance(value, go.GoClass):
2356
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value.handle)
2357
- else:
2358
- _whatsapp.whatsapp_Message_IsForwarded_Set(self.handle, value)
2359
- @property
2360
- def ReplyID(self):
2361
- return _whatsapp.whatsapp_Message_ReplyID_Get(self.handle)
2362
- @ReplyID.setter
2363
- def ReplyID(self, value):
2364
- if isinstance(value, go.GoClass):
2365
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value.handle)
2366
- else:
2367
- _whatsapp.whatsapp_Message_ReplyID_Set(self.handle, value)
2368
- @property
2369
- def ReplyBody(self):
2370
- return _whatsapp.whatsapp_Message_ReplyBody_Get(self.handle)
2371
- @ReplyBody.setter
2372
- def ReplyBody(self, value):
2373
- if isinstance(value, go.GoClass):
2374
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value.handle)
2375
- else:
2376
- _whatsapp.whatsapp_Message_ReplyBody_Set(self.handle, value)
2377
- @property
2378
- def Attachments(self):
2379
- return Slice_whatsapp_Attachment(handle=_whatsapp.whatsapp_Message_Attachments_Get(self.handle))
2380
- @Attachments.setter
2381
- def Attachments(self, value):
2382
- if isinstance(value, go.GoClass):
2383
- _whatsapp.whatsapp_Message_Attachments_Set(self.handle, value.handle)
2384
- else:
2385
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2386
- @property
2387
- def Preview(self):
2388
- return Preview(handle=_whatsapp.whatsapp_Message_Preview_Get(self.handle))
2389
- @Preview.setter
2390
- def Preview(self, value):
2391
- if isinstance(value, go.GoClass):
2392
- _whatsapp.whatsapp_Message_Preview_Set(self.handle, value.handle)
2393
- else:
2394
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2395
- @property
2396
- def Location(self):
2397
- return Location(handle=_whatsapp.whatsapp_Message_Location_Get(self.handle))
2398
- @Location.setter
2399
- def Location(self, value):
2400
- if isinstance(value, go.GoClass):
2401
- _whatsapp.whatsapp_Message_Location_Set(self.handle, value.handle)
2710
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value.handle)
2402
2711
  else:
2403
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2712
+ _whatsapp.whatsapp_Group_JID_Set(self.handle, value)
2404
2713
  @property
2405
- def Poll(self):
2406
- return Poll(handle=_whatsapp.whatsapp_Message_Poll_Get(self.handle))
2407
- @Poll.setter
2408
- def Poll(self, value):
2714
+ def Name(self):
2715
+ return _whatsapp.whatsapp_Group_Name_Get(self.handle)
2716
+ @Name.setter
2717
+ def Name(self, value):
2409
2718
  if isinstance(value, go.GoClass):
2410
- _whatsapp.whatsapp_Message_Poll_Set(self.handle, value.handle)
2719
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value.handle)
2411
2720
  else:
2412
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2721
+ _whatsapp.whatsapp_Group_Name_Set(self.handle, value)
2413
2722
  @property
2414
- def Album(self):
2415
- return Album(handle=_whatsapp.whatsapp_Message_Album_Get(self.handle))
2416
- @Album.setter
2417
- def Album(self, value):
2723
+ def Subject(self):
2724
+ return GroupSubject(handle=_whatsapp.whatsapp_Group_Subject_Get(self.handle))
2725
+ @Subject.setter
2726
+ def Subject(self, value):
2418
2727
  if isinstance(value, go.GoClass):
2419
- _whatsapp.whatsapp_Message_Album_Set(self.handle, value.handle)
2728
+ _whatsapp.whatsapp_Group_Subject_Set(self.handle, value.handle)
2420
2729
  else:
2421
2730
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2422
2731
  @property
2423
- def MentionJIDs(self):
2424
- return go.Slice_string(handle=_whatsapp.whatsapp_Message_MentionJIDs_Get(self.handle))
2425
- @MentionJIDs.setter
2426
- def MentionJIDs(self, value):
2732
+ def Nickname(self):
2733
+ return _whatsapp.whatsapp_Group_Nickname_Get(self.handle)
2734
+ @Nickname.setter
2735
+ def Nickname(self, value):
2427
2736
  if isinstance(value, go.GoClass):
2428
- _whatsapp.whatsapp_Message_MentionJIDs_Set(self.handle, value.handle)
2737
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value.handle)
2429
2738
  else:
2430
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2739
+ _whatsapp.whatsapp_Group_Nickname_Set(self.handle, value)
2431
2740
  @property
2432
- def Receipts(self):
2433
- return Slice_whatsapp_Receipt(handle=_whatsapp.whatsapp_Message_Receipts_Get(self.handle))
2434
- @Receipts.setter
2435
- def Receipts(self, value):
2741
+ def Participants(self):
2742
+ return Slice_whatsapp_GroupParticipant(handle=_whatsapp.whatsapp_Group_Participants_Get(self.handle))
2743
+ @Participants.setter
2744
+ def Participants(self, value):
2436
2745
  if isinstance(value, go.GoClass):
2437
- _whatsapp.whatsapp_Message_Receipts_Set(self.handle, value.handle)
2746
+ _whatsapp.whatsapp_Group_Participants_Set(self.handle, value.handle)
2438
2747
  else:
2439
2748
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2440
2749
  @property
2441
- def Reactions(self):
2442
- return Slice_whatsapp_Message(handle=_whatsapp.whatsapp_Message_Reactions_Get(self.handle))
2443
- @Reactions.setter
2444
- def Reactions(self, value):
2750
+ def InviteCode(self):
2751
+ return _whatsapp.whatsapp_Group_InviteCode_Get(self.handle)
2752
+ @InviteCode.setter
2753
+ def InviteCode(self, value):
2445
2754
  if isinstance(value, go.GoClass):
2446
- _whatsapp.whatsapp_Message_Reactions_Set(self.handle, value.handle)
2755
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value.handle)
2447
2756
  else:
2448
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2757
+ _whatsapp.whatsapp_Group_InviteCode_Set(self.handle, value)
2449
2758
 
2450
- # Python type for struct whatsapp.Attachment
2451
- class Attachment(go.GoClass):
2452
- """A Attachment represents additional binary data (e.g. images, videos, documents) provided alongside\na message, for display or storage on the recepient client.\n"""
2759
+ # Python type for struct whatsapp.LinkedDevice
2760
+ class LinkedDevice(go.GoClass):
2761
+ """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"""
2453
2762
  def __init__(self, *args, **kwargs):
2454
2763
  """
2455
2764
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2463,29 +2772,17 @@ class Attachment(go.GoClass):
2463
2772
  self.handle = args[0].handle
2464
2773
  _whatsapp.IncRef(self.handle)
2465
2774
  else:
2466
- self.handle = _whatsapp.whatsapp_Attachment_CTor()
2775
+ self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
2467
2776
  _whatsapp.IncRef(self.handle)
2468
2777
  if 0 < len(args):
2469
- self.MIME = args[0]
2470
- if "MIME" in kwargs:
2471
- self.MIME = kwargs["MIME"]
2472
- if 1 < len(args):
2473
- self.Filename = args[1]
2474
- if "Filename" in kwargs:
2475
- self.Filename = kwargs["Filename"]
2476
- if 2 < len(args):
2477
- self.Caption = args[2]
2478
- if "Caption" in kwargs:
2479
- self.Caption = kwargs["Caption"]
2480
- if 3 < len(args):
2481
- self.Data = args[3]
2482
- if "Data" in kwargs:
2483
- self.Data = kwargs["Data"]
2778
+ self.ID = args[0]
2779
+ if "ID" in kwargs:
2780
+ self.ID = kwargs["ID"]
2484
2781
  def __del__(self):
2485
2782
  _whatsapp.DecRef(self.handle)
2486
2783
  def __str__(self):
2487
2784
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2488
- sv = 'whatsapp.Attachment{'
2785
+ sv = 'whatsapp.LinkedDevice{'
2489
2786
  first = True
2490
2787
  for v in pr:
2491
2788
  if callable(v[1]):
@@ -2495,56 +2792,33 @@ class Attachment(go.GoClass):
2495
2792
  else:
2496
2793
  sv += ', '
2497
2794
  sv += v[0] + '=' + str(v[1])
2498
- return sv + '}'
2499
- def __repr__(self):
2500
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2501
- sv = 'whatsapp.Attachment ( '
2502
- for v in pr:
2503
- if not callable(v[1]):
2504
- sv += v[0] + '=' + str(v[1]) + ', '
2505
- return sv + ')'
2506
- @property
2507
- def MIME(self):
2508
- return _whatsapp.whatsapp_Attachment_MIME_Get(self.handle)
2509
- @MIME.setter
2510
- def MIME(self, value):
2511
- if isinstance(value, go.GoClass):
2512
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value.handle)
2513
- else:
2514
- _whatsapp.whatsapp_Attachment_MIME_Set(self.handle, value)
2515
- @property
2516
- def Filename(self):
2517
- return _whatsapp.whatsapp_Attachment_Filename_Get(self.handle)
2518
- @Filename.setter
2519
- def Filename(self, value):
2520
- if isinstance(value, go.GoClass):
2521
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value.handle)
2522
- else:
2523
- _whatsapp.whatsapp_Attachment_Filename_Set(self.handle, value)
2524
- @property
2525
- def Caption(self):
2526
- return _whatsapp.whatsapp_Attachment_Caption_Get(self.handle)
2527
- @Caption.setter
2528
- def Caption(self, value):
2529
- if isinstance(value, go.GoClass):
2530
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value.handle)
2531
- else:
2532
- _whatsapp.whatsapp_Attachment_Caption_Set(self.handle, value)
2795
+ return sv + '}'
2796
+ def __repr__(self):
2797
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2798
+ sv = 'whatsapp.LinkedDevice ( '
2799
+ for v in pr:
2800
+ if not callable(v[1]):
2801
+ sv += v[0] + '=' + str(v[1]) + ', '
2802
+ return sv + ')'
2533
2803
  @property
2534
- def Data(self):
2535
- return go.Slice_byte(handle=_whatsapp.whatsapp_Attachment_Data_Get(self.handle))
2536
- @Data.setter
2537
- def Data(self, value):
2804
+ def ID(self):
2805
+ """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
2806
+ is currently equivalent to a password, and needs to be protected accordingly.
2807
+ """
2808
+ return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
2809
+ @ID.setter
2810
+ def ID(self, value):
2538
2811
  if isinstance(value, go.GoClass):
2539
- _whatsapp.whatsapp_Attachment_Data_Set(self.handle, value.handle)
2812
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
2540
2813
  else:
2541
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2542
- def GetSpec(self, ctx):
2543
- """GetSpec(object ctx) object, str
2814
+ _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
2815
+ def JID(self):
2816
+ """JID() object
2544
2817
 
2545
- GetSpec returns metadata for this attachment, as derived from the underlying attachment data.
2818
+ JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
2819
+ may return invalid JIDs, and this function does not handle errors.
2546
2820
  """
2547
- return go.Ptr_media_Spec(handle=_whatsapp.whatsapp_Attachment_GetSpec(self.handle, ctx.handle))
2821
+ return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2548
2822
 
2549
2823
  # Python type for struct whatsapp.Presence
2550
2824
  class Presence(go.GoClass):
@@ -2626,9 +2900,9 @@ class Presence(go.GoClass):
2626
2900
  else:
2627
2901
  _whatsapp.whatsapp_Presence_LastSeen_Set(self.handle, value)
2628
2902
 
2629
- # Python type for struct whatsapp.Preview
2630
- class Preview(go.GoClass):
2631
- """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"""
2903
+ # Python type for struct whatsapp.Contact
2904
+ class Contact(go.GoClass):
2905
+ """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"""
2632
2906
  def __init__(self, *args, **kwargs):
2633
2907
  """
2634
2908
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2642,33 +2916,21 @@ class Preview(go.GoClass):
2642
2916
  self.handle = args[0].handle
2643
2917
  _whatsapp.IncRef(self.handle)
2644
2918
  else:
2645
- self.handle = _whatsapp.whatsapp_Preview_CTor()
2919
+ self.handle = _whatsapp.whatsapp_Contact_CTor()
2646
2920
  _whatsapp.IncRef(self.handle)
2647
2921
  if 0 < len(args):
2648
- self.Kind = args[0]
2649
- if "Kind" in kwargs:
2650
- self.Kind = kwargs["Kind"]
2922
+ self.JID = args[0]
2923
+ if "JID" in kwargs:
2924
+ self.JID = kwargs["JID"]
2651
2925
  if 1 < len(args):
2652
- self.URL = args[1]
2653
- if "URL" in kwargs:
2654
- self.URL = kwargs["URL"]
2655
- if 2 < len(args):
2656
- self.Title = args[2]
2657
- if "Title" in kwargs:
2658
- self.Title = kwargs["Title"]
2659
- if 3 < len(args):
2660
- self.Description = args[3]
2661
- if "Description" in kwargs:
2662
- self.Description = kwargs["Description"]
2663
- if 4 < len(args):
2664
- self.Thumbnail = args[4]
2665
- if "Thumbnail" in kwargs:
2666
- self.Thumbnail = kwargs["Thumbnail"]
2926
+ self.Name = args[1]
2927
+ if "Name" in kwargs:
2928
+ self.Name = kwargs["Name"]
2667
2929
  def __del__(self):
2668
2930
  _whatsapp.DecRef(self.handle)
2669
2931
  def __str__(self):
2670
2932
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2671
- sv = 'whatsapp.Preview{'
2933
+ sv = 'whatsapp.Contact{'
2672
2934
  first = True
2673
2935
  for v in pr:
2674
2936
  if callable(v[1]):
@@ -2681,60 +2943,33 @@ class Preview(go.GoClass):
2681
2943
  return sv + '}'
2682
2944
  def __repr__(self):
2683
2945
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2684
- sv = 'whatsapp.Preview ( '
2946
+ sv = 'whatsapp.Contact ( '
2685
2947
  for v in pr:
2686
2948
  if not callable(v[1]):
2687
2949
  sv += v[0] + '=' + str(v[1]) + ', '
2688
2950
  return sv + ')'
2689
2951
  @property
2690
- def Kind(self):
2691
- return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
2692
- @Kind.setter
2693
- def Kind(self, value):
2694
- if isinstance(value, go.GoClass):
2695
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
2696
- else:
2697
- _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
2698
- @property
2699
- def URL(self):
2700
- return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
2701
- @URL.setter
2702
- def URL(self, value):
2703
- if isinstance(value, go.GoClass):
2704
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
2705
- else:
2706
- _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
2707
- @property
2708
- def Title(self):
2709
- return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
2710
- @Title.setter
2711
- def Title(self, value):
2712
- if isinstance(value, go.GoClass):
2713
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
2714
- else:
2715
- _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
2716
- @property
2717
- def Description(self):
2718
- return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
2719
- @Description.setter
2720
- def Description(self, value):
2952
+ def JID(self):
2953
+ return _whatsapp.whatsapp_Contact_JID_Get(self.handle)
2954
+ @JID.setter
2955
+ def JID(self, value):
2721
2956
  if isinstance(value, go.GoClass):
2722
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
2957
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value.handle)
2723
2958
  else:
2724
- _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
2959
+ _whatsapp.whatsapp_Contact_JID_Set(self.handle, value)
2725
2960
  @property
2726
- def Thumbnail(self):
2727
- return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
2728
- @Thumbnail.setter
2729
- def Thumbnail(self, value):
2961
+ def Name(self):
2962
+ return _whatsapp.whatsapp_Contact_Name_Get(self.handle)
2963
+ @Name.setter
2964
+ def Name(self, value):
2730
2965
  if isinstance(value, go.GoClass):
2731
- _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
2966
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value.handle)
2732
2967
  else:
2733
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
2968
+ _whatsapp.whatsapp_Contact_Name_Set(self.handle, value)
2734
2969
 
2735
- # Python type for struct whatsapp.LinkedDevice
2736
- class LinkedDevice(go.GoClass):
2737
- """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"""
2970
+ # Python type for struct whatsapp.Location
2971
+ class Location(go.GoClass):
2972
+ """A Location represents additional metadata given to location messages.\n"""
2738
2973
  def __init__(self, *args, **kwargs):
2739
2974
  """
2740
2975
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2748,17 +2983,41 @@ class LinkedDevice(go.GoClass):
2748
2983
  self.handle = args[0].handle
2749
2984
  _whatsapp.IncRef(self.handle)
2750
2985
  else:
2751
- self.handle = _whatsapp.whatsapp_LinkedDevice_CTor()
2986
+ self.handle = _whatsapp.whatsapp_Location_CTor()
2752
2987
  _whatsapp.IncRef(self.handle)
2753
2988
  if 0 < len(args):
2754
- self.ID = args[0]
2755
- if "ID" in kwargs:
2756
- self.ID = kwargs["ID"]
2989
+ self.Latitude = args[0]
2990
+ if "Latitude" in kwargs:
2991
+ self.Latitude = kwargs["Latitude"]
2992
+ if 1 < len(args):
2993
+ self.Longitude = args[1]
2994
+ if "Longitude" in kwargs:
2995
+ self.Longitude = kwargs["Longitude"]
2996
+ if 2 < len(args):
2997
+ self.Accuracy = args[2]
2998
+ if "Accuracy" in kwargs:
2999
+ self.Accuracy = kwargs["Accuracy"]
3000
+ if 3 < len(args):
3001
+ self.IsLive = args[3]
3002
+ if "IsLive" in kwargs:
3003
+ self.IsLive = kwargs["IsLive"]
3004
+ if 4 < len(args):
3005
+ self.Name = args[4]
3006
+ if "Name" in kwargs:
3007
+ self.Name = kwargs["Name"]
3008
+ if 5 < len(args):
3009
+ self.Address = args[5]
3010
+ if "Address" in kwargs:
3011
+ self.Address = kwargs["Address"]
3012
+ if 6 < len(args):
3013
+ self.URL = args[6]
3014
+ if "URL" in kwargs:
3015
+ self.URL = kwargs["URL"]
2757
3016
  def __del__(self):
2758
3017
  _whatsapp.DecRef(self.handle)
2759
3018
  def __str__(self):
2760
3019
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2761
- sv = 'whatsapp.LinkedDevice{'
3020
+ sv = 'whatsapp.Location{'
2762
3021
  first = True
2763
3022
  for v in pr:
2764
3023
  if callable(v[1]):
@@ -2771,114 +3030,80 @@ class LinkedDevice(go.GoClass):
2771
3030
  return sv + '}'
2772
3031
  def __repr__(self):
2773
3032
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2774
- sv = 'whatsapp.LinkedDevice ( '
3033
+ sv = 'whatsapp.Location ( '
2775
3034
  for v in pr:
2776
3035
  if not callable(v[1]):
2777
3036
  sv += v[0] + '=' + str(v[1]) + ', '
2778
3037
  return sv + ')'
2779
3038
  @property
2780
- def ID(self):
2781
- """ID is an opaque string identifying this LinkedDevice to the Session. Noted that this string
2782
- is currently equivalent to a password, and needs to be protected accordingly.
2783
- """
2784
- return _whatsapp.whatsapp_LinkedDevice_ID_Get(self.handle)
2785
- @ID.setter
2786
- def ID(self, value):
3039
+ def Latitude(self):
3040
+ return _whatsapp.whatsapp_Location_Latitude_Get(self.handle)
3041
+ @Latitude.setter
3042
+ def Latitude(self, value):
2787
3043
  if isinstance(value, go.GoClass):
2788
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value.handle)
3044
+ _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value.handle)
2789
3045
  else:
2790
- _whatsapp.whatsapp_LinkedDevice_ID_Set(self.handle, value)
2791
- def JID(self):
2792
- """JID() object
2793
-
2794
- JID returns the WhatsApp JID corresponding to the LinkedDevice ID. Empty or invalid device IDs
2795
- may return invalid JIDs, and this function does not handle errors.
2796
- """
2797
- return go.types_JID(handle=_whatsapp.whatsapp_LinkedDevice_JID(self.handle))
2798
-
2799
- # Python type for struct whatsapp.ChatState
2800
- class ChatState(go.GoClass):
2801
- """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"""
2802
- def __init__(self, *args, **kwargs):
2803
- """
2804
- handle=A Go-side object is always initialized with an explicit handle=arg
2805
- otherwise parameters can be unnamed in order of field names or named fields
2806
- in which case a new Go object is constructed first
2807
- """
2808
- if len(kwargs) == 1 and 'handle' in kwargs:
2809
- self.handle = kwargs['handle']
2810
- _whatsapp.IncRef(self.handle)
2811
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
2812
- self.handle = args[0].handle
2813
- _whatsapp.IncRef(self.handle)
3046
+ _whatsapp.whatsapp_Location_Latitude_Set(self.handle, value)
3047
+ @property
3048
+ def Longitude(self):
3049
+ return _whatsapp.whatsapp_Location_Longitude_Get(self.handle)
3050
+ @Longitude.setter
3051
+ def Longitude(self, value):
3052
+ if isinstance(value, go.GoClass):
3053
+ _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value.handle)
2814
3054
  else:
2815
- self.handle = _whatsapp.whatsapp_ChatState_CTor()
2816
- _whatsapp.IncRef(self.handle)
2817
- if 0 < len(args):
2818
- self.Kind = args[0]
2819
- if "Kind" in kwargs:
2820
- self.Kind = kwargs["Kind"]
2821
- if 1 < len(args):
2822
- self.JID = args[1]
2823
- if "JID" in kwargs:
2824
- self.JID = kwargs["JID"]
2825
- if 2 < len(args):
2826
- self.GroupJID = args[2]
2827
- if "GroupJID" in kwargs:
2828
- self.GroupJID = kwargs["GroupJID"]
2829
- def __del__(self):
2830
- _whatsapp.DecRef(self.handle)
2831
- def __str__(self):
2832
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2833
- sv = 'whatsapp.ChatState{'
2834
- first = True
2835
- for v in pr:
2836
- if callable(v[1]):
2837
- continue
2838
- if first:
2839
- first = False
2840
- else:
2841
- sv += ', '
2842
- sv += v[0] + '=' + str(v[1])
2843
- return sv + '}'
2844
- def __repr__(self):
2845
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2846
- sv = 'whatsapp.ChatState ( '
2847
- for v in pr:
2848
- if not callable(v[1]):
2849
- sv += v[0] + '=' + str(v[1]) + ', '
2850
- return sv + ')'
3055
+ _whatsapp.whatsapp_Location_Longitude_Set(self.handle, value)
3056
+ @property
3057
+ def Accuracy(self):
3058
+ return _whatsapp.whatsapp_Location_Accuracy_Get(self.handle)
3059
+ @Accuracy.setter
3060
+ def Accuracy(self, value):
3061
+ if isinstance(value, go.GoClass):
3062
+ _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value.handle)
3063
+ else:
3064
+ _whatsapp.whatsapp_Location_Accuracy_Set(self.handle, value)
3065
+ @property
3066
+ def IsLive(self):
3067
+ return _whatsapp.whatsapp_Location_IsLive_Get(self.handle)
3068
+ @IsLive.setter
3069
+ def IsLive(self, value):
3070
+ if isinstance(value, go.GoClass):
3071
+ _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value.handle)
3072
+ else:
3073
+ _whatsapp.whatsapp_Location_IsLive_Set(self.handle, value)
2851
3074
  @property
2852
- def Kind(self):
2853
- return _whatsapp.whatsapp_ChatState_Kind_Get(self.handle)
2854
- @Kind.setter
2855
- def Kind(self, value):
3075
+ def Name(self):
3076
+ """Optional fields given for named locations.
3077
+ """
3078
+ return _whatsapp.whatsapp_Location_Name_Get(self.handle)
3079
+ @Name.setter
3080
+ def Name(self, value):
2856
3081
  if isinstance(value, go.GoClass):
2857
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value.handle)
3082
+ _whatsapp.whatsapp_Location_Name_Set(self.handle, value.handle)
2858
3083
  else:
2859
- _whatsapp.whatsapp_ChatState_Kind_Set(self.handle, value)
3084
+ _whatsapp.whatsapp_Location_Name_Set(self.handle, value)
2860
3085
  @property
2861
- def JID(self):
2862
- return _whatsapp.whatsapp_ChatState_JID_Get(self.handle)
2863
- @JID.setter
2864
- def JID(self, value):
3086
+ def Address(self):
3087
+ return _whatsapp.whatsapp_Location_Address_Get(self.handle)
3088
+ @Address.setter
3089
+ def Address(self, value):
2865
3090
  if isinstance(value, go.GoClass):
2866
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value.handle)
3091
+ _whatsapp.whatsapp_Location_Address_Set(self.handle, value.handle)
2867
3092
  else:
2868
- _whatsapp.whatsapp_ChatState_JID_Set(self.handle, value)
3093
+ _whatsapp.whatsapp_Location_Address_Set(self.handle, value)
2869
3094
  @property
2870
- def GroupJID(self):
2871
- return _whatsapp.whatsapp_ChatState_GroupJID_Get(self.handle)
2872
- @GroupJID.setter
2873
- def GroupJID(self, value):
3095
+ def URL(self):
3096
+ return _whatsapp.whatsapp_Location_URL_Get(self.handle)
3097
+ @URL.setter
3098
+ def URL(self, value):
2874
3099
  if isinstance(value, go.GoClass):
2875
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value.handle)
3100
+ _whatsapp.whatsapp_Location_URL_Set(self.handle, value.handle)
2876
3101
  else:
2877
- _whatsapp.whatsapp_ChatState_GroupJID_Set(self.handle, value)
3102
+ _whatsapp.whatsapp_Location_URL_Set(self.handle, value)
2878
3103
 
2879
- # Python type for struct whatsapp.Connect
2880
- class Connect(go.GoClass):
2881
- """Connect represents event data related to a connection to WhatsApp being established, or failing\nto do so (based on the [Connect.Error] result).\n"""
3104
+ # Python type for struct whatsapp.LoggedOut
3105
+ class LoggedOut(go.GoClass):
3106
+ """LoggedOut repreents event data related to an explicit or implicit log-out event.\n"""
2882
3107
  def __init__(self, *args, **kwargs):
2883
3108
  """
2884
3109
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -2892,21 +3117,17 @@ class Connect(go.GoClass):
2892
3117
  self.handle = args[0].handle
2893
3118
  _whatsapp.IncRef(self.handle)
2894
3119
  else:
2895
- self.handle = _whatsapp.whatsapp_Connect_CTor()
3120
+ self.handle = _whatsapp.whatsapp_LoggedOut_CTor()
2896
3121
  _whatsapp.IncRef(self.handle)
2897
3122
  if 0 < len(args):
2898
- self.JID = args[0]
2899
- if "JID" in kwargs:
2900
- self.JID = kwargs["JID"]
2901
- if 1 < len(args):
2902
- self.Error = args[1]
2903
- if "Error" in kwargs:
2904
- self.Error = kwargs["Error"]
3123
+ self.Reason = args[0]
3124
+ if "Reason" in kwargs:
3125
+ self.Reason = kwargs["Reason"]
2905
3126
  def __del__(self):
2906
3127
  _whatsapp.DecRef(self.handle)
2907
3128
  def __str__(self):
2908
3129
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2909
- sv = 'whatsapp.Connect{'
3130
+ sv = 'whatsapp.LoggedOut{'
2910
3131
  first = True
2911
3132
  for v in pr:
2912
3133
  if callable(v[1]):
@@ -2919,29 +3140,20 @@ class Connect(go.GoClass):
2919
3140
  return sv + '}'
2920
3141
  def __repr__(self):
2921
3142
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
2922
- sv = 'whatsapp.Connect ( '
3143
+ sv = 'whatsapp.LoggedOut ( '
2923
3144
  for v in pr:
2924
3145
  if not callable(v[1]):
2925
3146
  sv += v[0] + '=' + str(v[1]) + ', '
2926
3147
  return sv + ')'
2927
3148
  @property
2928
- def JID(self):
2929
- return _whatsapp.whatsapp_Connect_JID_Get(self.handle)
2930
- @JID.setter
2931
- def JID(self, value):
2932
- if isinstance(value, go.GoClass):
2933
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value.handle)
2934
- else:
2935
- _whatsapp.whatsapp_Connect_JID_Set(self.handle, value)
2936
- @property
2937
- def Error(self):
2938
- return _whatsapp.whatsapp_Connect_Error_Get(self.handle)
2939
- @Error.setter
2940
- def Error(self, value):
3149
+ def Reason(self):
3150
+ return _whatsapp.whatsapp_LoggedOut_Reason_Get(self.handle)
3151
+ @Reason.setter
3152
+ def Reason(self, value):
2941
3153
  if isinstance(value, go.GoClass):
2942
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value.handle)
3154
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value.handle)
2943
3155
  else:
2944
- _whatsapp.whatsapp_Connect_Error_Set(self.handle, value)
3156
+ _whatsapp.whatsapp_LoggedOut_Reason_Set(self.handle, value)
2945
3157
 
2946
3158
  # Python type for struct whatsapp.Poll
2947
3159
  class Poll(go.GoClass):
@@ -3010,9 +3222,9 @@ class Poll(go.GoClass):
3010
3222
  else:
3011
3223
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3012
3224
 
3013
- # Python type for struct whatsapp.Receipt
3014
- class Receipt(go.GoClass):
3015
- """A Receipt represents a notice of delivery or presentation for [Message] instances sent or\nreceived. Receipts can be delivered for many messages at once, but are generally all delivered\nunder one specific state at a time.\n"""
3225
+ # Python type for struct whatsapp.Preview
3226
+ class Preview(go.GoClass):
3227
+ """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"""
3016
3228
  def __init__(self, *args, **kwargs):
3017
3229
  """
3018
3230
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -3026,37 +3238,33 @@ class Receipt(go.GoClass):
3026
3238
  self.handle = args[0].handle
3027
3239
  _whatsapp.IncRef(self.handle)
3028
3240
  else:
3029
- self.handle = _whatsapp.whatsapp_Receipt_CTor()
3241
+ self.handle = _whatsapp.whatsapp_Preview_CTor()
3030
3242
  _whatsapp.IncRef(self.handle)
3031
3243
  if 0 < len(args):
3032
3244
  self.Kind = args[0]
3033
3245
  if "Kind" in kwargs:
3034
3246
  self.Kind = kwargs["Kind"]
3035
3247
  if 1 < len(args):
3036
- self.MessageIDs = args[1]
3037
- if "MessageIDs" in kwargs:
3038
- self.MessageIDs = kwargs["MessageIDs"]
3248
+ self.URL = args[1]
3249
+ if "URL" in kwargs:
3250
+ self.URL = kwargs["URL"]
3039
3251
  if 2 < len(args):
3040
- self.JID = args[2]
3041
- if "JID" in kwargs:
3042
- self.JID = kwargs["JID"]
3252
+ self.Title = args[2]
3253
+ if "Title" in kwargs:
3254
+ self.Title = kwargs["Title"]
3043
3255
  if 3 < len(args):
3044
- self.GroupJID = args[3]
3045
- if "GroupJID" in kwargs:
3046
- self.GroupJID = kwargs["GroupJID"]
3256
+ self.Description = args[3]
3257
+ if "Description" in kwargs:
3258
+ self.Description = kwargs["Description"]
3047
3259
  if 4 < len(args):
3048
- self.Timestamp = args[4]
3049
- if "Timestamp" in kwargs:
3050
- self.Timestamp = kwargs["Timestamp"]
3051
- if 5 < len(args):
3052
- self.IsCarbon = args[5]
3053
- if "IsCarbon" in kwargs:
3054
- self.IsCarbon = kwargs["IsCarbon"]
3260
+ self.Thumbnail = args[4]
3261
+ if "Thumbnail" in kwargs:
3262
+ self.Thumbnail = kwargs["Thumbnail"]
3055
3263
  def __del__(self):
3056
3264
  _whatsapp.DecRef(self.handle)
3057
3265
  def __str__(self):
3058
3266
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3059
- sv = 'whatsapp.Receipt{'
3267
+ sv = 'whatsapp.Preview{'
3060
3268
  first = True
3061
3269
  for v in pr:
3062
3270
  if callable(v[1]):
@@ -3069,145 +3277,56 @@ class Receipt(go.GoClass):
3069
3277
  return sv + '}'
3070
3278
  def __repr__(self):
3071
3279
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3072
- sv = 'whatsapp.Receipt ( '
3280
+ sv = 'whatsapp.Preview ( '
3073
3281
  for v in pr:
3074
3282
  if not callable(v[1]):
3075
3283
  sv += v[0] + '=' + str(v[1]) + ', '
3076
3284
  return sv + ')'
3077
3285
  @property
3078
3286
  def Kind(self):
3079
- return _whatsapp.whatsapp_Receipt_Kind_Get(self.handle)
3287
+ return _whatsapp.whatsapp_Preview_Kind_Get(self.handle)
3080
3288
  @Kind.setter
3081
3289
  def Kind(self, value):
3082
3290
  if isinstance(value, go.GoClass):
3083
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value.handle)
3084
- else:
3085
- _whatsapp.whatsapp_Receipt_Kind_Set(self.handle, value)
3086
- @property
3087
- def MessageIDs(self):
3088
- return go.Slice_string(handle=_whatsapp.whatsapp_Receipt_MessageIDs_Get(self.handle))
3089
- @MessageIDs.setter
3090
- def MessageIDs(self, value):
3091
- if isinstance(value, go.GoClass):
3092
- _whatsapp.whatsapp_Receipt_MessageIDs_Set(self.handle, value.handle)
3093
- else:
3094
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3095
- @property
3096
- def JID(self):
3097
- return _whatsapp.whatsapp_Receipt_JID_Get(self.handle)
3098
- @JID.setter
3099
- def JID(self, value):
3100
- if isinstance(value, go.GoClass):
3101
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value.handle)
3102
- else:
3103
- _whatsapp.whatsapp_Receipt_JID_Set(self.handle, value)
3104
- @property
3105
- def GroupJID(self):
3106
- return _whatsapp.whatsapp_Receipt_GroupJID_Get(self.handle)
3107
- @GroupJID.setter
3108
- def GroupJID(self, value):
3109
- if isinstance(value, go.GoClass):
3110
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value.handle)
3111
- else:
3112
- _whatsapp.whatsapp_Receipt_GroupJID_Set(self.handle, value)
3113
- @property
3114
- def Timestamp(self):
3115
- return _whatsapp.whatsapp_Receipt_Timestamp_Get(self.handle)
3116
- @Timestamp.setter
3117
- def Timestamp(self, value):
3118
- if isinstance(value, go.GoClass):
3119
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value.handle)
3291
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value.handle)
3120
3292
  else:
3121
- _whatsapp.whatsapp_Receipt_Timestamp_Set(self.handle, value)
3293
+ _whatsapp.whatsapp_Preview_Kind_Set(self.handle, value)
3122
3294
  @property
3123
- def IsCarbon(self):
3124
- return _whatsapp.whatsapp_Receipt_IsCarbon_Get(self.handle)
3125
- @IsCarbon.setter
3126
- def IsCarbon(self, value):
3295
+ def URL(self):
3296
+ return _whatsapp.whatsapp_Preview_URL_Get(self.handle)
3297
+ @URL.setter
3298
+ def URL(self, value):
3127
3299
  if isinstance(value, go.GoClass):
3128
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value.handle)
3129
- else:
3130
- _whatsapp.whatsapp_Receipt_IsCarbon_Set(self.handle, value)
3131
-
3132
- # Python type for struct whatsapp.Call
3133
- class Call(go.GoClass):
3134
- """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"""
3135
- def __init__(self, *args, **kwargs):
3136
- """
3137
- handle=A Go-side object is always initialized with an explicit handle=arg
3138
- otherwise parameters can be unnamed in order of field names or named fields
3139
- in which case a new Go object is constructed first
3140
- """
3141
- if len(kwargs) == 1 and 'handle' in kwargs:
3142
- self.handle = kwargs['handle']
3143
- _whatsapp.IncRef(self.handle)
3144
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
3145
- self.handle = args[0].handle
3146
- _whatsapp.IncRef(self.handle)
3300
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value.handle)
3147
3301
  else:
3148
- self.handle = _whatsapp.whatsapp_Call_CTor()
3149
- _whatsapp.IncRef(self.handle)
3150
- if 0 < len(args):
3151
- self.State = args[0]
3152
- if "State" in kwargs:
3153
- self.State = kwargs["State"]
3154
- if 1 < len(args):
3155
- self.JID = args[1]
3156
- if "JID" in kwargs:
3157
- self.JID = kwargs["JID"]
3158
- if 2 < len(args):
3159
- self.Timestamp = args[2]
3160
- if "Timestamp" in kwargs:
3161
- self.Timestamp = kwargs["Timestamp"]
3162
- def __del__(self):
3163
- _whatsapp.DecRef(self.handle)
3164
- def __str__(self):
3165
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3166
- sv = 'whatsapp.Call{'
3167
- first = True
3168
- for v in pr:
3169
- if callable(v[1]):
3170
- continue
3171
- if first:
3172
- first = False
3173
- else:
3174
- sv += ', '
3175
- sv += v[0] + '=' + str(v[1])
3176
- return sv + '}'
3177
- def __repr__(self):
3178
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
3179
- sv = 'whatsapp.Call ( '
3180
- for v in pr:
3181
- if not callable(v[1]):
3182
- sv += v[0] + '=' + str(v[1]) + ', '
3183
- return sv + ')'
3302
+ _whatsapp.whatsapp_Preview_URL_Set(self.handle, value)
3184
3303
  @property
3185
- def State(self):
3186
- return _whatsapp.whatsapp_Call_State_Get(self.handle)
3187
- @State.setter
3188
- def State(self, value):
3304
+ def Title(self):
3305
+ return _whatsapp.whatsapp_Preview_Title_Get(self.handle)
3306
+ @Title.setter
3307
+ def Title(self, value):
3189
3308
  if isinstance(value, go.GoClass):
3190
- _whatsapp.whatsapp_Call_State_Set(self.handle, value.handle)
3309
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value.handle)
3191
3310
  else:
3192
- _whatsapp.whatsapp_Call_State_Set(self.handle, value)
3311
+ _whatsapp.whatsapp_Preview_Title_Set(self.handle, value)
3193
3312
  @property
3194
- def JID(self):
3195
- return _whatsapp.whatsapp_Call_JID_Get(self.handle)
3196
- @JID.setter
3197
- def JID(self, value):
3313
+ def Description(self):
3314
+ return _whatsapp.whatsapp_Preview_Description_Get(self.handle)
3315
+ @Description.setter
3316
+ def Description(self, value):
3198
3317
  if isinstance(value, go.GoClass):
3199
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value.handle)
3318
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value.handle)
3200
3319
  else:
3201
- _whatsapp.whatsapp_Call_JID_Set(self.handle, value)
3320
+ _whatsapp.whatsapp_Preview_Description_Set(self.handle, value)
3202
3321
  @property
3203
- def Timestamp(self):
3204
- return _whatsapp.whatsapp_Call_Timestamp_Get(self.handle)
3205
- @Timestamp.setter
3206
- def Timestamp(self, value):
3322
+ def Thumbnail(self):
3323
+ return go.Slice_byte(handle=_whatsapp.whatsapp_Preview_Thumbnail_Get(self.handle))
3324
+ @Thumbnail.setter
3325
+ def Thumbnail(self, value):
3207
3326
  if isinstance(value, go.GoClass):
3208
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value.handle)
3327
+ _whatsapp.whatsapp_Preview_Thumbnail_Set(self.handle, value.handle)
3209
3328
  else:
3210
- _whatsapp.whatsapp_Call_Timestamp_Set(self.handle, value)
3329
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
3211
3330
 
3212
3331
 
3213
3332
  # ---- Slices ---
@@ -3227,5 +3346,11 @@ def NewGateway():
3227
3346
 
3228
3347
 
3229
3348
  # ---- Functions ---
3349
+ def IsAnonymousJID(id):
3350
+ """IsAnonymousJID(str id) bool
3351
+
3352
+ IsAnonymousJID returns true if the JID given is not addressible, that is, if it's actually a LID.
3353
+ """
3354
+ return _whatsapp.whatsapp_IsAnonymousJID(id)
3230
3355
 
3231
3356