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,1559 @@
|
|
|
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.MdStorageChatRowOpaqueData = (function() {
|
|
9
|
+
/**
|
|
10
|
+
* Namespace MdStorageChatRowOpaqueData.
|
|
11
|
+
* @exports MdStorageChatRowOpaqueData
|
|
12
|
+
* @namespace
|
|
13
|
+
*/
|
|
14
|
+
var MdStorageChatRowOpaqueData = {};
|
|
15
|
+
MdStorageChatRowOpaqueData.ChatRowOpaqueData = (function() {
|
|
16
|
+
/**
|
|
17
|
+
* Properties of a ChatRowOpaqueData.
|
|
18
|
+
* @memberof MdStorageChatRowOpaqueData
|
|
19
|
+
* @interface IChatRowOpaqueData
|
|
20
|
+
* @property {MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage|null} [draftMessage] ChatRowOpaqueData draftMessage
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new ChatRowOpaqueData.
|
|
24
|
+
* @memberof MdStorageChatRowOpaqueData
|
|
25
|
+
* @classdesc Represents a ChatRowOpaqueData.
|
|
26
|
+
* @implements IChatRowOpaqueData
|
|
27
|
+
* @constructor
|
|
28
|
+
* @param {MdStorageChatRowOpaqueData.IChatRowOpaqueData=} [properties] Properties to set
|
|
29
|
+
*/
|
|
30
|
+
function ChatRowOpaqueData(properties) {
|
|
31
|
+
if (properties)
|
|
32
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
33
|
+
if (properties[keys[i]] != null)
|
|
34
|
+
this[keys[i]] = properties[keys[i]];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* ChatRowOpaqueData draftMessage.
|
|
38
|
+
* @member {MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage|null|undefined} draftMessage
|
|
39
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
40
|
+
* @instance
|
|
41
|
+
*/
|
|
42
|
+
ChatRowOpaqueData.prototype.draftMessage = null;
|
|
43
|
+
// OneOf field names bound to virtual getters and setters
|
|
44
|
+
var $oneOfFields;
|
|
45
|
+
/**
|
|
46
|
+
* ChatRowOpaqueData _draftMessage.
|
|
47
|
+
* @member {"draftMessage"|undefined} _draftMessage
|
|
48
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
49
|
+
* @instance
|
|
50
|
+
*/
|
|
51
|
+
Object.defineProperty(ChatRowOpaqueData.prototype, "_draftMessage", {
|
|
52
|
+
get: $util.oneOfGetter($oneOfFields = ["draftMessage"]),
|
|
53
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* Creates a new ChatRowOpaqueData instance using the specified properties.
|
|
57
|
+
* @function create
|
|
58
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
59
|
+
* @static
|
|
60
|
+
* @param {MdStorageChatRowOpaqueData.IChatRowOpaqueData=} [properties] Properties to set
|
|
61
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData} ChatRowOpaqueData instance
|
|
62
|
+
*/
|
|
63
|
+
ChatRowOpaqueData.create = function create(properties) {
|
|
64
|
+
return new ChatRowOpaqueData(properties);
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Encodes the specified ChatRowOpaqueData message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.verify|verify} messages.
|
|
68
|
+
* @function encode
|
|
69
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
70
|
+
* @static
|
|
71
|
+
* @param {MdStorageChatRowOpaqueData.IChatRowOpaqueData} message ChatRowOpaqueData message or plain object to encode
|
|
72
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
73
|
+
* @returns {$protobuf.Writer} Writer
|
|
74
|
+
*/
|
|
75
|
+
ChatRowOpaqueData.encode = function encode(message, writer) {
|
|
76
|
+
if (!writer)
|
|
77
|
+
writer = $Writer.create();
|
|
78
|
+
if (message.draftMessage != null && Object.hasOwnProperty.call(message, "draftMessage"))
|
|
79
|
+
$root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.encode(message.draftMessage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
80
|
+
return writer;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Encodes the specified ChatRowOpaqueData message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.verify|verify} messages.
|
|
84
|
+
* @function encodeDelimited
|
|
85
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
86
|
+
* @static
|
|
87
|
+
* @param {MdStorageChatRowOpaqueData.IChatRowOpaqueData} message ChatRowOpaqueData message or plain object to encode
|
|
88
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
89
|
+
* @returns {$protobuf.Writer} Writer
|
|
90
|
+
*/
|
|
91
|
+
ChatRowOpaqueData.encodeDelimited = function encodeDelimited(message, writer) {
|
|
92
|
+
return this.encode(message, writer).ldelim();
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Decodes a ChatRowOpaqueData message from the specified reader or buffer.
|
|
96
|
+
* @function decode
|
|
97
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
98
|
+
* @static
|
|
99
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
100
|
+
* @param {number} [length] Message length if known beforehand
|
|
101
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData} ChatRowOpaqueData
|
|
102
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
103
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
104
|
+
*/
|
|
105
|
+
ChatRowOpaqueData.decode = function decode(reader, length, error) {
|
|
106
|
+
if (!(reader instanceof $Reader))
|
|
107
|
+
reader = $Reader.create(reader);
|
|
108
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData();
|
|
109
|
+
while (reader.pos < end) {
|
|
110
|
+
var tag = reader.uint32();
|
|
111
|
+
if (tag === error)
|
|
112
|
+
break;
|
|
113
|
+
switch (tag >>> 3) {
|
|
114
|
+
case 1: {
|
|
115
|
+
message.draftMessage = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.decode(reader, reader.uint32());
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
default:
|
|
119
|
+
reader.skipType(tag & 7);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return message;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Decodes a ChatRowOpaqueData message from the specified reader or buffer, length delimited.
|
|
127
|
+
* @function decodeDelimited
|
|
128
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
129
|
+
* @static
|
|
130
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
131
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData} ChatRowOpaqueData
|
|
132
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
133
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
134
|
+
*/
|
|
135
|
+
ChatRowOpaqueData.decodeDelimited = function decodeDelimited(reader) {
|
|
136
|
+
if (!(reader instanceof $Reader))
|
|
137
|
+
reader = new $Reader(reader);
|
|
138
|
+
return this.decode(reader, reader.uint32());
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Verifies a ChatRowOpaqueData message.
|
|
142
|
+
* @function verify
|
|
143
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
144
|
+
* @static
|
|
145
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
146
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
147
|
+
*/
|
|
148
|
+
ChatRowOpaqueData.verify = function verify(message) {
|
|
149
|
+
if (typeof message !== "object" || message === null)
|
|
150
|
+
return "object expected";
|
|
151
|
+
var properties = {};
|
|
152
|
+
if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) {
|
|
153
|
+
properties._draftMessage = 1;
|
|
154
|
+
{
|
|
155
|
+
var error = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.verify(message.draftMessage);
|
|
156
|
+
if (error)
|
|
157
|
+
return "draftMessage." + error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return null;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Creates a ChatRowOpaqueData message from a plain object. Also converts values to their respective internal types.
|
|
164
|
+
* @function fromObject
|
|
165
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
166
|
+
* @static
|
|
167
|
+
* @param {Object.<string,*>} object Plain object
|
|
168
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData} ChatRowOpaqueData
|
|
169
|
+
*/
|
|
170
|
+
ChatRowOpaqueData.fromObject = function fromObject(object) {
|
|
171
|
+
if (object instanceof $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData)
|
|
172
|
+
return object;
|
|
173
|
+
var message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData();
|
|
174
|
+
if (object.draftMessage != null) {
|
|
175
|
+
if (typeof object.draftMessage !== "object")
|
|
176
|
+
throw TypeError(".MdStorageChatRowOpaqueData.ChatRowOpaqueData.draftMessage: object expected");
|
|
177
|
+
message.draftMessage = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.fromObject(object.draftMessage);
|
|
178
|
+
}
|
|
179
|
+
return message;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Creates a plain object from a ChatRowOpaqueData message. Also converts values to other types if specified.
|
|
183
|
+
* @function toObject
|
|
184
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
185
|
+
* @static
|
|
186
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData} message ChatRowOpaqueData
|
|
187
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
188
|
+
* @returns {Object.<string,*>} Plain object
|
|
189
|
+
*/
|
|
190
|
+
ChatRowOpaqueData.toObject = function toObject(message, options) {
|
|
191
|
+
if (!options)
|
|
192
|
+
options = {};
|
|
193
|
+
var object = {};
|
|
194
|
+
if (message.draftMessage != null && message.hasOwnProperty("draftMessage")) {
|
|
195
|
+
object.draftMessage = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.toObject(message.draftMessage, options);
|
|
196
|
+
if (options.oneofs)
|
|
197
|
+
object._draftMessage = "draftMessage";
|
|
198
|
+
}
|
|
199
|
+
return object;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Converts this ChatRowOpaqueData to JSON.
|
|
203
|
+
* @function toJSON
|
|
204
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
205
|
+
* @instance
|
|
206
|
+
* @returns {Object.<string,*>} JSON object
|
|
207
|
+
*/
|
|
208
|
+
ChatRowOpaqueData.prototype.toJSON = function toJSON() {
|
|
209
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Gets the default type url for ChatRowOpaqueData
|
|
213
|
+
* @function getTypeUrl
|
|
214
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
215
|
+
* @static
|
|
216
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
217
|
+
* @returns {string} The default type url
|
|
218
|
+
*/
|
|
219
|
+
ChatRowOpaqueData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
220
|
+
if (typeUrlPrefix === undefined) {
|
|
221
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
222
|
+
}
|
|
223
|
+
return typeUrlPrefix + "/MdStorageChatRowOpaqueData.ChatRowOpaqueData";
|
|
224
|
+
};
|
|
225
|
+
ChatRowOpaqueData.DraftMessage = (function() {
|
|
226
|
+
/**
|
|
227
|
+
* Properties of a DraftMessage.
|
|
228
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
229
|
+
* @interface IDraftMessage
|
|
230
|
+
* @property {string|null} [text] DraftMessage text
|
|
231
|
+
* @property {string|null} [omittedUrl] DraftMessage omittedUrl
|
|
232
|
+
* @property {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null} [ctwaContextLinkData] DraftMessage ctwaContextLinkData
|
|
233
|
+
* @property {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null} [ctwaContext] DraftMessage ctwaContext
|
|
234
|
+
* @property {number|Long|null} [timestamp] DraftMessage timestamp
|
|
235
|
+
*/
|
|
236
|
+
/**
|
|
237
|
+
* Constructs a new DraftMessage.
|
|
238
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData
|
|
239
|
+
* @classdesc Represents a DraftMessage.
|
|
240
|
+
* @implements IDraftMessage
|
|
241
|
+
* @constructor
|
|
242
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage=} [properties] Properties to set
|
|
243
|
+
*/
|
|
244
|
+
function DraftMessage(properties) {
|
|
245
|
+
if (properties)
|
|
246
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
247
|
+
if (properties[keys[i]] != null)
|
|
248
|
+
this[keys[i]] = properties[keys[i]];
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* DraftMessage text.
|
|
252
|
+
* @member {string|null|undefined} text
|
|
253
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
254
|
+
* @instance
|
|
255
|
+
*/
|
|
256
|
+
DraftMessage.prototype.text = null;
|
|
257
|
+
/**
|
|
258
|
+
* DraftMessage omittedUrl.
|
|
259
|
+
* @member {string|null|undefined} omittedUrl
|
|
260
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
261
|
+
* @instance
|
|
262
|
+
*/
|
|
263
|
+
DraftMessage.prototype.omittedUrl = null;
|
|
264
|
+
/**
|
|
265
|
+
* DraftMessage ctwaContextLinkData.
|
|
266
|
+
* @member {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData|null|undefined} ctwaContextLinkData
|
|
267
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
268
|
+
* @instance
|
|
269
|
+
*/
|
|
270
|
+
DraftMessage.prototype.ctwaContextLinkData = null;
|
|
271
|
+
/**
|
|
272
|
+
* DraftMessage ctwaContext.
|
|
273
|
+
* @member {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData|null|undefined} ctwaContext
|
|
274
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
275
|
+
* @instance
|
|
276
|
+
*/
|
|
277
|
+
DraftMessage.prototype.ctwaContext = null;
|
|
278
|
+
/**
|
|
279
|
+
* DraftMessage timestamp.
|
|
280
|
+
* @member {number|Long|null|undefined} timestamp
|
|
281
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
282
|
+
* @instance
|
|
283
|
+
*/
|
|
284
|
+
DraftMessage.prototype.timestamp = null;
|
|
285
|
+
// OneOf field names bound to virtual getters and setters
|
|
286
|
+
var $oneOfFields;
|
|
287
|
+
/**
|
|
288
|
+
* DraftMessage _text.
|
|
289
|
+
* @member {"text"|undefined} _text
|
|
290
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
291
|
+
* @instance
|
|
292
|
+
*/
|
|
293
|
+
Object.defineProperty(DraftMessage.prototype, "_text", {
|
|
294
|
+
get: $util.oneOfGetter($oneOfFields = ["text"]),
|
|
295
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
296
|
+
});
|
|
297
|
+
/**
|
|
298
|
+
* DraftMessage _omittedUrl.
|
|
299
|
+
* @member {"omittedUrl"|undefined} _omittedUrl
|
|
300
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
301
|
+
* @instance
|
|
302
|
+
*/
|
|
303
|
+
Object.defineProperty(DraftMessage.prototype, "_omittedUrl", {
|
|
304
|
+
get: $util.oneOfGetter($oneOfFields = ["omittedUrl"]),
|
|
305
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
306
|
+
});
|
|
307
|
+
/**
|
|
308
|
+
* DraftMessage _ctwaContextLinkData.
|
|
309
|
+
* @member {"ctwaContextLinkData"|undefined} _ctwaContextLinkData
|
|
310
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
311
|
+
* @instance
|
|
312
|
+
*/
|
|
313
|
+
Object.defineProperty(DraftMessage.prototype, "_ctwaContextLinkData", {
|
|
314
|
+
get: $util.oneOfGetter($oneOfFields = ["ctwaContextLinkData"]),
|
|
315
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
316
|
+
});
|
|
317
|
+
/**
|
|
318
|
+
* DraftMessage _ctwaContext.
|
|
319
|
+
* @member {"ctwaContext"|undefined} _ctwaContext
|
|
320
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
321
|
+
* @instance
|
|
322
|
+
*/
|
|
323
|
+
Object.defineProperty(DraftMessage.prototype, "_ctwaContext", {
|
|
324
|
+
get: $util.oneOfGetter($oneOfFields = ["ctwaContext"]),
|
|
325
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
326
|
+
});
|
|
327
|
+
/**
|
|
328
|
+
* DraftMessage _timestamp.
|
|
329
|
+
* @member {"timestamp"|undefined} _timestamp
|
|
330
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
331
|
+
* @instance
|
|
332
|
+
*/
|
|
333
|
+
Object.defineProperty(DraftMessage.prototype, "_timestamp", {
|
|
334
|
+
get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
|
|
335
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
336
|
+
});
|
|
337
|
+
/**
|
|
338
|
+
* Creates a new DraftMessage instance using the specified properties.
|
|
339
|
+
* @function create
|
|
340
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
341
|
+
* @static
|
|
342
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage=} [properties] Properties to set
|
|
343
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage} DraftMessage instance
|
|
344
|
+
*/
|
|
345
|
+
DraftMessage.create = function create(properties) {
|
|
346
|
+
return new DraftMessage(properties);
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Encodes the specified DraftMessage message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.verify|verify} messages.
|
|
350
|
+
* @function encode
|
|
351
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
352
|
+
* @static
|
|
353
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage} message DraftMessage message or plain object to encode
|
|
354
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
355
|
+
* @returns {$protobuf.Writer} Writer
|
|
356
|
+
*/
|
|
357
|
+
DraftMessage.encode = function encode(message, writer) {
|
|
358
|
+
if (!writer)
|
|
359
|
+
writer = $Writer.create();
|
|
360
|
+
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
|
|
361
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
|
|
362
|
+
if (message.omittedUrl != null && Object.hasOwnProperty.call(message, "omittedUrl"))
|
|
363
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.omittedUrl);
|
|
364
|
+
if (message.ctwaContextLinkData != null && Object.hasOwnProperty.call(message, "ctwaContextLinkData"))
|
|
365
|
+
$root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.encode(message.ctwaContextLinkData, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
366
|
+
if (message.ctwaContext != null && Object.hasOwnProperty.call(message, "ctwaContext"))
|
|
367
|
+
$root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.encode(message.ctwaContext, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
368
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
369
|
+
writer.uint32(/* id 5, wireType 0 =*/40).int64(message.timestamp);
|
|
370
|
+
return writer;
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Encodes the specified DraftMessage message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.verify|verify} messages.
|
|
374
|
+
* @function encodeDelimited
|
|
375
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
376
|
+
* @static
|
|
377
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.IDraftMessage} message DraftMessage message or plain object to encode
|
|
378
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
379
|
+
* @returns {$protobuf.Writer} Writer
|
|
380
|
+
*/
|
|
381
|
+
DraftMessage.encodeDelimited = function encodeDelimited(message, writer) {
|
|
382
|
+
return this.encode(message, writer).ldelim();
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* Decodes a DraftMessage message from the specified reader or buffer.
|
|
386
|
+
* @function decode
|
|
387
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
388
|
+
* @static
|
|
389
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
390
|
+
* @param {number} [length] Message length if known beforehand
|
|
391
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage} DraftMessage
|
|
392
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
393
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
394
|
+
*/
|
|
395
|
+
DraftMessage.decode = function decode(reader, length, error) {
|
|
396
|
+
if (!(reader instanceof $Reader))
|
|
397
|
+
reader = $Reader.create(reader);
|
|
398
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage();
|
|
399
|
+
while (reader.pos < end) {
|
|
400
|
+
var tag = reader.uint32();
|
|
401
|
+
if (tag === error)
|
|
402
|
+
break;
|
|
403
|
+
switch (tag >>> 3) {
|
|
404
|
+
case 1: {
|
|
405
|
+
message.text = reader.string();
|
|
406
|
+
break;
|
|
407
|
+
}
|
|
408
|
+
case 2: {
|
|
409
|
+
message.omittedUrl = reader.string();
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
case 3: {
|
|
413
|
+
message.ctwaContextLinkData = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.decode(reader, reader.uint32());
|
|
414
|
+
break;
|
|
415
|
+
}
|
|
416
|
+
case 4: {
|
|
417
|
+
message.ctwaContext = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.decode(reader, reader.uint32());
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
case 5: {
|
|
421
|
+
message.timestamp = reader.int64();
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
default:
|
|
425
|
+
reader.skipType(tag & 7);
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
return message;
|
|
430
|
+
};
|
|
431
|
+
/**
|
|
432
|
+
* Decodes a DraftMessage message from the specified reader or buffer, length delimited.
|
|
433
|
+
* @function decodeDelimited
|
|
434
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
435
|
+
* @static
|
|
436
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
437
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage} DraftMessage
|
|
438
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
439
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
440
|
+
*/
|
|
441
|
+
DraftMessage.decodeDelimited = function decodeDelimited(reader) {
|
|
442
|
+
if (!(reader instanceof $Reader))
|
|
443
|
+
reader = new $Reader(reader);
|
|
444
|
+
return this.decode(reader, reader.uint32());
|
|
445
|
+
};
|
|
446
|
+
/**
|
|
447
|
+
* Verifies a DraftMessage message.
|
|
448
|
+
* @function verify
|
|
449
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
450
|
+
* @static
|
|
451
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
452
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
453
|
+
*/
|
|
454
|
+
DraftMessage.verify = function verify(message) {
|
|
455
|
+
if (typeof message !== "object" || message === null)
|
|
456
|
+
return "object expected";
|
|
457
|
+
var properties = {};
|
|
458
|
+
if (message.text != null && message.hasOwnProperty("text")) {
|
|
459
|
+
properties._text = 1;
|
|
460
|
+
if (!$util.isString(message.text))
|
|
461
|
+
return "text: string expected";
|
|
462
|
+
}
|
|
463
|
+
if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) {
|
|
464
|
+
properties._omittedUrl = 1;
|
|
465
|
+
if (!$util.isString(message.omittedUrl))
|
|
466
|
+
return "omittedUrl: string expected";
|
|
467
|
+
}
|
|
468
|
+
if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) {
|
|
469
|
+
properties._ctwaContextLinkData = 1;
|
|
470
|
+
{
|
|
471
|
+
var error = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify(message.ctwaContextLinkData);
|
|
472
|
+
if (error)
|
|
473
|
+
return "ctwaContextLinkData." + error;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) {
|
|
477
|
+
properties._ctwaContext = 1;
|
|
478
|
+
{
|
|
479
|
+
var error = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify(message.ctwaContext);
|
|
480
|
+
if (error)
|
|
481
|
+
return "ctwaContext." + error;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
485
|
+
properties._timestamp = 1;
|
|
486
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
487
|
+
return "timestamp: integer|Long expected";
|
|
488
|
+
}
|
|
489
|
+
return null;
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* Creates a DraftMessage message from a plain object. Also converts values to their respective internal types.
|
|
493
|
+
* @function fromObject
|
|
494
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
495
|
+
* @static
|
|
496
|
+
* @param {Object.<string,*>} object Plain object
|
|
497
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage} DraftMessage
|
|
498
|
+
*/
|
|
499
|
+
DraftMessage.fromObject = function fromObject(object) {
|
|
500
|
+
if (object instanceof $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage)
|
|
501
|
+
return object;
|
|
502
|
+
var message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage();
|
|
503
|
+
if (object.text != null)
|
|
504
|
+
message.text = String(object.text);
|
|
505
|
+
if (object.omittedUrl != null)
|
|
506
|
+
message.omittedUrl = String(object.omittedUrl);
|
|
507
|
+
if (object.ctwaContextLinkData != null) {
|
|
508
|
+
if (typeof object.ctwaContextLinkData !== "object")
|
|
509
|
+
throw TypeError(".MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ctwaContextLinkData: object expected");
|
|
510
|
+
message.ctwaContextLinkData = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.fromObject(object.ctwaContextLinkData);
|
|
511
|
+
}
|
|
512
|
+
if (object.ctwaContext != null) {
|
|
513
|
+
if (typeof object.ctwaContext !== "object")
|
|
514
|
+
throw TypeError(".MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ctwaContext: object expected");
|
|
515
|
+
message.ctwaContext = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.fromObject(object.ctwaContext);
|
|
516
|
+
}
|
|
517
|
+
if (object.timestamp != null)
|
|
518
|
+
if ($util.Long)
|
|
519
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false;
|
|
520
|
+
else if (typeof object.timestamp === "string")
|
|
521
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
522
|
+
else if (typeof object.timestamp === "number")
|
|
523
|
+
message.timestamp = object.timestamp;
|
|
524
|
+
else if (typeof object.timestamp === "object")
|
|
525
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber();
|
|
526
|
+
return message;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* Creates a plain object from a DraftMessage message. Also converts values to other types if specified.
|
|
530
|
+
* @function toObject
|
|
531
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
532
|
+
* @static
|
|
533
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage} message DraftMessage
|
|
534
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
535
|
+
* @returns {Object.<string,*>} Plain object
|
|
536
|
+
*/
|
|
537
|
+
DraftMessage.toObject = function toObject(message, options) {
|
|
538
|
+
if (!options)
|
|
539
|
+
options = {};
|
|
540
|
+
var object = {};
|
|
541
|
+
if (message.text != null && message.hasOwnProperty("text")) {
|
|
542
|
+
object.text = message.text;
|
|
543
|
+
if (options.oneofs)
|
|
544
|
+
object._text = "text";
|
|
545
|
+
}
|
|
546
|
+
if (message.omittedUrl != null && message.hasOwnProperty("omittedUrl")) {
|
|
547
|
+
object.omittedUrl = message.omittedUrl;
|
|
548
|
+
if (options.oneofs)
|
|
549
|
+
object._omittedUrl = "omittedUrl";
|
|
550
|
+
}
|
|
551
|
+
if (message.ctwaContextLinkData != null && message.hasOwnProperty("ctwaContextLinkData")) {
|
|
552
|
+
object.ctwaContextLinkData = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.toObject(message.ctwaContextLinkData, options);
|
|
553
|
+
if (options.oneofs)
|
|
554
|
+
object._ctwaContextLinkData = "ctwaContextLinkData";
|
|
555
|
+
}
|
|
556
|
+
if (message.ctwaContext != null && message.hasOwnProperty("ctwaContext")) {
|
|
557
|
+
object.ctwaContext = $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.toObject(message.ctwaContext, options);
|
|
558
|
+
if (options.oneofs)
|
|
559
|
+
object._ctwaContext = "ctwaContext";
|
|
560
|
+
}
|
|
561
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
562
|
+
if (typeof message.timestamp === "number")
|
|
563
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
564
|
+
else
|
|
565
|
+
object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber() : message.timestamp;
|
|
566
|
+
if (options.oneofs)
|
|
567
|
+
object._timestamp = "timestamp";
|
|
568
|
+
}
|
|
569
|
+
return object;
|
|
570
|
+
};
|
|
571
|
+
/**
|
|
572
|
+
* Converts this DraftMessage to JSON.
|
|
573
|
+
* @function toJSON
|
|
574
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
575
|
+
* @instance
|
|
576
|
+
* @returns {Object.<string,*>} JSON object
|
|
577
|
+
*/
|
|
578
|
+
DraftMessage.prototype.toJSON = function toJSON() {
|
|
579
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* Gets the default type url for DraftMessage
|
|
583
|
+
* @function getTypeUrl
|
|
584
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
585
|
+
* @static
|
|
586
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
587
|
+
* @returns {string} The default type url
|
|
588
|
+
*/
|
|
589
|
+
DraftMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
590
|
+
if (typeUrlPrefix === undefined) {
|
|
591
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
592
|
+
}
|
|
593
|
+
return typeUrlPrefix + "/MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage";
|
|
594
|
+
};
|
|
595
|
+
DraftMessage.CtwaContextData = (function() {
|
|
596
|
+
/**
|
|
597
|
+
* Properties of a CtwaContextData.
|
|
598
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
599
|
+
* @interface ICtwaContextData
|
|
600
|
+
* @property {string|null} [conversionSource] CtwaContextData conversionSource
|
|
601
|
+
* @property {Uint8Array|null} [conversionData] CtwaContextData conversionData
|
|
602
|
+
* @property {string|null} [sourceUrl] CtwaContextData sourceUrl
|
|
603
|
+
* @property {string|null} [sourceId] CtwaContextData sourceId
|
|
604
|
+
* @property {string|null} [sourceType] CtwaContextData sourceType
|
|
605
|
+
* @property {string|null} [title] CtwaContextData title
|
|
606
|
+
* @property {string|null} [description] CtwaContextData description
|
|
607
|
+
* @property {string|null} [thumbnail] CtwaContextData thumbnail
|
|
608
|
+
* @property {string|null} [thumbnailUrl] CtwaContextData thumbnailUrl
|
|
609
|
+
* @property {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null} [mediaType] CtwaContextData mediaType
|
|
610
|
+
* @property {string|null} [mediaUrl] CtwaContextData mediaUrl
|
|
611
|
+
* @property {boolean|null} [isSuspiciousLink] CtwaContextData isSuspiciousLink
|
|
612
|
+
*/
|
|
613
|
+
/**
|
|
614
|
+
* Constructs a new CtwaContextData.
|
|
615
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
616
|
+
* @classdesc Represents a CtwaContextData.
|
|
617
|
+
* @implements ICtwaContextData
|
|
618
|
+
* @constructor
|
|
619
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData=} [properties] Properties to set
|
|
620
|
+
*/
|
|
621
|
+
function CtwaContextData(properties) {
|
|
622
|
+
if (properties)
|
|
623
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
624
|
+
if (properties[keys[i]] != null)
|
|
625
|
+
this[keys[i]] = properties[keys[i]];
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* CtwaContextData conversionSource.
|
|
629
|
+
* @member {string|null|undefined} conversionSource
|
|
630
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
631
|
+
* @instance
|
|
632
|
+
*/
|
|
633
|
+
CtwaContextData.prototype.conversionSource = null;
|
|
634
|
+
/**
|
|
635
|
+
* CtwaContextData conversionData.
|
|
636
|
+
* @member {Uint8Array|null|undefined} conversionData
|
|
637
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
638
|
+
* @instance
|
|
639
|
+
*/
|
|
640
|
+
CtwaContextData.prototype.conversionData = null;
|
|
641
|
+
/**
|
|
642
|
+
* CtwaContextData sourceUrl.
|
|
643
|
+
* @member {string|null|undefined} sourceUrl
|
|
644
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
645
|
+
* @instance
|
|
646
|
+
*/
|
|
647
|
+
CtwaContextData.prototype.sourceUrl = null;
|
|
648
|
+
/**
|
|
649
|
+
* CtwaContextData sourceId.
|
|
650
|
+
* @member {string|null|undefined} sourceId
|
|
651
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
652
|
+
* @instance
|
|
653
|
+
*/
|
|
654
|
+
CtwaContextData.prototype.sourceId = null;
|
|
655
|
+
/**
|
|
656
|
+
* CtwaContextData sourceType.
|
|
657
|
+
* @member {string|null|undefined} sourceType
|
|
658
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
659
|
+
* @instance
|
|
660
|
+
*/
|
|
661
|
+
CtwaContextData.prototype.sourceType = null;
|
|
662
|
+
/**
|
|
663
|
+
* CtwaContextData title.
|
|
664
|
+
* @member {string|null|undefined} title
|
|
665
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
666
|
+
* @instance
|
|
667
|
+
*/
|
|
668
|
+
CtwaContextData.prototype.title = null;
|
|
669
|
+
/**
|
|
670
|
+
* CtwaContextData description.
|
|
671
|
+
* @member {string|null|undefined} description
|
|
672
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
673
|
+
* @instance
|
|
674
|
+
*/
|
|
675
|
+
CtwaContextData.prototype.description = null;
|
|
676
|
+
/**
|
|
677
|
+
* CtwaContextData thumbnail.
|
|
678
|
+
* @member {string|null|undefined} thumbnail
|
|
679
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
680
|
+
* @instance
|
|
681
|
+
*/
|
|
682
|
+
CtwaContextData.prototype.thumbnail = null;
|
|
683
|
+
/**
|
|
684
|
+
* CtwaContextData thumbnailUrl.
|
|
685
|
+
* @member {string|null|undefined} thumbnailUrl
|
|
686
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
687
|
+
* @instance
|
|
688
|
+
*/
|
|
689
|
+
CtwaContextData.prototype.thumbnailUrl = null;
|
|
690
|
+
/**
|
|
691
|
+
* CtwaContextData mediaType.
|
|
692
|
+
* @member {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType|null|undefined} mediaType
|
|
693
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
694
|
+
* @instance
|
|
695
|
+
*/
|
|
696
|
+
CtwaContextData.prototype.mediaType = null;
|
|
697
|
+
/**
|
|
698
|
+
* CtwaContextData mediaUrl.
|
|
699
|
+
* @member {string|null|undefined} mediaUrl
|
|
700
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
701
|
+
* @instance
|
|
702
|
+
*/
|
|
703
|
+
CtwaContextData.prototype.mediaUrl = null;
|
|
704
|
+
/**
|
|
705
|
+
* CtwaContextData isSuspiciousLink.
|
|
706
|
+
* @member {boolean|null|undefined} isSuspiciousLink
|
|
707
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
708
|
+
* @instance
|
|
709
|
+
*/
|
|
710
|
+
CtwaContextData.prototype.isSuspiciousLink = null;
|
|
711
|
+
// OneOf field names bound to virtual getters and setters
|
|
712
|
+
var $oneOfFields;
|
|
713
|
+
/**
|
|
714
|
+
* CtwaContextData _conversionSource.
|
|
715
|
+
* @member {"conversionSource"|undefined} _conversionSource
|
|
716
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
717
|
+
* @instance
|
|
718
|
+
*/
|
|
719
|
+
Object.defineProperty(CtwaContextData.prototype, "_conversionSource", {
|
|
720
|
+
get: $util.oneOfGetter($oneOfFields = ["conversionSource"]),
|
|
721
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
722
|
+
});
|
|
723
|
+
/**
|
|
724
|
+
* CtwaContextData _conversionData.
|
|
725
|
+
* @member {"conversionData"|undefined} _conversionData
|
|
726
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
727
|
+
* @instance
|
|
728
|
+
*/
|
|
729
|
+
Object.defineProperty(CtwaContextData.prototype, "_conversionData", {
|
|
730
|
+
get: $util.oneOfGetter($oneOfFields = ["conversionData"]),
|
|
731
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
732
|
+
});
|
|
733
|
+
/**
|
|
734
|
+
* CtwaContextData _sourceUrl.
|
|
735
|
+
* @member {"sourceUrl"|undefined} _sourceUrl
|
|
736
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
737
|
+
* @instance
|
|
738
|
+
*/
|
|
739
|
+
Object.defineProperty(CtwaContextData.prototype, "_sourceUrl", {
|
|
740
|
+
get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
|
|
741
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
742
|
+
});
|
|
743
|
+
/**
|
|
744
|
+
* CtwaContextData _sourceId.
|
|
745
|
+
* @member {"sourceId"|undefined} _sourceId
|
|
746
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
747
|
+
* @instance
|
|
748
|
+
*/
|
|
749
|
+
Object.defineProperty(CtwaContextData.prototype, "_sourceId", {
|
|
750
|
+
get: $util.oneOfGetter($oneOfFields = ["sourceId"]),
|
|
751
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
752
|
+
});
|
|
753
|
+
/**
|
|
754
|
+
* CtwaContextData _sourceType.
|
|
755
|
+
* @member {"sourceType"|undefined} _sourceType
|
|
756
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
757
|
+
* @instance
|
|
758
|
+
*/
|
|
759
|
+
Object.defineProperty(CtwaContextData.prototype, "_sourceType", {
|
|
760
|
+
get: $util.oneOfGetter($oneOfFields = ["sourceType"]),
|
|
761
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
762
|
+
});
|
|
763
|
+
/**
|
|
764
|
+
* CtwaContextData _title.
|
|
765
|
+
* @member {"title"|undefined} _title
|
|
766
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
767
|
+
* @instance
|
|
768
|
+
*/
|
|
769
|
+
Object.defineProperty(CtwaContextData.prototype, "_title", {
|
|
770
|
+
get: $util.oneOfGetter($oneOfFields = ["title"]),
|
|
771
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
772
|
+
});
|
|
773
|
+
/**
|
|
774
|
+
* CtwaContextData _description.
|
|
775
|
+
* @member {"description"|undefined} _description
|
|
776
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
777
|
+
* @instance
|
|
778
|
+
*/
|
|
779
|
+
Object.defineProperty(CtwaContextData.prototype, "_description", {
|
|
780
|
+
get: $util.oneOfGetter($oneOfFields = ["description"]),
|
|
781
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
782
|
+
});
|
|
783
|
+
/**
|
|
784
|
+
* CtwaContextData _thumbnail.
|
|
785
|
+
* @member {"thumbnail"|undefined} _thumbnail
|
|
786
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
787
|
+
* @instance
|
|
788
|
+
*/
|
|
789
|
+
Object.defineProperty(CtwaContextData.prototype, "_thumbnail", {
|
|
790
|
+
get: $util.oneOfGetter($oneOfFields = ["thumbnail"]),
|
|
791
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
792
|
+
});
|
|
793
|
+
/**
|
|
794
|
+
* CtwaContextData _thumbnailUrl.
|
|
795
|
+
* @member {"thumbnailUrl"|undefined} _thumbnailUrl
|
|
796
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
797
|
+
* @instance
|
|
798
|
+
*/
|
|
799
|
+
Object.defineProperty(CtwaContextData.prototype, "_thumbnailUrl", {
|
|
800
|
+
get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]),
|
|
801
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
802
|
+
});
|
|
803
|
+
/**
|
|
804
|
+
* CtwaContextData _mediaType.
|
|
805
|
+
* @member {"mediaType"|undefined} _mediaType
|
|
806
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
807
|
+
* @instance
|
|
808
|
+
*/
|
|
809
|
+
Object.defineProperty(CtwaContextData.prototype, "_mediaType", {
|
|
810
|
+
get: $util.oneOfGetter($oneOfFields = ["mediaType"]),
|
|
811
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
812
|
+
});
|
|
813
|
+
/**
|
|
814
|
+
* CtwaContextData _mediaUrl.
|
|
815
|
+
* @member {"mediaUrl"|undefined} _mediaUrl
|
|
816
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
817
|
+
* @instance
|
|
818
|
+
*/
|
|
819
|
+
Object.defineProperty(CtwaContextData.prototype, "_mediaUrl", {
|
|
820
|
+
get: $util.oneOfGetter($oneOfFields = ["mediaUrl"]),
|
|
821
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
822
|
+
});
|
|
823
|
+
/**
|
|
824
|
+
* CtwaContextData _isSuspiciousLink.
|
|
825
|
+
* @member {"isSuspiciousLink"|undefined} _isSuspiciousLink
|
|
826
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
827
|
+
* @instance
|
|
828
|
+
*/
|
|
829
|
+
Object.defineProperty(CtwaContextData.prototype, "_isSuspiciousLink", {
|
|
830
|
+
get: $util.oneOfGetter($oneOfFields = ["isSuspiciousLink"]),
|
|
831
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
832
|
+
});
|
|
833
|
+
/**
|
|
834
|
+
* Creates a new CtwaContextData instance using the specified properties.
|
|
835
|
+
* @function create
|
|
836
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
837
|
+
* @static
|
|
838
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData=} [properties] Properties to set
|
|
839
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData instance
|
|
840
|
+
*/
|
|
841
|
+
CtwaContextData.create = function create(properties) {
|
|
842
|
+
return new CtwaContextData(properties);
|
|
843
|
+
};
|
|
844
|
+
/**
|
|
845
|
+
* Encodes the specified CtwaContextData message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages.
|
|
846
|
+
* @function encode
|
|
847
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
848
|
+
* @static
|
|
849
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData} message CtwaContextData message or plain object to encode
|
|
850
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
851
|
+
* @returns {$protobuf.Writer} Writer
|
|
852
|
+
*/
|
|
853
|
+
CtwaContextData.encode = function encode(message, writer) {
|
|
854
|
+
if (!writer)
|
|
855
|
+
writer = $Writer.create();
|
|
856
|
+
if (message.conversionSource != null && Object.hasOwnProperty.call(message, "conversionSource"))
|
|
857
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.conversionSource);
|
|
858
|
+
if (message.conversionData != null && Object.hasOwnProperty.call(message, "conversionData"))
|
|
859
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.conversionData);
|
|
860
|
+
if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
|
|
861
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceUrl);
|
|
862
|
+
if (message.sourceId != null && Object.hasOwnProperty.call(message, "sourceId"))
|
|
863
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.sourceId);
|
|
864
|
+
if (message.sourceType != null && Object.hasOwnProperty.call(message, "sourceType"))
|
|
865
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.sourceType);
|
|
866
|
+
if (message.title != null && Object.hasOwnProperty.call(message, "title"))
|
|
867
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.title);
|
|
868
|
+
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
|
|
869
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.description);
|
|
870
|
+
if (message.thumbnail != null && Object.hasOwnProperty.call(message, "thumbnail"))
|
|
871
|
+
writer.uint32(/* id 8, wireType 2 =*/66).string(message.thumbnail);
|
|
872
|
+
if (message.thumbnailUrl != null && Object.hasOwnProperty.call(message, "thumbnailUrl"))
|
|
873
|
+
writer.uint32(/* id 9, wireType 2 =*/74).string(message.thumbnailUrl);
|
|
874
|
+
if (message.mediaType != null && Object.hasOwnProperty.call(message, "mediaType"))
|
|
875
|
+
writer.uint32(/* id 10, wireType 0 =*/80).int32(message.mediaType);
|
|
876
|
+
if (message.mediaUrl != null && Object.hasOwnProperty.call(message, "mediaUrl"))
|
|
877
|
+
writer.uint32(/* id 11, wireType 2 =*/90).string(message.mediaUrl);
|
|
878
|
+
if (message.isSuspiciousLink != null && Object.hasOwnProperty.call(message, "isSuspiciousLink"))
|
|
879
|
+
writer.uint32(/* id 12, wireType 0 =*/96).bool(message.isSuspiciousLink);
|
|
880
|
+
return writer;
|
|
881
|
+
};
|
|
882
|
+
/**
|
|
883
|
+
* Encodes the specified CtwaContextData message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.verify|verify} messages.
|
|
884
|
+
* @function encodeDelimited
|
|
885
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
886
|
+
* @static
|
|
887
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextData} message CtwaContextData message or plain object to encode
|
|
888
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
889
|
+
* @returns {$protobuf.Writer} Writer
|
|
890
|
+
*/
|
|
891
|
+
CtwaContextData.encodeDelimited = function encodeDelimited(message, writer) {
|
|
892
|
+
return this.encode(message, writer).ldelim();
|
|
893
|
+
};
|
|
894
|
+
/**
|
|
895
|
+
* Decodes a CtwaContextData message from the specified reader or buffer.
|
|
896
|
+
* @function decode
|
|
897
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
898
|
+
* @static
|
|
899
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
900
|
+
* @param {number} [length] Message length if known beforehand
|
|
901
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData
|
|
902
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
903
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
904
|
+
*/
|
|
905
|
+
CtwaContextData.decode = function decode(reader, length, error) {
|
|
906
|
+
if (!(reader instanceof $Reader))
|
|
907
|
+
reader = $Reader.create(reader);
|
|
908
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData();
|
|
909
|
+
while (reader.pos < end) {
|
|
910
|
+
var tag = reader.uint32();
|
|
911
|
+
if (tag === error)
|
|
912
|
+
break;
|
|
913
|
+
switch (tag >>> 3) {
|
|
914
|
+
case 1: {
|
|
915
|
+
message.conversionSource = reader.string();
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
case 2: {
|
|
919
|
+
message.conversionData = reader.bytes();
|
|
920
|
+
break;
|
|
921
|
+
}
|
|
922
|
+
case 3: {
|
|
923
|
+
message.sourceUrl = reader.string();
|
|
924
|
+
break;
|
|
925
|
+
}
|
|
926
|
+
case 4: {
|
|
927
|
+
message.sourceId = reader.string();
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
case 5: {
|
|
931
|
+
message.sourceType = reader.string();
|
|
932
|
+
break;
|
|
933
|
+
}
|
|
934
|
+
case 6: {
|
|
935
|
+
message.title = reader.string();
|
|
936
|
+
break;
|
|
937
|
+
}
|
|
938
|
+
case 7: {
|
|
939
|
+
message.description = reader.string();
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
case 8: {
|
|
943
|
+
message.thumbnail = reader.string();
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
case 9: {
|
|
947
|
+
message.thumbnailUrl = reader.string();
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
950
|
+
case 10: {
|
|
951
|
+
message.mediaType = reader.int32();
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
case 11: {
|
|
955
|
+
message.mediaUrl = reader.string();
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
case 12: {
|
|
959
|
+
message.isSuspiciousLink = reader.bool();
|
|
960
|
+
break;
|
|
961
|
+
}
|
|
962
|
+
default:
|
|
963
|
+
reader.skipType(tag & 7);
|
|
964
|
+
break;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
return message;
|
|
968
|
+
};
|
|
969
|
+
/**
|
|
970
|
+
* Decodes a CtwaContextData message from the specified reader or buffer, length delimited.
|
|
971
|
+
* @function decodeDelimited
|
|
972
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
973
|
+
* @static
|
|
974
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
975
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData
|
|
976
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
977
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
978
|
+
*/
|
|
979
|
+
CtwaContextData.decodeDelimited = function decodeDelimited(reader) {
|
|
980
|
+
if (!(reader instanceof $Reader))
|
|
981
|
+
reader = new $Reader(reader);
|
|
982
|
+
return this.decode(reader, reader.uint32());
|
|
983
|
+
};
|
|
984
|
+
/**
|
|
985
|
+
* Verifies a CtwaContextData message.
|
|
986
|
+
* @function verify
|
|
987
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
988
|
+
* @static
|
|
989
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
990
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
991
|
+
*/
|
|
992
|
+
CtwaContextData.verify = function verify(message) {
|
|
993
|
+
if (typeof message !== "object" || message === null)
|
|
994
|
+
return "object expected";
|
|
995
|
+
var properties = {};
|
|
996
|
+
if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) {
|
|
997
|
+
properties._conversionSource = 1;
|
|
998
|
+
if (!$util.isString(message.conversionSource))
|
|
999
|
+
return "conversionSource: string expected";
|
|
1000
|
+
}
|
|
1001
|
+
if (message.conversionData != null && message.hasOwnProperty("conversionData")) {
|
|
1002
|
+
properties._conversionData = 1;
|
|
1003
|
+
if (!(message.conversionData && typeof message.conversionData.length === "number" || $util.isString(message.conversionData)))
|
|
1004
|
+
return "conversionData: buffer expected";
|
|
1005
|
+
}
|
|
1006
|
+
if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
|
|
1007
|
+
properties._sourceUrl = 1;
|
|
1008
|
+
if (!$util.isString(message.sourceUrl))
|
|
1009
|
+
return "sourceUrl: string expected";
|
|
1010
|
+
}
|
|
1011
|
+
if (message.sourceId != null && message.hasOwnProperty("sourceId")) {
|
|
1012
|
+
properties._sourceId = 1;
|
|
1013
|
+
if (!$util.isString(message.sourceId))
|
|
1014
|
+
return "sourceId: string expected";
|
|
1015
|
+
}
|
|
1016
|
+
if (message.sourceType != null && message.hasOwnProperty("sourceType")) {
|
|
1017
|
+
properties._sourceType = 1;
|
|
1018
|
+
if (!$util.isString(message.sourceType))
|
|
1019
|
+
return "sourceType: string expected";
|
|
1020
|
+
}
|
|
1021
|
+
if (message.title != null && message.hasOwnProperty("title")) {
|
|
1022
|
+
properties._title = 1;
|
|
1023
|
+
if (!$util.isString(message.title))
|
|
1024
|
+
return "title: string expected";
|
|
1025
|
+
}
|
|
1026
|
+
if (message.description != null && message.hasOwnProperty("description")) {
|
|
1027
|
+
properties._description = 1;
|
|
1028
|
+
if (!$util.isString(message.description))
|
|
1029
|
+
return "description: string expected";
|
|
1030
|
+
}
|
|
1031
|
+
if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
|
|
1032
|
+
properties._thumbnail = 1;
|
|
1033
|
+
if (!$util.isString(message.thumbnail))
|
|
1034
|
+
return "thumbnail: string expected";
|
|
1035
|
+
}
|
|
1036
|
+
if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
|
|
1037
|
+
properties._thumbnailUrl = 1;
|
|
1038
|
+
if (!$util.isString(message.thumbnailUrl))
|
|
1039
|
+
return "thumbnailUrl: string expected";
|
|
1040
|
+
}
|
|
1041
|
+
if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
|
|
1042
|
+
properties._mediaType = 1;
|
|
1043
|
+
switch (message.mediaType) {
|
|
1044
|
+
default:
|
|
1045
|
+
return "mediaType: enum value expected";
|
|
1046
|
+
case 0:
|
|
1047
|
+
case 1:
|
|
1048
|
+
case 2:
|
|
1049
|
+
break;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) {
|
|
1053
|
+
properties._mediaUrl = 1;
|
|
1054
|
+
if (!$util.isString(message.mediaUrl))
|
|
1055
|
+
return "mediaUrl: string expected";
|
|
1056
|
+
}
|
|
1057
|
+
if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) {
|
|
1058
|
+
properties._isSuspiciousLink = 1;
|
|
1059
|
+
if (typeof message.isSuspiciousLink !== "boolean")
|
|
1060
|
+
return "isSuspiciousLink: boolean expected";
|
|
1061
|
+
}
|
|
1062
|
+
return null;
|
|
1063
|
+
};
|
|
1064
|
+
/**
|
|
1065
|
+
* Creates a CtwaContextData message from a plain object. Also converts values to their respective internal types.
|
|
1066
|
+
* @function fromObject
|
|
1067
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
1068
|
+
* @static
|
|
1069
|
+
* @param {Object.<string,*>} object Plain object
|
|
1070
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData} CtwaContextData
|
|
1071
|
+
*/
|
|
1072
|
+
CtwaContextData.fromObject = function fromObject(object) {
|
|
1073
|
+
if (object instanceof $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData)
|
|
1074
|
+
return object;
|
|
1075
|
+
var message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData();
|
|
1076
|
+
if (object.conversionSource != null)
|
|
1077
|
+
message.conversionSource = String(object.conversionSource);
|
|
1078
|
+
if (object.conversionData != null)
|
|
1079
|
+
if (typeof object.conversionData === "string")
|
|
1080
|
+
$util.base64.decode(object.conversionData, message.conversionData = $util.newBuffer($util.base64.length(object.conversionData)), 0);
|
|
1081
|
+
else if (object.conversionData.length >= 0)
|
|
1082
|
+
message.conversionData = object.conversionData;
|
|
1083
|
+
if (object.sourceUrl != null)
|
|
1084
|
+
message.sourceUrl = String(object.sourceUrl);
|
|
1085
|
+
if (object.sourceId != null)
|
|
1086
|
+
message.sourceId = String(object.sourceId);
|
|
1087
|
+
if (object.sourceType != null)
|
|
1088
|
+
message.sourceType = String(object.sourceType);
|
|
1089
|
+
if (object.title != null)
|
|
1090
|
+
message.title = String(object.title);
|
|
1091
|
+
if (object.description != null)
|
|
1092
|
+
message.description = String(object.description);
|
|
1093
|
+
if (object.thumbnail != null)
|
|
1094
|
+
message.thumbnail = String(object.thumbnail);
|
|
1095
|
+
if (object.thumbnailUrl != null)
|
|
1096
|
+
message.thumbnailUrl = String(object.thumbnailUrl);
|
|
1097
|
+
switch (object.mediaType) {
|
|
1098
|
+
default:
|
|
1099
|
+
if (typeof object.mediaType === "number") {
|
|
1100
|
+
message.mediaType = object.mediaType;
|
|
1101
|
+
break;
|
|
1102
|
+
}
|
|
1103
|
+
break;
|
|
1104
|
+
case "NONE":
|
|
1105
|
+
case 0:
|
|
1106
|
+
message.mediaType = 0;
|
|
1107
|
+
break;
|
|
1108
|
+
case "IMAGE":
|
|
1109
|
+
case 1:
|
|
1110
|
+
message.mediaType = 1;
|
|
1111
|
+
break;
|
|
1112
|
+
case "VIDEO":
|
|
1113
|
+
case 2:
|
|
1114
|
+
message.mediaType = 2;
|
|
1115
|
+
break;
|
|
1116
|
+
}
|
|
1117
|
+
if (object.mediaUrl != null)
|
|
1118
|
+
message.mediaUrl = String(object.mediaUrl);
|
|
1119
|
+
if (object.isSuspiciousLink != null)
|
|
1120
|
+
message.isSuspiciousLink = Boolean(object.isSuspiciousLink);
|
|
1121
|
+
return message;
|
|
1122
|
+
};
|
|
1123
|
+
/**
|
|
1124
|
+
* Creates a plain object from a CtwaContextData message. Also converts values to other types if specified.
|
|
1125
|
+
* @function toObject
|
|
1126
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
1127
|
+
* @static
|
|
1128
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData} message CtwaContextData
|
|
1129
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1130
|
+
* @returns {Object.<string,*>} Plain object
|
|
1131
|
+
*/
|
|
1132
|
+
CtwaContextData.toObject = function toObject(message, options) {
|
|
1133
|
+
if (!options)
|
|
1134
|
+
options = {};
|
|
1135
|
+
var object = {};
|
|
1136
|
+
if (message.conversionSource != null && message.hasOwnProperty("conversionSource")) {
|
|
1137
|
+
object.conversionSource = message.conversionSource;
|
|
1138
|
+
if (options.oneofs)
|
|
1139
|
+
object._conversionSource = "conversionSource";
|
|
1140
|
+
}
|
|
1141
|
+
if (message.conversionData != null && message.hasOwnProperty("conversionData")) {
|
|
1142
|
+
object.conversionData = options.bytes === String ? $util.base64.encode(message.conversionData, 0, message.conversionData.length) : options.bytes === Array ? Array.prototype.slice.call(message.conversionData) : message.conversionData;
|
|
1143
|
+
if (options.oneofs)
|
|
1144
|
+
object._conversionData = "conversionData";
|
|
1145
|
+
}
|
|
1146
|
+
if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
|
|
1147
|
+
object.sourceUrl = message.sourceUrl;
|
|
1148
|
+
if (options.oneofs)
|
|
1149
|
+
object._sourceUrl = "sourceUrl";
|
|
1150
|
+
}
|
|
1151
|
+
if (message.sourceId != null && message.hasOwnProperty("sourceId")) {
|
|
1152
|
+
object.sourceId = message.sourceId;
|
|
1153
|
+
if (options.oneofs)
|
|
1154
|
+
object._sourceId = "sourceId";
|
|
1155
|
+
}
|
|
1156
|
+
if (message.sourceType != null && message.hasOwnProperty("sourceType")) {
|
|
1157
|
+
object.sourceType = message.sourceType;
|
|
1158
|
+
if (options.oneofs)
|
|
1159
|
+
object._sourceType = "sourceType";
|
|
1160
|
+
}
|
|
1161
|
+
if (message.title != null && message.hasOwnProperty("title")) {
|
|
1162
|
+
object.title = message.title;
|
|
1163
|
+
if (options.oneofs)
|
|
1164
|
+
object._title = "title";
|
|
1165
|
+
}
|
|
1166
|
+
if (message.description != null && message.hasOwnProperty("description")) {
|
|
1167
|
+
object.description = message.description;
|
|
1168
|
+
if (options.oneofs)
|
|
1169
|
+
object._description = "description";
|
|
1170
|
+
}
|
|
1171
|
+
if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) {
|
|
1172
|
+
object.thumbnail = message.thumbnail;
|
|
1173
|
+
if (options.oneofs)
|
|
1174
|
+
object._thumbnail = "thumbnail";
|
|
1175
|
+
}
|
|
1176
|
+
if (message.thumbnailUrl != null && message.hasOwnProperty("thumbnailUrl")) {
|
|
1177
|
+
object.thumbnailUrl = message.thumbnailUrl;
|
|
1178
|
+
if (options.oneofs)
|
|
1179
|
+
object._thumbnailUrl = "thumbnailUrl";
|
|
1180
|
+
}
|
|
1181
|
+
if (message.mediaType != null && message.hasOwnProperty("mediaType")) {
|
|
1182
|
+
object.mediaType = options.enums === String ? $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[message.mediaType] === undefined ? message.mediaType : $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType[message.mediaType] : message.mediaType;
|
|
1183
|
+
if (options.oneofs)
|
|
1184
|
+
object._mediaType = "mediaType";
|
|
1185
|
+
}
|
|
1186
|
+
if (message.mediaUrl != null && message.hasOwnProperty("mediaUrl")) {
|
|
1187
|
+
object.mediaUrl = message.mediaUrl;
|
|
1188
|
+
if (options.oneofs)
|
|
1189
|
+
object._mediaUrl = "mediaUrl";
|
|
1190
|
+
}
|
|
1191
|
+
if (message.isSuspiciousLink != null && message.hasOwnProperty("isSuspiciousLink")) {
|
|
1192
|
+
object.isSuspiciousLink = message.isSuspiciousLink;
|
|
1193
|
+
if (options.oneofs)
|
|
1194
|
+
object._isSuspiciousLink = "isSuspiciousLink";
|
|
1195
|
+
}
|
|
1196
|
+
return object;
|
|
1197
|
+
};
|
|
1198
|
+
/**
|
|
1199
|
+
* Converts this CtwaContextData to JSON.
|
|
1200
|
+
* @function toJSON
|
|
1201
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
1202
|
+
* @instance
|
|
1203
|
+
* @returns {Object.<string,*>} JSON object
|
|
1204
|
+
*/
|
|
1205
|
+
CtwaContextData.prototype.toJSON = function toJSON() {
|
|
1206
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1207
|
+
};
|
|
1208
|
+
/**
|
|
1209
|
+
* Gets the default type url for CtwaContextData
|
|
1210
|
+
* @function getTypeUrl
|
|
1211
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData
|
|
1212
|
+
* @static
|
|
1213
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1214
|
+
* @returns {string} The default type url
|
|
1215
|
+
*/
|
|
1216
|
+
CtwaContextData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1217
|
+
if (typeUrlPrefix === undefined) {
|
|
1218
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1219
|
+
}
|
|
1220
|
+
return typeUrlPrefix + "/MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData";
|
|
1221
|
+
};
|
|
1222
|
+
/**
|
|
1223
|
+
* ContextInfoExternalAdReplyInfoMediaType enum.
|
|
1224
|
+
* @name MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextData.ContextInfoExternalAdReplyInfoMediaType
|
|
1225
|
+
* @enum {number}
|
|
1226
|
+
* @property {number} NONE=0 NONE value
|
|
1227
|
+
* @property {number} IMAGE=1 IMAGE value
|
|
1228
|
+
* @property {number} VIDEO=2 VIDEO value
|
|
1229
|
+
*/
|
|
1230
|
+
CtwaContextData.ContextInfoExternalAdReplyInfoMediaType = (function() {
|
|
1231
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
1232
|
+
values[valuesById[0] = "NONE"] = 0;
|
|
1233
|
+
values[valuesById[1] = "IMAGE"] = 1;
|
|
1234
|
+
values[valuesById[2] = "VIDEO"] = 2;
|
|
1235
|
+
return values;
|
|
1236
|
+
})();
|
|
1237
|
+
return CtwaContextData;
|
|
1238
|
+
})();
|
|
1239
|
+
DraftMessage.CtwaContextLinkData = (function() {
|
|
1240
|
+
/**
|
|
1241
|
+
* Properties of a CtwaContextLinkData.
|
|
1242
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
1243
|
+
* @interface ICtwaContextLinkData
|
|
1244
|
+
* @property {string|null} [context] CtwaContextLinkData context
|
|
1245
|
+
* @property {string|null} [sourceUrl] CtwaContextLinkData sourceUrl
|
|
1246
|
+
* @property {string|null} [icebreaker] CtwaContextLinkData icebreaker
|
|
1247
|
+
* @property {string|null} [phone] CtwaContextLinkData phone
|
|
1248
|
+
*/
|
|
1249
|
+
/**
|
|
1250
|
+
* Constructs a new CtwaContextLinkData.
|
|
1251
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage
|
|
1252
|
+
* @classdesc Represents a CtwaContextLinkData.
|
|
1253
|
+
* @implements ICtwaContextLinkData
|
|
1254
|
+
* @constructor
|
|
1255
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData=} [properties] Properties to set
|
|
1256
|
+
*/
|
|
1257
|
+
function CtwaContextLinkData(properties) {
|
|
1258
|
+
if (properties)
|
|
1259
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1260
|
+
if (properties[keys[i]] != null)
|
|
1261
|
+
this[keys[i]] = properties[keys[i]];
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* CtwaContextLinkData context.
|
|
1265
|
+
* @member {string|null|undefined} context
|
|
1266
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1267
|
+
* @instance
|
|
1268
|
+
*/
|
|
1269
|
+
CtwaContextLinkData.prototype.context = null;
|
|
1270
|
+
/**
|
|
1271
|
+
* CtwaContextLinkData sourceUrl.
|
|
1272
|
+
* @member {string|null|undefined} sourceUrl
|
|
1273
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1274
|
+
* @instance
|
|
1275
|
+
*/
|
|
1276
|
+
CtwaContextLinkData.prototype.sourceUrl = null;
|
|
1277
|
+
/**
|
|
1278
|
+
* CtwaContextLinkData icebreaker.
|
|
1279
|
+
* @member {string|null|undefined} icebreaker
|
|
1280
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1281
|
+
* @instance
|
|
1282
|
+
*/
|
|
1283
|
+
CtwaContextLinkData.prototype.icebreaker = null;
|
|
1284
|
+
/**
|
|
1285
|
+
* CtwaContextLinkData phone.
|
|
1286
|
+
* @member {string|null|undefined} phone
|
|
1287
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1288
|
+
* @instance
|
|
1289
|
+
*/
|
|
1290
|
+
CtwaContextLinkData.prototype.phone = null;
|
|
1291
|
+
// OneOf field names bound to virtual getters and setters
|
|
1292
|
+
var $oneOfFields;
|
|
1293
|
+
/**
|
|
1294
|
+
* CtwaContextLinkData _context.
|
|
1295
|
+
* @member {"context"|undefined} _context
|
|
1296
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1297
|
+
* @instance
|
|
1298
|
+
*/
|
|
1299
|
+
Object.defineProperty(CtwaContextLinkData.prototype, "_context", {
|
|
1300
|
+
get: $util.oneOfGetter($oneOfFields = ["context"]),
|
|
1301
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1302
|
+
});
|
|
1303
|
+
/**
|
|
1304
|
+
* CtwaContextLinkData _sourceUrl.
|
|
1305
|
+
* @member {"sourceUrl"|undefined} _sourceUrl
|
|
1306
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1307
|
+
* @instance
|
|
1308
|
+
*/
|
|
1309
|
+
Object.defineProperty(CtwaContextLinkData.prototype, "_sourceUrl", {
|
|
1310
|
+
get: $util.oneOfGetter($oneOfFields = ["sourceUrl"]),
|
|
1311
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1312
|
+
});
|
|
1313
|
+
/**
|
|
1314
|
+
* CtwaContextLinkData _icebreaker.
|
|
1315
|
+
* @member {"icebreaker"|undefined} _icebreaker
|
|
1316
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1317
|
+
* @instance
|
|
1318
|
+
*/
|
|
1319
|
+
Object.defineProperty(CtwaContextLinkData.prototype, "_icebreaker", {
|
|
1320
|
+
get: $util.oneOfGetter($oneOfFields = ["icebreaker"]),
|
|
1321
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1322
|
+
});
|
|
1323
|
+
/**
|
|
1324
|
+
* CtwaContextLinkData _phone.
|
|
1325
|
+
* @member {"phone"|undefined} _phone
|
|
1326
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1327
|
+
* @instance
|
|
1328
|
+
*/
|
|
1329
|
+
Object.defineProperty(CtwaContextLinkData.prototype, "_phone", {
|
|
1330
|
+
get: $util.oneOfGetter($oneOfFields = ["phone"]),
|
|
1331
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1332
|
+
});
|
|
1333
|
+
/**
|
|
1334
|
+
* Creates a new CtwaContextLinkData instance using the specified properties.
|
|
1335
|
+
* @function create
|
|
1336
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1337
|
+
* @static
|
|
1338
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData=} [properties] Properties to set
|
|
1339
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData instance
|
|
1340
|
+
*/
|
|
1341
|
+
CtwaContextLinkData.create = function create(properties) {
|
|
1342
|
+
return new CtwaContextLinkData(properties);
|
|
1343
|
+
};
|
|
1344
|
+
/**
|
|
1345
|
+
* Encodes the specified CtwaContextLinkData message. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages.
|
|
1346
|
+
* @function encode
|
|
1347
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1348
|
+
* @static
|
|
1349
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData} message CtwaContextLinkData message or plain object to encode
|
|
1350
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1351
|
+
* @returns {$protobuf.Writer} Writer
|
|
1352
|
+
*/
|
|
1353
|
+
CtwaContextLinkData.encode = function encode(message, writer) {
|
|
1354
|
+
if (!writer)
|
|
1355
|
+
writer = $Writer.create();
|
|
1356
|
+
if (message.context != null && Object.hasOwnProperty.call(message, "context"))
|
|
1357
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.context);
|
|
1358
|
+
if (message.sourceUrl != null && Object.hasOwnProperty.call(message, "sourceUrl"))
|
|
1359
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceUrl);
|
|
1360
|
+
if (message.icebreaker != null && Object.hasOwnProperty.call(message, "icebreaker"))
|
|
1361
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.icebreaker);
|
|
1362
|
+
if (message.phone != null && Object.hasOwnProperty.call(message, "phone"))
|
|
1363
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.phone);
|
|
1364
|
+
return writer;
|
|
1365
|
+
};
|
|
1366
|
+
/**
|
|
1367
|
+
* Encodes the specified CtwaContextLinkData message, length delimited. Does not implicitly {@link MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData.verify|verify} messages.
|
|
1368
|
+
* @function encodeDelimited
|
|
1369
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1370
|
+
* @static
|
|
1371
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.ICtwaContextLinkData} message CtwaContextLinkData message or plain object to encode
|
|
1372
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1373
|
+
* @returns {$protobuf.Writer} Writer
|
|
1374
|
+
*/
|
|
1375
|
+
CtwaContextLinkData.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1376
|
+
return this.encode(message, writer).ldelim();
|
|
1377
|
+
};
|
|
1378
|
+
/**
|
|
1379
|
+
* Decodes a CtwaContextLinkData message from the specified reader or buffer.
|
|
1380
|
+
* @function decode
|
|
1381
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1382
|
+
* @static
|
|
1383
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1384
|
+
* @param {number} [length] Message length if known beforehand
|
|
1385
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData
|
|
1386
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1387
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1388
|
+
*/
|
|
1389
|
+
CtwaContextLinkData.decode = function decode(reader, length, error) {
|
|
1390
|
+
if (!(reader instanceof $Reader))
|
|
1391
|
+
reader = $Reader.create(reader);
|
|
1392
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData();
|
|
1393
|
+
while (reader.pos < end) {
|
|
1394
|
+
var tag = reader.uint32();
|
|
1395
|
+
if (tag === error)
|
|
1396
|
+
break;
|
|
1397
|
+
switch (tag >>> 3) {
|
|
1398
|
+
case 1: {
|
|
1399
|
+
message.context = reader.string();
|
|
1400
|
+
break;
|
|
1401
|
+
}
|
|
1402
|
+
case 2: {
|
|
1403
|
+
message.sourceUrl = reader.string();
|
|
1404
|
+
break;
|
|
1405
|
+
}
|
|
1406
|
+
case 3: {
|
|
1407
|
+
message.icebreaker = reader.string();
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
case 4: {
|
|
1411
|
+
message.phone = reader.string();
|
|
1412
|
+
break;
|
|
1413
|
+
}
|
|
1414
|
+
default:
|
|
1415
|
+
reader.skipType(tag & 7);
|
|
1416
|
+
break;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
return message;
|
|
1420
|
+
};
|
|
1421
|
+
/**
|
|
1422
|
+
* Decodes a CtwaContextLinkData message from the specified reader or buffer, length delimited.
|
|
1423
|
+
* @function decodeDelimited
|
|
1424
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1425
|
+
* @static
|
|
1426
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1427
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData
|
|
1428
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1429
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1430
|
+
*/
|
|
1431
|
+
CtwaContextLinkData.decodeDelimited = function decodeDelimited(reader) {
|
|
1432
|
+
if (!(reader instanceof $Reader))
|
|
1433
|
+
reader = new $Reader(reader);
|
|
1434
|
+
return this.decode(reader, reader.uint32());
|
|
1435
|
+
};
|
|
1436
|
+
/**
|
|
1437
|
+
* Verifies a CtwaContextLinkData message.
|
|
1438
|
+
* @function verify
|
|
1439
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1440
|
+
* @static
|
|
1441
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
1442
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
1443
|
+
*/
|
|
1444
|
+
CtwaContextLinkData.verify = function verify(message) {
|
|
1445
|
+
if (typeof message !== "object" || message === null)
|
|
1446
|
+
return "object expected";
|
|
1447
|
+
var properties = {};
|
|
1448
|
+
if (message.context != null && message.hasOwnProperty("context")) {
|
|
1449
|
+
properties._context = 1;
|
|
1450
|
+
if (!$util.isString(message.context))
|
|
1451
|
+
return "context: string expected";
|
|
1452
|
+
}
|
|
1453
|
+
if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
|
|
1454
|
+
properties._sourceUrl = 1;
|
|
1455
|
+
if (!$util.isString(message.sourceUrl))
|
|
1456
|
+
return "sourceUrl: string expected";
|
|
1457
|
+
}
|
|
1458
|
+
if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) {
|
|
1459
|
+
properties._icebreaker = 1;
|
|
1460
|
+
if (!$util.isString(message.icebreaker))
|
|
1461
|
+
return "icebreaker: string expected";
|
|
1462
|
+
}
|
|
1463
|
+
if (message.phone != null && message.hasOwnProperty("phone")) {
|
|
1464
|
+
properties._phone = 1;
|
|
1465
|
+
if (!$util.isString(message.phone))
|
|
1466
|
+
return "phone: string expected";
|
|
1467
|
+
}
|
|
1468
|
+
return null;
|
|
1469
|
+
};
|
|
1470
|
+
/**
|
|
1471
|
+
* Creates a CtwaContextLinkData message from a plain object. Also converts values to their respective internal types.
|
|
1472
|
+
* @function fromObject
|
|
1473
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1474
|
+
* @static
|
|
1475
|
+
* @param {Object.<string,*>} object Plain object
|
|
1476
|
+
* @returns {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} CtwaContextLinkData
|
|
1477
|
+
*/
|
|
1478
|
+
CtwaContextLinkData.fromObject = function fromObject(object) {
|
|
1479
|
+
if (object instanceof $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData)
|
|
1480
|
+
return object;
|
|
1481
|
+
var message = new $root.MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData();
|
|
1482
|
+
if (object.context != null)
|
|
1483
|
+
message.context = String(object.context);
|
|
1484
|
+
if (object.sourceUrl != null)
|
|
1485
|
+
message.sourceUrl = String(object.sourceUrl);
|
|
1486
|
+
if (object.icebreaker != null)
|
|
1487
|
+
message.icebreaker = String(object.icebreaker);
|
|
1488
|
+
if (object.phone != null)
|
|
1489
|
+
message.phone = String(object.phone);
|
|
1490
|
+
return message;
|
|
1491
|
+
};
|
|
1492
|
+
/**
|
|
1493
|
+
* Creates a plain object from a CtwaContextLinkData message. Also converts values to other types if specified.
|
|
1494
|
+
* @function toObject
|
|
1495
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1496
|
+
* @static
|
|
1497
|
+
* @param {MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData} message CtwaContextLinkData
|
|
1498
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1499
|
+
* @returns {Object.<string,*>} Plain object
|
|
1500
|
+
*/
|
|
1501
|
+
CtwaContextLinkData.toObject = function toObject(message, options) {
|
|
1502
|
+
if (!options)
|
|
1503
|
+
options = {};
|
|
1504
|
+
var object = {};
|
|
1505
|
+
if (message.context != null && message.hasOwnProperty("context")) {
|
|
1506
|
+
object.context = message.context;
|
|
1507
|
+
if (options.oneofs)
|
|
1508
|
+
object._context = "context";
|
|
1509
|
+
}
|
|
1510
|
+
if (message.sourceUrl != null && message.hasOwnProperty("sourceUrl")) {
|
|
1511
|
+
object.sourceUrl = message.sourceUrl;
|
|
1512
|
+
if (options.oneofs)
|
|
1513
|
+
object._sourceUrl = "sourceUrl";
|
|
1514
|
+
}
|
|
1515
|
+
if (message.icebreaker != null && message.hasOwnProperty("icebreaker")) {
|
|
1516
|
+
object.icebreaker = message.icebreaker;
|
|
1517
|
+
if (options.oneofs)
|
|
1518
|
+
object._icebreaker = "icebreaker";
|
|
1519
|
+
}
|
|
1520
|
+
if (message.phone != null && message.hasOwnProperty("phone")) {
|
|
1521
|
+
object.phone = message.phone;
|
|
1522
|
+
if (options.oneofs)
|
|
1523
|
+
object._phone = "phone";
|
|
1524
|
+
}
|
|
1525
|
+
return object;
|
|
1526
|
+
};
|
|
1527
|
+
/**
|
|
1528
|
+
* Converts this CtwaContextLinkData to JSON.
|
|
1529
|
+
* @function toJSON
|
|
1530
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1531
|
+
* @instance
|
|
1532
|
+
* @returns {Object.<string,*>} JSON object
|
|
1533
|
+
*/
|
|
1534
|
+
CtwaContextLinkData.prototype.toJSON = function toJSON() {
|
|
1535
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1536
|
+
};
|
|
1537
|
+
/**
|
|
1538
|
+
* Gets the default type url for CtwaContextLinkData
|
|
1539
|
+
* @function getTypeUrl
|
|
1540
|
+
* @memberof MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData
|
|
1541
|
+
* @static
|
|
1542
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1543
|
+
* @returns {string} The default type url
|
|
1544
|
+
*/
|
|
1545
|
+
CtwaContextLinkData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1546
|
+
if (typeUrlPrefix === undefined) {
|
|
1547
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1548
|
+
}
|
|
1549
|
+
return typeUrlPrefix + "/MdStorageChatRowOpaqueData.ChatRowOpaqueData.DraftMessage.CtwaContextLinkData";
|
|
1550
|
+
};
|
|
1551
|
+
return CtwaContextLinkData;
|
|
1552
|
+
})();
|
|
1553
|
+
return DraftMessage;
|
|
1554
|
+
})();
|
|
1555
|
+
return ChatRowOpaqueData;
|
|
1556
|
+
})();
|
|
1557
|
+
return MdStorageChatRowOpaqueData;
|
|
1558
|
+
})();
|
|
1559
|
+
module.exports = $root;
|