@hiroosy/baileys-lite 0.3.4 → 0.3.5
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/WAProto/index.js +231 -113252
- package/WAProto/parts/ADVDeviceIdentity.part +201 -0
- package/WAProto/parts/ADVEncryptionType.part +6 -0
- package/WAProto/parts/ADVKeyIndexList.part +201 -0
- package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
- package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
- package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
- package/WAProto/parts/AIHomeState.part +405 -0
- package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
- package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
- package/WAProto/parts/AIMetadataOperation.part +83 -0
- package/WAProto/parts/AIQueryFanout.part +133 -0
- package/WAProto/parts/AIRegenerateMetadata.part +112 -0
- package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
- package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
- package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
- package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
- package/WAProto/parts/AIRichResponseImageURL.part +119 -0
- package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
- package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMessage.part +167 -0
- package/WAProto/parts/AIRichResponseMessageType.part +5 -0
- package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
- package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
- package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
- package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
- package/WAProto/parts/AISubscriptionRequestType.part +7 -0
- package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
- package/WAProto/parts/AIThreadInfo.part +316 -0
- package/WAProto/parts/Account.part +138 -0
- package/WAProto/parts/ActionLink.part +100 -0
- package/WAProto/parts/AutoDownloadSettings.part +138 -0
- package/WAProto/parts/AvatarUserSettings.part +100 -0
- package/WAProto/parts/BizAccountLinkInfo.part +210 -0
- package/WAProto/parts/BizAccountPayload.part +105 -0
- package/WAProto/parts/BizIdentityInfo.part +298 -0
- package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
- package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
- package/WAProto/parts/BotAgentMetadata.part +83 -0
- package/WAProto/parts/BotCapabilityMetadata.part +437 -0
- package/WAProto/parts/BotCommandMetadata.part +119 -0
- package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
- package/WAProto/parts/BotFeedbackMessage.part +1366 -0
- package/WAProto/parts/BotGroupMetadata.part +92 -0
- package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
- package/WAProto/parts/BotImagineMetadata.part +134 -0
- package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
- package/WAProto/parts/BotLinkedAccount.part +95 -0
- package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
- package/WAProto/parts/BotMediaMetadata.part +229 -0
- package/WAProto/parts/BotMemoryFact.part +100 -0
- package/WAProto/parts/BotMemoryMetadata.part +141 -0
- package/WAProto/parts/BotMemuMetadata.part +92 -0
- package/WAProto/parts/BotMessageOrigin.part +95 -0
- package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
- package/WAProto/parts/BotMessageSharingInfo.part +297 -0
- package/WAProto/parts/BotMetadata.part +934 -0
- package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
- package/WAProto/parts/BotMetricsMetadata.part +341 -0
- package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
- package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
- package/WAProto/parts/BotModelMetadata.part +167 -0
- package/WAProto/parts/BotPluginMetadata.part +379 -0
- package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
- package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
- package/WAProto/parts/BotPromptSuggestion.part +100 -0
- package/WAProto/parts/BotPromptSuggestions.part +92 -0
- package/WAProto/parts/BotPttPromptMetadata.part +81 -0
- package/WAProto/parts/BotQuotaMetadata.part +241 -0
- package/WAProto/parts/BotReminderMetadata.part +232 -0
- package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
- package/WAProto/parts/BotRenderingMetadata.part +203 -0
- package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
- package/WAProto/parts/BotSessionMetadata.part +137 -0
- package/WAProto/parts/BotSessionSource.part +11 -0
- package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
- package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
- package/WAProto/parts/BotSourcesMetadata.part +322 -0
- package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
- package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
- package/WAProto/parts/CallLogRecord.part +646 -0
- package/WAProto/parts/CertChain.part +392 -0
- package/WAProto/parts/ChatLockSettings.part +102 -0
- package/WAProto/parts/ChatRowOpaqueData.part +712 -0
- package/WAProto/parts/Citation.part +119 -0
- package/WAProto/parts/ClientPairingProps.part +160 -0
- package/WAProto/parts/ClientPayload.part +2892 -0
- package/WAProto/parts/CollectionName.part +9 -0
- package/WAProto/parts/CommentMetadata.part +102 -0
- package/WAProto/parts/CompanionCommitment.part +84 -0
- package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
- package/WAProto/parts/Config.part +136 -0
- package/WAProto/parts/ContextInfo.part +4137 -0
- package/WAProto/parts/Conversation.part +1472 -0
- package/WAProto/parts/DeviceCapabilities.part +670 -0
- package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
- package/WAProto/parts/DeviceListMetadata.part +306 -0
- package/WAProto/parts/DeviceProps.part +982 -0
- package/WAProto/parts/DisappearingMode.part +206 -0
- package/WAProto/parts/EmbeddedContent.part +100 -0
- package/WAProto/parts/EmbeddedMessage.part +102 -0
- package/WAProto/parts/EmbeddedMusic.part +370 -0
- package/WAProto/parts/EncryptedPairingRequest.part +106 -0
- package/WAProto/parts/EphemeralSetting.part +110 -0
- package/WAProto/parts/EventAdditionalMetadata.part +81 -0
- package/WAProto/parts/EventResponse.part +152 -0
- package/WAProto/parts/ExitCode.part +110 -0
- package/WAProto/parts/ExternalBlobReference.part +195 -0
- package/WAProto/parts/Field.part +193 -0
- package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
- package/WAProto/parts/GlobalSettings.part +497 -0
- package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
- package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
- package/WAProto/parts/GroupMention.part +100 -0
- package/WAProto/parts/GroupParticipant.part +142 -0
- package/WAProto/parts/GroupRootKeyShare.part +92 -0
- package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
- package/WAProto/parts/HandshakeMessage.part +815 -0
- package/WAProto/parts/HatchMetadataSync.part +132 -0
- package/WAProto/parts/HistorySync.part +605 -0
- package/WAProto/parts/HistorySyncMsg.part +112 -0
- package/WAProto/parts/HydratedTemplateButton.part +501 -0
- package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
- package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
- package/WAProto/parts/InlineContact.part +157 -0
- package/WAProto/parts/InteractiveAnnotation.part +246 -0
- package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
- package/WAProto/parts/KeepInChat.part +225 -0
- package/WAProto/parts/KeepType.part +6 -0
- package/WAProto/parts/KeyExchangeMessage.part +169 -0
- package/WAProto/parts/KeyId.part +84 -0
- package/WAProto/parts/LIDMigrationMapping.part +149 -0
- package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
- package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
- package/WAProto/parts/LegacyMessage.part +104 -0
- package/WAProto/parts/LimitSharing.part +177 -0
- package/WAProto/parts/LocalizedName.part +119 -0
- package/WAProto/parts/Location.part +119 -0
- package/WAProto/parts/MediaData.part +81 -0
- package/WAProto/parts/MediaDomainInfo.part +120 -0
- package/WAProto/parts/MediaKeyDomain.part +6 -0
- package/WAProto/parts/MediaNotifyMessage.part +132 -0
- package/WAProto/parts/MediaRetryNotification.part +170 -0
- package/WAProto/parts/MediaVisibility.part +6 -0
- package/WAProto/parts/MemberLabel.part +110 -0
- package/WAProto/parts/Message.part +32376 -0
- package/WAProto/parts/MessageAddOn.part +305 -0
- package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
- package/WAProto/parts/MessageAssociation.part +235 -0
- package/WAProto/parts/MessageContextInfo.part +451 -0
- package/WAProto/parts/MessageKey.part +138 -0
- package/WAProto/parts/MessageSecretMessage.part +125 -0
- package/WAProto/parts/Money.part +129 -0
- package/WAProto/parts/MsgOpaqueData.part +1732 -0
- package/WAProto/parts/MsgRowOpaqueData.part +104 -0
- package/WAProto/parts/MutationProps.part +89 -0
- package/WAProto/parts/NoiseCertificate.part +277 -0
- package/WAProto/parts/NotificationMessageInfo.part +152 -0
- package/WAProto/parts/NotificationSettings.part +176 -0
- package/WAProto/parts/PairingRequest.part +128 -0
- package/WAProto/parts/PastParticipant.part +148 -0
- package/WAProto/parts/PastParticipants.part +112 -0
- package/WAProto/parts/PatchDebugData.part +358 -0
- package/WAProto/parts/PaymentBackground.part +460 -0
- package/WAProto/parts/PaymentInfo.part +602 -0
- package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
- package/WAProto/parts/PhotoChange.part +125 -0
- package/WAProto/parts/PinInChat.part +205 -0
- package/WAProto/parts/Point.part +138 -0
- package/WAProto/parts/PollAdditionalMetadata.part +216 -0
- package/WAProto/parts/PollEncValue.part +106 -0
- package/WAProto/parts/PollUpdate.part +202 -0
- package/WAProto/parts/PreKeyRecordStructure.part +125 -0
- package/WAProto/parts/PreKeySignalMessage.part +185 -0
- package/WAProto/parts/PremiumMessageInfo.part +81 -0
- package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
- package/WAProto/parts/PrivacySystemMessage.part +6 -0
- package/WAProto/parts/ProcessedVideo.part +266 -0
- package/WAProto/parts/ProloguePayload.part +105 -0
- package/WAProto/parts/Pushname.part +100 -0
- package/WAProto/parts/QuarantinedMessage.part +103 -0
- package/WAProto/parts/Reaction.part +169 -0
- package/WAProto/parts/RecentEmojiWeight.part +100 -0
- package/WAProto/parts/RecordStructure.part +114 -0
- package/WAProto/parts/Reportable.part +138 -0
- package/WAProto/parts/ReportingTokenInfo.part +84 -0
- package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
- package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
- package/WAProto/parts/SenderKeyMessage.part +122 -0
- package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
- package/WAProto/parts/SenderKeyStateStructure.part +469 -0
- package/WAProto/parts/ServerErrorReceipt.part +81 -0
- package/WAProto/parts/SessionStructure.part +1087 -0
- package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
- package/WAProto/parts/SessionTransparencyType.part +5 -0
- package/WAProto/parts/SignalMessage.part +144 -0
- package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
- package/WAProto/parts/StatusAttribution.part +1235 -0
- package/WAProto/parts/StatusMentionMessage.part +83 -0
- package/WAProto/parts/StatusPSA.part +121 -0
- package/WAProto/parts/StickerMetadata.part +357 -0
- package/WAProto/parts/SyncActionData.part +146 -0
- package/WAProto/parts/SyncActionValue.part +12959 -0
- package/WAProto/parts/SyncdIndex.part +84 -0
- package/WAProto/parts/SyncdMutation.part +121 -0
- package/WAProto/parts/SyncdMutations.part +92 -0
- package/WAProto/parts/SyncdPatch.part +262 -0
- package/WAProto/parts/SyncdRecord.part +125 -0
- package/WAProto/parts/SyncdSnapshot.part +157 -0
- package/WAProto/parts/SyncdValue.part +84 -0
- package/WAProto/parts/SyncdVersion.part +91 -0
- package/WAProto/parts/TapLinkAction.part +100 -0
- package/WAProto/parts/TemplateButton.part +449 -0
- package/WAProto/parts/ThreadID.part +126 -0
- package/WAProto/parts/UrlTrackingMap.part +231 -0
- package/WAProto/parts/UserPassword.part +399 -0
- package/WAProto/parts/UserReceipt.part +221 -0
- package/WAProto/parts/VerifiedNameCertificate.part +318 -0
- package/WAProto/parts/WallpaperSettings.part +119 -0
- package/WAProto/parts/WebFeatures.part +1870 -0
- package/WAProto/parts/WebLinkRenderConfig.part +5 -0
- package/WAProto/parts/WebMessageInfo.part +2851 -0
- package/WAProto/parts/WebNotificationsInfo.part +160 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function ADVSignedKeyIndexList(p) {
|
|
3
|
+
if (p)
|
|
4
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
5
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
6
|
+
this[ks[i]] = p[ks[i]];
|
|
7
|
+
}
|
|
8
|
+
ADVSignedKeyIndexList.prototype.details = null;
|
|
9
|
+
ADVSignedKeyIndexList.prototype.accountSignature = null;
|
|
10
|
+
ADVSignedKeyIndexList.prototype.accountSignatureKey = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(ADVSignedKeyIndexList.prototype, "_details", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["details"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignature", {
|
|
17
|
+
get: $util.oneOfGetter($oneOfFields = ["accountSignature"]),
|
|
18
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignatureKey", {
|
|
21
|
+
get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23
|
+
});
|
|
24
|
+
ADVSignedKeyIndexList.create = function create(properties) {
|
|
25
|
+
return new ADVSignedKeyIndexList(properties);
|
|
26
|
+
};
|
|
27
|
+
ADVSignedKeyIndexList.encode = function encode(m, w) {
|
|
28
|
+
if (!w)
|
|
29
|
+
w = $Writer.create();
|
|
30
|
+
if (m.details != null && Object.hasOwnProperty.call(m, "details"))
|
|
31
|
+
w.uint32(10).bytes(m.details);
|
|
32
|
+
if (m.accountSignature != null && Object.hasOwnProperty.call(m, "accountSignature"))
|
|
33
|
+
w.uint32(18).bytes(m.accountSignature);
|
|
34
|
+
if (m.accountSignatureKey != null && Object.hasOwnProperty.call(m, "accountSignatureKey"))
|
|
35
|
+
w.uint32(26).bytes(m.accountSignatureKey);
|
|
36
|
+
return w;
|
|
37
|
+
};
|
|
38
|
+
ADVSignedKeyIndexList.decode = function decode(r, l, e, n) {
|
|
39
|
+
if (!(r instanceof $Reader))
|
|
40
|
+
r = $Reader.create(r);
|
|
41
|
+
if (n === undefined)
|
|
42
|
+
n = 0;
|
|
43
|
+
if (n > $Reader.recursionLimit)
|
|
44
|
+
throw Error("maximum nesting depth exceeded");
|
|
45
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ADVSignedKeyIndexList();
|
|
46
|
+
while (r.pos < c) {
|
|
47
|
+
var t = r.uint32();
|
|
48
|
+
if (t === e)
|
|
49
|
+
break;
|
|
50
|
+
switch (t >>> 3) {
|
|
51
|
+
case 1: {
|
|
52
|
+
m.details = r.bytes();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
m.accountSignature = r.bytes();
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 3: {
|
|
60
|
+
m.accountSignatureKey = r.bytes();
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
default:
|
|
64
|
+
r.skipType(t & 7, n);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return m;
|
|
69
|
+
};
|
|
70
|
+
ADVSignedKeyIndexList.fromObject = function fromObject(d, n) {
|
|
71
|
+
if (d instanceof $root.proto.ADVSignedKeyIndexList)
|
|
72
|
+
return d;
|
|
73
|
+
if (n === undefined)
|
|
74
|
+
n = 0;
|
|
75
|
+
if (n > $util.recursionLimit)
|
|
76
|
+
throw Error("maximum nesting depth exceeded");
|
|
77
|
+
var m = new $root.proto.ADVSignedKeyIndexList();
|
|
78
|
+
if (d.details != null) {
|
|
79
|
+
if (typeof d.details === "string")
|
|
80
|
+
$util.base64.decode(d.details, m.details = $util.newBuffer($util.base64.length(d.details)), 0);
|
|
81
|
+
else if (d.details.length >= 0)
|
|
82
|
+
m.details = d.details;
|
|
83
|
+
}
|
|
84
|
+
if (d.accountSignature != null) {
|
|
85
|
+
if (typeof d.accountSignature === "string")
|
|
86
|
+
$util.base64.decode(d.accountSignature, m.accountSignature = $util.newBuffer($util.base64.length(d.accountSignature)), 0);
|
|
87
|
+
else if (d.accountSignature.length >= 0)
|
|
88
|
+
m.accountSignature = d.accountSignature;
|
|
89
|
+
}
|
|
90
|
+
if (d.accountSignatureKey != null) {
|
|
91
|
+
if (typeof d.accountSignatureKey === "string")
|
|
92
|
+
$util.base64.decode(d.accountSignatureKey, m.accountSignatureKey = $util.newBuffer($util.base64.length(d.accountSignatureKey)), 0);
|
|
93
|
+
else if (d.accountSignatureKey.length >= 0)
|
|
94
|
+
m.accountSignatureKey = d.accountSignatureKey;
|
|
95
|
+
}
|
|
96
|
+
return m;
|
|
97
|
+
};
|
|
98
|
+
ADVSignedKeyIndexList.toObject = function toObject(m, o) {
|
|
99
|
+
if (!o)
|
|
100
|
+
o = {};
|
|
101
|
+
var d = {};
|
|
102
|
+
if (m.details != null && m.hasOwnProperty("details")) {
|
|
103
|
+
d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details;
|
|
104
|
+
if (o.oneofs)
|
|
105
|
+
d._details = "details";
|
|
106
|
+
}
|
|
107
|
+
if (m.accountSignature != null && m.hasOwnProperty("accountSignature")) {
|
|
108
|
+
d.accountSignature = o.bytes === String ? $util.base64.encode(m.accountSignature, 0, m.accountSignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignature) : m.accountSignature;
|
|
109
|
+
if (o.oneofs)
|
|
110
|
+
d._accountSignature = "accountSignature";
|
|
111
|
+
}
|
|
112
|
+
if (m.accountSignatureKey != null && m.hasOwnProperty("accountSignatureKey")) {
|
|
113
|
+
d.accountSignatureKey = o.bytes === String ? $util.base64.encode(m.accountSignatureKey, 0, m.accountSignatureKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignatureKey) : m.accountSignatureKey;
|
|
114
|
+
if (o.oneofs)
|
|
115
|
+
d._accountSignatureKey = "accountSignatureKey";
|
|
116
|
+
}
|
|
117
|
+
return d;
|
|
118
|
+
};
|
|
119
|
+
ADVSignedKeyIndexList.prototype.toJSON = function toJSON() {
|
|
120
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
121
|
+
};
|
|
122
|
+
ADVSignedKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
123
|
+
if (typeUrlPrefix === undefined) {
|
|
124
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
125
|
+
}
|
|
126
|
+
return typeUrlPrefix + "/proto.ADVSignedKeyIndexList";
|
|
127
|
+
};
|
|
128
|
+
return ADVSignedKeyIndexList;
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIHomeState(p) {
|
|
3
|
+
this.capabilityOptions = [];
|
|
4
|
+
this.conversationOptions = [];
|
|
5
|
+
if (p)
|
|
6
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
7
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
8
|
+
this[ks[i]] = p[ks[i]];
|
|
9
|
+
}
|
|
10
|
+
AIHomeState.prototype.lastFetchTime = null;
|
|
11
|
+
AIHomeState.prototype.capabilityOptions = $util.emptyArray;
|
|
12
|
+
AIHomeState.prototype.conversationOptions = $util.emptyArray;
|
|
13
|
+
let $oneOfFields;
|
|
14
|
+
Object.defineProperty(AIHomeState.prototype, "_lastFetchTime", {
|
|
15
|
+
get: $util.oneOfGetter($oneOfFields = ["lastFetchTime"]),
|
|
16
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
17
|
+
});
|
|
18
|
+
AIHomeState.create = function create(properties) {
|
|
19
|
+
return new AIHomeState(properties);
|
|
20
|
+
};
|
|
21
|
+
AIHomeState.encode = function encode(m, w) {
|
|
22
|
+
if (!w)
|
|
23
|
+
w = $Writer.create();
|
|
24
|
+
if (m.lastFetchTime != null && Object.hasOwnProperty.call(m, "lastFetchTime"))
|
|
25
|
+
w.uint32(8).int64(m.lastFetchTime);
|
|
26
|
+
if (m.capabilityOptions != null && m.capabilityOptions.length) {
|
|
27
|
+
for (var i = 0; i < m.capabilityOptions.length; ++i)
|
|
28
|
+
$root.proto.AIHomeState.AIHomeOption.encode(m.capabilityOptions[i], w.uint32(18).fork()).ldelim();
|
|
29
|
+
}
|
|
30
|
+
if (m.conversationOptions != null && m.conversationOptions.length) {
|
|
31
|
+
for (var i = 0; i < m.conversationOptions.length; ++i)
|
|
32
|
+
$root.proto.AIHomeState.AIHomeOption.encode(m.conversationOptions[i], w.uint32(26).fork()).ldelim();
|
|
33
|
+
}
|
|
34
|
+
return w;
|
|
35
|
+
};
|
|
36
|
+
AIHomeState.decode = function decode(r, l, e, n) {
|
|
37
|
+
if (!(r instanceof $Reader))
|
|
38
|
+
r = $Reader.create(r);
|
|
39
|
+
if (n === undefined)
|
|
40
|
+
n = 0;
|
|
41
|
+
if (n > $Reader.recursionLimit)
|
|
42
|
+
throw Error("maximum nesting depth exceeded");
|
|
43
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIHomeState();
|
|
44
|
+
while (r.pos < c) {
|
|
45
|
+
var t = r.uint32();
|
|
46
|
+
if (t === e)
|
|
47
|
+
break;
|
|
48
|
+
switch (t >>> 3) {
|
|
49
|
+
case 1: {
|
|
50
|
+
m.lastFetchTime = r.int64();
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
case 2: {
|
|
54
|
+
if (!(m.capabilityOptions && m.capabilityOptions.length))
|
|
55
|
+
m.capabilityOptions = [];
|
|
56
|
+
m.capabilityOptions.push($root.proto.AIHomeState.AIHomeOption.decode(r, r.uint32(), undefined, n + 1));
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 3: {
|
|
60
|
+
if (!(m.conversationOptions && m.conversationOptions.length))
|
|
61
|
+
m.conversationOptions = [];
|
|
62
|
+
m.conversationOptions.push($root.proto.AIHomeState.AIHomeOption.decode(r, r.uint32(), undefined, n + 1));
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
default:
|
|
66
|
+
r.skipType(t & 7, n);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return m;
|
|
71
|
+
};
|
|
72
|
+
AIHomeState.fromObject = function fromObject(d, n) {
|
|
73
|
+
if (d instanceof $root.proto.AIHomeState)
|
|
74
|
+
return d;
|
|
75
|
+
if (n === undefined)
|
|
76
|
+
n = 0;
|
|
77
|
+
if (n > $util.recursionLimit)
|
|
78
|
+
throw Error("maximum nesting depth exceeded");
|
|
79
|
+
var m = new $root.proto.AIHomeState();
|
|
80
|
+
if (d.lastFetchTime != null) {
|
|
81
|
+
if ($util.Long)
|
|
82
|
+
(m.lastFetchTime = $util.Long.fromValue(d.lastFetchTime)).unsigned = false;
|
|
83
|
+
else if (typeof d.lastFetchTime === "string")
|
|
84
|
+
m.lastFetchTime = parseInt(d.lastFetchTime, 10);
|
|
85
|
+
else if (typeof d.lastFetchTime === "number")
|
|
86
|
+
m.lastFetchTime = d.lastFetchTime;
|
|
87
|
+
else if (typeof d.lastFetchTime === "object")
|
|
88
|
+
m.lastFetchTime = new $util.LongBits(d.lastFetchTime.low >>> 0, d.lastFetchTime.high >>> 0).toNumber();
|
|
89
|
+
}
|
|
90
|
+
if (d.capabilityOptions) {
|
|
91
|
+
if (!Array.isArray(d.capabilityOptions))
|
|
92
|
+
throw TypeError(".proto.AIHomeState.capabilityOptions: array expected");
|
|
93
|
+
m.capabilityOptions = [];
|
|
94
|
+
for (var i = 0; i < d.capabilityOptions.length; ++i) {
|
|
95
|
+
if (typeof d.capabilityOptions[i] !== "object")
|
|
96
|
+
throw TypeError(".proto.AIHomeState.capabilityOptions: object expected");
|
|
97
|
+
m.capabilityOptions[i] = $root.proto.AIHomeState.AIHomeOption.fromObject(d.capabilityOptions[i], n + 1);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (d.conversationOptions) {
|
|
101
|
+
if (!Array.isArray(d.conversationOptions))
|
|
102
|
+
throw TypeError(".proto.AIHomeState.conversationOptions: array expected");
|
|
103
|
+
m.conversationOptions = [];
|
|
104
|
+
for (var i = 0; i < d.conversationOptions.length; ++i) {
|
|
105
|
+
if (typeof d.conversationOptions[i] !== "object")
|
|
106
|
+
throw TypeError(".proto.AIHomeState.conversationOptions: object expected");
|
|
107
|
+
m.conversationOptions[i] = $root.proto.AIHomeState.AIHomeOption.fromObject(d.conversationOptions[i], n + 1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return m;
|
|
111
|
+
};
|
|
112
|
+
AIHomeState.toObject = function toObject(m, o) {
|
|
113
|
+
if (!o)
|
|
114
|
+
o = {};
|
|
115
|
+
var d = {};
|
|
116
|
+
if (o.arrays || o.defaults) {
|
|
117
|
+
d.capabilityOptions = [];
|
|
118
|
+
d.conversationOptions = [];
|
|
119
|
+
}
|
|
120
|
+
if (m.lastFetchTime != null && m.hasOwnProperty("lastFetchTime")) {
|
|
121
|
+
if (typeof m.lastFetchTime === "number")
|
|
122
|
+
d.lastFetchTime = o.longs === String ? String(m.lastFetchTime) : m.lastFetchTime;
|
|
123
|
+
else
|
|
124
|
+
d.lastFetchTime = o.longs === String ? longToString(m.lastFetchTime) : o.longs === Number ? longToNumber(m.lastFetchTime) : m.lastFetchTime;
|
|
125
|
+
if (o.oneofs)
|
|
126
|
+
d._lastFetchTime = "lastFetchTime";
|
|
127
|
+
}
|
|
128
|
+
if (m.capabilityOptions && m.capabilityOptions.length) {
|
|
129
|
+
d.capabilityOptions = [];
|
|
130
|
+
for (var j = 0; j < m.capabilityOptions.length; ++j) {
|
|
131
|
+
d.capabilityOptions[j] = $root.proto.AIHomeState.AIHomeOption.toObject(m.capabilityOptions[j], o);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (m.conversationOptions && m.conversationOptions.length) {
|
|
135
|
+
d.conversationOptions = [];
|
|
136
|
+
for (var j = 0; j < m.conversationOptions.length; ++j) {
|
|
137
|
+
d.conversationOptions[j] = $root.proto.AIHomeState.AIHomeOption.toObject(m.conversationOptions[j], o);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return d;
|
|
141
|
+
};
|
|
142
|
+
AIHomeState.prototype.toJSON = function toJSON() {
|
|
143
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
144
|
+
};
|
|
145
|
+
AIHomeState.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
146
|
+
if (typeUrlPrefix === undefined) {
|
|
147
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
148
|
+
}
|
|
149
|
+
return typeUrlPrefix + "/proto.AIHomeState";
|
|
150
|
+
};
|
|
151
|
+
$lazy(AIHomeState, "AIHomeOption", function() {
|
|
152
|
+
function AIHomeOption(p) {
|
|
153
|
+
if (p)
|
|
154
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
155
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
156
|
+
this[ks[i]] = p[ks[i]];
|
|
157
|
+
}
|
|
158
|
+
AIHomeOption.prototype.type = null;
|
|
159
|
+
AIHomeOption.prototype.title = null;
|
|
160
|
+
AIHomeOption.prototype.promptText = null;
|
|
161
|
+
AIHomeOption.prototype.sessionId = null;
|
|
162
|
+
AIHomeOption.prototype.imageWdsIdentifier = null;
|
|
163
|
+
AIHomeOption.prototype.imageTintColor = null;
|
|
164
|
+
AIHomeOption.prototype.imageBackgroundColor = null;
|
|
165
|
+
AIHomeOption.prototype.cardTypeId = null;
|
|
166
|
+
let $oneOfFields;
|
|
167
|
+
Object.defineProperty(AIHomeOption.prototype, "_type", {
|
|
168
|
+
get: $util.oneOfGetter($oneOfFields = ["type"]),
|
|
169
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
170
|
+
});
|
|
171
|
+
Object.defineProperty(AIHomeOption.prototype, "_title", {
|
|
172
|
+
get: $util.oneOfGetter($oneOfFields = ["title"]),
|
|
173
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(AIHomeOption.prototype, "_promptText", {
|
|
176
|
+
get: $util.oneOfGetter($oneOfFields = ["promptText"]),
|
|
177
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
178
|
+
});
|
|
179
|
+
Object.defineProperty(AIHomeOption.prototype, "_sessionId", {
|
|
180
|
+
get: $util.oneOfGetter($oneOfFields = ["sessionId"]),
|
|
181
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
182
|
+
});
|
|
183
|
+
Object.defineProperty(AIHomeOption.prototype, "_imageWdsIdentifier", {
|
|
184
|
+
get: $util.oneOfGetter($oneOfFields = ["imageWdsIdentifier"]),
|
|
185
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
186
|
+
});
|
|
187
|
+
Object.defineProperty(AIHomeOption.prototype, "_imageTintColor", {
|
|
188
|
+
get: $util.oneOfGetter($oneOfFields = ["imageTintColor"]),
|
|
189
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
190
|
+
});
|
|
191
|
+
Object.defineProperty(AIHomeOption.prototype, "_imageBackgroundColor", {
|
|
192
|
+
get: $util.oneOfGetter($oneOfFields = ["imageBackgroundColor"]),
|
|
193
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
194
|
+
});
|
|
195
|
+
Object.defineProperty(AIHomeOption.prototype, "_cardTypeId", {
|
|
196
|
+
get: $util.oneOfGetter($oneOfFields = ["cardTypeId"]),
|
|
197
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
198
|
+
});
|
|
199
|
+
AIHomeOption.create = function create(properties) {
|
|
200
|
+
return new AIHomeOption(properties);
|
|
201
|
+
};
|
|
202
|
+
AIHomeOption.encode = function encode(m, w) {
|
|
203
|
+
if (!w)
|
|
204
|
+
w = $Writer.create();
|
|
205
|
+
if (m.type != null && Object.hasOwnProperty.call(m, "type"))
|
|
206
|
+
w.uint32(8).int32(m.type);
|
|
207
|
+
if (m.title != null && Object.hasOwnProperty.call(m, "title"))
|
|
208
|
+
w.uint32(18).string(m.title);
|
|
209
|
+
if (m.promptText != null && Object.hasOwnProperty.call(m, "promptText"))
|
|
210
|
+
w.uint32(26).string(m.promptText);
|
|
211
|
+
if (m.sessionId != null && Object.hasOwnProperty.call(m, "sessionId"))
|
|
212
|
+
w.uint32(34).string(m.sessionId);
|
|
213
|
+
if (m.imageWdsIdentifier != null && Object.hasOwnProperty.call(m, "imageWdsIdentifier"))
|
|
214
|
+
w.uint32(42).string(m.imageWdsIdentifier);
|
|
215
|
+
if (m.imageTintColor != null && Object.hasOwnProperty.call(m, "imageTintColor"))
|
|
216
|
+
w.uint32(50).string(m.imageTintColor);
|
|
217
|
+
if (m.imageBackgroundColor != null && Object.hasOwnProperty.call(m, "imageBackgroundColor"))
|
|
218
|
+
w.uint32(58).string(m.imageBackgroundColor);
|
|
219
|
+
if (m.cardTypeId != null && Object.hasOwnProperty.call(m, "cardTypeId"))
|
|
220
|
+
w.uint32(66).string(m.cardTypeId);
|
|
221
|
+
return w;
|
|
222
|
+
};
|
|
223
|
+
AIHomeOption.decode = function decode(r, l, e, n) {
|
|
224
|
+
if (!(r instanceof $Reader))
|
|
225
|
+
r = $Reader.create(r);
|
|
226
|
+
if (n === undefined)
|
|
227
|
+
n = 0;
|
|
228
|
+
if (n > $Reader.recursionLimit)
|
|
229
|
+
throw Error("maximum nesting depth exceeded");
|
|
230
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIHomeState.AIHomeOption();
|
|
231
|
+
while (r.pos < c) {
|
|
232
|
+
var t = r.uint32();
|
|
233
|
+
if (t === e)
|
|
234
|
+
break;
|
|
235
|
+
switch (t >>> 3) {
|
|
236
|
+
case 1: {
|
|
237
|
+
m.type = r.int32();
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
case 2: {
|
|
241
|
+
m.title = r.string();
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
case 3: {
|
|
245
|
+
m.promptText = r.string();
|
|
246
|
+
break;
|
|
247
|
+
}
|
|
248
|
+
case 4: {
|
|
249
|
+
m.sessionId = r.string();
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
case 5: {
|
|
253
|
+
m.imageWdsIdentifier = r.string();
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
case 6: {
|
|
257
|
+
m.imageTintColor = r.string();
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
case 7: {
|
|
261
|
+
m.imageBackgroundColor = r.string();
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
case 8: {
|
|
265
|
+
m.cardTypeId = r.string();
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
default:
|
|
269
|
+
r.skipType(t & 7, n);
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return m;
|
|
274
|
+
};
|
|
275
|
+
AIHomeOption.fromObject = function fromObject(d, n) {
|
|
276
|
+
if (d instanceof $root.proto.AIHomeState.AIHomeOption)
|
|
277
|
+
return d;
|
|
278
|
+
if (n === undefined)
|
|
279
|
+
n = 0;
|
|
280
|
+
if (n > $util.recursionLimit)
|
|
281
|
+
throw Error("maximum nesting depth exceeded");
|
|
282
|
+
var m = new $root.proto.AIHomeState.AIHomeOption();
|
|
283
|
+
switch (d.type) {
|
|
284
|
+
default:
|
|
285
|
+
if (typeof d.type === "number") {
|
|
286
|
+
m.type = d.type;
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
break;
|
|
290
|
+
case "PROMPT":
|
|
291
|
+
case 0:
|
|
292
|
+
m.type = 0;
|
|
293
|
+
break;
|
|
294
|
+
case "CREATE_IMAGE":
|
|
295
|
+
case 1:
|
|
296
|
+
m.type = 1;
|
|
297
|
+
break;
|
|
298
|
+
case "ANIMATE_PHOTO":
|
|
299
|
+
case 2:
|
|
300
|
+
m.type = 2;
|
|
301
|
+
break;
|
|
302
|
+
case "ANALYZE_FILE":
|
|
303
|
+
case 3:
|
|
304
|
+
m.type = 3;
|
|
305
|
+
break;
|
|
306
|
+
case "COLLABORATE":
|
|
307
|
+
case 4:
|
|
308
|
+
m.type = 4;
|
|
309
|
+
break;
|
|
310
|
+
case "OPEN_GREETING_CARD":
|
|
311
|
+
case 5:
|
|
312
|
+
m.type = 5;
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
if (d.title != null) {
|
|
316
|
+
m.title = String(d.title);
|
|
317
|
+
}
|
|
318
|
+
if (d.promptText != null) {
|
|
319
|
+
m.promptText = String(d.promptText);
|
|
320
|
+
}
|
|
321
|
+
if (d.sessionId != null) {
|
|
322
|
+
m.sessionId = String(d.sessionId);
|
|
323
|
+
}
|
|
324
|
+
if (d.imageWdsIdentifier != null) {
|
|
325
|
+
m.imageWdsIdentifier = String(d.imageWdsIdentifier);
|
|
326
|
+
}
|
|
327
|
+
if (d.imageTintColor != null) {
|
|
328
|
+
m.imageTintColor = String(d.imageTintColor);
|
|
329
|
+
}
|
|
330
|
+
if (d.imageBackgroundColor != null) {
|
|
331
|
+
m.imageBackgroundColor = String(d.imageBackgroundColor);
|
|
332
|
+
}
|
|
333
|
+
if (d.cardTypeId != null) {
|
|
334
|
+
m.cardTypeId = String(d.cardTypeId);
|
|
335
|
+
}
|
|
336
|
+
return m;
|
|
337
|
+
};
|
|
338
|
+
AIHomeOption.toObject = function toObject(m, o) {
|
|
339
|
+
if (!o)
|
|
340
|
+
o = {};
|
|
341
|
+
var d = {};
|
|
342
|
+
if (m.type != null && m.hasOwnProperty("type")) {
|
|
343
|
+
d.type = o.enums === String ? $root.proto.AIHomeState.AIHomeOption.AIHomeActionType[m.type] === undefined ? m.type : $root.proto.AIHomeState.AIHomeOption.AIHomeActionType[m.type] : m.type;
|
|
344
|
+
if (o.oneofs)
|
|
345
|
+
d._type = "type";
|
|
346
|
+
}
|
|
347
|
+
if (m.title != null && m.hasOwnProperty("title")) {
|
|
348
|
+
d.title = m.title;
|
|
349
|
+
if (o.oneofs)
|
|
350
|
+
d._title = "title";
|
|
351
|
+
}
|
|
352
|
+
if (m.promptText != null && m.hasOwnProperty("promptText")) {
|
|
353
|
+
d.promptText = m.promptText;
|
|
354
|
+
if (o.oneofs)
|
|
355
|
+
d._promptText = "promptText";
|
|
356
|
+
}
|
|
357
|
+
if (m.sessionId != null && m.hasOwnProperty("sessionId")) {
|
|
358
|
+
d.sessionId = m.sessionId;
|
|
359
|
+
if (o.oneofs)
|
|
360
|
+
d._sessionId = "sessionId";
|
|
361
|
+
}
|
|
362
|
+
if (m.imageWdsIdentifier != null && m.hasOwnProperty("imageWdsIdentifier")) {
|
|
363
|
+
d.imageWdsIdentifier = m.imageWdsIdentifier;
|
|
364
|
+
if (o.oneofs)
|
|
365
|
+
d._imageWdsIdentifier = "imageWdsIdentifier";
|
|
366
|
+
}
|
|
367
|
+
if (m.imageTintColor != null && m.hasOwnProperty("imageTintColor")) {
|
|
368
|
+
d.imageTintColor = m.imageTintColor;
|
|
369
|
+
if (o.oneofs)
|
|
370
|
+
d._imageTintColor = "imageTintColor";
|
|
371
|
+
}
|
|
372
|
+
if (m.imageBackgroundColor != null && m.hasOwnProperty("imageBackgroundColor")) {
|
|
373
|
+
d.imageBackgroundColor = m.imageBackgroundColor;
|
|
374
|
+
if (o.oneofs)
|
|
375
|
+
d._imageBackgroundColor = "imageBackgroundColor";
|
|
376
|
+
}
|
|
377
|
+
if (m.cardTypeId != null && m.hasOwnProperty("cardTypeId")) {
|
|
378
|
+
d.cardTypeId = m.cardTypeId;
|
|
379
|
+
if (o.oneofs)
|
|
380
|
+
d._cardTypeId = "cardTypeId";
|
|
381
|
+
}
|
|
382
|
+
return d;
|
|
383
|
+
};
|
|
384
|
+
AIHomeOption.prototype.toJSON = function toJSON() {
|
|
385
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
386
|
+
};
|
|
387
|
+
AIHomeOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
388
|
+
if (typeUrlPrefix === undefined) {
|
|
389
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
390
|
+
}
|
|
391
|
+
return typeUrlPrefix + "/proto.AIHomeState.AIHomeOption";
|
|
392
|
+
};
|
|
393
|
+
$lazy(AIHomeOption, "AIHomeActionType", function() {
|
|
394
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
395
|
+
values[valuesById[0] = "PROMPT"] = 0;
|
|
396
|
+
values[valuesById[1] = "CREATE_IMAGE"] = 1;
|
|
397
|
+
values[valuesById[2] = "ANIMATE_PHOTO"] = 2;
|
|
398
|
+
values[valuesById[3] = "ANALYZE_FILE"] = 3;
|
|
399
|
+
values[valuesById[4] = "COLLABORATE"] = 4;
|
|
400
|
+
values[valuesById[5] = "OPEN_GREETING_CARD"] = 5;
|
|
401
|
+
return values;
|
|
402
|
+
});
|
|
403
|
+
return AIHomeOption;
|
|
404
|
+
});
|
|
405
|
+
return AIHomeState;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIMediaCollectionMessage(p) {
|
|
3
|
+
if (p)
|
|
4
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
5
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
6
|
+
this[ks[i]] = p[ks[i]];
|
|
7
|
+
}
|
|
8
|
+
AIMediaCollectionMessage.prototype.collectionId = null;
|
|
9
|
+
AIMediaCollectionMessage.prototype.expectedMediaCount = null;
|
|
10
|
+
AIMediaCollectionMessage.prototype.hasGlobalCaption = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(AIMediaCollectionMessage.prototype, "_collectionId", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["collectionId"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(AIMediaCollectionMessage.prototype, "_expectedMediaCount", {
|
|
17
|
+
get: $util.oneOfGetter($oneOfFields = ["expectedMediaCount"]),
|
|
18
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(AIMediaCollectionMessage.prototype, "_hasGlobalCaption", {
|
|
21
|
+
get: $util.oneOfGetter($oneOfFields = ["hasGlobalCaption"]),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23
|
+
});
|
|
24
|
+
AIMediaCollectionMessage.create = function create(properties) {
|
|
25
|
+
return new AIMediaCollectionMessage(properties);
|
|
26
|
+
};
|
|
27
|
+
AIMediaCollectionMessage.encode = function encode(m, w) {
|
|
28
|
+
if (!w)
|
|
29
|
+
w = $Writer.create();
|
|
30
|
+
if (m.collectionId != null && Object.hasOwnProperty.call(m, "collectionId"))
|
|
31
|
+
w.uint32(10).string(m.collectionId);
|
|
32
|
+
if (m.expectedMediaCount != null && Object.hasOwnProperty.call(m, "expectedMediaCount"))
|
|
33
|
+
w.uint32(16).uint32(m.expectedMediaCount);
|
|
34
|
+
if (m.hasGlobalCaption != null && Object.hasOwnProperty.call(m, "hasGlobalCaption"))
|
|
35
|
+
w.uint32(24).bool(m.hasGlobalCaption);
|
|
36
|
+
return w;
|
|
37
|
+
};
|
|
38
|
+
AIMediaCollectionMessage.decode = function decode(r, l, e, n) {
|
|
39
|
+
if (!(r instanceof $Reader))
|
|
40
|
+
r = $Reader.create(r);
|
|
41
|
+
if (n === undefined)
|
|
42
|
+
n = 0;
|
|
43
|
+
if (n > $Reader.recursionLimit)
|
|
44
|
+
throw Error("maximum nesting depth exceeded");
|
|
45
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIMediaCollectionMessage();
|
|
46
|
+
while (r.pos < c) {
|
|
47
|
+
var t = r.uint32();
|
|
48
|
+
if (t === e)
|
|
49
|
+
break;
|
|
50
|
+
switch (t >>> 3) {
|
|
51
|
+
case 1: {
|
|
52
|
+
m.collectionId = r.string();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
m.expectedMediaCount = r.uint32();
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 3: {
|
|
60
|
+
m.hasGlobalCaption = r.bool();
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
default:
|
|
64
|
+
r.skipType(t & 7, n);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return m;
|
|
69
|
+
};
|
|
70
|
+
AIMediaCollectionMessage.fromObject = function fromObject(d, n) {
|
|
71
|
+
if (d instanceof $root.proto.AIMediaCollectionMessage)
|
|
72
|
+
return d;
|
|
73
|
+
if (n === undefined)
|
|
74
|
+
n = 0;
|
|
75
|
+
if (n > $util.recursionLimit)
|
|
76
|
+
throw Error("maximum nesting depth exceeded");
|
|
77
|
+
var m = new $root.proto.AIMediaCollectionMessage();
|
|
78
|
+
if (d.collectionId != null) {
|
|
79
|
+
m.collectionId = String(d.collectionId);
|
|
80
|
+
}
|
|
81
|
+
if (d.expectedMediaCount != null) {
|
|
82
|
+
m.expectedMediaCount = d.expectedMediaCount >>> 0;
|
|
83
|
+
}
|
|
84
|
+
if (d.hasGlobalCaption != null) {
|
|
85
|
+
m.hasGlobalCaption = Boolean(d.hasGlobalCaption);
|
|
86
|
+
}
|
|
87
|
+
return m;
|
|
88
|
+
};
|
|
89
|
+
AIMediaCollectionMessage.toObject = function toObject(m, o) {
|
|
90
|
+
if (!o)
|
|
91
|
+
o = {};
|
|
92
|
+
var d = {};
|
|
93
|
+
if (m.collectionId != null && m.hasOwnProperty("collectionId")) {
|
|
94
|
+
d.collectionId = m.collectionId;
|
|
95
|
+
if (o.oneofs)
|
|
96
|
+
d._collectionId = "collectionId";
|
|
97
|
+
}
|
|
98
|
+
if (m.expectedMediaCount != null && m.hasOwnProperty("expectedMediaCount")) {
|
|
99
|
+
d.expectedMediaCount = m.expectedMediaCount;
|
|
100
|
+
if (o.oneofs)
|
|
101
|
+
d._expectedMediaCount = "expectedMediaCount";
|
|
102
|
+
}
|
|
103
|
+
if (m.hasGlobalCaption != null && m.hasOwnProperty("hasGlobalCaption")) {
|
|
104
|
+
d.hasGlobalCaption = m.hasGlobalCaption;
|
|
105
|
+
if (o.oneofs)
|
|
106
|
+
d._hasGlobalCaption = "hasGlobalCaption";
|
|
107
|
+
}
|
|
108
|
+
return d;
|
|
109
|
+
};
|
|
110
|
+
AIMediaCollectionMessage.prototype.toJSON = function toJSON() {
|
|
111
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
112
|
+
};
|
|
113
|
+
AIMediaCollectionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
114
|
+
if (typeUrlPrefix === undefined) {
|
|
115
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
116
|
+
}
|
|
117
|
+
return typeUrlPrefix + "/proto.AIMediaCollectionMessage";
|
|
118
|
+
};
|
|
119
|
+
return AIMediaCollectionMessage;
|