@hiroosy/baileys-lite 0.3.3 → 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 +247 -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
- package/src/binary/wa-binary.js +4 -2
- package/src/defaults.js +2 -1
- package/src/foundation/cache.js +99 -24
- package/src/foundation/memory.js +103 -0
- package/src/signal/libsignal.js +1 -8
- package/src/signal/signal-repository.js +6 -4
- package/src/socket/chats.js +2 -0
- package/src/socket/messages-recv.js +5 -3
- package/src/socket/messages-send.js +2 -2
- package/src/socket/socket-core.js +3 -0
- package/src/utils/auth-state-core.js +2 -1
- package/src/utils/chat-sync.js +4 -0
- package/src/utils/media.js +13 -8
- package/src/utils/message-processing.js +22 -6
- package/src/utils/wa-protocol-core.js +6 -5
- package/src/wam/wam-constants.js +22 -22851
- package/src/wam/wam-data.json +1 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIRichResponseContentItemsMetadata(p) {
|
|
3
|
+
this.itemsMetadata = [];
|
|
4
|
+
if (p)
|
|
5
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
6
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
7
|
+
this[ks[i]] = p[ks[i]];
|
|
8
|
+
}
|
|
9
|
+
AIRichResponseContentItemsMetadata.prototype.itemsMetadata = $util.emptyArray;
|
|
10
|
+
AIRichResponseContentItemsMetadata.prototype.contentType = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(AIRichResponseContentItemsMetadata.prototype, "_contentType", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["contentType"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
AIRichResponseContentItemsMetadata.create = function create(properties) {
|
|
17
|
+
return new AIRichResponseContentItemsMetadata(properties);
|
|
18
|
+
};
|
|
19
|
+
AIRichResponseContentItemsMetadata.encode = function encode(m, w) {
|
|
20
|
+
if (!w)
|
|
21
|
+
w = $Writer.create();
|
|
22
|
+
if (m.itemsMetadata != null && m.itemsMetadata.length) {
|
|
23
|
+
for (var i = 0; i < m.itemsMetadata.length; ++i)
|
|
24
|
+
$root.proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.encode(m.itemsMetadata[i], w.uint32(10).fork()).ldelim();
|
|
25
|
+
}
|
|
26
|
+
if (m.contentType != null && Object.hasOwnProperty.call(m, "contentType"))
|
|
27
|
+
w.uint32(16).int32(m.contentType);
|
|
28
|
+
return w;
|
|
29
|
+
};
|
|
30
|
+
AIRichResponseContentItemsMetadata.decode = function decode(r, l, e, n) {
|
|
31
|
+
if (!(r instanceof $Reader))
|
|
32
|
+
r = $Reader.create(r);
|
|
33
|
+
if (n === undefined)
|
|
34
|
+
n = 0;
|
|
35
|
+
if (n > $Reader.recursionLimit)
|
|
36
|
+
throw Error("maximum nesting depth exceeded");
|
|
37
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseContentItemsMetadata();
|
|
38
|
+
while (r.pos < c) {
|
|
39
|
+
var t = r.uint32();
|
|
40
|
+
if (t === e)
|
|
41
|
+
break;
|
|
42
|
+
switch (t >>> 3) {
|
|
43
|
+
case 1: {
|
|
44
|
+
if (!(m.itemsMetadata && m.itemsMetadata.length))
|
|
45
|
+
m.itemsMetadata = [];
|
|
46
|
+
m.itemsMetadata.push($root.proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.decode(r, r.uint32(), undefined, n + 1));
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
case 2: {
|
|
50
|
+
m.contentType = r.int32();
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
default:
|
|
54
|
+
r.skipType(t & 7, n);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return m;
|
|
59
|
+
};
|
|
60
|
+
AIRichResponseContentItemsMetadata.fromObject = function fromObject(d, n) {
|
|
61
|
+
if (d instanceof $root.proto.AIRichResponseContentItemsMetadata)
|
|
62
|
+
return d;
|
|
63
|
+
if (n === undefined)
|
|
64
|
+
n = 0;
|
|
65
|
+
if (n > $util.recursionLimit)
|
|
66
|
+
throw Error("maximum nesting depth exceeded");
|
|
67
|
+
var m = new $root.proto.AIRichResponseContentItemsMetadata();
|
|
68
|
+
if (d.itemsMetadata) {
|
|
69
|
+
if (!Array.isArray(d.itemsMetadata))
|
|
70
|
+
throw TypeError(".proto.AIRichResponseContentItemsMetadata.itemsMetadata: array expected");
|
|
71
|
+
m.itemsMetadata = [];
|
|
72
|
+
for (var i = 0; i < d.itemsMetadata.length; ++i) {
|
|
73
|
+
if (typeof d.itemsMetadata[i] !== "object")
|
|
74
|
+
throw TypeError(".proto.AIRichResponseContentItemsMetadata.itemsMetadata: object expected");
|
|
75
|
+
m.itemsMetadata[i] = $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.fromObject(d.itemsMetadata[i], n + 1);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
switch (d.contentType) {
|
|
79
|
+
default:
|
|
80
|
+
if (typeof d.contentType === "number") {
|
|
81
|
+
m.contentType = d.contentType;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
case "DEFAULT":
|
|
86
|
+
case 0:
|
|
87
|
+
m.contentType = 0;
|
|
88
|
+
break;
|
|
89
|
+
case "CAROUSEL":
|
|
90
|
+
case 1:
|
|
91
|
+
m.contentType = 1;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
return m;
|
|
95
|
+
};
|
|
96
|
+
AIRichResponseContentItemsMetadata.toObject = function toObject(m, o) {
|
|
97
|
+
if (!o)
|
|
98
|
+
o = {};
|
|
99
|
+
var d = {};
|
|
100
|
+
if (o.arrays || o.defaults) {
|
|
101
|
+
d.itemsMetadata = [];
|
|
102
|
+
}
|
|
103
|
+
if (m.itemsMetadata && m.itemsMetadata.length) {
|
|
104
|
+
d.itemsMetadata = [];
|
|
105
|
+
for (var j = 0; j < m.itemsMetadata.length; ++j) {
|
|
106
|
+
d.itemsMetadata[j] = $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.toObject(m.itemsMetadata[j], o);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (m.contentType != null && m.hasOwnProperty("contentType")) {
|
|
110
|
+
d.contentType = o.enums === String ? $root.proto.AIRichResponseContentItemsMetadata.ContentType[m.contentType] === undefined ? m.contentType : $root.proto.AIRichResponseContentItemsMetadata.ContentType[m.contentType] : m.contentType;
|
|
111
|
+
if (o.oneofs)
|
|
112
|
+
d._contentType = "contentType";
|
|
113
|
+
}
|
|
114
|
+
return d;
|
|
115
|
+
};
|
|
116
|
+
AIRichResponseContentItemsMetadata.prototype.toJSON = function toJSON() {
|
|
117
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
118
|
+
};
|
|
119
|
+
AIRichResponseContentItemsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
120
|
+
if (typeUrlPrefix === undefined) {
|
|
121
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
122
|
+
}
|
|
123
|
+
return typeUrlPrefix + "/proto.AIRichResponseContentItemsMetadata";
|
|
124
|
+
};
|
|
125
|
+
$lazy(AIRichResponseContentItemsMetadata, "AIRichResponseContentItemMetadata", function() {
|
|
126
|
+
function AIRichResponseContentItemMetadata(p) {
|
|
127
|
+
if (p)
|
|
128
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
129
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
130
|
+
this[ks[i]] = p[ks[i]];
|
|
131
|
+
}
|
|
132
|
+
AIRichResponseContentItemMetadata.prototype.reelItem = null;
|
|
133
|
+
let $oneOfFields;
|
|
134
|
+
Object.defineProperty(AIRichResponseContentItemMetadata.prototype, "aIRichResponseContentItem", {
|
|
135
|
+
get: $util.oneOfGetter($oneOfFields = ["reelItem"]),
|
|
136
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
137
|
+
});
|
|
138
|
+
AIRichResponseContentItemMetadata.create = function create(properties) {
|
|
139
|
+
return new AIRichResponseContentItemMetadata(properties);
|
|
140
|
+
};
|
|
141
|
+
AIRichResponseContentItemMetadata.encode = function encode(m, w) {
|
|
142
|
+
if (!w)
|
|
143
|
+
w = $Writer.create();
|
|
144
|
+
if (m.reelItem != null && Object.hasOwnProperty.call(m, "reelItem"))
|
|
145
|
+
$root.proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.encode(m.reelItem, w.uint32(10).fork()).ldelim();
|
|
146
|
+
return w;
|
|
147
|
+
};
|
|
148
|
+
AIRichResponseContentItemMetadata.decode = function decode(r, l, e, n) {
|
|
149
|
+
if (!(r instanceof $Reader))
|
|
150
|
+
r = $Reader.create(r);
|
|
151
|
+
if (n === undefined)
|
|
152
|
+
n = 0;
|
|
153
|
+
if (n > $Reader.recursionLimit)
|
|
154
|
+
throw Error("maximum nesting depth exceeded");
|
|
155
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata();
|
|
156
|
+
while (r.pos < c) {
|
|
157
|
+
var t = r.uint32();
|
|
158
|
+
if (t === e)
|
|
159
|
+
break;
|
|
160
|
+
switch (t >>> 3) {
|
|
161
|
+
case 1: {
|
|
162
|
+
m.reelItem = $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.decode(r, r.uint32(), undefined, n + 1);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
default:
|
|
166
|
+
r.skipType(t & 7, n);
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return m;
|
|
171
|
+
};
|
|
172
|
+
AIRichResponseContentItemMetadata.fromObject = function fromObject(d, n) {
|
|
173
|
+
if (d instanceof $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata)
|
|
174
|
+
return d;
|
|
175
|
+
if (n === undefined)
|
|
176
|
+
n = 0;
|
|
177
|
+
if (n > $util.recursionLimit)
|
|
178
|
+
throw Error("maximum nesting depth exceeded");
|
|
179
|
+
var m = new $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata();
|
|
180
|
+
if (d.reelItem != null) {
|
|
181
|
+
if (typeof d.reelItem !== "object")
|
|
182
|
+
throw TypeError(".proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata.reelItem: object expected");
|
|
183
|
+
m.reelItem = $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.fromObject(d.reelItem, n + 1);
|
|
184
|
+
}
|
|
185
|
+
return m;
|
|
186
|
+
};
|
|
187
|
+
AIRichResponseContentItemMetadata.toObject = function toObject(m, o) {
|
|
188
|
+
if (!o)
|
|
189
|
+
o = {};
|
|
190
|
+
var d = {};
|
|
191
|
+
if (m.reelItem != null && m.hasOwnProperty("reelItem")) {
|
|
192
|
+
d.reelItem = $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem.toObject(m.reelItem, o);
|
|
193
|
+
if (o.oneofs)
|
|
194
|
+
d.aIRichResponseContentItem = "reelItem";
|
|
195
|
+
}
|
|
196
|
+
return d;
|
|
197
|
+
};
|
|
198
|
+
AIRichResponseContentItemMetadata.prototype.toJSON = function toJSON() {
|
|
199
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
200
|
+
};
|
|
201
|
+
AIRichResponseContentItemMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
202
|
+
if (typeUrlPrefix === undefined) {
|
|
203
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
204
|
+
}
|
|
205
|
+
return typeUrlPrefix + "/proto.AIRichResponseContentItemsMetadata.AIRichResponseContentItemMetadata";
|
|
206
|
+
};
|
|
207
|
+
return AIRichResponseContentItemMetadata;
|
|
208
|
+
});
|
|
209
|
+
$lazy(AIRichResponseContentItemsMetadata, "AIRichResponseReelItem", function() {
|
|
210
|
+
function AIRichResponseReelItem(p) {
|
|
211
|
+
if (p)
|
|
212
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
213
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
214
|
+
this[ks[i]] = p[ks[i]];
|
|
215
|
+
}
|
|
216
|
+
AIRichResponseReelItem.prototype.title = null;
|
|
217
|
+
AIRichResponseReelItem.prototype.profileIconUrl = null;
|
|
218
|
+
AIRichResponseReelItem.prototype.thumbnailUrl = null;
|
|
219
|
+
AIRichResponseReelItem.prototype.videoUrl = null;
|
|
220
|
+
let $oneOfFields;
|
|
221
|
+
Object.defineProperty(AIRichResponseReelItem.prototype, "_title", {
|
|
222
|
+
get: $util.oneOfGetter($oneOfFields = ["title"]),
|
|
223
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
224
|
+
});
|
|
225
|
+
Object.defineProperty(AIRichResponseReelItem.prototype, "_profileIconUrl", {
|
|
226
|
+
get: $util.oneOfGetter($oneOfFields = ["profileIconUrl"]),
|
|
227
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
228
|
+
});
|
|
229
|
+
Object.defineProperty(AIRichResponseReelItem.prototype, "_thumbnailUrl", {
|
|
230
|
+
get: $util.oneOfGetter($oneOfFields = ["thumbnailUrl"]),
|
|
231
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
232
|
+
});
|
|
233
|
+
Object.defineProperty(AIRichResponseReelItem.prototype, "_videoUrl", {
|
|
234
|
+
get: $util.oneOfGetter($oneOfFields = ["videoUrl"]),
|
|
235
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
236
|
+
});
|
|
237
|
+
AIRichResponseReelItem.create = function create(properties) {
|
|
238
|
+
return new AIRichResponseReelItem(properties);
|
|
239
|
+
};
|
|
240
|
+
AIRichResponseReelItem.encode = function encode(m, w) {
|
|
241
|
+
if (!w)
|
|
242
|
+
w = $Writer.create();
|
|
243
|
+
if (m.title != null && Object.hasOwnProperty.call(m, "title"))
|
|
244
|
+
w.uint32(10).string(m.title);
|
|
245
|
+
if (m.profileIconUrl != null && Object.hasOwnProperty.call(m, "profileIconUrl"))
|
|
246
|
+
w.uint32(18).string(m.profileIconUrl);
|
|
247
|
+
if (m.thumbnailUrl != null && Object.hasOwnProperty.call(m, "thumbnailUrl"))
|
|
248
|
+
w.uint32(26).string(m.thumbnailUrl);
|
|
249
|
+
if (m.videoUrl != null && Object.hasOwnProperty.call(m, "videoUrl"))
|
|
250
|
+
w.uint32(34).string(m.videoUrl);
|
|
251
|
+
return w;
|
|
252
|
+
};
|
|
253
|
+
AIRichResponseReelItem.decode = function decode(r, l, e, n) {
|
|
254
|
+
if (!(r instanceof $Reader))
|
|
255
|
+
r = $Reader.create(r);
|
|
256
|
+
if (n === undefined)
|
|
257
|
+
n = 0;
|
|
258
|
+
if (n > $Reader.recursionLimit)
|
|
259
|
+
throw Error("maximum nesting depth exceeded");
|
|
260
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem();
|
|
261
|
+
while (r.pos < c) {
|
|
262
|
+
var t = r.uint32();
|
|
263
|
+
if (t === e)
|
|
264
|
+
break;
|
|
265
|
+
switch (t >>> 3) {
|
|
266
|
+
case 1: {
|
|
267
|
+
m.title = r.string();
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
case 2: {
|
|
271
|
+
m.profileIconUrl = r.string();
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
case 3: {
|
|
275
|
+
m.thumbnailUrl = r.string();
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
case 4: {
|
|
279
|
+
m.videoUrl = r.string();
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
default:
|
|
283
|
+
r.skipType(t & 7, n);
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return m;
|
|
288
|
+
};
|
|
289
|
+
AIRichResponseReelItem.fromObject = function fromObject(d, n) {
|
|
290
|
+
if (d instanceof $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem)
|
|
291
|
+
return d;
|
|
292
|
+
if (n === undefined)
|
|
293
|
+
n = 0;
|
|
294
|
+
if (n > $util.recursionLimit)
|
|
295
|
+
throw Error("maximum nesting depth exceeded");
|
|
296
|
+
var m = new $root.proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem();
|
|
297
|
+
if (d.title != null) {
|
|
298
|
+
m.title = String(d.title);
|
|
299
|
+
}
|
|
300
|
+
if (d.profileIconUrl != null) {
|
|
301
|
+
m.profileIconUrl = String(d.profileIconUrl);
|
|
302
|
+
}
|
|
303
|
+
if (d.thumbnailUrl != null) {
|
|
304
|
+
m.thumbnailUrl = String(d.thumbnailUrl);
|
|
305
|
+
}
|
|
306
|
+
if (d.videoUrl != null) {
|
|
307
|
+
m.videoUrl = String(d.videoUrl);
|
|
308
|
+
}
|
|
309
|
+
return m;
|
|
310
|
+
};
|
|
311
|
+
AIRichResponseReelItem.toObject = function toObject(m, o) {
|
|
312
|
+
if (!o)
|
|
313
|
+
o = {};
|
|
314
|
+
var d = {};
|
|
315
|
+
if (m.title != null && m.hasOwnProperty("title")) {
|
|
316
|
+
d.title = m.title;
|
|
317
|
+
if (o.oneofs)
|
|
318
|
+
d._title = "title";
|
|
319
|
+
}
|
|
320
|
+
if (m.profileIconUrl != null && m.hasOwnProperty("profileIconUrl")) {
|
|
321
|
+
d.profileIconUrl = m.profileIconUrl;
|
|
322
|
+
if (o.oneofs)
|
|
323
|
+
d._profileIconUrl = "profileIconUrl";
|
|
324
|
+
}
|
|
325
|
+
if (m.thumbnailUrl != null && m.hasOwnProperty("thumbnailUrl")) {
|
|
326
|
+
d.thumbnailUrl = m.thumbnailUrl;
|
|
327
|
+
if (o.oneofs)
|
|
328
|
+
d._thumbnailUrl = "thumbnailUrl";
|
|
329
|
+
}
|
|
330
|
+
if (m.videoUrl != null && m.hasOwnProperty("videoUrl")) {
|
|
331
|
+
d.videoUrl = m.videoUrl;
|
|
332
|
+
if (o.oneofs)
|
|
333
|
+
d._videoUrl = "videoUrl";
|
|
334
|
+
}
|
|
335
|
+
return d;
|
|
336
|
+
};
|
|
337
|
+
AIRichResponseReelItem.prototype.toJSON = function toJSON() {
|
|
338
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
339
|
+
};
|
|
340
|
+
AIRichResponseReelItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
341
|
+
if (typeUrlPrefix === undefined) {
|
|
342
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
343
|
+
}
|
|
344
|
+
return typeUrlPrefix + "/proto.AIRichResponseContentItemsMetadata.AIRichResponseReelItem";
|
|
345
|
+
};
|
|
346
|
+
return AIRichResponseReelItem;
|
|
347
|
+
});
|
|
348
|
+
$lazy(AIRichResponseContentItemsMetadata, "ContentType", function() {
|
|
349
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
350
|
+
values[valuesById[0] = "DEFAULT"] = 0;
|
|
351
|
+
values[valuesById[1] = "CAROUSEL"] = 1;
|
|
352
|
+
return values;
|
|
353
|
+
});
|
|
354
|
+
return AIRichResponseContentItemsMetadata;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIRichResponseDynamicMetadata(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
|
+
AIRichResponseDynamicMetadata.prototype.type = null;
|
|
9
|
+
AIRichResponseDynamicMetadata.prototype.version = null;
|
|
10
|
+
AIRichResponseDynamicMetadata.prototype.url = null;
|
|
11
|
+
AIRichResponseDynamicMetadata.prototype.loopCount = null;
|
|
12
|
+
let $oneOfFields;
|
|
13
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_type", {
|
|
14
|
+
get: $util.oneOfGetter($oneOfFields = ["type"]),
|
|
15
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_version", {
|
|
18
|
+
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
|
19
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_url", {
|
|
22
|
+
get: $util.oneOfGetter($oneOfFields = ["url"]),
|
|
23
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(AIRichResponseDynamicMetadata.prototype, "_loopCount", {
|
|
26
|
+
get: $util.oneOfGetter($oneOfFields = ["loopCount"]),
|
|
27
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28
|
+
});
|
|
29
|
+
AIRichResponseDynamicMetadata.create = function create(properties) {
|
|
30
|
+
return new AIRichResponseDynamicMetadata(properties);
|
|
31
|
+
};
|
|
32
|
+
AIRichResponseDynamicMetadata.encode = function encode(m, w) {
|
|
33
|
+
if (!w)
|
|
34
|
+
w = $Writer.create();
|
|
35
|
+
if (m.type != null && Object.hasOwnProperty.call(m, "type"))
|
|
36
|
+
w.uint32(8).int32(m.type);
|
|
37
|
+
if (m.version != null && Object.hasOwnProperty.call(m, "version"))
|
|
38
|
+
w.uint32(16).uint64(m.version);
|
|
39
|
+
if (m.url != null && Object.hasOwnProperty.call(m, "url"))
|
|
40
|
+
w.uint32(26).string(m.url);
|
|
41
|
+
if (m.loopCount != null && Object.hasOwnProperty.call(m, "loopCount"))
|
|
42
|
+
w.uint32(32).uint32(m.loopCount);
|
|
43
|
+
return w;
|
|
44
|
+
};
|
|
45
|
+
AIRichResponseDynamicMetadata.decode = function decode(r, l, e, n) {
|
|
46
|
+
if (!(r instanceof $Reader))
|
|
47
|
+
r = $Reader.create(r);
|
|
48
|
+
if (n === undefined)
|
|
49
|
+
n = 0;
|
|
50
|
+
if (n > $Reader.recursionLimit)
|
|
51
|
+
throw Error("maximum nesting depth exceeded");
|
|
52
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseDynamicMetadata();
|
|
53
|
+
while (r.pos < c) {
|
|
54
|
+
var t = r.uint32();
|
|
55
|
+
if (t === e)
|
|
56
|
+
break;
|
|
57
|
+
switch (t >>> 3) {
|
|
58
|
+
case 1: {
|
|
59
|
+
m.type = r.int32();
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 2: {
|
|
63
|
+
m.version = r.uint64();
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case 3: {
|
|
67
|
+
m.url = r.string();
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 4: {
|
|
71
|
+
m.loopCount = r.uint32();
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
r.skipType(t & 7, n);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return m;
|
|
80
|
+
};
|
|
81
|
+
AIRichResponseDynamicMetadata.fromObject = function fromObject(d, n) {
|
|
82
|
+
if (d instanceof $root.proto.AIRichResponseDynamicMetadata)
|
|
83
|
+
return d;
|
|
84
|
+
if (n === undefined)
|
|
85
|
+
n = 0;
|
|
86
|
+
if (n > $util.recursionLimit)
|
|
87
|
+
throw Error("maximum nesting depth exceeded");
|
|
88
|
+
var m = new $root.proto.AIRichResponseDynamicMetadata();
|
|
89
|
+
switch (d.type) {
|
|
90
|
+
default:
|
|
91
|
+
if (typeof d.type === "number") {
|
|
92
|
+
m.type = d.type;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN":
|
|
97
|
+
case 0:
|
|
98
|
+
m.type = 0;
|
|
99
|
+
break;
|
|
100
|
+
case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE":
|
|
101
|
+
case 1:
|
|
102
|
+
m.type = 1;
|
|
103
|
+
break;
|
|
104
|
+
case "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF":
|
|
105
|
+
case 2:
|
|
106
|
+
m.type = 2;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
if (d.version != null) {
|
|
110
|
+
if ($util.Long)
|
|
111
|
+
(m.version = $util.Long.fromValue(d.version)).unsigned = true;
|
|
112
|
+
else if (typeof d.version === "string")
|
|
113
|
+
m.version = parseInt(d.version, 10);
|
|
114
|
+
else if (typeof d.version === "number")
|
|
115
|
+
m.version = d.version;
|
|
116
|
+
else if (typeof d.version === "object")
|
|
117
|
+
m.version = new $util.LongBits(d.version.low >>> 0, d.version.high >>> 0).toNumber(true);
|
|
118
|
+
}
|
|
119
|
+
if (d.url != null) {
|
|
120
|
+
m.url = String(d.url);
|
|
121
|
+
}
|
|
122
|
+
if (d.loopCount != null) {
|
|
123
|
+
m.loopCount = d.loopCount >>> 0;
|
|
124
|
+
}
|
|
125
|
+
return m;
|
|
126
|
+
};
|
|
127
|
+
AIRichResponseDynamicMetadata.toObject = function toObject(m, o) {
|
|
128
|
+
if (!o)
|
|
129
|
+
o = {};
|
|
130
|
+
var d = {};
|
|
131
|
+
if (m.type != null && m.hasOwnProperty("type")) {
|
|
132
|
+
d.type = o.enums === String ? $root.proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[m.type] === undefined ? m.type : $root.proto.AIRichResponseDynamicMetadata.AIRichResponseDynamicMetadataType[m.type] : m.type;
|
|
133
|
+
if (o.oneofs)
|
|
134
|
+
d._type = "type";
|
|
135
|
+
}
|
|
136
|
+
if (m.version != null && m.hasOwnProperty("version")) {
|
|
137
|
+
if (typeof m.version === "number")
|
|
138
|
+
d.version = o.longs === String ? String(m.version) : m.version;
|
|
139
|
+
else
|
|
140
|
+
d.version = o.longs === String ? longToString(m.version, true) : o.longs === Number ? longToNumber(m.version, true) : m.version;
|
|
141
|
+
if (o.oneofs)
|
|
142
|
+
d._version = "version";
|
|
143
|
+
}
|
|
144
|
+
if (m.url != null && m.hasOwnProperty("url")) {
|
|
145
|
+
d.url = m.url;
|
|
146
|
+
if (o.oneofs)
|
|
147
|
+
d._url = "url";
|
|
148
|
+
}
|
|
149
|
+
if (m.loopCount != null && m.hasOwnProperty("loopCount")) {
|
|
150
|
+
d.loopCount = m.loopCount;
|
|
151
|
+
if (o.oneofs)
|
|
152
|
+
d._loopCount = "loopCount";
|
|
153
|
+
}
|
|
154
|
+
return d;
|
|
155
|
+
};
|
|
156
|
+
AIRichResponseDynamicMetadata.prototype.toJSON = function toJSON() {
|
|
157
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
158
|
+
};
|
|
159
|
+
AIRichResponseDynamicMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
160
|
+
if (typeUrlPrefix === undefined) {
|
|
161
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
162
|
+
}
|
|
163
|
+
return typeUrlPrefix + "/proto.AIRichResponseDynamicMetadata";
|
|
164
|
+
};
|
|
165
|
+
$lazy(AIRichResponseDynamicMetadata, "AIRichResponseDynamicMetadataType", function() {
|
|
166
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
167
|
+
values[valuesById[0] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_UNKNOWN"] = 0;
|
|
168
|
+
values[valuesById[1] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_IMAGE"] = 1;
|
|
169
|
+
values[valuesById[2] = "AI_RICH_RESPONSE_DYNAMIC_METADATA_TYPE_GIF"] = 2;
|
|
170
|
+
return values;
|
|
171
|
+
});
|
|
172
|
+
return AIRichResponseDynamicMetadata;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function AIRichResponseGridImageMetadata(p) {
|
|
3
|
+
this.imageUrls = [];
|
|
4
|
+
if (p)
|
|
5
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
6
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
7
|
+
this[ks[i]] = p[ks[i]];
|
|
8
|
+
}
|
|
9
|
+
AIRichResponseGridImageMetadata.prototype.gridImageUrl = null;
|
|
10
|
+
AIRichResponseGridImageMetadata.prototype.imageUrls = $util.emptyArray;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(AIRichResponseGridImageMetadata.prototype, "_gridImageUrl", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["gridImageUrl"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
AIRichResponseGridImageMetadata.create = function create(properties) {
|
|
17
|
+
return new AIRichResponseGridImageMetadata(properties);
|
|
18
|
+
};
|
|
19
|
+
AIRichResponseGridImageMetadata.encode = function encode(m, w) {
|
|
20
|
+
if (!w)
|
|
21
|
+
w = $Writer.create();
|
|
22
|
+
if (m.gridImageUrl != null && Object.hasOwnProperty.call(m, "gridImageUrl"))
|
|
23
|
+
$root.proto.AIRichResponseImageURL.encode(m.gridImageUrl, w.uint32(10).fork()).ldelim();
|
|
24
|
+
if (m.imageUrls != null && m.imageUrls.length) {
|
|
25
|
+
for (var i = 0; i < m.imageUrls.length; ++i)
|
|
26
|
+
$root.proto.AIRichResponseImageURL.encode(m.imageUrls[i], w.uint32(18).fork()).ldelim();
|
|
27
|
+
}
|
|
28
|
+
return w;
|
|
29
|
+
};
|
|
30
|
+
AIRichResponseGridImageMetadata.decode = function decode(r, l, e, n) {
|
|
31
|
+
if (!(r instanceof $Reader))
|
|
32
|
+
r = $Reader.create(r);
|
|
33
|
+
if (n === undefined)
|
|
34
|
+
n = 0;
|
|
35
|
+
if (n > $Reader.recursionLimit)
|
|
36
|
+
throw Error("maximum nesting depth exceeded");
|
|
37
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIRichResponseGridImageMetadata();
|
|
38
|
+
while (r.pos < c) {
|
|
39
|
+
var t = r.uint32();
|
|
40
|
+
if (t === e)
|
|
41
|
+
break;
|
|
42
|
+
switch (t >>> 3) {
|
|
43
|
+
case 1: {
|
|
44
|
+
m.gridImageUrl = $root.proto.AIRichResponseImageURL.decode(r, r.uint32(), undefined, n + 1);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case 2: {
|
|
48
|
+
if (!(m.imageUrls && m.imageUrls.length))
|
|
49
|
+
m.imageUrls = [];
|
|
50
|
+
m.imageUrls.push($root.proto.AIRichResponseImageURL.decode(r, r.uint32(), undefined, n + 1));
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
default:
|
|
54
|
+
r.skipType(t & 7, n);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return m;
|
|
59
|
+
};
|
|
60
|
+
AIRichResponseGridImageMetadata.fromObject = function fromObject(d, n) {
|
|
61
|
+
if (d instanceof $root.proto.AIRichResponseGridImageMetadata)
|
|
62
|
+
return d;
|
|
63
|
+
if (n === undefined)
|
|
64
|
+
n = 0;
|
|
65
|
+
if (n > $util.recursionLimit)
|
|
66
|
+
throw Error("maximum nesting depth exceeded");
|
|
67
|
+
var m = new $root.proto.AIRichResponseGridImageMetadata();
|
|
68
|
+
if (d.gridImageUrl != null) {
|
|
69
|
+
if (typeof d.gridImageUrl !== "object")
|
|
70
|
+
throw TypeError(".proto.AIRichResponseGridImageMetadata.gridImageUrl: object expected");
|
|
71
|
+
m.gridImageUrl = $root.proto.AIRichResponseImageURL.fromObject(d.gridImageUrl, n + 1);
|
|
72
|
+
}
|
|
73
|
+
if (d.imageUrls) {
|
|
74
|
+
if (!Array.isArray(d.imageUrls))
|
|
75
|
+
throw TypeError(".proto.AIRichResponseGridImageMetadata.imageUrls: array expected");
|
|
76
|
+
m.imageUrls = [];
|
|
77
|
+
for (var i = 0; i < d.imageUrls.length; ++i) {
|
|
78
|
+
if (typeof d.imageUrls[i] !== "object")
|
|
79
|
+
throw TypeError(".proto.AIRichResponseGridImageMetadata.imageUrls: object expected");
|
|
80
|
+
m.imageUrls[i] = $root.proto.AIRichResponseImageURL.fromObject(d.imageUrls[i], n + 1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return m;
|
|
84
|
+
};
|
|
85
|
+
AIRichResponseGridImageMetadata.toObject = function toObject(m, o) {
|
|
86
|
+
if (!o)
|
|
87
|
+
o = {};
|
|
88
|
+
var d = {};
|
|
89
|
+
if (o.arrays || o.defaults) {
|
|
90
|
+
d.imageUrls = [];
|
|
91
|
+
}
|
|
92
|
+
if (m.gridImageUrl != null && m.hasOwnProperty("gridImageUrl")) {
|
|
93
|
+
d.gridImageUrl = $root.proto.AIRichResponseImageURL.toObject(m.gridImageUrl, o);
|
|
94
|
+
if (o.oneofs)
|
|
95
|
+
d._gridImageUrl = "gridImageUrl";
|
|
96
|
+
}
|
|
97
|
+
if (m.imageUrls && m.imageUrls.length) {
|
|
98
|
+
d.imageUrls = [];
|
|
99
|
+
for (var j = 0; j < m.imageUrls.length; ++j) {
|
|
100
|
+
d.imageUrls[j] = $root.proto.AIRichResponseImageURL.toObject(m.imageUrls[j], o);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return d;
|
|
104
|
+
};
|
|
105
|
+
AIRichResponseGridImageMetadata.prototype.toJSON = function toJSON() {
|
|
106
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
107
|
+
};
|
|
108
|
+
AIRichResponseGridImageMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
109
|
+
if (typeUrlPrefix === undefined) {
|
|
110
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
111
|
+
}
|
|
112
|
+
return typeUrlPrefix + "/proto.AIRichResponseGridImageMetadata";
|
|
113
|
+
};
|
|
114
|
+
return AIRichResponseGridImageMetadata;
|