sanka-baileyss 1.4.8

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.
Files changed (252) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2520 -0
  3. package/WAProto/Adv/Adv.d.ts +518 -0
  4. package/WAProto/Adv/Adv.js +1734 -0
  5. package/WAProto/Adv/Adv.proto +36 -0
  6. package/WAProto/Cert/Cert.d.ts +497 -0
  7. package/WAProto/Cert/Cert.js +1503 -0
  8. package/WAProto/Cert/Cert.proto +28 -0
  9. package/WAProto/ChatLockSettings/ChatLockSettings.d.ts +391 -0
  10. package/WAProto/ChatLockSettings/ChatLockSettings.js +1155 -0
  11. package/WAProto/ChatLockSettings/ChatLockSettings.proto +7 -0
  12. package/WAProto/CompanionReg/CompanionReg.d.ts +1049 -0
  13. package/WAProto/CompanionReg/CompanionReg.js +3496 -0
  14. package/WAProto/CompanionReg/CompanionReg.proto +88 -0
  15. package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +187 -0
  16. package/WAProto/DeviceCapabilities/DeviceCapabilities.js +520 -0
  17. package/WAProto/DeviceCapabilities/DeviceCapabilities.proto +14 -0
  18. package/WAProto/E2E/E2E.d.ts +27989 -0
  19. package/WAProto/E2E/E2E.js +97013 -0
  20. package/WAProto/E2E/E2E.proto +2256 -0
  21. package/WAProto/Ephemeral/Ephemeral.d.ts +95 -0
  22. package/WAProto/Ephemeral/Ephemeral.js +269 -0
  23. package/WAProto/Ephemeral/Ephemeral.proto +6 -0
  24. package/WAProto/HistorySync/HistorySync.d.ts +40300 -0
  25. package/WAProto/HistorySync/HistorySync.js +141555 -0
  26. package/WAProto/HistorySync/HistorySync.proto +207 -0
  27. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +189 -0
  28. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.js +585 -0
  29. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.proto +11 -0
  30. package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.d.ts +461 -0
  31. package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.js +1559 -0
  32. package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.proto +37 -0
  33. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +28866 -0
  34. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +100307 -0
  35. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.proto +76 -0
  36. package/WAProto/MmsRetry/MmsRetry.d.ts +200 -0
  37. package/WAProto/MmsRetry/MmsRetry.js +586 -0
  38. package/WAProto/MmsRetry/MmsRetry.proto +17 -0
  39. package/WAProto/Protocol/Protocol.d.ts +218 -0
  40. package/WAProto/Protocol/Protocol.js +701 -0
  41. package/WAProto/Protocol/Protocol.proto +20 -0
  42. package/WAProto/Reporting/Reporting.d.ts +301 -0
  43. package/WAProto/Reporting/Reporting.js +989 -0
  44. package/WAProto/Reporting/Reporting.proto +19 -0
  45. package/WAProto/ServerSync/ServerSync.d.ts +1050 -0
  46. package/WAProto/ServerSync/ServerSync.js +3176 -0
  47. package/WAProto/ServerSync/ServerSync.proto +59 -0
  48. package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.d.ts +1507 -0
  49. package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.js +4756 -0
  50. package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.proto +88 -0
  51. package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.d.ts +617 -0
  52. package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.js +1940 -0
  53. package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.proto +38 -0
  54. package/WAProto/StatusAttributions/StatusAttributions.d.ts +544 -0
  55. package/WAProto/StatusAttributions/StatusAttributions.js +1769 -0
  56. package/WAProto/StatusAttributions/StatusAttributions.proto +53 -0
  57. package/WAProto/SyncAction/SyncAction.d.ts +7227 -0
  58. package/WAProto/SyncAction/SyncAction.js +22271 -0
  59. package/WAProto/SyncAction/SyncAction.proto +423 -0
  60. package/WAProto/UserPassword/UserPassword.d.ts +298 -0
  61. package/WAProto/UserPassword/UserPassword.js +898 -0
  62. package/WAProto/UserPassword/UserPassword.proto +27 -0
  63. package/WAProto/VnameCert/VnameCert.d.ts +658 -0
  64. package/WAProto/VnameCert/VnameCert.js +2225 -0
  65. package/WAProto/VnameCert/VnameCert.proto +60 -0
  66. package/WAProto/Wa6/Wa6.d.ts +1613 -0
  67. package/WAProto/Wa6/Wa6.js +6299 -0
  68. package/WAProto/Wa6/Wa6.proto +229 -0
  69. package/WAProto/Web/Web.d.ts +31290 -0
  70. package/WAProto/Web/Web.js +111977 -0
  71. package/WAProto/Web/Web.proto +545 -0
  72. package/WAProto/index.d.ts +49 -0
  73. package/WAProto/index.js +28 -0
  74. package/WASignalGroup/GroupProtocol.js +1771 -0
  75. package/WASignalGroup/ciphertext_message.js +10 -0
  76. package/WASignalGroup/group_cipher.js +103 -0
  77. package/WASignalGroup/group_session_builder.js +39 -0
  78. package/WASignalGroup/index.js +5 -0
  79. package/WASignalGroup/keyhelper.js +17 -0
  80. package/WASignalGroup/protobufs.js +2 -0
  81. package/WASignalGroup/queue_job.js +64 -0
  82. package/WASignalGroup/sender_chain_key.js +38 -0
  83. package/WASignalGroup/sender_key_distribution_message.js +68 -0
  84. package/WASignalGroup/sender_key_message.js +79 -0
  85. package/WASignalGroup/sender_key_name.js +59 -0
  86. package/WASignalGroup/sender_key_record.js +47 -0
  87. package/WASignalGroup/sender_key_state.js +110 -0
  88. package/WASignalGroup/sender_message_key.js +30 -0
  89. package/check-node-version.js +10 -0
  90. package/lib/Defaults/baileys-version.json +3 -0
  91. package/lib/Defaults/index.d.ts +51 -0
  92. package/lib/Defaults/index.js +108 -0
  93. package/lib/Defaults/phonenumber-mcc.json +223 -0
  94. package/lib/Signal/libsignal.d.ts +3 -0
  95. package/lib/Signal/libsignal.js +153 -0
  96. package/lib/Socket/Client/index.d.ts +2 -0
  97. package/lib/Socket/Client/index.js +18 -0
  98. package/lib/Socket/Client/types.d.ts +15 -0
  99. package/lib/Socket/Client/types.js +14 -0
  100. package/lib/Socket/Client/websocket.d.ts +12 -0
  101. package/lib/Socket/Client/websocket.js +57 -0
  102. package/lib/Socket/business.d.ts +181 -0
  103. package/lib/Socket/business.js +259 -0
  104. package/lib/Socket/chats.d.ts +95 -0
  105. package/lib/Socket/chats.js +906 -0
  106. package/lib/Socket/groups.d.ts +128 -0
  107. package/lib/Socket/groups.js +307 -0
  108. package/lib/Socket/index.d.ts +183 -0
  109. package/lib/Socket/index.js +10 -0
  110. package/lib/Socket/messages-recv.d.ts +170 -0
  111. package/lib/Socket/messages-recv.js +1072 -0
  112. package/lib/Socket/messages-send.d.ts +161 -0
  113. package/lib/Socket/messages-send.js +984 -0
  114. package/lib/Socket/newsletter.d.ts +140 -0
  115. package/lib/Socket/newsletter.js +242 -0
  116. package/lib/Socket/socket.d.ts +43 -0
  117. package/lib/Socket/socket.js +651 -0
  118. package/lib/Socket/usync.d.ts +36 -0
  119. package/lib/Socket/usync.js +71 -0
  120. package/lib/Store/index.d.ts +4 -0
  121. package/lib/Store/index.js +20 -0
  122. package/lib/Store/make-cache-manager-store.d.ts +13 -0
  123. package/lib/Store/make-cache-manager-store.js +85 -0
  124. package/lib/Store/make-in-memory-store.d.ts +117 -0
  125. package/lib/Store/make-in-memory-store.js +420 -0
  126. package/lib/Store/make-ordered-dictionary.d.ts +12 -0
  127. package/lib/Store/make-ordered-dictionary.js +83 -0
  128. package/lib/Store/object-repository.d.ts +10 -0
  129. package/lib/Store/object-repository.js +28 -0
  130. package/lib/Types/Auth.d.ts +103 -0
  131. package/lib/Types/Auth.js +2 -0
  132. package/lib/Types/Call.d.ts +13 -0
  133. package/lib/Types/Call.js +2 -0
  134. package/lib/Types/Chat.d.ts +115 -0
  135. package/lib/Types/Chat.js +6 -0
  136. package/lib/Types/Contact.d.ts +24 -0
  137. package/lib/Types/Contact.js +2 -0
  138. package/lib/Types/Events.d.ts +208 -0
  139. package/lib/Types/Events.js +2 -0
  140. package/lib/Types/GroupMetadata.d.ts +58 -0
  141. package/lib/Types/GroupMetadata.js +2 -0
  142. package/lib/Types/Label.d.ts +46 -0
  143. package/lib/Types/Label.js +28 -0
  144. package/lib/Types/LabelAssociation.d.ts +29 -0
  145. package/lib/Types/LabelAssociation.js +10 -0
  146. package/lib/Types/Message.d.ts +391 -0
  147. package/lib/Types/Message.js +9 -0
  148. package/lib/Types/Newsletter.d.ts +92 -0
  149. package/lib/Types/Newsletter.js +33 -0
  150. package/lib/Types/Product.d.ts +78 -0
  151. package/lib/Types/Product.js +2 -0
  152. package/lib/Types/Signal.d.ts +57 -0
  153. package/lib/Types/Signal.js +2 -0
  154. package/lib/Types/Socket.d.ts +116 -0
  155. package/lib/Types/Socket.js +2 -0
  156. package/lib/Types/State.d.ts +27 -0
  157. package/lib/Types/State.js +2 -0
  158. package/lib/Types/USync.d.ts +25 -0
  159. package/lib/Types/USync.js +2 -0
  160. package/lib/Types/index.d.ts +70 -0
  161. package/lib/Types/index.js +42 -0
  162. package/lib/Utils/auth-utils.d.ts +18 -0
  163. package/lib/Utils/auth-utils.js +198 -0
  164. package/lib/Utils/baileys-event-stream.d.ts +16 -0
  165. package/lib/Utils/baileys-event-stream.js +64 -0
  166. package/lib/Utils/business.d.ts +22 -0
  167. package/lib/Utils/business.js +239 -0
  168. package/lib/Utils/chat-utils.d.ts +70 -0
  169. package/lib/Utils/chat-utils.js +754 -0
  170. package/lib/Utils/crypto.d.ts +40 -0
  171. package/lib/Utils/crypto.js +150 -0
  172. package/lib/Utils/decode-wa-message.d.ts +36 -0
  173. package/lib/Utils/decode-wa-message.js +228 -0
  174. package/lib/Utils/event-buffer.d.ts +35 -0
  175. package/lib/Utils/event-buffer.js +539 -0
  176. package/lib/Utils/generics.d.ts +96 -0
  177. package/lib/Utils/generics.js +553 -0
  178. package/lib/Utils/history.d.ts +19 -0
  179. package/lib/Utils/history.js +93 -0
  180. package/lib/Utils/index.d.ts +19 -0
  181. package/lib/Utils/index.js +35 -0
  182. package/lib/Utils/link-preview.d.ts +21 -0
  183. package/lib/Utils/link-preview.js +112 -0
  184. package/lib/Utils/logger.d.ts +11 -0
  185. package/lib/Utils/logger.js +7 -0
  186. package/lib/Utils/lt-hash.d.ts +12 -0
  187. package/lib/Utils/lt-hash.js +53 -0
  188. package/lib/Utils/make-mutex.d.ts +7 -0
  189. package/lib/Utils/make-mutex.js +45 -0
  190. package/lib/Utils/messages-media.d.ts +104 -0
  191. package/lib/Utils/messages-media.js +751 -0
  192. package/lib/Utils/messages.d.ts +80 -0
  193. package/lib/Utils/messages.js +1371 -0
  194. package/lib/Utils/noise-handler.d.ts +19 -0
  195. package/lib/Utils/noise-handler.js +150 -0
  196. package/lib/Utils/process-message.d.ts +41 -0
  197. package/lib/Utils/process-message.js +378 -0
  198. package/lib/Utils/signal.d.ts +33 -0
  199. package/lib/Utils/signal.js +154 -0
  200. package/lib/Utils/use-mongo-file-auth-state.d.ts +5 -0
  201. package/lib/Utils/use-mongo-file-auth-state.js +75 -0
  202. package/lib/Utils/use-multi-file-auth-state.d.ts +12 -0
  203. package/lib/Utils/use-multi-file-auth-state.js +123 -0
  204. package/lib/Utils/use-single-file-auth-state.d.ts +12 -0
  205. package/lib/Utils/use-single-file-auth-state.js +75 -0
  206. package/lib/Utils/validate-connection.d.ts +10 -0
  207. package/lib/Utils/validate-connection.js +174 -0
  208. package/lib/WABinary/constants.d.ts +27 -0
  209. package/lib/WABinary/constants.js +45 -0
  210. package/lib/WABinary/decode.d.ts +6 -0
  211. package/lib/WABinary/decode.js +255 -0
  212. package/lib/WABinary/encode.d.ts +2 -0
  213. package/lib/WABinary/encode.js +243 -0
  214. package/lib/WABinary/generic-utils.d.ts +16 -0
  215. package/lib/WABinary/generic-utils.js +125 -0
  216. package/lib/WABinary/index.d.ts +5 -0
  217. package/lib/WABinary/index.js +21 -0
  218. package/lib/WABinary/jid-utils.d.ts +34 -0
  219. package/lib/WABinary/jid-utils.js +73 -0
  220. package/lib/WABinary/types.d.ts +18 -0
  221. package/lib/WABinary/types.js +2 -0
  222. package/lib/WAM/BinaryInfo.d.ts +16 -0
  223. package/lib/WAM/BinaryInfo.js +14 -0
  224. package/lib/WAM/constants.d.ts +39 -0
  225. package/lib/WAM/constants.js +15362 -0
  226. package/lib/WAM/encode.d.ts +2 -0
  227. package/lib/WAM/encode.js +156 -0
  228. package/lib/WAM/index.d.ts +3 -0
  229. package/lib/WAM/index.js +19 -0
  230. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +25 -0
  231. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +60 -0
  232. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
  233. package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
  234. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
  235. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +58 -0
  236. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  237. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +31 -0
  238. package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +8 -0
  239. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +26 -0
  240. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  241. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
  242. package/lib/WAUSync/Protocols/index.d.ts +6 -0
  243. package/lib/WAUSync/Protocols/index.js +22 -0
  244. package/lib/WAUSync/USyncQuery.d.ts +28 -0
  245. package/lib/WAUSync/USyncQuery.js +88 -0
  246. package/lib/WAUSync/USyncUser.d.ts +12 -0
  247. package/lib/WAUSync/USyncUser.js +27 -0
  248. package/lib/WAUSync/index.d.ts +3 -0
  249. package/lib/WAUSync/index.js +19 -0
  250. package/lib/index.d.ts +13 -0
  251. package/lib/index.js +9 -0
  252. package/package.json +66 -0
@@ -0,0 +1,1769 @@
1
+ /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
2
+ "use strict";
3
+ var $protobuf = require("protobufjs/minimal");
4
+ // Common aliases
5
+ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
6
+ // Exported root namespace
7
+ var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
8
+ $root.StatusAttributions = (function() {
9
+ /**
10
+ * Namespace StatusAttributions.
11
+ * @exports StatusAttributions
12
+ * @namespace
13
+ */
14
+ var StatusAttributions = {};
15
+ StatusAttributions.StatusAttribution = (function() {
16
+ /**
17
+ * Properties of a StatusAttribution.
18
+ * @memberof StatusAttributions
19
+ * @interface IStatusAttribution
20
+ * @property {StatusAttributions.StatusAttribution.Type|null} [type] StatusAttribution type
21
+ * @property {string|null} [actionUrl] StatusAttribution actionUrl
22
+ * @property {StatusAttributions.StatusAttribution.IStatusReshare|null} [statusReshare] StatusAttribution statusReshare
23
+ * @property {StatusAttributions.StatusAttribution.IExternalShare|null} [externalShare] StatusAttribution externalShare
24
+ * @property {StatusAttributions.StatusAttribution.IMusic|null} [music] StatusAttribution music
25
+ */
26
+ /**
27
+ * Constructs a new StatusAttribution.
28
+ * @memberof StatusAttributions
29
+ * @classdesc Represents a StatusAttribution.
30
+ * @implements IStatusAttribution
31
+ * @constructor
32
+ * @param {StatusAttributions.IStatusAttribution=} [properties] Properties to set
33
+ */
34
+ function StatusAttribution(properties) {
35
+ if (properties)
36
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
37
+ if (properties[keys[i]] != null)
38
+ this[keys[i]] = properties[keys[i]];
39
+ }
40
+ /**
41
+ * StatusAttribution type.
42
+ * @member {StatusAttributions.StatusAttribution.Type|null|undefined} type
43
+ * @memberof StatusAttributions.StatusAttribution
44
+ * @instance
45
+ */
46
+ StatusAttribution.prototype.type = null;
47
+ /**
48
+ * StatusAttribution actionUrl.
49
+ * @member {string|null|undefined} actionUrl
50
+ * @memberof StatusAttributions.StatusAttribution
51
+ * @instance
52
+ */
53
+ StatusAttribution.prototype.actionUrl = null;
54
+ /**
55
+ * StatusAttribution statusReshare.
56
+ * @member {StatusAttributions.StatusAttribution.IStatusReshare|null|undefined} statusReshare
57
+ * @memberof StatusAttributions.StatusAttribution
58
+ * @instance
59
+ */
60
+ StatusAttribution.prototype.statusReshare = null;
61
+ /**
62
+ * StatusAttribution externalShare.
63
+ * @member {StatusAttributions.StatusAttribution.IExternalShare|null|undefined} externalShare
64
+ * @memberof StatusAttributions.StatusAttribution
65
+ * @instance
66
+ */
67
+ StatusAttribution.prototype.externalShare = null;
68
+ /**
69
+ * StatusAttribution music.
70
+ * @member {StatusAttributions.StatusAttribution.IMusic|null|undefined} music
71
+ * @memberof StatusAttributions.StatusAttribution
72
+ * @instance
73
+ */
74
+ StatusAttribution.prototype.music = null;
75
+ // OneOf field names bound to virtual getters and setters
76
+ var $oneOfFields;
77
+ /**
78
+ * StatusAttribution _type.
79
+ * @member {"type"|undefined} _type
80
+ * @memberof StatusAttributions.StatusAttribution
81
+ * @instance
82
+ */
83
+ Object.defineProperty(StatusAttribution.prototype, "_type", {
84
+ get: $util.oneOfGetter($oneOfFields = ["type"]),
85
+ set: $util.oneOfSetter($oneOfFields)
86
+ });
87
+ /**
88
+ * StatusAttribution _actionUrl.
89
+ * @member {"actionUrl"|undefined} _actionUrl
90
+ * @memberof StatusAttributions.StatusAttribution
91
+ * @instance
92
+ */
93
+ Object.defineProperty(StatusAttribution.prototype, "_actionUrl", {
94
+ get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
95
+ set: $util.oneOfSetter($oneOfFields)
96
+ });
97
+ /**
98
+ * StatusAttribution attributionData.
99
+ * @member {"statusReshare"|"externalShare"|"music"|undefined} attributionData
100
+ * @memberof StatusAttributions.StatusAttribution
101
+ * @instance
102
+ */
103
+ Object.defineProperty(StatusAttribution.prototype, "attributionData", {
104
+ get: $util.oneOfGetter($oneOfFields = ["statusReshare", "externalShare", "music"]),
105
+ set: $util.oneOfSetter($oneOfFields)
106
+ });
107
+ /**
108
+ * Creates a new StatusAttribution instance using the specified properties.
109
+ * @function create
110
+ * @memberof StatusAttributions.StatusAttribution
111
+ * @static
112
+ * @param {StatusAttributions.IStatusAttribution=} [properties] Properties to set
113
+ * @returns {StatusAttributions.StatusAttribution} StatusAttribution instance
114
+ */
115
+ StatusAttribution.create = function create(properties) {
116
+ return new StatusAttribution(properties);
117
+ };
118
+ /**
119
+ * Encodes the specified StatusAttribution message. Does not implicitly {@link StatusAttributions.StatusAttribution.verify|verify} messages.
120
+ * @function encode
121
+ * @memberof StatusAttributions.StatusAttribution
122
+ * @static
123
+ * @param {StatusAttributions.IStatusAttribution} message StatusAttribution message or plain object to encode
124
+ * @param {$protobuf.Writer} [writer] Writer to encode to
125
+ * @returns {$protobuf.Writer} Writer
126
+ */
127
+ StatusAttribution.encode = function encode(message, writer) {
128
+ if (!writer)
129
+ writer = $Writer.create();
130
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
131
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
132
+ if (message.actionUrl != null && Object.hasOwnProperty.call(message, "actionUrl"))
133
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.actionUrl);
134
+ if (message.statusReshare != null && Object.hasOwnProperty.call(message, "statusReshare"))
135
+ $root.StatusAttributions.StatusAttribution.StatusReshare.encode(message.statusReshare, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
136
+ if (message.externalShare != null && Object.hasOwnProperty.call(message, "externalShare"))
137
+ $root.StatusAttributions.StatusAttribution.ExternalShare.encode(message.externalShare, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
138
+ if (message.music != null && Object.hasOwnProperty.call(message, "music"))
139
+ $root.StatusAttributions.StatusAttribution.Music.encode(message.music, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
140
+ return writer;
141
+ };
142
+ /**
143
+ * Encodes the specified StatusAttribution message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.verify|verify} messages.
144
+ * @function encodeDelimited
145
+ * @memberof StatusAttributions.StatusAttribution
146
+ * @static
147
+ * @param {StatusAttributions.IStatusAttribution} message StatusAttribution message or plain object to encode
148
+ * @param {$protobuf.Writer} [writer] Writer to encode to
149
+ * @returns {$protobuf.Writer} Writer
150
+ */
151
+ StatusAttribution.encodeDelimited = function encodeDelimited(message, writer) {
152
+ return this.encode(message, writer).ldelim();
153
+ };
154
+ /**
155
+ * Decodes a StatusAttribution message from the specified reader or buffer.
156
+ * @function decode
157
+ * @memberof StatusAttributions.StatusAttribution
158
+ * @static
159
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
160
+ * @param {number} [length] Message length if known beforehand
161
+ * @returns {StatusAttributions.StatusAttribution} StatusAttribution
162
+ * @throws {Error} If the payload is not a reader or valid buffer
163
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
164
+ */
165
+ StatusAttribution.decode = function decode(reader, length, error) {
166
+ if (!(reader instanceof $Reader))
167
+ reader = $Reader.create(reader);
168
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution();
169
+ while (reader.pos < end) {
170
+ var tag = reader.uint32();
171
+ if (tag === error)
172
+ break;
173
+ switch (tag >>> 3) {
174
+ case 1: {
175
+ message.type = reader.int32();
176
+ break;
177
+ }
178
+ case 2: {
179
+ message.actionUrl = reader.string();
180
+ break;
181
+ }
182
+ case 3: {
183
+ message.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.decode(reader, reader.uint32());
184
+ break;
185
+ }
186
+ case 4: {
187
+ message.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.decode(reader, reader.uint32());
188
+ break;
189
+ }
190
+ case 5: {
191
+ message.music = $root.StatusAttributions.StatusAttribution.Music.decode(reader, reader.uint32());
192
+ break;
193
+ }
194
+ default:
195
+ reader.skipType(tag & 7);
196
+ break;
197
+ }
198
+ }
199
+ return message;
200
+ };
201
+ /**
202
+ * Decodes a StatusAttribution message from the specified reader or buffer, length delimited.
203
+ * @function decodeDelimited
204
+ * @memberof StatusAttributions.StatusAttribution
205
+ * @static
206
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
207
+ * @returns {StatusAttributions.StatusAttribution} StatusAttribution
208
+ * @throws {Error} If the payload is not a reader or valid buffer
209
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
210
+ */
211
+ StatusAttribution.decodeDelimited = function decodeDelimited(reader) {
212
+ if (!(reader instanceof $Reader))
213
+ reader = new $Reader(reader);
214
+ return this.decode(reader, reader.uint32());
215
+ };
216
+ /**
217
+ * Verifies a StatusAttribution message.
218
+ * @function verify
219
+ * @memberof StatusAttributions.StatusAttribution
220
+ * @static
221
+ * @param {Object.<string,*>} message Plain object to verify
222
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
223
+ */
224
+ StatusAttribution.verify = function verify(message) {
225
+ if (typeof message !== "object" || message === null)
226
+ return "object expected";
227
+ var properties = {};
228
+ if (message.type != null && message.hasOwnProperty("type")) {
229
+ properties._type = 1;
230
+ switch (message.type) {
231
+ default:
232
+ return "type: enum value expected";
233
+ case 0:
234
+ case 1:
235
+ case 2:
236
+ break;
237
+ }
238
+ }
239
+ if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
240
+ properties._actionUrl = 1;
241
+ if (!$util.isString(message.actionUrl))
242
+ return "actionUrl: string expected";
243
+ }
244
+ if (message.statusReshare != null && message.hasOwnProperty("statusReshare")) {
245
+ properties.attributionData = 1;
246
+ {
247
+ var error = $root.StatusAttributions.StatusAttribution.StatusReshare.verify(message.statusReshare);
248
+ if (error)
249
+ return "statusReshare." + error;
250
+ }
251
+ }
252
+ if (message.externalShare != null && message.hasOwnProperty("externalShare")) {
253
+ if (properties.attributionData === 1)
254
+ return "attributionData: multiple values";
255
+ properties.attributionData = 1;
256
+ {
257
+ var error = $root.StatusAttributions.StatusAttribution.ExternalShare.verify(message.externalShare);
258
+ if (error)
259
+ return "externalShare." + error;
260
+ }
261
+ }
262
+ if (message.music != null && message.hasOwnProperty("music")) {
263
+ if (properties.attributionData === 1)
264
+ return "attributionData: multiple values";
265
+ properties.attributionData = 1;
266
+ {
267
+ var error = $root.StatusAttributions.StatusAttribution.Music.verify(message.music);
268
+ if (error)
269
+ return "music." + error;
270
+ }
271
+ }
272
+ return null;
273
+ };
274
+ /**
275
+ * Creates a StatusAttribution message from a plain object. Also converts values to their respective internal types.
276
+ * @function fromObject
277
+ * @memberof StatusAttributions.StatusAttribution
278
+ * @static
279
+ * @param {Object.<string,*>} object Plain object
280
+ * @returns {StatusAttributions.StatusAttribution} StatusAttribution
281
+ */
282
+ StatusAttribution.fromObject = function fromObject(object) {
283
+ if (object instanceof $root.StatusAttributions.StatusAttribution)
284
+ return object;
285
+ var message = new $root.StatusAttributions.StatusAttribution();
286
+ switch (object.type) {
287
+ default:
288
+ if (typeof object.type === "number") {
289
+ message.type = object.type;
290
+ break;
291
+ }
292
+ break;
293
+ case "RESHARE":
294
+ case 0:
295
+ message.type = 0;
296
+ break;
297
+ case "EXTERNAL_SHARE":
298
+ case 1:
299
+ message.type = 1;
300
+ break;
301
+ case "MUSIC":
302
+ case 2:
303
+ message.type = 2;
304
+ break;
305
+ }
306
+ if (object.actionUrl != null)
307
+ message.actionUrl = String(object.actionUrl);
308
+ if (object.statusReshare != null) {
309
+ if (typeof object.statusReshare !== "object")
310
+ throw TypeError(".StatusAttributions.StatusAttribution.statusReshare: object expected");
311
+ message.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.fromObject(object.statusReshare);
312
+ }
313
+ if (object.externalShare != null) {
314
+ if (typeof object.externalShare !== "object")
315
+ throw TypeError(".StatusAttributions.StatusAttribution.externalShare: object expected");
316
+ message.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.fromObject(object.externalShare);
317
+ }
318
+ if (object.music != null) {
319
+ if (typeof object.music !== "object")
320
+ throw TypeError(".StatusAttributions.StatusAttribution.music: object expected");
321
+ message.music = $root.StatusAttributions.StatusAttribution.Music.fromObject(object.music);
322
+ }
323
+ return message;
324
+ };
325
+ /**
326
+ * Creates a plain object from a StatusAttribution message. Also converts values to other types if specified.
327
+ * @function toObject
328
+ * @memberof StatusAttributions.StatusAttribution
329
+ * @static
330
+ * @param {StatusAttributions.StatusAttribution} message StatusAttribution
331
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
332
+ * @returns {Object.<string,*>} Plain object
333
+ */
334
+ StatusAttribution.toObject = function toObject(message, options) {
335
+ if (!options)
336
+ options = {};
337
+ var object = {};
338
+ if (message.type != null && message.hasOwnProperty("type")) {
339
+ object.type = options.enums === String ? $root.StatusAttributions.StatusAttribution.Type[message.type] === undefined ? message.type : $root.StatusAttributions.StatusAttribution.Type[message.type] : message.type;
340
+ if (options.oneofs)
341
+ object._type = "type";
342
+ }
343
+ if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
344
+ object.actionUrl = message.actionUrl;
345
+ if (options.oneofs)
346
+ object._actionUrl = "actionUrl";
347
+ }
348
+ if (message.statusReshare != null && message.hasOwnProperty("statusReshare")) {
349
+ object.statusReshare = $root.StatusAttributions.StatusAttribution.StatusReshare.toObject(message.statusReshare, options);
350
+ if (options.oneofs)
351
+ object.attributionData = "statusReshare";
352
+ }
353
+ if (message.externalShare != null && message.hasOwnProperty("externalShare")) {
354
+ object.externalShare = $root.StatusAttributions.StatusAttribution.ExternalShare.toObject(message.externalShare, options);
355
+ if (options.oneofs)
356
+ object.attributionData = "externalShare";
357
+ }
358
+ if (message.music != null && message.hasOwnProperty("music")) {
359
+ object.music = $root.StatusAttributions.StatusAttribution.Music.toObject(message.music, options);
360
+ if (options.oneofs)
361
+ object.attributionData = "music";
362
+ }
363
+ return object;
364
+ };
365
+ /**
366
+ * Converts this StatusAttribution to JSON.
367
+ * @function toJSON
368
+ * @memberof StatusAttributions.StatusAttribution
369
+ * @instance
370
+ * @returns {Object.<string,*>} JSON object
371
+ */
372
+ StatusAttribution.prototype.toJSON = function toJSON() {
373
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
374
+ };
375
+ /**
376
+ * Gets the default type url for StatusAttribution
377
+ * @function getTypeUrl
378
+ * @memberof StatusAttributions.StatusAttribution
379
+ * @static
380
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
381
+ * @returns {string} The default type url
382
+ */
383
+ StatusAttribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
384
+ if (typeUrlPrefix === undefined) {
385
+ typeUrlPrefix = "type.googleapis.com";
386
+ }
387
+ return typeUrlPrefix + "/StatusAttributions.StatusAttribution";
388
+ };
389
+ StatusAttribution.ExternalShare = (function() {
390
+ /**
391
+ * Properties of an ExternalShare.
392
+ * @memberof StatusAttributions.StatusAttribution
393
+ * @interface IExternalShare
394
+ * @property {string|null} [actionUrl] ExternalShare actionUrl
395
+ * @property {StatusAttributions.StatusAttribution.ExternalShare.Source|null} [source] ExternalShare source
396
+ * @property {number|null} [duration] ExternalShare duration
397
+ * @property {string|null} [actionFallbackUrl] ExternalShare actionFallbackUrl
398
+ */
399
+ /**
400
+ * Constructs a new ExternalShare.
401
+ * @memberof StatusAttributions.StatusAttribution
402
+ * @classdesc Represents an ExternalShare.
403
+ * @implements IExternalShare
404
+ * @constructor
405
+ * @param {StatusAttributions.StatusAttribution.IExternalShare=} [properties] Properties to set
406
+ */
407
+ function ExternalShare(properties) {
408
+ if (properties)
409
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
410
+ if (properties[keys[i]] != null)
411
+ this[keys[i]] = properties[keys[i]];
412
+ }
413
+ /**
414
+ * ExternalShare actionUrl.
415
+ * @member {string|null|undefined} actionUrl
416
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
417
+ * @instance
418
+ */
419
+ ExternalShare.prototype.actionUrl = null;
420
+ /**
421
+ * ExternalShare source.
422
+ * @member {StatusAttributions.StatusAttribution.ExternalShare.Source|null|undefined} source
423
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
424
+ * @instance
425
+ */
426
+ ExternalShare.prototype.source = null;
427
+ /**
428
+ * ExternalShare duration.
429
+ * @member {number|null|undefined} duration
430
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
431
+ * @instance
432
+ */
433
+ ExternalShare.prototype.duration = null;
434
+ /**
435
+ * ExternalShare actionFallbackUrl.
436
+ * @member {string|null|undefined} actionFallbackUrl
437
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
438
+ * @instance
439
+ */
440
+ ExternalShare.prototype.actionFallbackUrl = null;
441
+ // OneOf field names bound to virtual getters and setters
442
+ var $oneOfFields;
443
+ /**
444
+ * ExternalShare _actionUrl.
445
+ * @member {"actionUrl"|undefined} _actionUrl
446
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
447
+ * @instance
448
+ */
449
+ Object.defineProperty(ExternalShare.prototype, "_actionUrl", {
450
+ get: $util.oneOfGetter($oneOfFields = ["actionUrl"]),
451
+ set: $util.oneOfSetter($oneOfFields)
452
+ });
453
+ /**
454
+ * ExternalShare _source.
455
+ * @member {"source"|undefined} _source
456
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
457
+ * @instance
458
+ */
459
+ Object.defineProperty(ExternalShare.prototype, "_source", {
460
+ get: $util.oneOfGetter($oneOfFields = ["source"]),
461
+ set: $util.oneOfSetter($oneOfFields)
462
+ });
463
+ /**
464
+ * ExternalShare _duration.
465
+ * @member {"duration"|undefined} _duration
466
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
467
+ * @instance
468
+ */
469
+ Object.defineProperty(ExternalShare.prototype, "_duration", {
470
+ get: $util.oneOfGetter($oneOfFields = ["duration"]),
471
+ set: $util.oneOfSetter($oneOfFields)
472
+ });
473
+ /**
474
+ * ExternalShare _actionFallbackUrl.
475
+ * @member {"actionFallbackUrl"|undefined} _actionFallbackUrl
476
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
477
+ * @instance
478
+ */
479
+ Object.defineProperty(ExternalShare.prototype, "_actionFallbackUrl", {
480
+ get: $util.oneOfGetter($oneOfFields = ["actionFallbackUrl"]),
481
+ set: $util.oneOfSetter($oneOfFields)
482
+ });
483
+ /**
484
+ * Creates a new ExternalShare instance using the specified properties.
485
+ * @function create
486
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
487
+ * @static
488
+ * @param {StatusAttributions.StatusAttribution.IExternalShare=} [properties] Properties to set
489
+ * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare instance
490
+ */
491
+ ExternalShare.create = function create(properties) {
492
+ return new ExternalShare(properties);
493
+ };
494
+ /**
495
+ * Encodes the specified ExternalShare message. Does not implicitly {@link StatusAttributions.StatusAttribution.ExternalShare.verify|verify} messages.
496
+ * @function encode
497
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
498
+ * @static
499
+ * @param {StatusAttributions.StatusAttribution.IExternalShare} message ExternalShare message or plain object to encode
500
+ * @param {$protobuf.Writer} [writer] Writer to encode to
501
+ * @returns {$protobuf.Writer} Writer
502
+ */
503
+ ExternalShare.encode = function encode(message, writer) {
504
+ if (!writer)
505
+ writer = $Writer.create();
506
+ if (message.actionUrl != null && Object.hasOwnProperty.call(message, "actionUrl"))
507
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.actionUrl);
508
+ if (message.source != null && Object.hasOwnProperty.call(message, "source"))
509
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.source);
510
+ if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
511
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.duration);
512
+ if (message.actionFallbackUrl != null && Object.hasOwnProperty.call(message, "actionFallbackUrl"))
513
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.actionFallbackUrl);
514
+ return writer;
515
+ };
516
+ /**
517
+ * Encodes the specified ExternalShare message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.ExternalShare.verify|verify} messages.
518
+ * @function encodeDelimited
519
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
520
+ * @static
521
+ * @param {StatusAttributions.StatusAttribution.IExternalShare} message ExternalShare message or plain object to encode
522
+ * @param {$protobuf.Writer} [writer] Writer to encode to
523
+ * @returns {$protobuf.Writer} Writer
524
+ */
525
+ ExternalShare.encodeDelimited = function encodeDelimited(message, writer) {
526
+ return this.encode(message, writer).ldelim();
527
+ };
528
+ /**
529
+ * Decodes an ExternalShare message from the specified reader or buffer.
530
+ * @function decode
531
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
532
+ * @static
533
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
534
+ * @param {number} [length] Message length if known beforehand
535
+ * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare
536
+ * @throws {Error} If the payload is not a reader or valid buffer
537
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
538
+ */
539
+ ExternalShare.decode = function decode(reader, length, error) {
540
+ if (!(reader instanceof $Reader))
541
+ reader = $Reader.create(reader);
542
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.ExternalShare();
543
+ while (reader.pos < end) {
544
+ var tag = reader.uint32();
545
+ if (tag === error)
546
+ break;
547
+ switch (tag >>> 3) {
548
+ case 1: {
549
+ message.actionUrl = reader.string();
550
+ break;
551
+ }
552
+ case 2: {
553
+ message.source = reader.int32();
554
+ break;
555
+ }
556
+ case 3: {
557
+ message.duration = reader.int32();
558
+ break;
559
+ }
560
+ case 4: {
561
+ message.actionFallbackUrl = reader.string();
562
+ break;
563
+ }
564
+ default:
565
+ reader.skipType(tag & 7);
566
+ break;
567
+ }
568
+ }
569
+ return message;
570
+ };
571
+ /**
572
+ * Decodes an ExternalShare message from the specified reader or buffer, length delimited.
573
+ * @function decodeDelimited
574
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
575
+ * @static
576
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
577
+ * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare
578
+ * @throws {Error} If the payload is not a reader or valid buffer
579
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
580
+ */
581
+ ExternalShare.decodeDelimited = function decodeDelimited(reader) {
582
+ if (!(reader instanceof $Reader))
583
+ reader = new $Reader(reader);
584
+ return this.decode(reader, reader.uint32());
585
+ };
586
+ /**
587
+ * Verifies an ExternalShare message.
588
+ * @function verify
589
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
590
+ * @static
591
+ * @param {Object.<string,*>} message Plain object to verify
592
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
593
+ */
594
+ ExternalShare.verify = function verify(message) {
595
+ if (typeof message !== "object" || message === null)
596
+ return "object expected";
597
+ var properties = {};
598
+ if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
599
+ properties._actionUrl = 1;
600
+ if (!$util.isString(message.actionUrl))
601
+ return "actionUrl: string expected";
602
+ }
603
+ if (message.source != null && message.hasOwnProperty("source")) {
604
+ properties._source = 1;
605
+ switch (message.source) {
606
+ default:
607
+ return "source: enum value expected";
608
+ case 0:
609
+ case 1:
610
+ case 2:
611
+ case 3:
612
+ case 4:
613
+ break;
614
+ }
615
+ }
616
+ if (message.duration != null && message.hasOwnProperty("duration")) {
617
+ properties._duration = 1;
618
+ if (!$util.isInteger(message.duration))
619
+ return "duration: integer expected";
620
+ }
621
+ if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl")) {
622
+ properties._actionFallbackUrl = 1;
623
+ if (!$util.isString(message.actionFallbackUrl))
624
+ return "actionFallbackUrl: string expected";
625
+ }
626
+ return null;
627
+ };
628
+ /**
629
+ * Creates an ExternalShare message from a plain object. Also converts values to their respective internal types.
630
+ * @function fromObject
631
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
632
+ * @static
633
+ * @param {Object.<string,*>} object Plain object
634
+ * @returns {StatusAttributions.StatusAttribution.ExternalShare} ExternalShare
635
+ */
636
+ ExternalShare.fromObject = function fromObject(object) {
637
+ if (object instanceof $root.StatusAttributions.StatusAttribution.ExternalShare)
638
+ return object;
639
+ var message = new $root.StatusAttributions.StatusAttribution.ExternalShare();
640
+ if (object.actionUrl != null)
641
+ message.actionUrl = String(object.actionUrl);
642
+ switch (object.source) {
643
+ default:
644
+ if (typeof object.source === "number") {
645
+ message.source = object.source;
646
+ break;
647
+ }
648
+ break;
649
+ case "UNKNOWN":
650
+ case 0:
651
+ message.source = 0;
652
+ break;
653
+ case "INSTAGRAM":
654
+ case 1:
655
+ message.source = 1;
656
+ break;
657
+ case "FACEBOOK":
658
+ case 2:
659
+ message.source = 2;
660
+ break;
661
+ case "MESSENGER":
662
+ case 3:
663
+ message.source = 3;
664
+ break;
665
+ case "SPOTIFY":
666
+ case 4:
667
+ message.source = 4;
668
+ break;
669
+ }
670
+ if (object.duration != null)
671
+ message.duration = object.duration | 0;
672
+ if (object.actionFallbackUrl != null)
673
+ message.actionFallbackUrl = String(object.actionFallbackUrl);
674
+ return message;
675
+ };
676
+ /**
677
+ * Creates a plain object from an ExternalShare message. Also converts values to other types if specified.
678
+ * @function toObject
679
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
680
+ * @static
681
+ * @param {StatusAttributions.StatusAttribution.ExternalShare} message ExternalShare
682
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
683
+ * @returns {Object.<string,*>} Plain object
684
+ */
685
+ ExternalShare.toObject = function toObject(message, options) {
686
+ if (!options)
687
+ options = {};
688
+ var object = {};
689
+ if (message.actionUrl != null && message.hasOwnProperty("actionUrl")) {
690
+ object.actionUrl = message.actionUrl;
691
+ if (options.oneofs)
692
+ object._actionUrl = "actionUrl";
693
+ }
694
+ if (message.source != null && message.hasOwnProperty("source")) {
695
+ object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.ExternalShare.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.ExternalShare.Source[message.source] : message.source;
696
+ if (options.oneofs)
697
+ object._source = "source";
698
+ }
699
+ if (message.duration != null && message.hasOwnProperty("duration")) {
700
+ object.duration = message.duration;
701
+ if (options.oneofs)
702
+ object._duration = "duration";
703
+ }
704
+ if (message.actionFallbackUrl != null && message.hasOwnProperty("actionFallbackUrl")) {
705
+ object.actionFallbackUrl = message.actionFallbackUrl;
706
+ if (options.oneofs)
707
+ object._actionFallbackUrl = "actionFallbackUrl";
708
+ }
709
+ return object;
710
+ };
711
+ /**
712
+ * Converts this ExternalShare to JSON.
713
+ * @function toJSON
714
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
715
+ * @instance
716
+ * @returns {Object.<string,*>} JSON object
717
+ */
718
+ ExternalShare.prototype.toJSON = function toJSON() {
719
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
720
+ };
721
+ /**
722
+ * Gets the default type url for ExternalShare
723
+ * @function getTypeUrl
724
+ * @memberof StatusAttributions.StatusAttribution.ExternalShare
725
+ * @static
726
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
727
+ * @returns {string} The default type url
728
+ */
729
+ ExternalShare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
730
+ if (typeUrlPrefix === undefined) {
731
+ typeUrlPrefix = "type.googleapis.com";
732
+ }
733
+ return typeUrlPrefix + "/StatusAttributions.StatusAttribution.ExternalShare";
734
+ };
735
+ /**
736
+ * Source enum.
737
+ * @name StatusAttributions.StatusAttribution.ExternalShare.Source
738
+ * @enum {number}
739
+ * @property {number} UNKNOWN=0 UNKNOWN value
740
+ * @property {number} INSTAGRAM=1 INSTAGRAM value
741
+ * @property {number} FACEBOOK=2 FACEBOOK value
742
+ * @property {number} MESSENGER=3 MESSENGER value
743
+ * @property {number} SPOTIFY=4 SPOTIFY value
744
+ */
745
+ ExternalShare.Source = (function() {
746
+ var valuesById = {}, values = Object.create(valuesById);
747
+ values[valuesById[0] = "UNKNOWN"] = 0;
748
+ values[valuesById[1] = "INSTAGRAM"] = 1;
749
+ values[valuesById[2] = "FACEBOOK"] = 2;
750
+ values[valuesById[3] = "MESSENGER"] = 3;
751
+ values[valuesById[4] = "SPOTIFY"] = 4;
752
+ return values;
753
+ })();
754
+ return ExternalShare;
755
+ })();
756
+ StatusAttribution.Music = (function() {
757
+ /**
758
+ * Properties of a Music.
759
+ * @memberof StatusAttributions.StatusAttribution
760
+ * @interface IMusic
761
+ * @property {string|null} [authorName] Music authorName
762
+ * @property {string|null} [songId] Music songId
763
+ * @property {string|null} [title] Music title
764
+ * @property {string|null} [author] Music author
765
+ * @property {string|null} [artistAttribution] Music artistAttribution
766
+ * @property {boolean|null} [isExplicit] Music isExplicit
767
+ */
768
+ /**
769
+ * Constructs a new Music.
770
+ * @memberof StatusAttributions.StatusAttribution
771
+ * @classdesc Represents a Music.
772
+ * @implements IMusic
773
+ * @constructor
774
+ * @param {StatusAttributions.StatusAttribution.IMusic=} [properties] Properties to set
775
+ */
776
+ function Music(properties) {
777
+ if (properties)
778
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
779
+ if (properties[keys[i]] != null)
780
+ this[keys[i]] = properties[keys[i]];
781
+ }
782
+ /**
783
+ * Music authorName.
784
+ * @member {string|null|undefined} authorName
785
+ * @memberof StatusAttributions.StatusAttribution.Music
786
+ * @instance
787
+ */
788
+ Music.prototype.authorName = null;
789
+ /**
790
+ * Music songId.
791
+ * @member {string|null|undefined} songId
792
+ * @memberof StatusAttributions.StatusAttribution.Music
793
+ * @instance
794
+ */
795
+ Music.prototype.songId = null;
796
+ /**
797
+ * Music title.
798
+ * @member {string|null|undefined} title
799
+ * @memberof StatusAttributions.StatusAttribution.Music
800
+ * @instance
801
+ */
802
+ Music.prototype.title = null;
803
+ /**
804
+ * Music author.
805
+ * @member {string|null|undefined} author
806
+ * @memberof StatusAttributions.StatusAttribution.Music
807
+ * @instance
808
+ */
809
+ Music.prototype.author = null;
810
+ /**
811
+ * Music artistAttribution.
812
+ * @member {string|null|undefined} artistAttribution
813
+ * @memberof StatusAttributions.StatusAttribution.Music
814
+ * @instance
815
+ */
816
+ Music.prototype.artistAttribution = null;
817
+ /**
818
+ * Music isExplicit.
819
+ * @member {boolean|null|undefined} isExplicit
820
+ * @memberof StatusAttributions.StatusAttribution.Music
821
+ * @instance
822
+ */
823
+ Music.prototype.isExplicit = null;
824
+ // OneOf field names bound to virtual getters and setters
825
+ var $oneOfFields;
826
+ /**
827
+ * Music _authorName.
828
+ * @member {"authorName"|undefined} _authorName
829
+ * @memberof StatusAttributions.StatusAttribution.Music
830
+ * @instance
831
+ */
832
+ Object.defineProperty(Music.prototype, "_authorName", {
833
+ get: $util.oneOfGetter($oneOfFields = ["authorName"]),
834
+ set: $util.oneOfSetter($oneOfFields)
835
+ });
836
+ /**
837
+ * Music _songId.
838
+ * @member {"songId"|undefined} _songId
839
+ * @memberof StatusAttributions.StatusAttribution.Music
840
+ * @instance
841
+ */
842
+ Object.defineProperty(Music.prototype, "_songId", {
843
+ get: $util.oneOfGetter($oneOfFields = ["songId"]),
844
+ set: $util.oneOfSetter($oneOfFields)
845
+ });
846
+ /**
847
+ * Music _title.
848
+ * @member {"title"|undefined} _title
849
+ * @memberof StatusAttributions.StatusAttribution.Music
850
+ * @instance
851
+ */
852
+ Object.defineProperty(Music.prototype, "_title", {
853
+ get: $util.oneOfGetter($oneOfFields = ["title"]),
854
+ set: $util.oneOfSetter($oneOfFields)
855
+ });
856
+ /**
857
+ * Music _author.
858
+ * @member {"author"|undefined} _author
859
+ * @memberof StatusAttributions.StatusAttribution.Music
860
+ * @instance
861
+ */
862
+ Object.defineProperty(Music.prototype, "_author", {
863
+ get: $util.oneOfGetter($oneOfFields = ["author"]),
864
+ set: $util.oneOfSetter($oneOfFields)
865
+ });
866
+ /**
867
+ * Music _artistAttribution.
868
+ * @member {"artistAttribution"|undefined} _artistAttribution
869
+ * @memberof StatusAttributions.StatusAttribution.Music
870
+ * @instance
871
+ */
872
+ Object.defineProperty(Music.prototype, "_artistAttribution", {
873
+ get: $util.oneOfGetter($oneOfFields = ["artistAttribution"]),
874
+ set: $util.oneOfSetter($oneOfFields)
875
+ });
876
+ /**
877
+ * Music _isExplicit.
878
+ * @member {"isExplicit"|undefined} _isExplicit
879
+ * @memberof StatusAttributions.StatusAttribution.Music
880
+ * @instance
881
+ */
882
+ Object.defineProperty(Music.prototype, "_isExplicit", {
883
+ get: $util.oneOfGetter($oneOfFields = ["isExplicit"]),
884
+ set: $util.oneOfSetter($oneOfFields)
885
+ });
886
+ /**
887
+ * Creates a new Music instance using the specified properties.
888
+ * @function create
889
+ * @memberof StatusAttributions.StatusAttribution.Music
890
+ * @static
891
+ * @param {StatusAttributions.StatusAttribution.IMusic=} [properties] Properties to set
892
+ * @returns {StatusAttributions.StatusAttribution.Music} Music instance
893
+ */
894
+ Music.create = function create(properties) {
895
+ return new Music(properties);
896
+ };
897
+ /**
898
+ * Encodes the specified Music message. Does not implicitly {@link StatusAttributions.StatusAttribution.Music.verify|verify} messages.
899
+ * @function encode
900
+ * @memberof StatusAttributions.StatusAttribution.Music
901
+ * @static
902
+ * @param {StatusAttributions.StatusAttribution.IMusic} message Music message or plain object to encode
903
+ * @param {$protobuf.Writer} [writer] Writer to encode to
904
+ * @returns {$protobuf.Writer} Writer
905
+ */
906
+ Music.encode = function encode(message, writer) {
907
+ if (!writer)
908
+ writer = $Writer.create();
909
+ if (message.authorName != null && Object.hasOwnProperty.call(message, "authorName"))
910
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.authorName);
911
+ if (message.songId != null && Object.hasOwnProperty.call(message, "songId"))
912
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.songId);
913
+ if (message.title != null && Object.hasOwnProperty.call(message, "title"))
914
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.title);
915
+ if (message.author != null && Object.hasOwnProperty.call(message, "author"))
916
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.author);
917
+ if (message.artistAttribution != null && Object.hasOwnProperty.call(message, "artistAttribution"))
918
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.artistAttribution);
919
+ if (message.isExplicit != null && Object.hasOwnProperty.call(message, "isExplicit"))
920
+ writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isExplicit);
921
+ return writer;
922
+ };
923
+ /**
924
+ * Encodes the specified Music message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.Music.verify|verify} messages.
925
+ * @function encodeDelimited
926
+ * @memberof StatusAttributions.StatusAttribution.Music
927
+ * @static
928
+ * @param {StatusAttributions.StatusAttribution.IMusic} message Music message or plain object to encode
929
+ * @param {$protobuf.Writer} [writer] Writer to encode to
930
+ * @returns {$protobuf.Writer} Writer
931
+ */
932
+ Music.encodeDelimited = function encodeDelimited(message, writer) {
933
+ return this.encode(message, writer).ldelim();
934
+ };
935
+ /**
936
+ * Decodes a Music message from the specified reader or buffer.
937
+ * @function decode
938
+ * @memberof StatusAttributions.StatusAttribution.Music
939
+ * @static
940
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
941
+ * @param {number} [length] Message length if known beforehand
942
+ * @returns {StatusAttributions.StatusAttribution.Music} Music
943
+ * @throws {Error} If the payload is not a reader or valid buffer
944
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
945
+ */
946
+ Music.decode = function decode(reader, length, error) {
947
+ if (!(reader instanceof $Reader))
948
+ reader = $Reader.create(reader);
949
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.Music();
950
+ while (reader.pos < end) {
951
+ var tag = reader.uint32();
952
+ if (tag === error)
953
+ break;
954
+ switch (tag >>> 3) {
955
+ case 1: {
956
+ message.authorName = reader.string();
957
+ break;
958
+ }
959
+ case 2: {
960
+ message.songId = reader.string();
961
+ break;
962
+ }
963
+ case 3: {
964
+ message.title = reader.string();
965
+ break;
966
+ }
967
+ case 4: {
968
+ message.author = reader.string();
969
+ break;
970
+ }
971
+ case 5: {
972
+ message.artistAttribution = reader.string();
973
+ break;
974
+ }
975
+ case 6: {
976
+ message.isExplicit = reader.bool();
977
+ break;
978
+ }
979
+ default:
980
+ reader.skipType(tag & 7);
981
+ break;
982
+ }
983
+ }
984
+ return message;
985
+ };
986
+ /**
987
+ * Decodes a Music message from the specified reader or buffer, length delimited.
988
+ * @function decodeDelimited
989
+ * @memberof StatusAttributions.StatusAttribution.Music
990
+ * @static
991
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
992
+ * @returns {StatusAttributions.StatusAttribution.Music} Music
993
+ * @throws {Error} If the payload is not a reader or valid buffer
994
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
995
+ */
996
+ Music.decodeDelimited = function decodeDelimited(reader) {
997
+ if (!(reader instanceof $Reader))
998
+ reader = new $Reader(reader);
999
+ return this.decode(reader, reader.uint32());
1000
+ };
1001
+ /**
1002
+ * Verifies a Music message.
1003
+ * @function verify
1004
+ * @memberof StatusAttributions.StatusAttribution.Music
1005
+ * @static
1006
+ * @param {Object.<string,*>} message Plain object to verify
1007
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1008
+ */
1009
+ Music.verify = function verify(message) {
1010
+ if (typeof message !== "object" || message === null)
1011
+ return "object expected";
1012
+ var properties = {};
1013
+ if (message.authorName != null && message.hasOwnProperty("authorName")) {
1014
+ properties._authorName = 1;
1015
+ if (!$util.isString(message.authorName))
1016
+ return "authorName: string expected";
1017
+ }
1018
+ if (message.songId != null && message.hasOwnProperty("songId")) {
1019
+ properties._songId = 1;
1020
+ if (!$util.isString(message.songId))
1021
+ return "songId: string expected";
1022
+ }
1023
+ if (message.title != null && message.hasOwnProperty("title")) {
1024
+ properties._title = 1;
1025
+ if (!$util.isString(message.title))
1026
+ return "title: string expected";
1027
+ }
1028
+ if (message.author != null && message.hasOwnProperty("author")) {
1029
+ properties._author = 1;
1030
+ if (!$util.isString(message.author))
1031
+ return "author: string expected";
1032
+ }
1033
+ if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
1034
+ properties._artistAttribution = 1;
1035
+ if (!$util.isString(message.artistAttribution))
1036
+ return "artistAttribution: string expected";
1037
+ }
1038
+ if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
1039
+ properties._isExplicit = 1;
1040
+ if (typeof message.isExplicit !== "boolean")
1041
+ return "isExplicit: boolean expected";
1042
+ }
1043
+ return null;
1044
+ };
1045
+ /**
1046
+ * Creates a Music message from a plain object. Also converts values to their respective internal types.
1047
+ * @function fromObject
1048
+ * @memberof StatusAttributions.StatusAttribution.Music
1049
+ * @static
1050
+ * @param {Object.<string,*>} object Plain object
1051
+ * @returns {StatusAttributions.StatusAttribution.Music} Music
1052
+ */
1053
+ Music.fromObject = function fromObject(object) {
1054
+ if (object instanceof $root.StatusAttributions.StatusAttribution.Music)
1055
+ return object;
1056
+ var message = new $root.StatusAttributions.StatusAttribution.Music();
1057
+ if (object.authorName != null)
1058
+ message.authorName = String(object.authorName);
1059
+ if (object.songId != null)
1060
+ message.songId = String(object.songId);
1061
+ if (object.title != null)
1062
+ message.title = String(object.title);
1063
+ if (object.author != null)
1064
+ message.author = String(object.author);
1065
+ if (object.artistAttribution != null)
1066
+ message.artistAttribution = String(object.artistAttribution);
1067
+ if (object.isExplicit != null)
1068
+ message.isExplicit = Boolean(object.isExplicit);
1069
+ return message;
1070
+ };
1071
+ /**
1072
+ * Creates a plain object from a Music message. Also converts values to other types if specified.
1073
+ * @function toObject
1074
+ * @memberof StatusAttributions.StatusAttribution.Music
1075
+ * @static
1076
+ * @param {StatusAttributions.StatusAttribution.Music} message Music
1077
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1078
+ * @returns {Object.<string,*>} Plain object
1079
+ */
1080
+ Music.toObject = function toObject(message, options) {
1081
+ if (!options)
1082
+ options = {};
1083
+ var object = {};
1084
+ if (message.authorName != null && message.hasOwnProperty("authorName")) {
1085
+ object.authorName = message.authorName;
1086
+ if (options.oneofs)
1087
+ object._authorName = "authorName";
1088
+ }
1089
+ if (message.songId != null && message.hasOwnProperty("songId")) {
1090
+ object.songId = message.songId;
1091
+ if (options.oneofs)
1092
+ object._songId = "songId";
1093
+ }
1094
+ if (message.title != null && message.hasOwnProperty("title")) {
1095
+ object.title = message.title;
1096
+ if (options.oneofs)
1097
+ object._title = "title";
1098
+ }
1099
+ if (message.author != null && message.hasOwnProperty("author")) {
1100
+ object.author = message.author;
1101
+ if (options.oneofs)
1102
+ object._author = "author";
1103
+ }
1104
+ if (message.artistAttribution != null && message.hasOwnProperty("artistAttribution")) {
1105
+ object.artistAttribution = message.artistAttribution;
1106
+ if (options.oneofs)
1107
+ object._artistAttribution = "artistAttribution";
1108
+ }
1109
+ if (message.isExplicit != null && message.hasOwnProperty("isExplicit")) {
1110
+ object.isExplicit = message.isExplicit;
1111
+ if (options.oneofs)
1112
+ object._isExplicit = "isExplicit";
1113
+ }
1114
+ return object;
1115
+ };
1116
+ /**
1117
+ * Converts this Music to JSON.
1118
+ * @function toJSON
1119
+ * @memberof StatusAttributions.StatusAttribution.Music
1120
+ * @instance
1121
+ * @returns {Object.<string,*>} JSON object
1122
+ */
1123
+ Music.prototype.toJSON = function toJSON() {
1124
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1125
+ };
1126
+ /**
1127
+ * Gets the default type url for Music
1128
+ * @function getTypeUrl
1129
+ * @memberof StatusAttributions.StatusAttribution.Music
1130
+ * @static
1131
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1132
+ * @returns {string} The default type url
1133
+ */
1134
+ Music.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1135
+ if (typeUrlPrefix === undefined) {
1136
+ typeUrlPrefix = "type.googleapis.com";
1137
+ }
1138
+ return typeUrlPrefix + "/StatusAttributions.StatusAttribution.Music";
1139
+ };
1140
+ return Music;
1141
+ })();
1142
+ StatusAttribution.StatusReshare = (function() {
1143
+ /**
1144
+ * Properties of a StatusReshare.
1145
+ * @memberof StatusAttributions.StatusAttribution
1146
+ * @interface IStatusReshare
1147
+ * @property {StatusAttributions.StatusAttribution.StatusReshare.Source|null} [source] StatusReshare source
1148
+ * @property {StatusAttributions.StatusAttribution.StatusReshare.IMetadata|null} [metadata] StatusReshare metadata
1149
+ */
1150
+ /**
1151
+ * Constructs a new StatusReshare.
1152
+ * @memberof StatusAttributions.StatusAttribution
1153
+ * @classdesc Represents a StatusReshare.
1154
+ * @implements IStatusReshare
1155
+ * @constructor
1156
+ * @param {StatusAttributions.StatusAttribution.IStatusReshare=} [properties] Properties to set
1157
+ */
1158
+ function StatusReshare(properties) {
1159
+ if (properties)
1160
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1161
+ if (properties[keys[i]] != null)
1162
+ this[keys[i]] = properties[keys[i]];
1163
+ }
1164
+ /**
1165
+ * StatusReshare source.
1166
+ * @member {StatusAttributions.StatusAttribution.StatusReshare.Source|null|undefined} source
1167
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1168
+ * @instance
1169
+ */
1170
+ StatusReshare.prototype.source = null;
1171
+ /**
1172
+ * StatusReshare metadata.
1173
+ * @member {StatusAttributions.StatusAttribution.StatusReshare.IMetadata|null|undefined} metadata
1174
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1175
+ * @instance
1176
+ */
1177
+ StatusReshare.prototype.metadata = null;
1178
+ // OneOf field names bound to virtual getters and setters
1179
+ var $oneOfFields;
1180
+ /**
1181
+ * StatusReshare _source.
1182
+ * @member {"source"|undefined} _source
1183
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1184
+ * @instance
1185
+ */
1186
+ Object.defineProperty(StatusReshare.prototype, "_source", {
1187
+ get: $util.oneOfGetter($oneOfFields = ["source"]),
1188
+ set: $util.oneOfSetter($oneOfFields)
1189
+ });
1190
+ /**
1191
+ * StatusReshare _metadata.
1192
+ * @member {"metadata"|undefined} _metadata
1193
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1194
+ * @instance
1195
+ */
1196
+ Object.defineProperty(StatusReshare.prototype, "_metadata", {
1197
+ get: $util.oneOfGetter($oneOfFields = ["metadata"]),
1198
+ set: $util.oneOfSetter($oneOfFields)
1199
+ });
1200
+ /**
1201
+ * Creates a new StatusReshare instance using the specified properties.
1202
+ * @function create
1203
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1204
+ * @static
1205
+ * @param {StatusAttributions.StatusAttribution.IStatusReshare=} [properties] Properties to set
1206
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare instance
1207
+ */
1208
+ StatusReshare.create = function create(properties) {
1209
+ return new StatusReshare(properties);
1210
+ };
1211
+ /**
1212
+ * Encodes the specified StatusReshare message. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.verify|verify} messages.
1213
+ * @function encode
1214
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1215
+ * @static
1216
+ * @param {StatusAttributions.StatusAttribution.IStatusReshare} message StatusReshare message or plain object to encode
1217
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1218
+ * @returns {$protobuf.Writer} Writer
1219
+ */
1220
+ StatusReshare.encode = function encode(message, writer) {
1221
+ if (!writer)
1222
+ writer = $Writer.create();
1223
+ if (message.source != null && Object.hasOwnProperty.call(message, "source"))
1224
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.source);
1225
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
1226
+ $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
1227
+ return writer;
1228
+ };
1229
+ /**
1230
+ * Encodes the specified StatusReshare message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.verify|verify} messages.
1231
+ * @function encodeDelimited
1232
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1233
+ * @static
1234
+ * @param {StatusAttributions.StatusAttribution.IStatusReshare} message StatusReshare message or plain object to encode
1235
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1236
+ * @returns {$protobuf.Writer} Writer
1237
+ */
1238
+ StatusReshare.encodeDelimited = function encodeDelimited(message, writer) {
1239
+ return this.encode(message, writer).ldelim();
1240
+ };
1241
+ /**
1242
+ * Decodes a StatusReshare message from the specified reader or buffer.
1243
+ * @function decode
1244
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1245
+ * @static
1246
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1247
+ * @param {number} [length] Message length if known beforehand
1248
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
1249
+ * @throws {Error} If the payload is not a reader or valid buffer
1250
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1251
+ */
1252
+ StatusReshare.decode = function decode(reader, length, error) {
1253
+ if (!(reader instanceof $Reader))
1254
+ reader = $Reader.create(reader);
1255
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.StatusReshare();
1256
+ while (reader.pos < end) {
1257
+ var tag = reader.uint32();
1258
+ if (tag === error)
1259
+ break;
1260
+ switch (tag >>> 3) {
1261
+ case 1: {
1262
+ message.source = reader.int32();
1263
+ break;
1264
+ }
1265
+ case 2: {
1266
+ message.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.decode(reader, reader.uint32());
1267
+ break;
1268
+ }
1269
+ default:
1270
+ reader.skipType(tag & 7);
1271
+ break;
1272
+ }
1273
+ }
1274
+ return message;
1275
+ };
1276
+ /**
1277
+ * Decodes a StatusReshare message from the specified reader or buffer, length delimited.
1278
+ * @function decodeDelimited
1279
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1280
+ * @static
1281
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1282
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
1283
+ * @throws {Error} If the payload is not a reader or valid buffer
1284
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1285
+ */
1286
+ StatusReshare.decodeDelimited = function decodeDelimited(reader) {
1287
+ if (!(reader instanceof $Reader))
1288
+ reader = new $Reader(reader);
1289
+ return this.decode(reader, reader.uint32());
1290
+ };
1291
+ /**
1292
+ * Verifies a StatusReshare message.
1293
+ * @function verify
1294
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1295
+ * @static
1296
+ * @param {Object.<string,*>} message Plain object to verify
1297
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1298
+ */
1299
+ StatusReshare.verify = function verify(message) {
1300
+ if (typeof message !== "object" || message === null)
1301
+ return "object expected";
1302
+ var properties = {};
1303
+ if (message.source != null && message.hasOwnProperty("source")) {
1304
+ properties._source = 1;
1305
+ switch (message.source) {
1306
+ default:
1307
+ return "source: enum value expected";
1308
+ case 0:
1309
+ case 1:
1310
+ case 2:
1311
+ case 3:
1312
+ break;
1313
+ }
1314
+ }
1315
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
1316
+ properties._metadata = 1;
1317
+ {
1318
+ var error = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify(message.metadata);
1319
+ if (error)
1320
+ return "metadata." + error;
1321
+ }
1322
+ }
1323
+ return null;
1324
+ };
1325
+ /**
1326
+ * Creates a StatusReshare message from a plain object. Also converts values to their respective internal types.
1327
+ * @function fromObject
1328
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1329
+ * @static
1330
+ * @param {Object.<string,*>} object Plain object
1331
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare} StatusReshare
1332
+ */
1333
+ StatusReshare.fromObject = function fromObject(object) {
1334
+ if (object instanceof $root.StatusAttributions.StatusAttribution.StatusReshare)
1335
+ return object;
1336
+ var message = new $root.StatusAttributions.StatusAttribution.StatusReshare();
1337
+ switch (object.source) {
1338
+ default:
1339
+ if (typeof object.source === "number") {
1340
+ message.source = object.source;
1341
+ break;
1342
+ }
1343
+ break;
1344
+ case "UNKNOWN":
1345
+ case 0:
1346
+ message.source = 0;
1347
+ break;
1348
+ case "INTERNAL_RESHARE":
1349
+ case 1:
1350
+ message.source = 1;
1351
+ break;
1352
+ case "MENTION_RESHARE":
1353
+ case 2:
1354
+ message.source = 2;
1355
+ break;
1356
+ case "CHANNEL_RESHARE":
1357
+ case 3:
1358
+ message.source = 3;
1359
+ break;
1360
+ }
1361
+ if (object.metadata != null) {
1362
+ if (typeof object.metadata !== "object")
1363
+ throw TypeError(".StatusAttributions.StatusAttribution.StatusReshare.metadata: object expected");
1364
+ message.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.fromObject(object.metadata);
1365
+ }
1366
+ return message;
1367
+ };
1368
+ /**
1369
+ * Creates a plain object from a StatusReshare message. Also converts values to other types if specified.
1370
+ * @function toObject
1371
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1372
+ * @static
1373
+ * @param {StatusAttributions.StatusAttribution.StatusReshare} message StatusReshare
1374
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1375
+ * @returns {Object.<string,*>} Plain object
1376
+ */
1377
+ StatusReshare.toObject = function toObject(message, options) {
1378
+ if (!options)
1379
+ options = {};
1380
+ var object = {};
1381
+ if (message.source != null && message.hasOwnProperty("source")) {
1382
+ object.source = options.enums === String ? $root.StatusAttributions.StatusAttribution.StatusReshare.Source[message.source] === undefined ? message.source : $root.StatusAttributions.StatusAttribution.StatusReshare.Source[message.source] : message.source;
1383
+ if (options.oneofs)
1384
+ object._source = "source";
1385
+ }
1386
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
1387
+ object.metadata = $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata.toObject(message.metadata, options);
1388
+ if (options.oneofs)
1389
+ object._metadata = "metadata";
1390
+ }
1391
+ return object;
1392
+ };
1393
+ /**
1394
+ * Converts this StatusReshare to JSON.
1395
+ * @function toJSON
1396
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1397
+ * @instance
1398
+ * @returns {Object.<string,*>} JSON object
1399
+ */
1400
+ StatusReshare.prototype.toJSON = function toJSON() {
1401
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1402
+ };
1403
+ /**
1404
+ * Gets the default type url for StatusReshare
1405
+ * @function getTypeUrl
1406
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1407
+ * @static
1408
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1409
+ * @returns {string} The default type url
1410
+ */
1411
+ StatusReshare.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1412
+ if (typeUrlPrefix === undefined) {
1413
+ typeUrlPrefix = "type.googleapis.com";
1414
+ }
1415
+ return typeUrlPrefix + "/StatusAttributions.StatusAttribution.StatusReshare";
1416
+ };
1417
+ StatusReshare.Metadata = (function() {
1418
+ /**
1419
+ * Properties of a Metadata.
1420
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1421
+ * @interface IMetadata
1422
+ * @property {number|null} [duration] Metadata duration
1423
+ * @property {string|null} [channelJid] Metadata channelJid
1424
+ * @property {number|null} [channelMessageId] Metadata channelMessageId
1425
+ * @property {boolean|null} [hasMultipleReshares] Metadata hasMultipleReshares
1426
+ */
1427
+ /**
1428
+ * Constructs a new Metadata.
1429
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare
1430
+ * @classdesc Represents a Metadata.
1431
+ * @implements IMetadata
1432
+ * @constructor
1433
+ * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata=} [properties] Properties to set
1434
+ */
1435
+ function Metadata(properties) {
1436
+ if (properties)
1437
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
1438
+ if (properties[keys[i]] != null)
1439
+ this[keys[i]] = properties[keys[i]];
1440
+ }
1441
+ /**
1442
+ * Metadata duration.
1443
+ * @member {number|null|undefined} duration
1444
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1445
+ * @instance
1446
+ */
1447
+ Metadata.prototype.duration = null;
1448
+ /**
1449
+ * Metadata channelJid.
1450
+ * @member {string|null|undefined} channelJid
1451
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1452
+ * @instance
1453
+ */
1454
+ Metadata.prototype.channelJid = null;
1455
+ /**
1456
+ * Metadata channelMessageId.
1457
+ * @member {number|null|undefined} channelMessageId
1458
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1459
+ * @instance
1460
+ */
1461
+ Metadata.prototype.channelMessageId = null;
1462
+ /**
1463
+ * Metadata hasMultipleReshares.
1464
+ * @member {boolean|null|undefined} hasMultipleReshares
1465
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1466
+ * @instance
1467
+ */
1468
+ Metadata.prototype.hasMultipleReshares = null;
1469
+ // OneOf field names bound to virtual getters and setters
1470
+ var $oneOfFields;
1471
+ /**
1472
+ * Metadata _duration.
1473
+ * @member {"duration"|undefined} _duration
1474
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1475
+ * @instance
1476
+ */
1477
+ Object.defineProperty(Metadata.prototype, "_duration", {
1478
+ get: $util.oneOfGetter($oneOfFields = ["duration"]),
1479
+ set: $util.oneOfSetter($oneOfFields)
1480
+ });
1481
+ /**
1482
+ * Metadata _channelJid.
1483
+ * @member {"channelJid"|undefined} _channelJid
1484
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1485
+ * @instance
1486
+ */
1487
+ Object.defineProperty(Metadata.prototype, "_channelJid", {
1488
+ get: $util.oneOfGetter($oneOfFields = ["channelJid"]),
1489
+ set: $util.oneOfSetter($oneOfFields)
1490
+ });
1491
+ /**
1492
+ * Metadata _channelMessageId.
1493
+ * @member {"channelMessageId"|undefined} _channelMessageId
1494
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1495
+ * @instance
1496
+ */
1497
+ Object.defineProperty(Metadata.prototype, "_channelMessageId", {
1498
+ get: $util.oneOfGetter($oneOfFields = ["channelMessageId"]),
1499
+ set: $util.oneOfSetter($oneOfFields)
1500
+ });
1501
+ /**
1502
+ * Metadata _hasMultipleReshares.
1503
+ * @member {"hasMultipleReshares"|undefined} _hasMultipleReshares
1504
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1505
+ * @instance
1506
+ */
1507
+ Object.defineProperty(Metadata.prototype, "_hasMultipleReshares", {
1508
+ get: $util.oneOfGetter($oneOfFields = ["hasMultipleReshares"]),
1509
+ set: $util.oneOfSetter($oneOfFields)
1510
+ });
1511
+ /**
1512
+ * Creates a new Metadata instance using the specified properties.
1513
+ * @function create
1514
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1515
+ * @static
1516
+ * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata=} [properties] Properties to set
1517
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata instance
1518
+ */
1519
+ Metadata.create = function create(properties) {
1520
+ return new Metadata(properties);
1521
+ };
1522
+ /**
1523
+ * Encodes the specified Metadata message. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify|verify} messages.
1524
+ * @function encode
1525
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1526
+ * @static
1527
+ * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata} message Metadata message or plain object to encode
1528
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1529
+ * @returns {$protobuf.Writer} Writer
1530
+ */
1531
+ Metadata.encode = function encode(message, writer) {
1532
+ if (!writer)
1533
+ writer = $Writer.create();
1534
+ if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
1535
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.duration);
1536
+ if (message.channelJid != null && Object.hasOwnProperty.call(message, "channelJid"))
1537
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelJid);
1538
+ if (message.channelMessageId != null && Object.hasOwnProperty.call(message, "channelMessageId"))
1539
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.channelMessageId);
1540
+ if (message.hasMultipleReshares != null && Object.hasOwnProperty.call(message, "hasMultipleReshares"))
1541
+ writer.uint32(/* id 4, wireType 0 =*/32).bool(message.hasMultipleReshares);
1542
+ return writer;
1543
+ };
1544
+ /**
1545
+ * Encodes the specified Metadata message, length delimited. Does not implicitly {@link StatusAttributions.StatusAttribution.StatusReshare.Metadata.verify|verify} messages.
1546
+ * @function encodeDelimited
1547
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1548
+ * @static
1549
+ * @param {StatusAttributions.StatusAttribution.StatusReshare.IMetadata} message Metadata message or plain object to encode
1550
+ * @param {$protobuf.Writer} [writer] Writer to encode to
1551
+ * @returns {$protobuf.Writer} Writer
1552
+ */
1553
+ Metadata.encodeDelimited = function encodeDelimited(message, writer) {
1554
+ return this.encode(message, writer).ldelim();
1555
+ };
1556
+ /**
1557
+ * Decodes a Metadata message from the specified reader or buffer.
1558
+ * @function decode
1559
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1560
+ * @static
1561
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1562
+ * @param {number} [length] Message length if known beforehand
1563
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
1564
+ * @throws {Error} If the payload is not a reader or valid buffer
1565
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1566
+ */
1567
+ Metadata.decode = function decode(reader, length, error) {
1568
+ if (!(reader instanceof $Reader))
1569
+ reader = $Reader.create(reader);
1570
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata();
1571
+ while (reader.pos < end) {
1572
+ var tag = reader.uint32();
1573
+ if (tag === error)
1574
+ break;
1575
+ switch (tag >>> 3) {
1576
+ case 1: {
1577
+ message.duration = reader.int32();
1578
+ break;
1579
+ }
1580
+ case 2: {
1581
+ message.channelJid = reader.string();
1582
+ break;
1583
+ }
1584
+ case 3: {
1585
+ message.channelMessageId = reader.int32();
1586
+ break;
1587
+ }
1588
+ case 4: {
1589
+ message.hasMultipleReshares = reader.bool();
1590
+ break;
1591
+ }
1592
+ default:
1593
+ reader.skipType(tag & 7);
1594
+ break;
1595
+ }
1596
+ }
1597
+ return message;
1598
+ };
1599
+ /**
1600
+ * Decodes a Metadata message from the specified reader or buffer, length delimited.
1601
+ * @function decodeDelimited
1602
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1603
+ * @static
1604
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
1605
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
1606
+ * @throws {Error} If the payload is not a reader or valid buffer
1607
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1608
+ */
1609
+ Metadata.decodeDelimited = function decodeDelimited(reader) {
1610
+ if (!(reader instanceof $Reader))
1611
+ reader = new $Reader(reader);
1612
+ return this.decode(reader, reader.uint32());
1613
+ };
1614
+ /**
1615
+ * Verifies a Metadata message.
1616
+ * @function verify
1617
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1618
+ * @static
1619
+ * @param {Object.<string,*>} message Plain object to verify
1620
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
1621
+ */
1622
+ Metadata.verify = function verify(message) {
1623
+ if (typeof message !== "object" || message === null)
1624
+ return "object expected";
1625
+ var properties = {};
1626
+ if (message.duration != null && message.hasOwnProperty("duration")) {
1627
+ properties._duration = 1;
1628
+ if (!$util.isInteger(message.duration))
1629
+ return "duration: integer expected";
1630
+ }
1631
+ if (message.channelJid != null && message.hasOwnProperty("channelJid")) {
1632
+ properties._channelJid = 1;
1633
+ if (!$util.isString(message.channelJid))
1634
+ return "channelJid: string expected";
1635
+ }
1636
+ if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId")) {
1637
+ properties._channelMessageId = 1;
1638
+ if (!$util.isInteger(message.channelMessageId))
1639
+ return "channelMessageId: integer expected";
1640
+ }
1641
+ if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares")) {
1642
+ properties._hasMultipleReshares = 1;
1643
+ if (typeof message.hasMultipleReshares !== "boolean")
1644
+ return "hasMultipleReshares: boolean expected";
1645
+ }
1646
+ return null;
1647
+ };
1648
+ /**
1649
+ * Creates a Metadata message from a plain object. Also converts values to their respective internal types.
1650
+ * @function fromObject
1651
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1652
+ * @static
1653
+ * @param {Object.<string,*>} object Plain object
1654
+ * @returns {StatusAttributions.StatusAttribution.StatusReshare.Metadata} Metadata
1655
+ */
1656
+ Metadata.fromObject = function fromObject(object) {
1657
+ if (object instanceof $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata)
1658
+ return object;
1659
+ var message = new $root.StatusAttributions.StatusAttribution.StatusReshare.Metadata();
1660
+ if (object.duration != null)
1661
+ message.duration = object.duration | 0;
1662
+ if (object.channelJid != null)
1663
+ message.channelJid = String(object.channelJid);
1664
+ if (object.channelMessageId != null)
1665
+ message.channelMessageId = object.channelMessageId | 0;
1666
+ if (object.hasMultipleReshares != null)
1667
+ message.hasMultipleReshares = Boolean(object.hasMultipleReshares);
1668
+ return message;
1669
+ };
1670
+ /**
1671
+ * Creates a plain object from a Metadata message. Also converts values to other types if specified.
1672
+ * @function toObject
1673
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1674
+ * @static
1675
+ * @param {StatusAttributions.StatusAttribution.StatusReshare.Metadata} message Metadata
1676
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
1677
+ * @returns {Object.<string,*>} Plain object
1678
+ */
1679
+ Metadata.toObject = function toObject(message, options) {
1680
+ if (!options)
1681
+ options = {};
1682
+ var object = {};
1683
+ if (message.duration != null && message.hasOwnProperty("duration")) {
1684
+ object.duration = message.duration;
1685
+ if (options.oneofs)
1686
+ object._duration = "duration";
1687
+ }
1688
+ if (message.channelJid != null && message.hasOwnProperty("channelJid")) {
1689
+ object.channelJid = message.channelJid;
1690
+ if (options.oneofs)
1691
+ object._channelJid = "channelJid";
1692
+ }
1693
+ if (message.channelMessageId != null && message.hasOwnProperty("channelMessageId")) {
1694
+ object.channelMessageId = message.channelMessageId;
1695
+ if (options.oneofs)
1696
+ object._channelMessageId = "channelMessageId";
1697
+ }
1698
+ if (message.hasMultipleReshares != null && message.hasOwnProperty("hasMultipleReshares")) {
1699
+ object.hasMultipleReshares = message.hasMultipleReshares;
1700
+ if (options.oneofs)
1701
+ object._hasMultipleReshares = "hasMultipleReshares";
1702
+ }
1703
+ return object;
1704
+ };
1705
+ /**
1706
+ * Converts this Metadata to JSON.
1707
+ * @function toJSON
1708
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1709
+ * @instance
1710
+ * @returns {Object.<string,*>} JSON object
1711
+ */
1712
+ Metadata.prototype.toJSON = function toJSON() {
1713
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1714
+ };
1715
+ /**
1716
+ * Gets the default type url for Metadata
1717
+ * @function getTypeUrl
1718
+ * @memberof StatusAttributions.StatusAttribution.StatusReshare.Metadata
1719
+ * @static
1720
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1721
+ * @returns {string} The default type url
1722
+ */
1723
+ Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1724
+ if (typeUrlPrefix === undefined) {
1725
+ typeUrlPrefix = "type.googleapis.com";
1726
+ }
1727
+ return typeUrlPrefix + "/StatusAttributions.StatusAttribution.StatusReshare.Metadata";
1728
+ };
1729
+ return Metadata;
1730
+ })();
1731
+ /**
1732
+ * Source enum.
1733
+ * @name StatusAttributions.StatusAttribution.StatusReshare.Source
1734
+ * @enum {number}
1735
+ * @property {number} UNKNOWN=0 UNKNOWN value
1736
+ * @property {number} INTERNAL_RESHARE=1 INTERNAL_RESHARE value
1737
+ * @property {number} MENTION_RESHARE=2 MENTION_RESHARE value
1738
+ * @property {number} CHANNEL_RESHARE=3 CHANNEL_RESHARE value
1739
+ */
1740
+ StatusReshare.Source = (function() {
1741
+ var valuesById = {}, values = Object.create(valuesById);
1742
+ values[valuesById[0] = "UNKNOWN"] = 0;
1743
+ values[valuesById[1] = "INTERNAL_RESHARE"] = 1;
1744
+ values[valuesById[2] = "MENTION_RESHARE"] = 2;
1745
+ values[valuesById[3] = "CHANNEL_RESHARE"] = 3;
1746
+ return values;
1747
+ })();
1748
+ return StatusReshare;
1749
+ })();
1750
+ /**
1751
+ * Type enum.
1752
+ * @name StatusAttributions.StatusAttribution.Type
1753
+ * @enum {number}
1754
+ * @property {number} RESHARE=0 RESHARE value
1755
+ * @property {number} EXTERNAL_SHARE=1 EXTERNAL_SHARE value
1756
+ * @property {number} MUSIC=2 MUSIC value
1757
+ */
1758
+ StatusAttribution.Type = (function() {
1759
+ var valuesById = {}, values = Object.create(valuesById);
1760
+ values[valuesById[0] = "RESHARE"] = 0;
1761
+ values[valuesById[1] = "EXTERNAL_SHARE"] = 1;
1762
+ values[valuesById[2] = "MUSIC"] = 2;
1763
+ return values;
1764
+ })();
1765
+ return StatusAttribution;
1766
+ })();
1767
+ return StatusAttributions;
1768
+ })();
1769
+ module.exports = $root;