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