@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.
Files changed (225) hide show
  1. package/WAProto/index.js +231 -113252
  2. package/WAProto/parts/ADVDeviceIdentity.part +201 -0
  3. package/WAProto/parts/ADVEncryptionType.part +6 -0
  4. package/WAProto/parts/ADVKeyIndexList.part +201 -0
  5. package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
  6. package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
  7. package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
  8. package/WAProto/parts/AIHomeState.part +405 -0
  9. package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
  10. package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
  11. package/WAProto/parts/AIMetadataOperation.part +83 -0
  12. package/WAProto/parts/AIQueryFanout.part +133 -0
  13. package/WAProto/parts/AIRegenerateMetadata.part +112 -0
  14. package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
  15. package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
  16. package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
  17. package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
  18. package/WAProto/parts/AIRichResponseImageURL.part +119 -0
  19. package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
  20. package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
  21. package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
  22. package/WAProto/parts/AIRichResponseMessage.part +167 -0
  23. package/WAProto/parts/AIRichResponseMessageType.part +5 -0
  24. package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
  25. package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
  26. package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
  27. package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
  28. package/WAProto/parts/AISubscriptionRequestType.part +7 -0
  29. package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
  30. package/WAProto/parts/AIThreadInfo.part +316 -0
  31. package/WAProto/parts/Account.part +138 -0
  32. package/WAProto/parts/ActionLink.part +100 -0
  33. package/WAProto/parts/AutoDownloadSettings.part +138 -0
  34. package/WAProto/parts/AvatarUserSettings.part +100 -0
  35. package/WAProto/parts/BizAccountLinkInfo.part +210 -0
  36. package/WAProto/parts/BizAccountPayload.part +105 -0
  37. package/WAProto/parts/BizIdentityInfo.part +298 -0
  38. package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
  39. package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
  40. package/WAProto/parts/BotAgentMetadata.part +83 -0
  41. package/WAProto/parts/BotCapabilityMetadata.part +437 -0
  42. package/WAProto/parts/BotCommandMetadata.part +119 -0
  43. package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
  44. package/WAProto/parts/BotFeedbackMessage.part +1366 -0
  45. package/WAProto/parts/BotGroupMetadata.part +92 -0
  46. package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
  47. package/WAProto/parts/BotImagineMetadata.part +134 -0
  48. package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
  49. package/WAProto/parts/BotLinkedAccount.part +95 -0
  50. package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
  51. package/WAProto/parts/BotMediaMetadata.part +229 -0
  52. package/WAProto/parts/BotMemoryFact.part +100 -0
  53. package/WAProto/parts/BotMemoryMetadata.part +141 -0
  54. package/WAProto/parts/BotMemuMetadata.part +92 -0
  55. package/WAProto/parts/BotMessageOrigin.part +95 -0
  56. package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
  57. package/WAProto/parts/BotMessageSharingInfo.part +297 -0
  58. package/WAProto/parts/BotMetadata.part +934 -0
  59. package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
  60. package/WAProto/parts/BotMetricsMetadata.part +341 -0
  61. package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
  62. package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
  63. package/WAProto/parts/BotModelMetadata.part +167 -0
  64. package/WAProto/parts/BotPluginMetadata.part +379 -0
  65. package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
  66. package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
  67. package/WAProto/parts/BotPromptSuggestion.part +100 -0
  68. package/WAProto/parts/BotPromptSuggestions.part +92 -0
  69. package/WAProto/parts/BotPttPromptMetadata.part +81 -0
  70. package/WAProto/parts/BotQuotaMetadata.part +241 -0
  71. package/WAProto/parts/BotReminderMetadata.part +232 -0
  72. package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
  73. package/WAProto/parts/BotRenderingMetadata.part +203 -0
  74. package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
  75. package/WAProto/parts/BotSessionMetadata.part +137 -0
  76. package/WAProto/parts/BotSessionSource.part +11 -0
  77. package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
  78. package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
  79. package/WAProto/parts/BotSourcesMetadata.part +322 -0
  80. package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
  81. package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
  82. package/WAProto/parts/CallLogRecord.part +646 -0
  83. package/WAProto/parts/CertChain.part +392 -0
  84. package/WAProto/parts/ChatLockSettings.part +102 -0
  85. package/WAProto/parts/ChatRowOpaqueData.part +712 -0
  86. package/WAProto/parts/Citation.part +119 -0
  87. package/WAProto/parts/ClientPairingProps.part +160 -0
  88. package/WAProto/parts/ClientPayload.part +2892 -0
  89. package/WAProto/parts/CollectionName.part +9 -0
  90. package/WAProto/parts/CommentMetadata.part +102 -0
  91. package/WAProto/parts/CompanionCommitment.part +84 -0
  92. package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
  93. package/WAProto/parts/Config.part +136 -0
  94. package/WAProto/parts/ContextInfo.part +4137 -0
  95. package/WAProto/parts/Conversation.part +1472 -0
  96. package/WAProto/parts/DeviceCapabilities.part +670 -0
  97. package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
  98. package/WAProto/parts/DeviceListMetadata.part +306 -0
  99. package/WAProto/parts/DeviceProps.part +982 -0
  100. package/WAProto/parts/DisappearingMode.part +206 -0
  101. package/WAProto/parts/EmbeddedContent.part +100 -0
  102. package/WAProto/parts/EmbeddedMessage.part +102 -0
  103. package/WAProto/parts/EmbeddedMusic.part +370 -0
  104. package/WAProto/parts/EncryptedPairingRequest.part +106 -0
  105. package/WAProto/parts/EphemeralSetting.part +110 -0
  106. package/WAProto/parts/EventAdditionalMetadata.part +81 -0
  107. package/WAProto/parts/EventResponse.part +152 -0
  108. package/WAProto/parts/ExitCode.part +110 -0
  109. package/WAProto/parts/ExternalBlobReference.part +195 -0
  110. package/WAProto/parts/Field.part +193 -0
  111. package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
  112. package/WAProto/parts/GlobalSettings.part +497 -0
  113. package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
  114. package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
  115. package/WAProto/parts/GroupMention.part +100 -0
  116. package/WAProto/parts/GroupParticipant.part +142 -0
  117. package/WAProto/parts/GroupRootKeyShare.part +92 -0
  118. package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
  119. package/WAProto/parts/HandshakeMessage.part +815 -0
  120. package/WAProto/parts/HatchMetadataSync.part +132 -0
  121. package/WAProto/parts/HistorySync.part +605 -0
  122. package/WAProto/parts/HistorySyncMsg.part +112 -0
  123. package/WAProto/parts/HydratedTemplateButton.part +501 -0
  124. package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
  125. package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
  126. package/WAProto/parts/InlineContact.part +157 -0
  127. package/WAProto/parts/InteractiveAnnotation.part +246 -0
  128. package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
  129. package/WAProto/parts/KeepInChat.part +225 -0
  130. package/WAProto/parts/KeepType.part +6 -0
  131. package/WAProto/parts/KeyExchangeMessage.part +169 -0
  132. package/WAProto/parts/KeyId.part +84 -0
  133. package/WAProto/parts/LIDMigrationMapping.part +149 -0
  134. package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
  135. package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
  136. package/WAProto/parts/LegacyMessage.part +104 -0
  137. package/WAProto/parts/LimitSharing.part +177 -0
  138. package/WAProto/parts/LocalizedName.part +119 -0
  139. package/WAProto/parts/Location.part +119 -0
  140. package/WAProto/parts/MediaData.part +81 -0
  141. package/WAProto/parts/MediaDomainInfo.part +120 -0
  142. package/WAProto/parts/MediaKeyDomain.part +6 -0
  143. package/WAProto/parts/MediaNotifyMessage.part +132 -0
  144. package/WAProto/parts/MediaRetryNotification.part +170 -0
  145. package/WAProto/parts/MediaVisibility.part +6 -0
  146. package/WAProto/parts/MemberLabel.part +110 -0
  147. package/WAProto/parts/Message.part +32376 -0
  148. package/WAProto/parts/MessageAddOn.part +305 -0
  149. package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
  150. package/WAProto/parts/MessageAssociation.part +235 -0
  151. package/WAProto/parts/MessageContextInfo.part +451 -0
  152. package/WAProto/parts/MessageKey.part +138 -0
  153. package/WAProto/parts/MessageSecretMessage.part +125 -0
  154. package/WAProto/parts/Money.part +129 -0
  155. package/WAProto/parts/MsgOpaqueData.part +1732 -0
  156. package/WAProto/parts/MsgRowOpaqueData.part +104 -0
  157. package/WAProto/parts/MutationProps.part +89 -0
  158. package/WAProto/parts/NoiseCertificate.part +277 -0
  159. package/WAProto/parts/NotificationMessageInfo.part +152 -0
  160. package/WAProto/parts/NotificationSettings.part +176 -0
  161. package/WAProto/parts/PairingRequest.part +128 -0
  162. package/WAProto/parts/PastParticipant.part +148 -0
  163. package/WAProto/parts/PastParticipants.part +112 -0
  164. package/WAProto/parts/PatchDebugData.part +358 -0
  165. package/WAProto/parts/PaymentBackground.part +460 -0
  166. package/WAProto/parts/PaymentInfo.part +602 -0
  167. package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
  168. package/WAProto/parts/PhotoChange.part +125 -0
  169. package/WAProto/parts/PinInChat.part +205 -0
  170. package/WAProto/parts/Point.part +138 -0
  171. package/WAProto/parts/PollAdditionalMetadata.part +216 -0
  172. package/WAProto/parts/PollEncValue.part +106 -0
  173. package/WAProto/parts/PollUpdate.part +202 -0
  174. package/WAProto/parts/PreKeyRecordStructure.part +125 -0
  175. package/WAProto/parts/PreKeySignalMessage.part +185 -0
  176. package/WAProto/parts/PremiumMessageInfo.part +81 -0
  177. package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
  178. package/WAProto/parts/PrivacySystemMessage.part +6 -0
  179. package/WAProto/parts/ProcessedVideo.part +266 -0
  180. package/WAProto/parts/ProloguePayload.part +105 -0
  181. package/WAProto/parts/Pushname.part +100 -0
  182. package/WAProto/parts/QuarantinedMessage.part +103 -0
  183. package/WAProto/parts/Reaction.part +169 -0
  184. package/WAProto/parts/RecentEmojiWeight.part +100 -0
  185. package/WAProto/parts/RecordStructure.part +114 -0
  186. package/WAProto/parts/Reportable.part +138 -0
  187. package/WAProto/parts/ReportingTokenInfo.part +84 -0
  188. package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
  189. package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
  190. package/WAProto/parts/SenderKeyMessage.part +122 -0
  191. package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
  192. package/WAProto/parts/SenderKeyStateStructure.part +469 -0
  193. package/WAProto/parts/ServerErrorReceipt.part +81 -0
  194. package/WAProto/parts/SessionStructure.part +1087 -0
  195. package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
  196. package/WAProto/parts/SessionTransparencyType.part +5 -0
  197. package/WAProto/parts/SignalMessage.part +144 -0
  198. package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
  199. package/WAProto/parts/StatusAttribution.part +1235 -0
  200. package/WAProto/parts/StatusMentionMessage.part +83 -0
  201. package/WAProto/parts/StatusPSA.part +121 -0
  202. package/WAProto/parts/StickerMetadata.part +357 -0
  203. package/WAProto/parts/SyncActionData.part +146 -0
  204. package/WAProto/parts/SyncActionValue.part +12959 -0
  205. package/WAProto/parts/SyncdIndex.part +84 -0
  206. package/WAProto/parts/SyncdMutation.part +121 -0
  207. package/WAProto/parts/SyncdMutations.part +92 -0
  208. package/WAProto/parts/SyncdPatch.part +262 -0
  209. package/WAProto/parts/SyncdRecord.part +125 -0
  210. package/WAProto/parts/SyncdSnapshot.part +157 -0
  211. package/WAProto/parts/SyncdValue.part +84 -0
  212. package/WAProto/parts/SyncdVersion.part +91 -0
  213. package/WAProto/parts/TapLinkAction.part +100 -0
  214. package/WAProto/parts/TemplateButton.part +449 -0
  215. package/WAProto/parts/ThreadID.part +126 -0
  216. package/WAProto/parts/UrlTrackingMap.part +231 -0
  217. package/WAProto/parts/UserPassword.part +399 -0
  218. package/WAProto/parts/UserReceipt.part +221 -0
  219. package/WAProto/parts/VerifiedNameCertificate.part +318 -0
  220. package/WAProto/parts/WallpaperSettings.part +119 -0
  221. package/WAProto/parts/WebFeatures.part +1870 -0
  222. package/WAProto/parts/WebLinkRenderConfig.part +5 -0
  223. package/WAProto/parts/WebMessageInfo.part +2851 -0
  224. package/WAProto/parts/WebNotificationsInfo.part +160 -0
  225. package/package.json +1 -1
@@ -0,0 +1,2892 @@
1
+ "use strict";
2
+ function ClientPayload(p) {
3
+ this.shards = [];
4
+ this.pairedPeripherals = [];
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
+ ClientPayload.prototype.username = null;
11
+ ClientPayload.prototype.passive = null;
12
+ ClientPayload.prototype.userAgent = null;
13
+ ClientPayload.prototype.webInfo = null;
14
+ ClientPayload.prototype.pushName = null;
15
+ ClientPayload.prototype.sessionId = null;
16
+ ClientPayload.prototype.shortConnect = null;
17
+ ClientPayload.prototype.connectType = null;
18
+ ClientPayload.prototype.connectReason = null;
19
+ ClientPayload.prototype.shards = $util.emptyArray;
20
+ ClientPayload.prototype.dnsSource = null;
21
+ ClientPayload.prototype.connectAttemptCount = null;
22
+ ClientPayload.prototype.device = null;
23
+ ClientPayload.prototype.devicePairingData = null;
24
+ ClientPayload.prototype.product = null;
25
+ ClientPayload.prototype.fbCat = null;
26
+ ClientPayload.prototype.fbUserAgent = null;
27
+ ClientPayload.prototype.oc = null;
28
+ ClientPayload.prototype.lc = null;
29
+ ClientPayload.prototype.iosAppExtension = null;
30
+ ClientPayload.prototype.fbAppId = null;
31
+ ClientPayload.prototype.fbDeviceId = null;
32
+ ClientPayload.prototype.pull = null;
33
+ ClientPayload.prototype.paddingBytes = null;
34
+ ClientPayload.prototype.yearClass = null;
35
+ ClientPayload.prototype.memClass = null;
36
+ ClientPayload.prototype.interopData = null;
37
+ ClientPayload.prototype.trafficAnonymization = null;
38
+ ClientPayload.prototype.lidDbMigrated = null;
39
+ ClientPayload.prototype.accountType = null;
40
+ ClientPayload.prototype.connectionSequenceInfo = null;
41
+ ClientPayload.prototype.paaLink = null;
42
+ ClientPayload.prototype.preacksCount = null;
43
+ ClientPayload.prototype.processingQueueSize = null;
44
+ ClientPayload.prototype.pairedPeripherals = $util.emptyArray;
45
+ ClientPayload.prototype.testIsolationId = null;
46
+ let $oneOfFields;
47
+ Object.defineProperty(ClientPayload.prototype, "_username", {
48
+ get: $util.oneOfGetter($oneOfFields = ["username"]),
49
+ set: $util.oneOfSetter($oneOfFields)
50
+ });
51
+ Object.defineProperty(ClientPayload.prototype, "_passive", {
52
+ get: $util.oneOfGetter($oneOfFields = ["passive"]),
53
+ set: $util.oneOfSetter($oneOfFields)
54
+ });
55
+ Object.defineProperty(ClientPayload.prototype, "_userAgent", {
56
+ get: $util.oneOfGetter($oneOfFields = ["userAgent"]),
57
+ set: $util.oneOfSetter($oneOfFields)
58
+ });
59
+ Object.defineProperty(ClientPayload.prototype, "_webInfo", {
60
+ get: $util.oneOfGetter($oneOfFields = ["webInfo"]),
61
+ set: $util.oneOfSetter($oneOfFields)
62
+ });
63
+ Object.defineProperty(ClientPayload.prototype, "_pushName", {
64
+ get: $util.oneOfGetter($oneOfFields = ["pushName"]),
65
+ set: $util.oneOfSetter($oneOfFields)
66
+ });
67
+ Object.defineProperty(ClientPayload.prototype, "_sessionId", {
68
+ get: $util.oneOfGetter($oneOfFields = ["sessionId"]),
69
+ set: $util.oneOfSetter($oneOfFields)
70
+ });
71
+ Object.defineProperty(ClientPayload.prototype, "_shortConnect", {
72
+ get: $util.oneOfGetter($oneOfFields = ["shortConnect"]),
73
+ set: $util.oneOfSetter($oneOfFields)
74
+ });
75
+ Object.defineProperty(ClientPayload.prototype, "_connectType", {
76
+ get: $util.oneOfGetter($oneOfFields = ["connectType"]),
77
+ set: $util.oneOfSetter($oneOfFields)
78
+ });
79
+ Object.defineProperty(ClientPayload.prototype, "_connectReason", {
80
+ get: $util.oneOfGetter($oneOfFields = ["connectReason"]),
81
+ set: $util.oneOfSetter($oneOfFields)
82
+ });
83
+ Object.defineProperty(ClientPayload.prototype, "_dnsSource", {
84
+ get: $util.oneOfGetter($oneOfFields = ["dnsSource"]),
85
+ set: $util.oneOfSetter($oneOfFields)
86
+ });
87
+ Object.defineProperty(ClientPayload.prototype, "_connectAttemptCount", {
88
+ get: $util.oneOfGetter($oneOfFields = ["connectAttemptCount"]),
89
+ set: $util.oneOfSetter($oneOfFields)
90
+ });
91
+ Object.defineProperty(ClientPayload.prototype, "_device", {
92
+ get: $util.oneOfGetter($oneOfFields = ["device"]),
93
+ set: $util.oneOfSetter($oneOfFields)
94
+ });
95
+ Object.defineProperty(ClientPayload.prototype, "_devicePairingData", {
96
+ get: $util.oneOfGetter($oneOfFields = ["devicePairingData"]),
97
+ set: $util.oneOfSetter($oneOfFields)
98
+ });
99
+ Object.defineProperty(ClientPayload.prototype, "_product", {
100
+ get: $util.oneOfGetter($oneOfFields = ["product"]),
101
+ set: $util.oneOfSetter($oneOfFields)
102
+ });
103
+ Object.defineProperty(ClientPayload.prototype, "_fbCat", {
104
+ get: $util.oneOfGetter($oneOfFields = ["fbCat"]),
105
+ set: $util.oneOfSetter($oneOfFields)
106
+ });
107
+ Object.defineProperty(ClientPayload.prototype, "_fbUserAgent", {
108
+ get: $util.oneOfGetter($oneOfFields = ["fbUserAgent"]),
109
+ set: $util.oneOfSetter($oneOfFields)
110
+ });
111
+ Object.defineProperty(ClientPayload.prototype, "_oc", {
112
+ get: $util.oneOfGetter($oneOfFields = ["oc"]),
113
+ set: $util.oneOfSetter($oneOfFields)
114
+ });
115
+ Object.defineProperty(ClientPayload.prototype, "_lc", {
116
+ get: $util.oneOfGetter($oneOfFields = ["lc"]),
117
+ set: $util.oneOfSetter($oneOfFields)
118
+ });
119
+ Object.defineProperty(ClientPayload.prototype, "_iosAppExtension", {
120
+ get: $util.oneOfGetter($oneOfFields = ["iosAppExtension"]),
121
+ set: $util.oneOfSetter($oneOfFields)
122
+ });
123
+ Object.defineProperty(ClientPayload.prototype, "_fbAppId", {
124
+ get: $util.oneOfGetter($oneOfFields = ["fbAppId"]),
125
+ set: $util.oneOfSetter($oneOfFields)
126
+ });
127
+ Object.defineProperty(ClientPayload.prototype, "_fbDeviceId", {
128
+ get: $util.oneOfGetter($oneOfFields = ["fbDeviceId"]),
129
+ set: $util.oneOfSetter($oneOfFields)
130
+ });
131
+ Object.defineProperty(ClientPayload.prototype, "_pull", {
132
+ get: $util.oneOfGetter($oneOfFields = ["pull"]),
133
+ set: $util.oneOfSetter($oneOfFields)
134
+ });
135
+ Object.defineProperty(ClientPayload.prototype, "_paddingBytes", {
136
+ get: $util.oneOfGetter($oneOfFields = ["paddingBytes"]),
137
+ set: $util.oneOfSetter($oneOfFields)
138
+ });
139
+ Object.defineProperty(ClientPayload.prototype, "_yearClass", {
140
+ get: $util.oneOfGetter($oneOfFields = ["yearClass"]),
141
+ set: $util.oneOfSetter($oneOfFields)
142
+ });
143
+ Object.defineProperty(ClientPayload.prototype, "_memClass", {
144
+ get: $util.oneOfGetter($oneOfFields = ["memClass"]),
145
+ set: $util.oneOfSetter($oneOfFields)
146
+ });
147
+ Object.defineProperty(ClientPayload.prototype, "_interopData", {
148
+ get: $util.oneOfGetter($oneOfFields = ["interopData"]),
149
+ set: $util.oneOfSetter($oneOfFields)
150
+ });
151
+ Object.defineProperty(ClientPayload.prototype, "_trafficAnonymization", {
152
+ get: $util.oneOfGetter($oneOfFields = ["trafficAnonymization"]),
153
+ set: $util.oneOfSetter($oneOfFields)
154
+ });
155
+ Object.defineProperty(ClientPayload.prototype, "_lidDbMigrated", {
156
+ get: $util.oneOfGetter($oneOfFields = ["lidDbMigrated"]),
157
+ set: $util.oneOfSetter($oneOfFields)
158
+ });
159
+ Object.defineProperty(ClientPayload.prototype, "_accountType", {
160
+ get: $util.oneOfGetter($oneOfFields = ["accountType"]),
161
+ set: $util.oneOfSetter($oneOfFields)
162
+ });
163
+ Object.defineProperty(ClientPayload.prototype, "_connectionSequenceInfo", {
164
+ get: $util.oneOfGetter($oneOfFields = ["connectionSequenceInfo"]),
165
+ set: $util.oneOfSetter($oneOfFields)
166
+ });
167
+ Object.defineProperty(ClientPayload.prototype, "_paaLink", {
168
+ get: $util.oneOfGetter($oneOfFields = ["paaLink"]),
169
+ set: $util.oneOfSetter($oneOfFields)
170
+ });
171
+ Object.defineProperty(ClientPayload.prototype, "_preacksCount", {
172
+ get: $util.oneOfGetter($oneOfFields = ["preacksCount"]),
173
+ set: $util.oneOfSetter($oneOfFields)
174
+ });
175
+ Object.defineProperty(ClientPayload.prototype, "_processingQueueSize", {
176
+ get: $util.oneOfGetter($oneOfFields = ["processingQueueSize"]),
177
+ set: $util.oneOfSetter($oneOfFields)
178
+ });
179
+ Object.defineProperty(ClientPayload.prototype, "_testIsolationId", {
180
+ get: $util.oneOfGetter($oneOfFields = ["testIsolationId"]),
181
+ set: $util.oneOfSetter($oneOfFields)
182
+ });
183
+ ClientPayload.create = function create(properties) {
184
+ return new ClientPayload(properties);
185
+ };
186
+ ClientPayload.encode = function encode(m, w) {
187
+ if (!w)
188
+ w = $Writer.create();
189
+ if (m.username != null && Object.hasOwnProperty.call(m, "username"))
190
+ w.uint32(8).uint64(m.username);
191
+ if (m.passive != null && Object.hasOwnProperty.call(m, "passive"))
192
+ w.uint32(24).bool(m.passive);
193
+ if (m.userAgent != null && Object.hasOwnProperty.call(m, "userAgent"))
194
+ $root.proto.ClientPayload.UserAgent.encode(m.userAgent, w.uint32(42).fork()).ldelim();
195
+ if (m.webInfo != null && Object.hasOwnProperty.call(m, "webInfo"))
196
+ $root.proto.ClientPayload.WebInfo.encode(m.webInfo, w.uint32(50).fork()).ldelim();
197
+ if (m.pushName != null && Object.hasOwnProperty.call(m, "pushName"))
198
+ w.uint32(58).string(m.pushName);
199
+ if (m.sessionId != null && Object.hasOwnProperty.call(m, "sessionId"))
200
+ w.uint32(77).sfixed32(m.sessionId);
201
+ if (m.shortConnect != null && Object.hasOwnProperty.call(m, "shortConnect"))
202
+ w.uint32(80).bool(m.shortConnect);
203
+ if (m.connectType != null && Object.hasOwnProperty.call(m, "connectType"))
204
+ w.uint32(96).int32(m.connectType);
205
+ if (m.connectReason != null && Object.hasOwnProperty.call(m, "connectReason"))
206
+ w.uint32(104).int32(m.connectReason);
207
+ if (m.shards != null && m.shards.length) {
208
+ w.uint32(114).fork();
209
+ for (var i = 0; i < m.shards.length; ++i)
210
+ w.int32(m.shards[i]);
211
+ w.ldelim();
212
+ }
213
+ if (m.dnsSource != null && Object.hasOwnProperty.call(m, "dnsSource"))
214
+ $root.proto.ClientPayload.DNSSource.encode(m.dnsSource, w.uint32(122).fork()).ldelim();
215
+ if (m.connectAttemptCount != null && Object.hasOwnProperty.call(m, "connectAttemptCount"))
216
+ w.uint32(128).uint32(m.connectAttemptCount);
217
+ if (m.device != null && Object.hasOwnProperty.call(m, "device"))
218
+ w.uint32(144).uint32(m.device);
219
+ if (m.devicePairingData != null && Object.hasOwnProperty.call(m, "devicePairingData"))
220
+ $root.proto.ClientPayload.DevicePairingRegistrationData.encode(m.devicePairingData, w.uint32(154).fork()).ldelim();
221
+ if (m.product != null && Object.hasOwnProperty.call(m, "product"))
222
+ w.uint32(160).int32(m.product);
223
+ if (m.fbCat != null && Object.hasOwnProperty.call(m, "fbCat"))
224
+ w.uint32(170).bytes(m.fbCat);
225
+ if (m.fbUserAgent != null && Object.hasOwnProperty.call(m, "fbUserAgent"))
226
+ w.uint32(178).bytes(m.fbUserAgent);
227
+ if (m.oc != null && Object.hasOwnProperty.call(m, "oc"))
228
+ w.uint32(184).bool(m.oc);
229
+ if (m.lc != null && Object.hasOwnProperty.call(m, "lc"))
230
+ w.uint32(192).int32(m.lc);
231
+ if (m.iosAppExtension != null && Object.hasOwnProperty.call(m, "iosAppExtension"))
232
+ w.uint32(240).int32(m.iosAppExtension);
233
+ if (m.fbAppId != null && Object.hasOwnProperty.call(m, "fbAppId"))
234
+ w.uint32(248).uint64(m.fbAppId);
235
+ if (m.fbDeviceId != null && Object.hasOwnProperty.call(m, "fbDeviceId"))
236
+ w.uint32(258).bytes(m.fbDeviceId);
237
+ if (m.pull != null && Object.hasOwnProperty.call(m, "pull"))
238
+ w.uint32(264).bool(m.pull);
239
+ if (m.paddingBytes != null && Object.hasOwnProperty.call(m, "paddingBytes"))
240
+ w.uint32(274).bytes(m.paddingBytes);
241
+ if (m.yearClass != null && Object.hasOwnProperty.call(m, "yearClass"))
242
+ w.uint32(288).int32(m.yearClass);
243
+ if (m.memClass != null && Object.hasOwnProperty.call(m, "memClass"))
244
+ w.uint32(296).int32(m.memClass);
245
+ if (m.interopData != null && Object.hasOwnProperty.call(m, "interopData"))
246
+ $root.proto.ClientPayload.InteropData.encode(m.interopData, w.uint32(306).fork()).ldelim();
247
+ if (m.trafficAnonymization != null && Object.hasOwnProperty.call(m, "trafficAnonymization"))
248
+ w.uint32(320).int32(m.trafficAnonymization);
249
+ if (m.lidDbMigrated != null && Object.hasOwnProperty.call(m, "lidDbMigrated"))
250
+ w.uint32(328).bool(m.lidDbMigrated);
251
+ if (m.accountType != null && Object.hasOwnProperty.call(m, "accountType"))
252
+ w.uint32(336).int32(m.accountType);
253
+ if (m.connectionSequenceInfo != null && Object.hasOwnProperty.call(m, "connectionSequenceInfo"))
254
+ w.uint32(349).sfixed32(m.connectionSequenceInfo);
255
+ if (m.paaLink != null && Object.hasOwnProperty.call(m, "paaLink"))
256
+ w.uint32(352).bool(m.paaLink);
257
+ if (m.preacksCount != null && Object.hasOwnProperty.call(m, "preacksCount"))
258
+ w.uint32(360).int32(m.preacksCount);
259
+ if (m.processingQueueSize != null && Object.hasOwnProperty.call(m, "processingQueueSize"))
260
+ w.uint32(368).int32(m.processingQueueSize);
261
+ if (m.pairedPeripherals != null && m.pairedPeripherals.length) {
262
+ for (var i = 0; i < m.pairedPeripherals.length; ++i)
263
+ w.uint32(378).string(m.pairedPeripherals[i]);
264
+ }
265
+ if (m.testIsolationId != null && Object.hasOwnProperty.call(m, "testIsolationId"))
266
+ w.uint32(386).bytes(m.testIsolationId);
267
+ return w;
268
+ };
269
+ ClientPayload.decode = function decode(r, l, e, n) {
270
+ if (!(r instanceof $Reader))
271
+ r = $Reader.create(r);
272
+ if (n === undefined)
273
+ n = 0;
274
+ if (n > $Reader.recursionLimit)
275
+ throw Error("maximum nesting depth exceeded");
276
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload();
277
+ while (r.pos < c) {
278
+ var t = r.uint32();
279
+ if (t === e)
280
+ break;
281
+ switch (t >>> 3) {
282
+ case 1: {
283
+ m.username = r.uint64();
284
+ break;
285
+ }
286
+ case 3: {
287
+ m.passive = r.bool();
288
+ break;
289
+ }
290
+ case 5: {
291
+ m.userAgent = $root.proto.ClientPayload.UserAgent.decode(r, r.uint32(), undefined, n + 1);
292
+ break;
293
+ }
294
+ case 6: {
295
+ m.webInfo = $root.proto.ClientPayload.WebInfo.decode(r, r.uint32(), undefined, n + 1);
296
+ break;
297
+ }
298
+ case 7: {
299
+ m.pushName = r.string();
300
+ break;
301
+ }
302
+ case 9: {
303
+ m.sessionId = r.sfixed32();
304
+ break;
305
+ }
306
+ case 10: {
307
+ m.shortConnect = r.bool();
308
+ break;
309
+ }
310
+ case 12: {
311
+ m.connectType = r.int32();
312
+ break;
313
+ }
314
+ case 13: {
315
+ m.connectReason = r.int32();
316
+ break;
317
+ }
318
+ case 14: {
319
+ if (!(m.shards && m.shards.length))
320
+ m.shards = [];
321
+ if ((t & 7) === 2) {
322
+ var c2 = r.uint32() + r.pos;
323
+ while (r.pos < c2)
324
+ m.shards.push(r.int32());
325
+ } else
326
+ m.shards.push(r.int32());
327
+ break;
328
+ }
329
+ case 15: {
330
+ m.dnsSource = $root.proto.ClientPayload.DNSSource.decode(r, r.uint32(), undefined, n + 1);
331
+ break;
332
+ }
333
+ case 16: {
334
+ m.connectAttemptCount = r.uint32();
335
+ break;
336
+ }
337
+ case 18: {
338
+ m.device = r.uint32();
339
+ break;
340
+ }
341
+ case 19: {
342
+ m.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.decode(r, r.uint32(), undefined, n + 1);
343
+ break;
344
+ }
345
+ case 20: {
346
+ m.product = r.int32();
347
+ break;
348
+ }
349
+ case 21: {
350
+ m.fbCat = r.bytes();
351
+ break;
352
+ }
353
+ case 22: {
354
+ m.fbUserAgent = r.bytes();
355
+ break;
356
+ }
357
+ case 23: {
358
+ m.oc = r.bool();
359
+ break;
360
+ }
361
+ case 24: {
362
+ m.lc = r.int32();
363
+ break;
364
+ }
365
+ case 30: {
366
+ m.iosAppExtension = r.int32();
367
+ break;
368
+ }
369
+ case 31: {
370
+ m.fbAppId = r.uint64();
371
+ break;
372
+ }
373
+ case 32: {
374
+ m.fbDeviceId = r.bytes();
375
+ break;
376
+ }
377
+ case 33: {
378
+ m.pull = r.bool();
379
+ break;
380
+ }
381
+ case 34: {
382
+ m.paddingBytes = r.bytes();
383
+ break;
384
+ }
385
+ case 36: {
386
+ m.yearClass = r.int32();
387
+ break;
388
+ }
389
+ case 37: {
390
+ m.memClass = r.int32();
391
+ break;
392
+ }
393
+ case 38: {
394
+ m.interopData = $root.proto.ClientPayload.InteropData.decode(r, r.uint32(), undefined, n + 1);
395
+ break;
396
+ }
397
+ case 40: {
398
+ m.trafficAnonymization = r.int32();
399
+ break;
400
+ }
401
+ case 41: {
402
+ m.lidDbMigrated = r.bool();
403
+ break;
404
+ }
405
+ case 42: {
406
+ m.accountType = r.int32();
407
+ break;
408
+ }
409
+ case 43: {
410
+ m.connectionSequenceInfo = r.sfixed32();
411
+ break;
412
+ }
413
+ case 44: {
414
+ m.paaLink = r.bool();
415
+ break;
416
+ }
417
+ case 45: {
418
+ m.preacksCount = r.int32();
419
+ break;
420
+ }
421
+ case 46: {
422
+ m.processingQueueSize = r.int32();
423
+ break;
424
+ }
425
+ case 47: {
426
+ if (!(m.pairedPeripherals && m.pairedPeripherals.length))
427
+ m.pairedPeripherals = [];
428
+ m.pairedPeripherals.push(r.string());
429
+ break;
430
+ }
431
+ case 48: {
432
+ m.testIsolationId = r.bytes();
433
+ break;
434
+ }
435
+ default:
436
+ r.skipType(t & 7, n);
437
+ break;
438
+ }
439
+ }
440
+ return m;
441
+ };
442
+ ClientPayload.fromObject = function fromObject(d, n) {
443
+ if (d instanceof $root.proto.ClientPayload)
444
+ return d;
445
+ if (n === undefined)
446
+ n = 0;
447
+ if (n > $util.recursionLimit)
448
+ throw Error("maximum nesting depth exceeded");
449
+ var m = new $root.proto.ClientPayload();
450
+ if (d.username != null) {
451
+ if ($util.Long)
452
+ (m.username = $util.Long.fromValue(d.username)).unsigned = true;
453
+ else if (typeof d.username === "string")
454
+ m.username = parseInt(d.username, 10);
455
+ else if (typeof d.username === "number")
456
+ m.username = d.username;
457
+ else if (typeof d.username === "object")
458
+ m.username = new $util.LongBits(d.username.low >>> 0, d.username.high >>> 0).toNumber(true);
459
+ }
460
+ if (d.passive != null) {
461
+ m.passive = Boolean(d.passive);
462
+ }
463
+ if (d.userAgent != null) {
464
+ if (typeof d.userAgent !== "object")
465
+ throw TypeError(".proto.ClientPayload.userAgent: object expected");
466
+ m.userAgent = $root.proto.ClientPayload.UserAgent.fromObject(d.userAgent, n + 1);
467
+ }
468
+ if (d.webInfo != null) {
469
+ if (typeof d.webInfo !== "object")
470
+ throw TypeError(".proto.ClientPayload.webInfo: object expected");
471
+ m.webInfo = $root.proto.ClientPayload.WebInfo.fromObject(d.webInfo, n + 1);
472
+ }
473
+ if (d.pushName != null) {
474
+ m.pushName = String(d.pushName);
475
+ }
476
+ if (d.sessionId != null) {
477
+ m.sessionId = d.sessionId | 0;
478
+ }
479
+ if (d.shortConnect != null) {
480
+ m.shortConnect = Boolean(d.shortConnect);
481
+ }
482
+ switch (d.connectType) {
483
+ default:
484
+ if (typeof d.connectType === "number") {
485
+ m.connectType = d.connectType;
486
+ break;
487
+ }
488
+ break;
489
+ case "CELLULAR_UNKNOWN":
490
+ case 0:
491
+ m.connectType = 0;
492
+ break;
493
+ case "WIFI_UNKNOWN":
494
+ case 1:
495
+ m.connectType = 1;
496
+ break;
497
+ case "CELLULAR_EDGE":
498
+ case 100:
499
+ m.connectType = 100;
500
+ break;
501
+ case "CELLULAR_IDEN":
502
+ case 101:
503
+ m.connectType = 101;
504
+ break;
505
+ case "CELLULAR_UMTS":
506
+ case 102:
507
+ m.connectType = 102;
508
+ break;
509
+ case "CELLULAR_EVDO":
510
+ case 103:
511
+ m.connectType = 103;
512
+ break;
513
+ case "CELLULAR_GPRS":
514
+ case 104:
515
+ m.connectType = 104;
516
+ break;
517
+ case "CELLULAR_HSDPA":
518
+ case 105:
519
+ m.connectType = 105;
520
+ break;
521
+ case "CELLULAR_HSUPA":
522
+ case 106:
523
+ m.connectType = 106;
524
+ break;
525
+ case "CELLULAR_HSPA":
526
+ case 107:
527
+ m.connectType = 107;
528
+ break;
529
+ case "CELLULAR_CDMA":
530
+ case 108:
531
+ m.connectType = 108;
532
+ break;
533
+ case "CELLULAR_1XRTT":
534
+ case 109:
535
+ m.connectType = 109;
536
+ break;
537
+ case "CELLULAR_EHRPD":
538
+ case 110:
539
+ m.connectType = 110;
540
+ break;
541
+ case "CELLULAR_LTE":
542
+ case 111:
543
+ m.connectType = 111;
544
+ break;
545
+ case "CELLULAR_HSPAP":
546
+ case 112:
547
+ m.connectType = 112;
548
+ break;
549
+ }
550
+ switch (d.connectReason) {
551
+ default:
552
+ if (typeof d.connectReason === "number") {
553
+ m.connectReason = d.connectReason;
554
+ break;
555
+ }
556
+ break;
557
+ case "PUSH":
558
+ case 0:
559
+ m.connectReason = 0;
560
+ break;
561
+ case "USER_ACTIVATED":
562
+ case 1:
563
+ m.connectReason = 1;
564
+ break;
565
+ case "SCHEDULED":
566
+ case 2:
567
+ m.connectReason = 2;
568
+ break;
569
+ case "ERROR_RECONNECT":
570
+ case 3:
571
+ m.connectReason = 3;
572
+ break;
573
+ case "NETWORK_SWITCH":
574
+ case 4:
575
+ m.connectReason = 4;
576
+ break;
577
+ case "PING_RECONNECT":
578
+ case 5:
579
+ m.connectReason = 5;
580
+ break;
581
+ case "UNKNOWN":
582
+ case 6:
583
+ m.connectReason = 6;
584
+ break;
585
+ }
586
+ if (d.shards) {
587
+ if (!Array.isArray(d.shards))
588
+ throw TypeError(".proto.ClientPayload.shards: array expected");
589
+ m.shards = [];
590
+ for (var i = 0; i < d.shards.length; ++i) {
591
+ m.shards[i] = d.shards[i] | 0;
592
+ }
593
+ }
594
+ if (d.dnsSource != null) {
595
+ if (typeof d.dnsSource !== "object")
596
+ throw TypeError(".proto.ClientPayload.dnsSource: object expected");
597
+ m.dnsSource = $root.proto.ClientPayload.DNSSource.fromObject(d.dnsSource, n + 1);
598
+ }
599
+ if (d.connectAttemptCount != null) {
600
+ m.connectAttemptCount = d.connectAttemptCount >>> 0;
601
+ }
602
+ if (d.device != null) {
603
+ m.device = d.device >>> 0;
604
+ }
605
+ if (d.devicePairingData != null) {
606
+ if (typeof d.devicePairingData !== "object")
607
+ throw TypeError(".proto.ClientPayload.devicePairingData: object expected");
608
+ m.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.fromObject(d.devicePairingData, n + 1);
609
+ }
610
+ switch (d.product) {
611
+ default:
612
+ if (typeof d.product === "number") {
613
+ m.product = d.product;
614
+ break;
615
+ }
616
+ break;
617
+ case "WHATSAPP":
618
+ case 0:
619
+ m.product = 0;
620
+ break;
621
+ case "MESSENGER":
622
+ case 1:
623
+ m.product = 1;
624
+ break;
625
+ case "INTEROP":
626
+ case 2:
627
+ m.product = 2;
628
+ break;
629
+ case "INTEROP_MSGR":
630
+ case 3:
631
+ m.product = 3;
632
+ break;
633
+ case "WHATSAPP_LID":
634
+ case 4:
635
+ m.product = 4;
636
+ break;
637
+ }
638
+ if (d.fbCat != null) {
639
+ if (typeof d.fbCat === "string")
640
+ $util.base64.decode(d.fbCat, m.fbCat = $util.newBuffer($util.base64.length(d.fbCat)), 0);
641
+ else if (d.fbCat.length >= 0)
642
+ m.fbCat = d.fbCat;
643
+ }
644
+ if (d.fbUserAgent != null) {
645
+ if (typeof d.fbUserAgent === "string")
646
+ $util.base64.decode(d.fbUserAgent, m.fbUserAgent = $util.newBuffer($util.base64.length(d.fbUserAgent)), 0);
647
+ else if (d.fbUserAgent.length >= 0)
648
+ m.fbUserAgent = d.fbUserAgent;
649
+ }
650
+ if (d.oc != null) {
651
+ m.oc = Boolean(d.oc);
652
+ }
653
+ if (d.lc != null) {
654
+ m.lc = d.lc | 0;
655
+ }
656
+ switch (d.iosAppExtension) {
657
+ default:
658
+ if (typeof d.iosAppExtension === "number") {
659
+ m.iosAppExtension = d.iosAppExtension;
660
+ break;
661
+ }
662
+ break;
663
+ case "SHARE_EXTENSION":
664
+ case 0:
665
+ m.iosAppExtension = 0;
666
+ break;
667
+ case "SERVICE_EXTENSION":
668
+ case 1:
669
+ m.iosAppExtension = 1;
670
+ break;
671
+ case "INTENTS_EXTENSION":
672
+ case 2:
673
+ m.iosAppExtension = 2;
674
+ break;
675
+ }
676
+ if (d.fbAppId != null) {
677
+ if ($util.Long)
678
+ (m.fbAppId = $util.Long.fromValue(d.fbAppId)).unsigned = true;
679
+ else if (typeof d.fbAppId === "string")
680
+ m.fbAppId = parseInt(d.fbAppId, 10);
681
+ else if (typeof d.fbAppId === "number")
682
+ m.fbAppId = d.fbAppId;
683
+ else if (typeof d.fbAppId === "object")
684
+ m.fbAppId = new $util.LongBits(d.fbAppId.low >>> 0, d.fbAppId.high >>> 0).toNumber(true);
685
+ }
686
+ if (d.fbDeviceId != null) {
687
+ if (typeof d.fbDeviceId === "string")
688
+ $util.base64.decode(d.fbDeviceId, m.fbDeviceId = $util.newBuffer($util.base64.length(d.fbDeviceId)), 0);
689
+ else if (d.fbDeviceId.length >= 0)
690
+ m.fbDeviceId = d.fbDeviceId;
691
+ }
692
+ if (d.pull != null) {
693
+ m.pull = Boolean(d.pull);
694
+ }
695
+ if (d.paddingBytes != null) {
696
+ if (typeof d.paddingBytes === "string")
697
+ $util.base64.decode(d.paddingBytes, m.paddingBytes = $util.newBuffer($util.base64.length(d.paddingBytes)), 0);
698
+ else if (d.paddingBytes.length >= 0)
699
+ m.paddingBytes = d.paddingBytes;
700
+ }
701
+ if (d.yearClass != null) {
702
+ m.yearClass = d.yearClass | 0;
703
+ }
704
+ if (d.memClass != null) {
705
+ m.memClass = d.memClass | 0;
706
+ }
707
+ if (d.interopData != null) {
708
+ if (typeof d.interopData !== "object")
709
+ throw TypeError(".proto.ClientPayload.interopData: object expected");
710
+ m.interopData = $root.proto.ClientPayload.InteropData.fromObject(d.interopData, n + 1);
711
+ }
712
+ switch (d.trafficAnonymization) {
713
+ default:
714
+ if (typeof d.trafficAnonymization === "number") {
715
+ m.trafficAnonymization = d.trafficAnonymization;
716
+ break;
717
+ }
718
+ break;
719
+ case "OFF":
720
+ case 0:
721
+ m.trafficAnonymization = 0;
722
+ break;
723
+ case "STANDARD":
724
+ case 1:
725
+ m.trafficAnonymization = 1;
726
+ break;
727
+ }
728
+ if (d.lidDbMigrated != null) {
729
+ m.lidDbMigrated = Boolean(d.lidDbMigrated);
730
+ }
731
+ switch (d.accountType) {
732
+ default:
733
+ if (typeof d.accountType === "number") {
734
+ m.accountType = d.accountType;
735
+ break;
736
+ }
737
+ break;
738
+ case "DEFAULT":
739
+ case 0:
740
+ m.accountType = 0;
741
+ break;
742
+ case "GUEST":
743
+ case 1:
744
+ m.accountType = 1;
745
+ break;
746
+ }
747
+ if (d.connectionSequenceInfo != null) {
748
+ m.connectionSequenceInfo = d.connectionSequenceInfo | 0;
749
+ }
750
+ if (d.paaLink != null) {
751
+ m.paaLink = Boolean(d.paaLink);
752
+ }
753
+ if (d.preacksCount != null) {
754
+ m.preacksCount = d.preacksCount | 0;
755
+ }
756
+ if (d.processingQueueSize != null) {
757
+ m.processingQueueSize = d.processingQueueSize | 0;
758
+ }
759
+ if (d.pairedPeripherals) {
760
+ if (!Array.isArray(d.pairedPeripherals))
761
+ throw TypeError(".proto.ClientPayload.pairedPeripherals: array expected");
762
+ m.pairedPeripherals = [];
763
+ for (var i = 0; i < d.pairedPeripherals.length; ++i) {
764
+ m.pairedPeripherals[i] = String(d.pairedPeripherals[i]);
765
+ }
766
+ }
767
+ if (d.testIsolationId != null) {
768
+ if (typeof d.testIsolationId === "string")
769
+ $util.base64.decode(d.testIsolationId, m.testIsolationId = $util.newBuffer($util.base64.length(d.testIsolationId)), 0);
770
+ else if (d.testIsolationId.length >= 0)
771
+ m.testIsolationId = d.testIsolationId;
772
+ }
773
+ return m;
774
+ };
775
+ ClientPayload.toObject = function toObject(m, o) {
776
+ if (!o)
777
+ o = {};
778
+ var d = {};
779
+ if (o.arrays || o.defaults) {
780
+ d.shards = [];
781
+ d.pairedPeripherals = [];
782
+ }
783
+ if (m.username != null && m.hasOwnProperty("username")) {
784
+ if (typeof m.username === "number")
785
+ d.username = o.longs === String ? String(m.username) : m.username;
786
+ else
787
+ d.username = o.longs === String ? longToString(m.username, true) : o.longs === Number ? longToNumber(m.username, true) : m.username;
788
+ if (o.oneofs)
789
+ d._username = "username";
790
+ }
791
+ if (m.passive != null && m.hasOwnProperty("passive")) {
792
+ d.passive = m.passive;
793
+ if (o.oneofs)
794
+ d._passive = "passive";
795
+ }
796
+ if (m.userAgent != null && m.hasOwnProperty("userAgent")) {
797
+ d.userAgent = $root.proto.ClientPayload.UserAgent.toObject(m.userAgent, o);
798
+ if (o.oneofs)
799
+ d._userAgent = "userAgent";
800
+ }
801
+ if (m.webInfo != null && m.hasOwnProperty("webInfo")) {
802
+ d.webInfo = $root.proto.ClientPayload.WebInfo.toObject(m.webInfo, o);
803
+ if (o.oneofs)
804
+ d._webInfo = "webInfo";
805
+ }
806
+ if (m.pushName != null && m.hasOwnProperty("pushName")) {
807
+ d.pushName = m.pushName;
808
+ if (o.oneofs)
809
+ d._pushName = "pushName";
810
+ }
811
+ if (m.sessionId != null && m.hasOwnProperty("sessionId")) {
812
+ d.sessionId = m.sessionId;
813
+ if (o.oneofs)
814
+ d._sessionId = "sessionId";
815
+ }
816
+ if (m.shortConnect != null && m.hasOwnProperty("shortConnect")) {
817
+ d.shortConnect = m.shortConnect;
818
+ if (o.oneofs)
819
+ d._shortConnect = "shortConnect";
820
+ }
821
+ if (m.connectType != null && m.hasOwnProperty("connectType")) {
822
+ d.connectType = o.enums === String ? $root.proto.ClientPayload.ConnectType[m.connectType] === undefined ? m.connectType : $root.proto.ClientPayload.ConnectType[m.connectType] : m.connectType;
823
+ if (o.oneofs)
824
+ d._connectType = "connectType";
825
+ }
826
+ if (m.connectReason != null && m.hasOwnProperty("connectReason")) {
827
+ d.connectReason = o.enums === String ? $root.proto.ClientPayload.ConnectReason[m.connectReason] === undefined ? m.connectReason : $root.proto.ClientPayload.ConnectReason[m.connectReason] : m.connectReason;
828
+ if (o.oneofs)
829
+ d._connectReason = "connectReason";
830
+ }
831
+ if (m.shards && m.shards.length) {
832
+ d.shards = [];
833
+ for (var j = 0; j < m.shards.length; ++j) {
834
+ d.shards[j] = m.shards[j];
835
+ }
836
+ }
837
+ if (m.dnsSource != null && m.hasOwnProperty("dnsSource")) {
838
+ d.dnsSource = $root.proto.ClientPayload.DNSSource.toObject(m.dnsSource, o);
839
+ if (o.oneofs)
840
+ d._dnsSource = "dnsSource";
841
+ }
842
+ if (m.connectAttemptCount != null && m.hasOwnProperty("connectAttemptCount")) {
843
+ d.connectAttemptCount = m.connectAttemptCount;
844
+ if (o.oneofs)
845
+ d._connectAttemptCount = "connectAttemptCount";
846
+ }
847
+ if (m.device != null && m.hasOwnProperty("device")) {
848
+ d.device = m.device;
849
+ if (o.oneofs)
850
+ d._device = "device";
851
+ }
852
+ if (m.devicePairingData != null && m.hasOwnProperty("devicePairingData")) {
853
+ d.devicePairingData = $root.proto.ClientPayload.DevicePairingRegistrationData.toObject(m.devicePairingData, o);
854
+ if (o.oneofs)
855
+ d._devicePairingData = "devicePairingData";
856
+ }
857
+ if (m.product != null && m.hasOwnProperty("product")) {
858
+ d.product = o.enums === String ? $root.proto.ClientPayload.Product[m.product] === undefined ? m.product : $root.proto.ClientPayload.Product[m.product] : m.product;
859
+ if (o.oneofs)
860
+ d._product = "product";
861
+ }
862
+ if (m.fbCat != null && m.hasOwnProperty("fbCat")) {
863
+ d.fbCat = o.bytes === String ? $util.base64.encode(m.fbCat, 0, m.fbCat.length) : o.bytes === Array ? Array.prototype.slice.call(m.fbCat) : m.fbCat;
864
+ if (o.oneofs)
865
+ d._fbCat = "fbCat";
866
+ }
867
+ if (m.fbUserAgent != null && m.hasOwnProperty("fbUserAgent")) {
868
+ d.fbUserAgent = o.bytes === String ? $util.base64.encode(m.fbUserAgent, 0, m.fbUserAgent.length) : o.bytes === Array ? Array.prototype.slice.call(m.fbUserAgent) : m.fbUserAgent;
869
+ if (o.oneofs)
870
+ d._fbUserAgent = "fbUserAgent";
871
+ }
872
+ if (m.oc != null && m.hasOwnProperty("oc")) {
873
+ d.oc = m.oc;
874
+ if (o.oneofs)
875
+ d._oc = "oc";
876
+ }
877
+ if (m.lc != null && m.hasOwnProperty("lc")) {
878
+ d.lc = m.lc;
879
+ if (o.oneofs)
880
+ d._lc = "lc";
881
+ }
882
+ if (m.iosAppExtension != null && m.hasOwnProperty("iosAppExtension")) {
883
+ d.iosAppExtension = o.enums === String ? $root.proto.ClientPayload.IOSAppExtension[m.iosAppExtension] === undefined ? m.iosAppExtension : $root.proto.ClientPayload.IOSAppExtension[m.iosAppExtension] : m.iosAppExtension;
884
+ if (o.oneofs)
885
+ d._iosAppExtension = "iosAppExtension";
886
+ }
887
+ if (m.fbAppId != null && m.hasOwnProperty("fbAppId")) {
888
+ if (typeof m.fbAppId === "number")
889
+ d.fbAppId = o.longs === String ? String(m.fbAppId) : m.fbAppId;
890
+ else
891
+ d.fbAppId = o.longs === String ? longToString(m.fbAppId, true) : o.longs === Number ? longToNumber(m.fbAppId, true) : m.fbAppId;
892
+ if (o.oneofs)
893
+ d._fbAppId = "fbAppId";
894
+ }
895
+ if (m.fbDeviceId != null && m.hasOwnProperty("fbDeviceId")) {
896
+ d.fbDeviceId = o.bytes === String ? $util.base64.encode(m.fbDeviceId, 0, m.fbDeviceId.length) : o.bytes === Array ? Array.prototype.slice.call(m.fbDeviceId) : m.fbDeviceId;
897
+ if (o.oneofs)
898
+ d._fbDeviceId = "fbDeviceId";
899
+ }
900
+ if (m.pull != null && m.hasOwnProperty("pull")) {
901
+ d.pull = m.pull;
902
+ if (o.oneofs)
903
+ d._pull = "pull";
904
+ }
905
+ if (m.paddingBytes != null && m.hasOwnProperty("paddingBytes")) {
906
+ d.paddingBytes = o.bytes === String ? $util.base64.encode(m.paddingBytes, 0, m.paddingBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.paddingBytes) : m.paddingBytes;
907
+ if (o.oneofs)
908
+ d._paddingBytes = "paddingBytes";
909
+ }
910
+ if (m.yearClass != null && m.hasOwnProperty("yearClass")) {
911
+ d.yearClass = m.yearClass;
912
+ if (o.oneofs)
913
+ d._yearClass = "yearClass";
914
+ }
915
+ if (m.memClass != null && m.hasOwnProperty("memClass")) {
916
+ d.memClass = m.memClass;
917
+ if (o.oneofs)
918
+ d._memClass = "memClass";
919
+ }
920
+ if (m.interopData != null && m.hasOwnProperty("interopData")) {
921
+ d.interopData = $root.proto.ClientPayload.InteropData.toObject(m.interopData, o);
922
+ if (o.oneofs)
923
+ d._interopData = "interopData";
924
+ }
925
+ if (m.trafficAnonymization != null && m.hasOwnProperty("trafficAnonymization")) {
926
+ d.trafficAnonymization = o.enums === String ? $root.proto.ClientPayload.TrafficAnonymization[m.trafficAnonymization] === undefined ? m.trafficAnonymization : $root.proto.ClientPayload.TrafficAnonymization[m.trafficAnonymization] : m.trafficAnonymization;
927
+ if (o.oneofs)
928
+ d._trafficAnonymization = "trafficAnonymization";
929
+ }
930
+ if (m.lidDbMigrated != null && m.hasOwnProperty("lidDbMigrated")) {
931
+ d.lidDbMigrated = m.lidDbMigrated;
932
+ if (o.oneofs)
933
+ d._lidDbMigrated = "lidDbMigrated";
934
+ }
935
+ if (m.accountType != null && m.hasOwnProperty("accountType")) {
936
+ d.accountType = o.enums === String ? $root.proto.ClientPayload.AccountType[m.accountType] === undefined ? m.accountType : $root.proto.ClientPayload.AccountType[m.accountType] : m.accountType;
937
+ if (o.oneofs)
938
+ d._accountType = "accountType";
939
+ }
940
+ if (m.connectionSequenceInfo != null && m.hasOwnProperty("connectionSequenceInfo")) {
941
+ d.connectionSequenceInfo = m.connectionSequenceInfo;
942
+ if (o.oneofs)
943
+ d._connectionSequenceInfo = "connectionSequenceInfo";
944
+ }
945
+ if (m.paaLink != null && m.hasOwnProperty("paaLink")) {
946
+ d.paaLink = m.paaLink;
947
+ if (o.oneofs)
948
+ d._paaLink = "paaLink";
949
+ }
950
+ if (m.preacksCount != null && m.hasOwnProperty("preacksCount")) {
951
+ d.preacksCount = m.preacksCount;
952
+ if (o.oneofs)
953
+ d._preacksCount = "preacksCount";
954
+ }
955
+ if (m.processingQueueSize != null && m.hasOwnProperty("processingQueueSize")) {
956
+ d.processingQueueSize = m.processingQueueSize;
957
+ if (o.oneofs)
958
+ d._processingQueueSize = "processingQueueSize";
959
+ }
960
+ if (m.pairedPeripherals && m.pairedPeripherals.length) {
961
+ d.pairedPeripherals = [];
962
+ for (var j = 0; j < m.pairedPeripherals.length; ++j) {
963
+ d.pairedPeripherals[j] = m.pairedPeripherals[j];
964
+ }
965
+ }
966
+ if (m.testIsolationId != null && m.hasOwnProperty("testIsolationId")) {
967
+ d.testIsolationId = o.bytes === String ? $util.base64.encode(m.testIsolationId, 0, m.testIsolationId.length) : o.bytes === Array ? Array.prototype.slice.call(m.testIsolationId) : m.testIsolationId;
968
+ if (o.oneofs)
969
+ d._testIsolationId = "testIsolationId";
970
+ }
971
+ return d;
972
+ };
973
+ ClientPayload.prototype.toJSON = function toJSON() {
974
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
975
+ };
976
+ ClientPayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
977
+ if (typeUrlPrefix === undefined) {
978
+ typeUrlPrefix = "type.googleapis.com";
979
+ }
980
+ return typeUrlPrefix + "/proto.ClientPayload";
981
+ };
982
+ $lazy(ClientPayload, "AccountType", function() {
983
+ const valuesById = {}, values = Object.create(valuesById);
984
+ values[valuesById[0] = "DEFAULT"] = 0;
985
+ values[valuesById[1] = "GUEST"] = 1;
986
+ return values;
987
+ });
988
+ $lazy(ClientPayload, "ConnectReason", function() {
989
+ const valuesById = {}, values = Object.create(valuesById);
990
+ values[valuesById[0] = "PUSH"] = 0;
991
+ values[valuesById[1] = "USER_ACTIVATED"] = 1;
992
+ values[valuesById[2] = "SCHEDULED"] = 2;
993
+ values[valuesById[3] = "ERROR_RECONNECT"] = 3;
994
+ values[valuesById[4] = "NETWORK_SWITCH"] = 4;
995
+ values[valuesById[5] = "PING_RECONNECT"] = 5;
996
+ values[valuesById[6] = "UNKNOWN"] = 6;
997
+ return values;
998
+ });
999
+ $lazy(ClientPayload, "ConnectType", function() {
1000
+ const valuesById = {}, values = Object.create(valuesById);
1001
+ values[valuesById[0] = "CELLULAR_UNKNOWN"] = 0;
1002
+ values[valuesById[1] = "WIFI_UNKNOWN"] = 1;
1003
+ values[valuesById[100] = "CELLULAR_EDGE"] = 100;
1004
+ values[valuesById[101] = "CELLULAR_IDEN"] = 101;
1005
+ values[valuesById[102] = "CELLULAR_UMTS"] = 102;
1006
+ values[valuesById[103] = "CELLULAR_EVDO"] = 103;
1007
+ values[valuesById[104] = "CELLULAR_GPRS"] = 104;
1008
+ values[valuesById[105] = "CELLULAR_HSDPA"] = 105;
1009
+ values[valuesById[106] = "CELLULAR_HSUPA"] = 106;
1010
+ values[valuesById[107] = "CELLULAR_HSPA"] = 107;
1011
+ values[valuesById[108] = "CELLULAR_CDMA"] = 108;
1012
+ values[valuesById[109] = "CELLULAR_1XRTT"] = 109;
1013
+ values[valuesById[110] = "CELLULAR_EHRPD"] = 110;
1014
+ values[valuesById[111] = "CELLULAR_LTE"] = 111;
1015
+ values[valuesById[112] = "CELLULAR_HSPAP"] = 112;
1016
+ return values;
1017
+ });
1018
+ $lazy(ClientPayload, "DNSSource", function() {
1019
+ function DNSSource(p) {
1020
+ if (p)
1021
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1022
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1023
+ this[ks[i]] = p[ks[i]];
1024
+ }
1025
+ DNSSource.prototype.dnsMethod = null;
1026
+ DNSSource.prototype.appCached = null;
1027
+ let $oneOfFields;
1028
+ Object.defineProperty(DNSSource.prototype, "_dnsMethod", {
1029
+ get: $util.oneOfGetter($oneOfFields = ["dnsMethod"]),
1030
+ set: $util.oneOfSetter($oneOfFields)
1031
+ });
1032
+ Object.defineProperty(DNSSource.prototype, "_appCached", {
1033
+ get: $util.oneOfGetter($oneOfFields = ["appCached"]),
1034
+ set: $util.oneOfSetter($oneOfFields)
1035
+ });
1036
+ DNSSource.create = function create(properties) {
1037
+ return new DNSSource(properties);
1038
+ };
1039
+ DNSSource.encode = function encode(m, w) {
1040
+ if (!w)
1041
+ w = $Writer.create();
1042
+ if (m.dnsMethod != null && Object.hasOwnProperty.call(m, "dnsMethod"))
1043
+ w.uint32(120).int32(m.dnsMethod);
1044
+ if (m.appCached != null && Object.hasOwnProperty.call(m, "appCached"))
1045
+ w.uint32(128).bool(m.appCached);
1046
+ return w;
1047
+ };
1048
+ DNSSource.decode = function decode(r, l, e, n) {
1049
+ if (!(r instanceof $Reader))
1050
+ r = $Reader.create(r);
1051
+ if (n === undefined)
1052
+ n = 0;
1053
+ if (n > $Reader.recursionLimit)
1054
+ throw Error("maximum nesting depth exceeded");
1055
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload.DNSSource();
1056
+ while (r.pos < c) {
1057
+ var t = r.uint32();
1058
+ if (t === e)
1059
+ break;
1060
+ switch (t >>> 3) {
1061
+ case 15: {
1062
+ m.dnsMethod = r.int32();
1063
+ break;
1064
+ }
1065
+ case 16: {
1066
+ m.appCached = r.bool();
1067
+ break;
1068
+ }
1069
+ default:
1070
+ r.skipType(t & 7, n);
1071
+ break;
1072
+ }
1073
+ }
1074
+ return m;
1075
+ };
1076
+ DNSSource.fromObject = function fromObject(d, n) {
1077
+ if (d instanceof $root.proto.ClientPayload.DNSSource)
1078
+ return d;
1079
+ if (n === undefined)
1080
+ n = 0;
1081
+ if (n > $util.recursionLimit)
1082
+ throw Error("maximum nesting depth exceeded");
1083
+ var m = new $root.proto.ClientPayload.DNSSource();
1084
+ switch (d.dnsMethod) {
1085
+ default:
1086
+ if (typeof d.dnsMethod === "number") {
1087
+ m.dnsMethod = d.dnsMethod;
1088
+ break;
1089
+ }
1090
+ break;
1091
+ case "SYSTEM":
1092
+ case 0:
1093
+ m.dnsMethod = 0;
1094
+ break;
1095
+ case "GOOGLE":
1096
+ case 1:
1097
+ m.dnsMethod = 1;
1098
+ break;
1099
+ case "HARDCODED":
1100
+ case 2:
1101
+ m.dnsMethod = 2;
1102
+ break;
1103
+ case "OVERRIDE":
1104
+ case 3:
1105
+ m.dnsMethod = 3;
1106
+ break;
1107
+ case "FALLBACK":
1108
+ case 4:
1109
+ m.dnsMethod = 4;
1110
+ break;
1111
+ case "MNS":
1112
+ case 5:
1113
+ m.dnsMethod = 5;
1114
+ break;
1115
+ case "MNS_SECONDARY":
1116
+ case 6:
1117
+ m.dnsMethod = 6;
1118
+ break;
1119
+ case "SOCKS_PROXY":
1120
+ case 7:
1121
+ m.dnsMethod = 7;
1122
+ break;
1123
+ }
1124
+ if (d.appCached != null) {
1125
+ m.appCached = Boolean(d.appCached);
1126
+ }
1127
+ return m;
1128
+ };
1129
+ DNSSource.toObject = function toObject(m, o) {
1130
+ if (!o)
1131
+ o = {};
1132
+ var d = {};
1133
+ if (m.dnsMethod != null && m.hasOwnProperty("dnsMethod")) {
1134
+ d.dnsMethod = o.enums === String ? $root.proto.ClientPayload.DNSSource.DNSResolutionMethod[m.dnsMethod] === undefined ? m.dnsMethod : $root.proto.ClientPayload.DNSSource.DNSResolutionMethod[m.dnsMethod] : m.dnsMethod;
1135
+ if (o.oneofs)
1136
+ d._dnsMethod = "dnsMethod";
1137
+ }
1138
+ if (m.appCached != null && m.hasOwnProperty("appCached")) {
1139
+ d.appCached = m.appCached;
1140
+ if (o.oneofs)
1141
+ d._appCached = "appCached";
1142
+ }
1143
+ return d;
1144
+ };
1145
+ DNSSource.prototype.toJSON = function toJSON() {
1146
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1147
+ };
1148
+ DNSSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1149
+ if (typeUrlPrefix === undefined) {
1150
+ typeUrlPrefix = "type.googleapis.com";
1151
+ }
1152
+ return typeUrlPrefix + "/proto.ClientPayload.DNSSource";
1153
+ };
1154
+ $lazy(DNSSource, "DNSResolutionMethod", function() {
1155
+ const valuesById = {}, values = Object.create(valuesById);
1156
+ values[valuesById[0] = "SYSTEM"] = 0;
1157
+ values[valuesById[1] = "GOOGLE"] = 1;
1158
+ values[valuesById[2] = "HARDCODED"] = 2;
1159
+ values[valuesById[3] = "OVERRIDE"] = 3;
1160
+ values[valuesById[4] = "FALLBACK"] = 4;
1161
+ values[valuesById[5] = "MNS"] = 5;
1162
+ values[valuesById[6] = "MNS_SECONDARY"] = 6;
1163
+ values[valuesById[7] = "SOCKS_PROXY"] = 7;
1164
+ return values;
1165
+ });
1166
+ return DNSSource;
1167
+ });
1168
+ $lazy(ClientPayload, "DevicePairingRegistrationData", function() {
1169
+ function DevicePairingRegistrationData(p) {
1170
+ if (p)
1171
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1172
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1173
+ this[ks[i]] = p[ks[i]];
1174
+ }
1175
+ DevicePairingRegistrationData.prototype.eRegid = null;
1176
+ DevicePairingRegistrationData.prototype.eKeytype = null;
1177
+ DevicePairingRegistrationData.prototype.eIdent = null;
1178
+ DevicePairingRegistrationData.prototype.eSkeyId = null;
1179
+ DevicePairingRegistrationData.prototype.eSkeyVal = null;
1180
+ DevicePairingRegistrationData.prototype.eSkeySig = null;
1181
+ DevicePairingRegistrationData.prototype.buildHash = null;
1182
+ DevicePairingRegistrationData.prototype.deviceProps = null;
1183
+ let $oneOfFields;
1184
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_eRegid", {
1185
+ get: $util.oneOfGetter($oneOfFields = ["eRegid"]),
1186
+ set: $util.oneOfSetter($oneOfFields)
1187
+ });
1188
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_eKeytype", {
1189
+ get: $util.oneOfGetter($oneOfFields = ["eKeytype"]),
1190
+ set: $util.oneOfSetter($oneOfFields)
1191
+ });
1192
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_eIdent", {
1193
+ get: $util.oneOfGetter($oneOfFields = ["eIdent"]),
1194
+ set: $util.oneOfSetter($oneOfFields)
1195
+ });
1196
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_eSkeyId", {
1197
+ get: $util.oneOfGetter($oneOfFields = ["eSkeyId"]),
1198
+ set: $util.oneOfSetter($oneOfFields)
1199
+ });
1200
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_eSkeyVal", {
1201
+ get: $util.oneOfGetter($oneOfFields = ["eSkeyVal"]),
1202
+ set: $util.oneOfSetter($oneOfFields)
1203
+ });
1204
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_eSkeySig", {
1205
+ get: $util.oneOfGetter($oneOfFields = ["eSkeySig"]),
1206
+ set: $util.oneOfSetter($oneOfFields)
1207
+ });
1208
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_buildHash", {
1209
+ get: $util.oneOfGetter($oneOfFields = ["buildHash"]),
1210
+ set: $util.oneOfSetter($oneOfFields)
1211
+ });
1212
+ Object.defineProperty(DevicePairingRegistrationData.prototype, "_deviceProps", {
1213
+ get: $util.oneOfGetter($oneOfFields = ["deviceProps"]),
1214
+ set: $util.oneOfSetter($oneOfFields)
1215
+ });
1216
+ DevicePairingRegistrationData.create = function create(properties) {
1217
+ return new DevicePairingRegistrationData(properties);
1218
+ };
1219
+ DevicePairingRegistrationData.encode = function encode(m, w) {
1220
+ if (!w)
1221
+ w = $Writer.create();
1222
+ if (m.eRegid != null && Object.hasOwnProperty.call(m, "eRegid"))
1223
+ w.uint32(10).bytes(m.eRegid);
1224
+ if (m.eKeytype != null && Object.hasOwnProperty.call(m, "eKeytype"))
1225
+ w.uint32(18).bytes(m.eKeytype);
1226
+ if (m.eIdent != null && Object.hasOwnProperty.call(m, "eIdent"))
1227
+ w.uint32(26).bytes(m.eIdent);
1228
+ if (m.eSkeyId != null && Object.hasOwnProperty.call(m, "eSkeyId"))
1229
+ w.uint32(34).bytes(m.eSkeyId);
1230
+ if (m.eSkeyVal != null && Object.hasOwnProperty.call(m, "eSkeyVal"))
1231
+ w.uint32(42).bytes(m.eSkeyVal);
1232
+ if (m.eSkeySig != null && Object.hasOwnProperty.call(m, "eSkeySig"))
1233
+ w.uint32(50).bytes(m.eSkeySig);
1234
+ if (m.buildHash != null && Object.hasOwnProperty.call(m, "buildHash"))
1235
+ w.uint32(58).bytes(m.buildHash);
1236
+ if (m.deviceProps != null && Object.hasOwnProperty.call(m, "deviceProps"))
1237
+ w.uint32(66).bytes(m.deviceProps);
1238
+ return w;
1239
+ };
1240
+ DevicePairingRegistrationData.decode = function decode(r, l, e, n) {
1241
+ if (!(r instanceof $Reader))
1242
+ r = $Reader.create(r);
1243
+ if (n === undefined)
1244
+ n = 0;
1245
+ if (n > $Reader.recursionLimit)
1246
+ throw Error("maximum nesting depth exceeded");
1247
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload.DevicePairingRegistrationData();
1248
+ while (r.pos < c) {
1249
+ var t = r.uint32();
1250
+ if (t === e)
1251
+ break;
1252
+ switch (t >>> 3) {
1253
+ case 1: {
1254
+ m.eRegid = r.bytes();
1255
+ break;
1256
+ }
1257
+ case 2: {
1258
+ m.eKeytype = r.bytes();
1259
+ break;
1260
+ }
1261
+ case 3: {
1262
+ m.eIdent = r.bytes();
1263
+ break;
1264
+ }
1265
+ case 4: {
1266
+ m.eSkeyId = r.bytes();
1267
+ break;
1268
+ }
1269
+ case 5: {
1270
+ m.eSkeyVal = r.bytes();
1271
+ break;
1272
+ }
1273
+ case 6: {
1274
+ m.eSkeySig = r.bytes();
1275
+ break;
1276
+ }
1277
+ case 7: {
1278
+ m.buildHash = r.bytes();
1279
+ break;
1280
+ }
1281
+ case 8: {
1282
+ m.deviceProps = r.bytes();
1283
+ break;
1284
+ }
1285
+ default:
1286
+ r.skipType(t & 7, n);
1287
+ break;
1288
+ }
1289
+ }
1290
+ return m;
1291
+ };
1292
+ DevicePairingRegistrationData.fromObject = function fromObject(d, n) {
1293
+ if (d instanceof $root.proto.ClientPayload.DevicePairingRegistrationData)
1294
+ return d;
1295
+ if (n === undefined)
1296
+ n = 0;
1297
+ if (n > $util.recursionLimit)
1298
+ throw Error("maximum nesting depth exceeded");
1299
+ var m = new $root.proto.ClientPayload.DevicePairingRegistrationData();
1300
+ if (d.eRegid != null) {
1301
+ if (typeof d.eRegid === "string")
1302
+ $util.base64.decode(d.eRegid, m.eRegid = $util.newBuffer($util.base64.length(d.eRegid)), 0);
1303
+ else if (d.eRegid.length >= 0)
1304
+ m.eRegid = d.eRegid;
1305
+ }
1306
+ if (d.eKeytype != null) {
1307
+ if (typeof d.eKeytype === "string")
1308
+ $util.base64.decode(d.eKeytype, m.eKeytype = $util.newBuffer($util.base64.length(d.eKeytype)), 0);
1309
+ else if (d.eKeytype.length >= 0)
1310
+ m.eKeytype = d.eKeytype;
1311
+ }
1312
+ if (d.eIdent != null) {
1313
+ if (typeof d.eIdent === "string")
1314
+ $util.base64.decode(d.eIdent, m.eIdent = $util.newBuffer($util.base64.length(d.eIdent)), 0);
1315
+ else if (d.eIdent.length >= 0)
1316
+ m.eIdent = d.eIdent;
1317
+ }
1318
+ if (d.eSkeyId != null) {
1319
+ if (typeof d.eSkeyId === "string")
1320
+ $util.base64.decode(d.eSkeyId, m.eSkeyId = $util.newBuffer($util.base64.length(d.eSkeyId)), 0);
1321
+ else if (d.eSkeyId.length >= 0)
1322
+ m.eSkeyId = d.eSkeyId;
1323
+ }
1324
+ if (d.eSkeyVal != null) {
1325
+ if (typeof d.eSkeyVal === "string")
1326
+ $util.base64.decode(d.eSkeyVal, m.eSkeyVal = $util.newBuffer($util.base64.length(d.eSkeyVal)), 0);
1327
+ else if (d.eSkeyVal.length >= 0)
1328
+ m.eSkeyVal = d.eSkeyVal;
1329
+ }
1330
+ if (d.eSkeySig != null) {
1331
+ if (typeof d.eSkeySig === "string")
1332
+ $util.base64.decode(d.eSkeySig, m.eSkeySig = $util.newBuffer($util.base64.length(d.eSkeySig)), 0);
1333
+ else if (d.eSkeySig.length >= 0)
1334
+ m.eSkeySig = d.eSkeySig;
1335
+ }
1336
+ if (d.buildHash != null) {
1337
+ if (typeof d.buildHash === "string")
1338
+ $util.base64.decode(d.buildHash, m.buildHash = $util.newBuffer($util.base64.length(d.buildHash)), 0);
1339
+ else if (d.buildHash.length >= 0)
1340
+ m.buildHash = d.buildHash;
1341
+ }
1342
+ if (d.deviceProps != null) {
1343
+ if (typeof d.deviceProps === "string")
1344
+ $util.base64.decode(d.deviceProps, m.deviceProps = $util.newBuffer($util.base64.length(d.deviceProps)), 0);
1345
+ else if (d.deviceProps.length >= 0)
1346
+ m.deviceProps = d.deviceProps;
1347
+ }
1348
+ return m;
1349
+ };
1350
+ DevicePairingRegistrationData.toObject = function toObject(m, o) {
1351
+ if (!o)
1352
+ o = {};
1353
+ var d = {};
1354
+ if (m.eRegid != null && m.hasOwnProperty("eRegid")) {
1355
+ d.eRegid = o.bytes === String ? $util.base64.encode(m.eRegid, 0, m.eRegid.length) : o.bytes === Array ? Array.prototype.slice.call(m.eRegid) : m.eRegid;
1356
+ if (o.oneofs)
1357
+ d._eRegid = "eRegid";
1358
+ }
1359
+ if (m.eKeytype != null && m.hasOwnProperty("eKeytype")) {
1360
+ d.eKeytype = o.bytes === String ? $util.base64.encode(m.eKeytype, 0, m.eKeytype.length) : o.bytes === Array ? Array.prototype.slice.call(m.eKeytype) : m.eKeytype;
1361
+ if (o.oneofs)
1362
+ d._eKeytype = "eKeytype";
1363
+ }
1364
+ if (m.eIdent != null && m.hasOwnProperty("eIdent")) {
1365
+ d.eIdent = o.bytes === String ? $util.base64.encode(m.eIdent, 0, m.eIdent.length) : o.bytes === Array ? Array.prototype.slice.call(m.eIdent) : m.eIdent;
1366
+ if (o.oneofs)
1367
+ d._eIdent = "eIdent";
1368
+ }
1369
+ if (m.eSkeyId != null && m.hasOwnProperty("eSkeyId")) {
1370
+ d.eSkeyId = o.bytes === String ? $util.base64.encode(m.eSkeyId, 0, m.eSkeyId.length) : o.bytes === Array ? Array.prototype.slice.call(m.eSkeyId) : m.eSkeyId;
1371
+ if (o.oneofs)
1372
+ d._eSkeyId = "eSkeyId";
1373
+ }
1374
+ if (m.eSkeyVal != null && m.hasOwnProperty("eSkeyVal")) {
1375
+ d.eSkeyVal = o.bytes === String ? $util.base64.encode(m.eSkeyVal, 0, m.eSkeyVal.length) : o.bytes === Array ? Array.prototype.slice.call(m.eSkeyVal) : m.eSkeyVal;
1376
+ if (o.oneofs)
1377
+ d._eSkeyVal = "eSkeyVal";
1378
+ }
1379
+ if (m.eSkeySig != null && m.hasOwnProperty("eSkeySig")) {
1380
+ d.eSkeySig = o.bytes === String ? $util.base64.encode(m.eSkeySig, 0, m.eSkeySig.length) : o.bytes === Array ? Array.prototype.slice.call(m.eSkeySig) : m.eSkeySig;
1381
+ if (o.oneofs)
1382
+ d._eSkeySig = "eSkeySig";
1383
+ }
1384
+ if (m.buildHash != null && m.hasOwnProperty("buildHash")) {
1385
+ d.buildHash = o.bytes === String ? $util.base64.encode(m.buildHash, 0, m.buildHash.length) : o.bytes === Array ? Array.prototype.slice.call(m.buildHash) : m.buildHash;
1386
+ if (o.oneofs)
1387
+ d._buildHash = "buildHash";
1388
+ }
1389
+ if (m.deviceProps != null && m.hasOwnProperty("deviceProps")) {
1390
+ d.deviceProps = o.bytes === String ? $util.base64.encode(m.deviceProps, 0, m.deviceProps.length) : o.bytes === Array ? Array.prototype.slice.call(m.deviceProps) : m.deviceProps;
1391
+ if (o.oneofs)
1392
+ d._deviceProps = "deviceProps";
1393
+ }
1394
+ return d;
1395
+ };
1396
+ DevicePairingRegistrationData.prototype.toJSON = function toJSON() {
1397
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1398
+ };
1399
+ DevicePairingRegistrationData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1400
+ if (typeUrlPrefix === undefined) {
1401
+ typeUrlPrefix = "type.googleapis.com";
1402
+ }
1403
+ return typeUrlPrefix + "/proto.ClientPayload.DevicePairingRegistrationData";
1404
+ };
1405
+ return DevicePairingRegistrationData;
1406
+ });
1407
+ $lazy(ClientPayload, "IOSAppExtension", function() {
1408
+ const valuesById = {}, values = Object.create(valuesById);
1409
+ values[valuesById[0] = "SHARE_EXTENSION"] = 0;
1410
+ values[valuesById[1] = "SERVICE_EXTENSION"] = 1;
1411
+ values[valuesById[2] = "INTENTS_EXTENSION"] = 2;
1412
+ return values;
1413
+ });
1414
+ $lazy(ClientPayload, "InteropData", function() {
1415
+ function InteropData(p) {
1416
+ if (p)
1417
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1418
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1419
+ this[ks[i]] = p[ks[i]];
1420
+ }
1421
+ InteropData.prototype.accountId = null;
1422
+ InteropData.prototype.token = null;
1423
+ InteropData.prototype.enableReadReceipts = null;
1424
+ let $oneOfFields;
1425
+ Object.defineProperty(InteropData.prototype, "_accountId", {
1426
+ get: $util.oneOfGetter($oneOfFields = ["accountId"]),
1427
+ set: $util.oneOfSetter($oneOfFields)
1428
+ });
1429
+ Object.defineProperty(InteropData.prototype, "_token", {
1430
+ get: $util.oneOfGetter($oneOfFields = ["token"]),
1431
+ set: $util.oneOfSetter($oneOfFields)
1432
+ });
1433
+ Object.defineProperty(InteropData.prototype, "_enableReadReceipts", {
1434
+ get: $util.oneOfGetter($oneOfFields = ["enableReadReceipts"]),
1435
+ set: $util.oneOfSetter($oneOfFields)
1436
+ });
1437
+ InteropData.create = function create(properties) {
1438
+ return new InteropData(properties);
1439
+ };
1440
+ InteropData.encode = function encode(m, w) {
1441
+ if (!w)
1442
+ w = $Writer.create();
1443
+ if (m.accountId != null && Object.hasOwnProperty.call(m, "accountId"))
1444
+ w.uint32(8).uint64(m.accountId);
1445
+ if (m.token != null && Object.hasOwnProperty.call(m, "token"))
1446
+ w.uint32(18).bytes(m.token);
1447
+ if (m.enableReadReceipts != null && Object.hasOwnProperty.call(m, "enableReadReceipts"))
1448
+ w.uint32(24).bool(m.enableReadReceipts);
1449
+ return w;
1450
+ };
1451
+ InteropData.decode = function decode(r, l, e, n) {
1452
+ if (!(r instanceof $Reader))
1453
+ r = $Reader.create(r);
1454
+ if (n === undefined)
1455
+ n = 0;
1456
+ if (n > $Reader.recursionLimit)
1457
+ throw Error("maximum nesting depth exceeded");
1458
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload.InteropData();
1459
+ while (r.pos < c) {
1460
+ var t = r.uint32();
1461
+ if (t === e)
1462
+ break;
1463
+ switch (t >>> 3) {
1464
+ case 1: {
1465
+ m.accountId = r.uint64();
1466
+ break;
1467
+ }
1468
+ case 2: {
1469
+ m.token = r.bytes();
1470
+ break;
1471
+ }
1472
+ case 3: {
1473
+ m.enableReadReceipts = r.bool();
1474
+ break;
1475
+ }
1476
+ default:
1477
+ r.skipType(t & 7, n);
1478
+ break;
1479
+ }
1480
+ }
1481
+ return m;
1482
+ };
1483
+ InteropData.fromObject = function fromObject(d, n) {
1484
+ if (d instanceof $root.proto.ClientPayload.InteropData)
1485
+ return d;
1486
+ if (n === undefined)
1487
+ n = 0;
1488
+ if (n > $util.recursionLimit)
1489
+ throw Error("maximum nesting depth exceeded");
1490
+ var m = new $root.proto.ClientPayload.InteropData();
1491
+ if (d.accountId != null) {
1492
+ if ($util.Long)
1493
+ (m.accountId = $util.Long.fromValue(d.accountId)).unsigned = true;
1494
+ else if (typeof d.accountId === "string")
1495
+ m.accountId = parseInt(d.accountId, 10);
1496
+ else if (typeof d.accountId === "number")
1497
+ m.accountId = d.accountId;
1498
+ else if (typeof d.accountId === "object")
1499
+ m.accountId = new $util.LongBits(d.accountId.low >>> 0, d.accountId.high >>> 0).toNumber(true);
1500
+ }
1501
+ if (d.token != null) {
1502
+ if (typeof d.token === "string")
1503
+ $util.base64.decode(d.token, m.token = $util.newBuffer($util.base64.length(d.token)), 0);
1504
+ else if (d.token.length >= 0)
1505
+ m.token = d.token;
1506
+ }
1507
+ if (d.enableReadReceipts != null) {
1508
+ m.enableReadReceipts = Boolean(d.enableReadReceipts);
1509
+ }
1510
+ return m;
1511
+ };
1512
+ InteropData.toObject = function toObject(m, o) {
1513
+ if (!o)
1514
+ o = {};
1515
+ var d = {};
1516
+ if (m.accountId != null && m.hasOwnProperty("accountId")) {
1517
+ if (typeof m.accountId === "number")
1518
+ d.accountId = o.longs === String ? String(m.accountId) : m.accountId;
1519
+ else
1520
+ d.accountId = o.longs === String ? longToString(m.accountId, true) : o.longs === Number ? longToNumber(m.accountId, true) : m.accountId;
1521
+ if (o.oneofs)
1522
+ d._accountId = "accountId";
1523
+ }
1524
+ if (m.token != null && m.hasOwnProperty("token")) {
1525
+ d.token = o.bytes === String ? $util.base64.encode(m.token, 0, m.token.length) : o.bytes === Array ? Array.prototype.slice.call(m.token) : m.token;
1526
+ if (o.oneofs)
1527
+ d._token = "token";
1528
+ }
1529
+ if (m.enableReadReceipts != null && m.hasOwnProperty("enableReadReceipts")) {
1530
+ d.enableReadReceipts = m.enableReadReceipts;
1531
+ if (o.oneofs)
1532
+ d._enableReadReceipts = "enableReadReceipts";
1533
+ }
1534
+ return d;
1535
+ };
1536
+ InteropData.prototype.toJSON = function toJSON() {
1537
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
1538
+ };
1539
+ InteropData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
1540
+ if (typeUrlPrefix === undefined) {
1541
+ typeUrlPrefix = "type.googleapis.com";
1542
+ }
1543
+ return typeUrlPrefix + "/proto.ClientPayload.InteropData";
1544
+ };
1545
+ return InteropData;
1546
+ });
1547
+ $lazy(ClientPayload, "Product", function() {
1548
+ const valuesById = {}, values = Object.create(valuesById);
1549
+ values[valuesById[0] = "WHATSAPP"] = 0;
1550
+ values[valuesById[1] = "MESSENGER"] = 1;
1551
+ values[valuesById[2] = "INTEROP"] = 2;
1552
+ values[valuesById[3] = "INTEROP_MSGR"] = 3;
1553
+ values[valuesById[4] = "WHATSAPP_LID"] = 4;
1554
+ return values;
1555
+ });
1556
+ $lazy(ClientPayload, "TrafficAnonymization", function() {
1557
+ const valuesById = {}, values = Object.create(valuesById);
1558
+ values[valuesById[0] = "OFF"] = 0;
1559
+ values[valuesById[1] = "STANDARD"] = 1;
1560
+ return values;
1561
+ });
1562
+ $lazy(ClientPayload, "UserAgent", function() {
1563
+ function UserAgent(p) {
1564
+ if (p)
1565
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
1566
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
1567
+ this[ks[i]] = p[ks[i]];
1568
+ }
1569
+ UserAgent.prototype.platform = null;
1570
+ UserAgent.prototype.appVersion = null;
1571
+ UserAgent.prototype.mcc = null;
1572
+ UserAgent.prototype.mnc = null;
1573
+ UserAgent.prototype.osVersion = null;
1574
+ UserAgent.prototype.manufacturer = null;
1575
+ UserAgent.prototype.device = null;
1576
+ UserAgent.prototype.osBuildNumber = null;
1577
+ UserAgent.prototype.phoneId = null;
1578
+ UserAgent.prototype.releaseChannel = null;
1579
+ UserAgent.prototype.localeLanguageIso6391 = null;
1580
+ UserAgent.prototype.localeCountryIso31661Alpha2 = null;
1581
+ UserAgent.prototype.deviceBoard = null;
1582
+ UserAgent.prototype.deviceExpId = null;
1583
+ UserAgent.prototype.deviceType = null;
1584
+ UserAgent.prototype.deviceModelType = null;
1585
+ UserAgent.prototype.distributionChannel = null;
1586
+ let $oneOfFields;
1587
+ Object.defineProperty(UserAgent.prototype, "_platform", {
1588
+ get: $util.oneOfGetter($oneOfFields = ["platform"]),
1589
+ set: $util.oneOfSetter($oneOfFields)
1590
+ });
1591
+ Object.defineProperty(UserAgent.prototype, "_appVersion", {
1592
+ get: $util.oneOfGetter($oneOfFields = ["appVersion"]),
1593
+ set: $util.oneOfSetter($oneOfFields)
1594
+ });
1595
+ Object.defineProperty(UserAgent.prototype, "_mcc", {
1596
+ get: $util.oneOfGetter($oneOfFields = ["mcc"]),
1597
+ set: $util.oneOfSetter($oneOfFields)
1598
+ });
1599
+ Object.defineProperty(UserAgent.prototype, "_mnc", {
1600
+ get: $util.oneOfGetter($oneOfFields = ["mnc"]),
1601
+ set: $util.oneOfSetter($oneOfFields)
1602
+ });
1603
+ Object.defineProperty(UserAgent.prototype, "_osVersion", {
1604
+ get: $util.oneOfGetter($oneOfFields = ["osVersion"]),
1605
+ set: $util.oneOfSetter($oneOfFields)
1606
+ });
1607
+ Object.defineProperty(UserAgent.prototype, "_manufacturer", {
1608
+ get: $util.oneOfGetter($oneOfFields = ["manufacturer"]),
1609
+ set: $util.oneOfSetter($oneOfFields)
1610
+ });
1611
+ Object.defineProperty(UserAgent.prototype, "_device", {
1612
+ get: $util.oneOfGetter($oneOfFields = ["device"]),
1613
+ set: $util.oneOfSetter($oneOfFields)
1614
+ });
1615
+ Object.defineProperty(UserAgent.prototype, "_osBuildNumber", {
1616
+ get: $util.oneOfGetter($oneOfFields = ["osBuildNumber"]),
1617
+ set: $util.oneOfSetter($oneOfFields)
1618
+ });
1619
+ Object.defineProperty(UserAgent.prototype, "_phoneId", {
1620
+ get: $util.oneOfGetter($oneOfFields = ["phoneId"]),
1621
+ set: $util.oneOfSetter($oneOfFields)
1622
+ });
1623
+ Object.defineProperty(UserAgent.prototype, "_releaseChannel", {
1624
+ get: $util.oneOfGetter($oneOfFields = ["releaseChannel"]),
1625
+ set: $util.oneOfSetter($oneOfFields)
1626
+ });
1627
+ Object.defineProperty(UserAgent.prototype, "_localeLanguageIso6391", {
1628
+ get: $util.oneOfGetter($oneOfFields = ["localeLanguageIso6391"]),
1629
+ set: $util.oneOfSetter($oneOfFields)
1630
+ });
1631
+ Object.defineProperty(UserAgent.prototype, "_localeCountryIso31661Alpha2", {
1632
+ get: $util.oneOfGetter($oneOfFields = ["localeCountryIso31661Alpha2"]),
1633
+ set: $util.oneOfSetter($oneOfFields)
1634
+ });
1635
+ Object.defineProperty(UserAgent.prototype, "_deviceBoard", {
1636
+ get: $util.oneOfGetter($oneOfFields = ["deviceBoard"]),
1637
+ set: $util.oneOfSetter($oneOfFields)
1638
+ });
1639
+ Object.defineProperty(UserAgent.prototype, "_deviceExpId", {
1640
+ get: $util.oneOfGetter($oneOfFields = ["deviceExpId"]),
1641
+ set: $util.oneOfSetter($oneOfFields)
1642
+ });
1643
+ Object.defineProperty(UserAgent.prototype, "_deviceType", {
1644
+ get: $util.oneOfGetter($oneOfFields = ["deviceType"]),
1645
+ set: $util.oneOfSetter($oneOfFields)
1646
+ });
1647
+ Object.defineProperty(UserAgent.prototype, "_deviceModelType", {
1648
+ get: $util.oneOfGetter($oneOfFields = ["deviceModelType"]),
1649
+ set: $util.oneOfSetter($oneOfFields)
1650
+ });
1651
+ Object.defineProperty(UserAgent.prototype, "_distributionChannel", {
1652
+ get: $util.oneOfGetter($oneOfFields = ["distributionChannel"]),
1653
+ set: $util.oneOfSetter($oneOfFields)
1654
+ });
1655
+ UserAgent.create = function create(properties) {
1656
+ return new UserAgent(properties);
1657
+ };
1658
+ UserAgent.encode = function encode(m, w) {
1659
+ if (!w)
1660
+ w = $Writer.create();
1661
+ if (m.platform != null && Object.hasOwnProperty.call(m, "platform"))
1662
+ w.uint32(8).int32(m.platform);
1663
+ if (m.appVersion != null && Object.hasOwnProperty.call(m, "appVersion"))
1664
+ $root.proto.ClientPayload.UserAgent.AppVersion.encode(m.appVersion, w.uint32(18).fork()).ldelim();
1665
+ if (m.mcc != null && Object.hasOwnProperty.call(m, "mcc"))
1666
+ w.uint32(26).string(m.mcc);
1667
+ if (m.mnc != null && Object.hasOwnProperty.call(m, "mnc"))
1668
+ w.uint32(34).string(m.mnc);
1669
+ if (m.osVersion != null && Object.hasOwnProperty.call(m, "osVersion"))
1670
+ w.uint32(42).string(m.osVersion);
1671
+ if (m.manufacturer != null && Object.hasOwnProperty.call(m, "manufacturer"))
1672
+ w.uint32(50).string(m.manufacturer);
1673
+ if (m.device != null && Object.hasOwnProperty.call(m, "device"))
1674
+ w.uint32(58).string(m.device);
1675
+ if (m.osBuildNumber != null && Object.hasOwnProperty.call(m, "osBuildNumber"))
1676
+ w.uint32(66).string(m.osBuildNumber);
1677
+ if (m.phoneId != null && Object.hasOwnProperty.call(m, "phoneId"))
1678
+ w.uint32(74).string(m.phoneId);
1679
+ if (m.releaseChannel != null && Object.hasOwnProperty.call(m, "releaseChannel"))
1680
+ w.uint32(80).int32(m.releaseChannel);
1681
+ if (m.localeLanguageIso6391 != null && Object.hasOwnProperty.call(m, "localeLanguageIso6391"))
1682
+ w.uint32(90).string(m.localeLanguageIso6391);
1683
+ if (m.localeCountryIso31661Alpha2 != null && Object.hasOwnProperty.call(m, "localeCountryIso31661Alpha2"))
1684
+ w.uint32(98).string(m.localeCountryIso31661Alpha2);
1685
+ if (m.deviceBoard != null && Object.hasOwnProperty.call(m, "deviceBoard"))
1686
+ w.uint32(106).string(m.deviceBoard);
1687
+ if (m.deviceExpId != null && Object.hasOwnProperty.call(m, "deviceExpId"))
1688
+ w.uint32(114).string(m.deviceExpId);
1689
+ if (m.deviceType != null && Object.hasOwnProperty.call(m, "deviceType"))
1690
+ w.uint32(120).int32(m.deviceType);
1691
+ if (m.deviceModelType != null && Object.hasOwnProperty.call(m, "deviceModelType"))
1692
+ w.uint32(130).string(m.deviceModelType);
1693
+ if (m.distributionChannel != null && Object.hasOwnProperty.call(m, "distributionChannel"))
1694
+ w.uint32(136).int32(m.distributionChannel);
1695
+ return w;
1696
+ };
1697
+ UserAgent.decode = function decode(r, l, e, n) {
1698
+ if (!(r instanceof $Reader))
1699
+ r = $Reader.create(r);
1700
+ if (n === undefined)
1701
+ n = 0;
1702
+ if (n > $Reader.recursionLimit)
1703
+ throw Error("maximum nesting depth exceeded");
1704
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload.UserAgent();
1705
+ while (r.pos < c) {
1706
+ var t = r.uint32();
1707
+ if (t === e)
1708
+ break;
1709
+ switch (t >>> 3) {
1710
+ case 1: {
1711
+ m.platform = r.int32();
1712
+ break;
1713
+ }
1714
+ case 2: {
1715
+ m.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.decode(r, r.uint32(), undefined, n + 1);
1716
+ break;
1717
+ }
1718
+ case 3: {
1719
+ m.mcc = r.string();
1720
+ break;
1721
+ }
1722
+ case 4: {
1723
+ m.mnc = r.string();
1724
+ break;
1725
+ }
1726
+ case 5: {
1727
+ m.osVersion = r.string();
1728
+ break;
1729
+ }
1730
+ case 6: {
1731
+ m.manufacturer = r.string();
1732
+ break;
1733
+ }
1734
+ case 7: {
1735
+ m.device = r.string();
1736
+ break;
1737
+ }
1738
+ case 8: {
1739
+ m.osBuildNumber = r.string();
1740
+ break;
1741
+ }
1742
+ case 9: {
1743
+ m.phoneId = r.string();
1744
+ break;
1745
+ }
1746
+ case 10: {
1747
+ m.releaseChannel = r.int32();
1748
+ break;
1749
+ }
1750
+ case 11: {
1751
+ m.localeLanguageIso6391 = r.string();
1752
+ break;
1753
+ }
1754
+ case 12: {
1755
+ m.localeCountryIso31661Alpha2 = r.string();
1756
+ break;
1757
+ }
1758
+ case 13: {
1759
+ m.deviceBoard = r.string();
1760
+ break;
1761
+ }
1762
+ case 14: {
1763
+ m.deviceExpId = r.string();
1764
+ break;
1765
+ }
1766
+ case 15: {
1767
+ m.deviceType = r.int32();
1768
+ break;
1769
+ }
1770
+ case 16: {
1771
+ m.deviceModelType = r.string();
1772
+ break;
1773
+ }
1774
+ case 17: {
1775
+ m.distributionChannel = r.int32();
1776
+ break;
1777
+ }
1778
+ default:
1779
+ r.skipType(t & 7, n);
1780
+ break;
1781
+ }
1782
+ }
1783
+ return m;
1784
+ };
1785
+ UserAgent.fromObject = function fromObject(d, n) {
1786
+ if (d instanceof $root.proto.ClientPayload.UserAgent)
1787
+ return d;
1788
+ if (n === undefined)
1789
+ n = 0;
1790
+ if (n > $util.recursionLimit)
1791
+ throw Error("maximum nesting depth exceeded");
1792
+ var m = new $root.proto.ClientPayload.UserAgent();
1793
+ switch (d.platform) {
1794
+ default:
1795
+ if (typeof d.platform === "number") {
1796
+ m.platform = d.platform;
1797
+ break;
1798
+ }
1799
+ break;
1800
+ case "ANDROID":
1801
+ case 0:
1802
+ m.platform = 0;
1803
+ break;
1804
+ case "IOS":
1805
+ case 1:
1806
+ m.platform = 1;
1807
+ break;
1808
+ case "WINDOWS_PHONE":
1809
+ case 2:
1810
+ m.platform = 2;
1811
+ break;
1812
+ case "BLACKBERRY":
1813
+ case 3:
1814
+ m.platform = 3;
1815
+ break;
1816
+ case "BLACKBERRYX":
1817
+ case 4:
1818
+ m.platform = 4;
1819
+ break;
1820
+ case "S40":
1821
+ case 5:
1822
+ m.platform = 5;
1823
+ break;
1824
+ case "S60":
1825
+ case 6:
1826
+ m.platform = 6;
1827
+ break;
1828
+ case "PYTHON_CLIENT":
1829
+ case 7:
1830
+ m.platform = 7;
1831
+ break;
1832
+ case "TIZEN":
1833
+ case 8:
1834
+ m.platform = 8;
1835
+ break;
1836
+ case "ENTERPRISE":
1837
+ case 9:
1838
+ m.platform = 9;
1839
+ break;
1840
+ case "SMB_ANDROID":
1841
+ case 10:
1842
+ m.platform = 10;
1843
+ break;
1844
+ case "KAIOS":
1845
+ case 11:
1846
+ m.platform = 11;
1847
+ break;
1848
+ case "SMB_IOS":
1849
+ case 12:
1850
+ m.platform = 12;
1851
+ break;
1852
+ case "WINDOWS":
1853
+ case 13:
1854
+ m.platform = 13;
1855
+ break;
1856
+ case "WEB":
1857
+ case 14:
1858
+ m.platform = 14;
1859
+ break;
1860
+ case "PORTAL":
1861
+ case 15:
1862
+ m.platform = 15;
1863
+ break;
1864
+ case "GREEN_ANDROID":
1865
+ case 16:
1866
+ m.platform = 16;
1867
+ break;
1868
+ case "GREEN_IPHONE":
1869
+ case 17:
1870
+ m.platform = 17;
1871
+ break;
1872
+ case "BLUE_ANDROID":
1873
+ case 18:
1874
+ m.platform = 18;
1875
+ break;
1876
+ case "BLUE_IPHONE":
1877
+ case 19:
1878
+ m.platform = 19;
1879
+ break;
1880
+ case "FBLITE_ANDROID":
1881
+ case 20:
1882
+ m.platform = 20;
1883
+ break;
1884
+ case "MLITE_ANDROID":
1885
+ case 21:
1886
+ m.platform = 21;
1887
+ break;
1888
+ case "IGLITE_ANDROID":
1889
+ case 22:
1890
+ m.platform = 22;
1891
+ break;
1892
+ case "PAGE":
1893
+ case 23:
1894
+ m.platform = 23;
1895
+ break;
1896
+ case "MACOS":
1897
+ case 24:
1898
+ m.platform = 24;
1899
+ break;
1900
+ case "OCULUS_MSG":
1901
+ case 25:
1902
+ m.platform = 25;
1903
+ break;
1904
+ case "OCULUS_CALL":
1905
+ case 26:
1906
+ m.platform = 26;
1907
+ break;
1908
+ case "MILAN":
1909
+ case 27:
1910
+ m.platform = 27;
1911
+ break;
1912
+ case "CAPI":
1913
+ case 28:
1914
+ m.platform = 28;
1915
+ break;
1916
+ case "WEAROS":
1917
+ case 29:
1918
+ m.platform = 29;
1919
+ break;
1920
+ case "ARDEVICE":
1921
+ case 30:
1922
+ m.platform = 30;
1923
+ break;
1924
+ case "VRDEVICE":
1925
+ case 31:
1926
+ m.platform = 31;
1927
+ break;
1928
+ case "BLUE_WEB":
1929
+ case 32:
1930
+ m.platform = 32;
1931
+ break;
1932
+ case "IPAD":
1933
+ case 33:
1934
+ m.platform = 33;
1935
+ break;
1936
+ case "TEST":
1937
+ case 34:
1938
+ m.platform = 34;
1939
+ break;
1940
+ case "SMART_GLASSES":
1941
+ case 35:
1942
+ m.platform = 35;
1943
+ break;
1944
+ case "BLUE_VR":
1945
+ case 36:
1946
+ m.platform = 36;
1947
+ break;
1948
+ case "AR_WRIST":
1949
+ case 37:
1950
+ m.platform = 37;
1951
+ break;
1952
+ }
1953
+ if (d.appVersion != null) {
1954
+ if (typeof d.appVersion !== "object")
1955
+ throw TypeError(".proto.ClientPayload.UserAgent.appVersion: object expected");
1956
+ m.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.fromObject(d.appVersion, n + 1);
1957
+ }
1958
+ if (d.mcc != null) {
1959
+ m.mcc = String(d.mcc);
1960
+ }
1961
+ if (d.mnc != null) {
1962
+ m.mnc = String(d.mnc);
1963
+ }
1964
+ if (d.osVersion != null) {
1965
+ m.osVersion = String(d.osVersion);
1966
+ }
1967
+ if (d.manufacturer != null) {
1968
+ m.manufacturer = String(d.manufacturer);
1969
+ }
1970
+ if (d.device != null) {
1971
+ m.device = String(d.device);
1972
+ }
1973
+ if (d.osBuildNumber != null) {
1974
+ m.osBuildNumber = String(d.osBuildNumber);
1975
+ }
1976
+ if (d.phoneId != null) {
1977
+ m.phoneId = String(d.phoneId);
1978
+ }
1979
+ switch (d.releaseChannel) {
1980
+ default:
1981
+ if (typeof d.releaseChannel === "number") {
1982
+ m.releaseChannel = d.releaseChannel;
1983
+ break;
1984
+ }
1985
+ break;
1986
+ case "RELEASE":
1987
+ case 0:
1988
+ m.releaseChannel = 0;
1989
+ break;
1990
+ case "BETA":
1991
+ case 1:
1992
+ m.releaseChannel = 1;
1993
+ break;
1994
+ case "ALPHA":
1995
+ case 2:
1996
+ m.releaseChannel = 2;
1997
+ break;
1998
+ case "DEBUG":
1999
+ case 3:
2000
+ m.releaseChannel = 3;
2001
+ break;
2002
+ }
2003
+ if (d.localeLanguageIso6391 != null) {
2004
+ m.localeLanguageIso6391 = String(d.localeLanguageIso6391);
2005
+ }
2006
+ if (d.localeCountryIso31661Alpha2 != null) {
2007
+ m.localeCountryIso31661Alpha2 = String(d.localeCountryIso31661Alpha2);
2008
+ }
2009
+ if (d.deviceBoard != null) {
2010
+ m.deviceBoard = String(d.deviceBoard);
2011
+ }
2012
+ if (d.deviceExpId != null) {
2013
+ m.deviceExpId = String(d.deviceExpId);
2014
+ }
2015
+ switch (d.deviceType) {
2016
+ default:
2017
+ if (typeof d.deviceType === "number") {
2018
+ m.deviceType = d.deviceType;
2019
+ break;
2020
+ }
2021
+ break;
2022
+ case "PHONE":
2023
+ case 0:
2024
+ m.deviceType = 0;
2025
+ break;
2026
+ case "TABLET":
2027
+ case 1:
2028
+ m.deviceType = 1;
2029
+ break;
2030
+ case "DESKTOP":
2031
+ case 2:
2032
+ m.deviceType = 2;
2033
+ break;
2034
+ case "WEARABLE":
2035
+ case 3:
2036
+ m.deviceType = 3;
2037
+ break;
2038
+ case "VR":
2039
+ case 4:
2040
+ m.deviceType = 4;
2041
+ break;
2042
+ }
2043
+ if (d.deviceModelType != null) {
2044
+ m.deviceModelType = String(d.deviceModelType);
2045
+ }
2046
+ switch (d.distributionChannel) {
2047
+ default:
2048
+ if (typeof d.distributionChannel === "number") {
2049
+ m.distributionChannel = d.distributionChannel;
2050
+ break;
2051
+ }
2052
+ break;
2053
+ case "APPSTORE":
2054
+ case 0:
2055
+ m.distributionChannel = 0;
2056
+ break;
2057
+ case "WEBSITE":
2058
+ case 1:
2059
+ m.distributionChannel = 1;
2060
+ break;
2061
+ case "TESTFLIGHT":
2062
+ case 2:
2063
+ m.distributionChannel = 2;
2064
+ break;
2065
+ case "INTERNAL":
2066
+ case 3:
2067
+ m.distributionChannel = 3;
2068
+ break;
2069
+ }
2070
+ return m;
2071
+ };
2072
+ UserAgent.toObject = function toObject(m, o) {
2073
+ if (!o)
2074
+ o = {};
2075
+ var d = {};
2076
+ if (m.platform != null && m.hasOwnProperty("platform")) {
2077
+ d.platform = o.enums === String ? $root.proto.ClientPayload.UserAgent.Platform[m.platform] === undefined ? m.platform : $root.proto.ClientPayload.UserAgent.Platform[m.platform] : m.platform;
2078
+ if (o.oneofs)
2079
+ d._platform = "platform";
2080
+ }
2081
+ if (m.appVersion != null && m.hasOwnProperty("appVersion")) {
2082
+ d.appVersion = $root.proto.ClientPayload.UserAgent.AppVersion.toObject(m.appVersion, o);
2083
+ if (o.oneofs)
2084
+ d._appVersion = "appVersion";
2085
+ }
2086
+ if (m.mcc != null && m.hasOwnProperty("mcc")) {
2087
+ d.mcc = m.mcc;
2088
+ if (o.oneofs)
2089
+ d._mcc = "mcc";
2090
+ }
2091
+ if (m.mnc != null && m.hasOwnProperty("mnc")) {
2092
+ d.mnc = m.mnc;
2093
+ if (o.oneofs)
2094
+ d._mnc = "mnc";
2095
+ }
2096
+ if (m.osVersion != null && m.hasOwnProperty("osVersion")) {
2097
+ d.osVersion = m.osVersion;
2098
+ if (o.oneofs)
2099
+ d._osVersion = "osVersion";
2100
+ }
2101
+ if (m.manufacturer != null && m.hasOwnProperty("manufacturer")) {
2102
+ d.manufacturer = m.manufacturer;
2103
+ if (o.oneofs)
2104
+ d._manufacturer = "manufacturer";
2105
+ }
2106
+ if (m.device != null && m.hasOwnProperty("device")) {
2107
+ d.device = m.device;
2108
+ if (o.oneofs)
2109
+ d._device = "device";
2110
+ }
2111
+ if (m.osBuildNumber != null && m.hasOwnProperty("osBuildNumber")) {
2112
+ d.osBuildNumber = m.osBuildNumber;
2113
+ if (o.oneofs)
2114
+ d._osBuildNumber = "osBuildNumber";
2115
+ }
2116
+ if (m.phoneId != null && m.hasOwnProperty("phoneId")) {
2117
+ d.phoneId = m.phoneId;
2118
+ if (o.oneofs)
2119
+ d._phoneId = "phoneId";
2120
+ }
2121
+ if (m.releaseChannel != null && m.hasOwnProperty("releaseChannel")) {
2122
+ d.releaseChannel = o.enums === String ? $root.proto.ClientPayload.UserAgent.ReleaseChannel[m.releaseChannel] === undefined ? m.releaseChannel : $root.proto.ClientPayload.UserAgent.ReleaseChannel[m.releaseChannel] : m.releaseChannel;
2123
+ if (o.oneofs)
2124
+ d._releaseChannel = "releaseChannel";
2125
+ }
2126
+ if (m.localeLanguageIso6391 != null && m.hasOwnProperty("localeLanguageIso6391")) {
2127
+ d.localeLanguageIso6391 = m.localeLanguageIso6391;
2128
+ if (o.oneofs)
2129
+ d._localeLanguageIso6391 = "localeLanguageIso6391";
2130
+ }
2131
+ if (m.localeCountryIso31661Alpha2 != null && m.hasOwnProperty("localeCountryIso31661Alpha2")) {
2132
+ d.localeCountryIso31661Alpha2 = m.localeCountryIso31661Alpha2;
2133
+ if (o.oneofs)
2134
+ d._localeCountryIso31661Alpha2 = "localeCountryIso31661Alpha2";
2135
+ }
2136
+ if (m.deviceBoard != null && m.hasOwnProperty("deviceBoard")) {
2137
+ d.deviceBoard = m.deviceBoard;
2138
+ if (o.oneofs)
2139
+ d._deviceBoard = "deviceBoard";
2140
+ }
2141
+ if (m.deviceExpId != null && m.hasOwnProperty("deviceExpId")) {
2142
+ d.deviceExpId = m.deviceExpId;
2143
+ if (o.oneofs)
2144
+ d._deviceExpId = "deviceExpId";
2145
+ }
2146
+ if (m.deviceType != null && m.hasOwnProperty("deviceType")) {
2147
+ d.deviceType = o.enums === String ? $root.proto.ClientPayload.UserAgent.DeviceType[m.deviceType] === undefined ? m.deviceType : $root.proto.ClientPayload.UserAgent.DeviceType[m.deviceType] : m.deviceType;
2148
+ if (o.oneofs)
2149
+ d._deviceType = "deviceType";
2150
+ }
2151
+ if (m.deviceModelType != null && m.hasOwnProperty("deviceModelType")) {
2152
+ d.deviceModelType = m.deviceModelType;
2153
+ if (o.oneofs)
2154
+ d._deviceModelType = "deviceModelType";
2155
+ }
2156
+ if (m.distributionChannel != null && m.hasOwnProperty("distributionChannel")) {
2157
+ d.distributionChannel = o.enums === String ? $root.proto.ClientPayload.UserAgent.DistributionChannel[m.distributionChannel] === undefined ? m.distributionChannel : $root.proto.ClientPayload.UserAgent.DistributionChannel[m.distributionChannel] : m.distributionChannel;
2158
+ if (o.oneofs)
2159
+ d._distributionChannel = "distributionChannel";
2160
+ }
2161
+ return d;
2162
+ };
2163
+ UserAgent.prototype.toJSON = function toJSON() {
2164
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2165
+ };
2166
+ UserAgent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2167
+ if (typeUrlPrefix === undefined) {
2168
+ typeUrlPrefix = "type.googleapis.com";
2169
+ }
2170
+ return typeUrlPrefix + "/proto.ClientPayload.UserAgent";
2171
+ };
2172
+ $lazy(UserAgent, "AppVersion", function() {
2173
+ function AppVersion(p) {
2174
+ if (p)
2175
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
2176
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
2177
+ this[ks[i]] = p[ks[i]];
2178
+ }
2179
+ AppVersion.prototype.primary = null;
2180
+ AppVersion.prototype.secondary = null;
2181
+ AppVersion.prototype.tertiary = null;
2182
+ AppVersion.prototype.quaternary = null;
2183
+ AppVersion.prototype.quinary = null;
2184
+ let $oneOfFields;
2185
+ Object.defineProperty(AppVersion.prototype, "_primary", {
2186
+ get: $util.oneOfGetter($oneOfFields = ["primary"]),
2187
+ set: $util.oneOfSetter($oneOfFields)
2188
+ });
2189
+ Object.defineProperty(AppVersion.prototype, "_secondary", {
2190
+ get: $util.oneOfGetter($oneOfFields = ["secondary"]),
2191
+ set: $util.oneOfSetter($oneOfFields)
2192
+ });
2193
+ Object.defineProperty(AppVersion.prototype, "_tertiary", {
2194
+ get: $util.oneOfGetter($oneOfFields = ["tertiary"]),
2195
+ set: $util.oneOfSetter($oneOfFields)
2196
+ });
2197
+ Object.defineProperty(AppVersion.prototype, "_quaternary", {
2198
+ get: $util.oneOfGetter($oneOfFields = ["quaternary"]),
2199
+ set: $util.oneOfSetter($oneOfFields)
2200
+ });
2201
+ Object.defineProperty(AppVersion.prototype, "_quinary", {
2202
+ get: $util.oneOfGetter($oneOfFields = ["quinary"]),
2203
+ set: $util.oneOfSetter($oneOfFields)
2204
+ });
2205
+ AppVersion.create = function create(properties) {
2206
+ return new AppVersion(properties);
2207
+ };
2208
+ AppVersion.encode = function encode(m, w) {
2209
+ if (!w)
2210
+ w = $Writer.create();
2211
+ if (m.primary != null && Object.hasOwnProperty.call(m, "primary"))
2212
+ w.uint32(8).uint32(m.primary);
2213
+ if (m.secondary != null && Object.hasOwnProperty.call(m, "secondary"))
2214
+ w.uint32(16).uint32(m.secondary);
2215
+ if (m.tertiary != null && Object.hasOwnProperty.call(m, "tertiary"))
2216
+ w.uint32(24).uint32(m.tertiary);
2217
+ if (m.quaternary != null && Object.hasOwnProperty.call(m, "quaternary"))
2218
+ w.uint32(32).uint32(m.quaternary);
2219
+ if (m.quinary != null && Object.hasOwnProperty.call(m, "quinary"))
2220
+ w.uint32(40).uint32(m.quinary);
2221
+ return w;
2222
+ };
2223
+ AppVersion.decode = function decode(r, l, e, n) {
2224
+ if (!(r instanceof $Reader))
2225
+ r = $Reader.create(r);
2226
+ if (n === undefined)
2227
+ n = 0;
2228
+ if (n > $Reader.recursionLimit)
2229
+ throw Error("maximum nesting depth exceeded");
2230
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload.UserAgent.AppVersion();
2231
+ while (r.pos < c) {
2232
+ var t = r.uint32();
2233
+ if (t === e)
2234
+ break;
2235
+ switch (t >>> 3) {
2236
+ case 1: {
2237
+ m.primary = r.uint32();
2238
+ break;
2239
+ }
2240
+ case 2: {
2241
+ m.secondary = r.uint32();
2242
+ break;
2243
+ }
2244
+ case 3: {
2245
+ m.tertiary = r.uint32();
2246
+ break;
2247
+ }
2248
+ case 4: {
2249
+ m.quaternary = r.uint32();
2250
+ break;
2251
+ }
2252
+ case 5: {
2253
+ m.quinary = r.uint32();
2254
+ break;
2255
+ }
2256
+ default:
2257
+ r.skipType(t & 7, n);
2258
+ break;
2259
+ }
2260
+ }
2261
+ return m;
2262
+ };
2263
+ AppVersion.fromObject = function fromObject(d, n) {
2264
+ if (d instanceof $root.proto.ClientPayload.UserAgent.AppVersion)
2265
+ return d;
2266
+ if (n === undefined)
2267
+ n = 0;
2268
+ if (n > $util.recursionLimit)
2269
+ throw Error("maximum nesting depth exceeded");
2270
+ var m = new $root.proto.ClientPayload.UserAgent.AppVersion();
2271
+ if (d.primary != null) {
2272
+ m.primary = d.primary >>> 0;
2273
+ }
2274
+ if (d.secondary != null) {
2275
+ m.secondary = d.secondary >>> 0;
2276
+ }
2277
+ if (d.tertiary != null) {
2278
+ m.tertiary = d.tertiary >>> 0;
2279
+ }
2280
+ if (d.quaternary != null) {
2281
+ m.quaternary = d.quaternary >>> 0;
2282
+ }
2283
+ if (d.quinary != null) {
2284
+ m.quinary = d.quinary >>> 0;
2285
+ }
2286
+ return m;
2287
+ };
2288
+ AppVersion.toObject = function toObject(m, o) {
2289
+ if (!o)
2290
+ o = {};
2291
+ var d = {};
2292
+ if (m.primary != null && m.hasOwnProperty("primary")) {
2293
+ d.primary = m.primary;
2294
+ if (o.oneofs)
2295
+ d._primary = "primary";
2296
+ }
2297
+ if (m.secondary != null && m.hasOwnProperty("secondary")) {
2298
+ d.secondary = m.secondary;
2299
+ if (o.oneofs)
2300
+ d._secondary = "secondary";
2301
+ }
2302
+ if (m.tertiary != null && m.hasOwnProperty("tertiary")) {
2303
+ d.tertiary = m.tertiary;
2304
+ if (o.oneofs)
2305
+ d._tertiary = "tertiary";
2306
+ }
2307
+ if (m.quaternary != null && m.hasOwnProperty("quaternary")) {
2308
+ d.quaternary = m.quaternary;
2309
+ if (o.oneofs)
2310
+ d._quaternary = "quaternary";
2311
+ }
2312
+ if (m.quinary != null && m.hasOwnProperty("quinary")) {
2313
+ d.quinary = m.quinary;
2314
+ if (o.oneofs)
2315
+ d._quinary = "quinary";
2316
+ }
2317
+ return d;
2318
+ };
2319
+ AppVersion.prototype.toJSON = function toJSON() {
2320
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2321
+ };
2322
+ AppVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2323
+ if (typeUrlPrefix === undefined) {
2324
+ typeUrlPrefix = "type.googleapis.com";
2325
+ }
2326
+ return typeUrlPrefix + "/proto.ClientPayload.UserAgent.AppVersion";
2327
+ };
2328
+ return AppVersion;
2329
+ });
2330
+ $lazy(UserAgent, "DeviceType", function() {
2331
+ const valuesById = {}, values = Object.create(valuesById);
2332
+ values[valuesById[0] = "PHONE"] = 0;
2333
+ values[valuesById[1] = "TABLET"] = 1;
2334
+ values[valuesById[2] = "DESKTOP"] = 2;
2335
+ values[valuesById[3] = "WEARABLE"] = 3;
2336
+ values[valuesById[4] = "VR"] = 4;
2337
+ return values;
2338
+ });
2339
+ $lazy(UserAgent, "DistributionChannel", function() {
2340
+ const valuesById = {}, values = Object.create(valuesById);
2341
+ values[valuesById[0] = "APPSTORE"] = 0;
2342
+ values[valuesById[1] = "WEBSITE"] = 1;
2343
+ values[valuesById[2] = "TESTFLIGHT"] = 2;
2344
+ values[valuesById[3] = "INTERNAL"] = 3;
2345
+ return values;
2346
+ });
2347
+ $lazy(UserAgent, "Platform", function() {
2348
+ const valuesById = {}, values = Object.create(valuesById);
2349
+ values[valuesById[0] = "ANDROID"] = 0;
2350
+ values[valuesById[1] = "IOS"] = 1;
2351
+ values[valuesById[2] = "WINDOWS_PHONE"] = 2;
2352
+ values[valuesById[3] = "BLACKBERRY"] = 3;
2353
+ values[valuesById[4] = "BLACKBERRYX"] = 4;
2354
+ values[valuesById[5] = "S40"] = 5;
2355
+ values[valuesById[6] = "S60"] = 6;
2356
+ values[valuesById[7] = "PYTHON_CLIENT"] = 7;
2357
+ values[valuesById[8] = "TIZEN"] = 8;
2358
+ values[valuesById[9] = "ENTERPRISE"] = 9;
2359
+ values[valuesById[10] = "SMB_ANDROID"] = 10;
2360
+ values[valuesById[11] = "KAIOS"] = 11;
2361
+ values[valuesById[12] = "SMB_IOS"] = 12;
2362
+ values[valuesById[13] = "WINDOWS"] = 13;
2363
+ values[valuesById[14] = "WEB"] = 14;
2364
+ values[valuesById[15] = "PORTAL"] = 15;
2365
+ values[valuesById[16] = "GREEN_ANDROID"] = 16;
2366
+ values[valuesById[17] = "GREEN_IPHONE"] = 17;
2367
+ values[valuesById[18] = "BLUE_ANDROID"] = 18;
2368
+ values[valuesById[19] = "BLUE_IPHONE"] = 19;
2369
+ values[valuesById[20] = "FBLITE_ANDROID"] = 20;
2370
+ values[valuesById[21] = "MLITE_ANDROID"] = 21;
2371
+ values[valuesById[22] = "IGLITE_ANDROID"] = 22;
2372
+ values[valuesById[23] = "PAGE"] = 23;
2373
+ values[valuesById[24] = "MACOS"] = 24;
2374
+ values[valuesById[25] = "OCULUS_MSG"] = 25;
2375
+ values[valuesById[26] = "OCULUS_CALL"] = 26;
2376
+ values[valuesById[27] = "MILAN"] = 27;
2377
+ values[valuesById[28] = "CAPI"] = 28;
2378
+ values[valuesById[29] = "WEAROS"] = 29;
2379
+ values[valuesById[30] = "ARDEVICE"] = 30;
2380
+ values[valuesById[31] = "VRDEVICE"] = 31;
2381
+ values[valuesById[32] = "BLUE_WEB"] = 32;
2382
+ values[valuesById[33] = "IPAD"] = 33;
2383
+ values[valuesById[34] = "TEST"] = 34;
2384
+ values[valuesById[35] = "SMART_GLASSES"] = 35;
2385
+ values[valuesById[36] = "BLUE_VR"] = 36;
2386
+ values[valuesById[37] = "AR_WRIST"] = 37;
2387
+ return values;
2388
+ });
2389
+ $lazy(UserAgent, "ReleaseChannel", function() {
2390
+ const valuesById = {}, values = Object.create(valuesById);
2391
+ values[valuesById[0] = "RELEASE"] = 0;
2392
+ values[valuesById[1] = "BETA"] = 1;
2393
+ values[valuesById[2] = "ALPHA"] = 2;
2394
+ values[valuesById[3] = "DEBUG"] = 3;
2395
+ return values;
2396
+ });
2397
+ return UserAgent;
2398
+ });
2399
+ $lazy(ClientPayload, "WebInfo", function() {
2400
+ function WebInfo(p) {
2401
+ if (p)
2402
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
2403
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
2404
+ this[ks[i]] = p[ks[i]];
2405
+ }
2406
+ WebInfo.prototype.refToken = null;
2407
+ WebInfo.prototype.version = null;
2408
+ WebInfo.prototype.webdPayload = null;
2409
+ WebInfo.prototype.webSubPlatform = null;
2410
+ WebInfo.prototype.browser = null;
2411
+ WebInfo.prototype.browserVersion = null;
2412
+ let $oneOfFields;
2413
+ Object.defineProperty(WebInfo.prototype, "_refToken", {
2414
+ get: $util.oneOfGetter($oneOfFields = ["refToken"]),
2415
+ set: $util.oneOfSetter($oneOfFields)
2416
+ });
2417
+ Object.defineProperty(WebInfo.prototype, "_version", {
2418
+ get: $util.oneOfGetter($oneOfFields = ["version"]),
2419
+ set: $util.oneOfSetter($oneOfFields)
2420
+ });
2421
+ Object.defineProperty(WebInfo.prototype, "_webdPayload", {
2422
+ get: $util.oneOfGetter($oneOfFields = ["webdPayload"]),
2423
+ set: $util.oneOfSetter($oneOfFields)
2424
+ });
2425
+ Object.defineProperty(WebInfo.prototype, "_webSubPlatform", {
2426
+ get: $util.oneOfGetter($oneOfFields = ["webSubPlatform"]),
2427
+ set: $util.oneOfSetter($oneOfFields)
2428
+ });
2429
+ Object.defineProperty(WebInfo.prototype, "_browser", {
2430
+ get: $util.oneOfGetter($oneOfFields = ["browser"]),
2431
+ set: $util.oneOfSetter($oneOfFields)
2432
+ });
2433
+ Object.defineProperty(WebInfo.prototype, "_browserVersion", {
2434
+ get: $util.oneOfGetter($oneOfFields = ["browserVersion"]),
2435
+ set: $util.oneOfSetter($oneOfFields)
2436
+ });
2437
+ WebInfo.create = function create(properties) {
2438
+ return new WebInfo(properties);
2439
+ };
2440
+ WebInfo.encode = function encode(m, w) {
2441
+ if (!w)
2442
+ w = $Writer.create();
2443
+ if (m.refToken != null && Object.hasOwnProperty.call(m, "refToken"))
2444
+ w.uint32(10).string(m.refToken);
2445
+ if (m.version != null && Object.hasOwnProperty.call(m, "version"))
2446
+ w.uint32(18).string(m.version);
2447
+ if (m.webdPayload != null && Object.hasOwnProperty.call(m, "webdPayload"))
2448
+ $root.proto.ClientPayload.WebInfo.WebdPayload.encode(m.webdPayload, w.uint32(26).fork()).ldelim();
2449
+ if (m.webSubPlatform != null && Object.hasOwnProperty.call(m, "webSubPlatform"))
2450
+ w.uint32(32).int32(m.webSubPlatform);
2451
+ if (m.browser != null && Object.hasOwnProperty.call(m, "browser"))
2452
+ w.uint32(42).string(m.browser);
2453
+ if (m.browserVersion != null && Object.hasOwnProperty.call(m, "browserVersion"))
2454
+ w.uint32(50).string(m.browserVersion);
2455
+ return w;
2456
+ };
2457
+ WebInfo.decode = function decode(r, l, e, n) {
2458
+ if (!(r instanceof $Reader))
2459
+ r = $Reader.create(r);
2460
+ if (n === undefined)
2461
+ n = 0;
2462
+ if (n > $Reader.recursionLimit)
2463
+ throw Error("maximum nesting depth exceeded");
2464
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload.WebInfo();
2465
+ while (r.pos < c) {
2466
+ var t = r.uint32();
2467
+ if (t === e)
2468
+ break;
2469
+ switch (t >>> 3) {
2470
+ case 1: {
2471
+ m.refToken = r.string();
2472
+ break;
2473
+ }
2474
+ case 2: {
2475
+ m.version = r.string();
2476
+ break;
2477
+ }
2478
+ case 3: {
2479
+ m.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.decode(r, r.uint32(), undefined, n + 1);
2480
+ break;
2481
+ }
2482
+ case 4: {
2483
+ m.webSubPlatform = r.int32();
2484
+ break;
2485
+ }
2486
+ case 5: {
2487
+ m.browser = r.string();
2488
+ break;
2489
+ }
2490
+ case 6: {
2491
+ m.browserVersion = r.string();
2492
+ break;
2493
+ }
2494
+ default:
2495
+ r.skipType(t & 7, n);
2496
+ break;
2497
+ }
2498
+ }
2499
+ return m;
2500
+ };
2501
+ WebInfo.fromObject = function fromObject(d, n) {
2502
+ if (d instanceof $root.proto.ClientPayload.WebInfo)
2503
+ return d;
2504
+ if (n === undefined)
2505
+ n = 0;
2506
+ if (n > $util.recursionLimit)
2507
+ throw Error("maximum nesting depth exceeded");
2508
+ var m = new $root.proto.ClientPayload.WebInfo();
2509
+ if (d.refToken != null) {
2510
+ m.refToken = String(d.refToken);
2511
+ }
2512
+ if (d.version != null) {
2513
+ m.version = String(d.version);
2514
+ }
2515
+ if (d.webdPayload != null) {
2516
+ if (typeof d.webdPayload !== "object")
2517
+ throw TypeError(".proto.ClientPayload.WebInfo.webdPayload: object expected");
2518
+ m.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.fromObject(d.webdPayload, n + 1);
2519
+ }
2520
+ switch (d.webSubPlatform) {
2521
+ default:
2522
+ if (typeof d.webSubPlatform === "number") {
2523
+ m.webSubPlatform = d.webSubPlatform;
2524
+ break;
2525
+ }
2526
+ break;
2527
+ case "WEB_BROWSER":
2528
+ case 0:
2529
+ m.webSubPlatform = 0;
2530
+ break;
2531
+ case "APP_STORE":
2532
+ case 1:
2533
+ m.webSubPlatform = 1;
2534
+ break;
2535
+ case "WIN_STORE":
2536
+ case 2:
2537
+ m.webSubPlatform = 2;
2538
+ break;
2539
+ case "DARWIN":
2540
+ case 3:
2541
+ m.webSubPlatform = 3;
2542
+ break;
2543
+ case "WIN32":
2544
+ case 4:
2545
+ m.webSubPlatform = 4;
2546
+ break;
2547
+ case "WIN_HYBRID":
2548
+ case 5:
2549
+ m.webSubPlatform = 5;
2550
+ break;
2551
+ }
2552
+ if (d.browser != null) {
2553
+ m.browser = String(d.browser);
2554
+ }
2555
+ if (d.browserVersion != null) {
2556
+ m.browserVersion = String(d.browserVersion);
2557
+ }
2558
+ return m;
2559
+ };
2560
+ WebInfo.toObject = function toObject(m, o) {
2561
+ if (!o)
2562
+ o = {};
2563
+ var d = {};
2564
+ if (m.refToken != null && m.hasOwnProperty("refToken")) {
2565
+ d.refToken = m.refToken;
2566
+ if (o.oneofs)
2567
+ d._refToken = "refToken";
2568
+ }
2569
+ if (m.version != null && m.hasOwnProperty("version")) {
2570
+ d.version = m.version;
2571
+ if (o.oneofs)
2572
+ d._version = "version";
2573
+ }
2574
+ if (m.webdPayload != null && m.hasOwnProperty("webdPayload")) {
2575
+ d.webdPayload = $root.proto.ClientPayload.WebInfo.WebdPayload.toObject(m.webdPayload, o);
2576
+ if (o.oneofs)
2577
+ d._webdPayload = "webdPayload";
2578
+ }
2579
+ if (m.webSubPlatform != null && m.hasOwnProperty("webSubPlatform")) {
2580
+ d.webSubPlatform = o.enums === String ? $root.proto.ClientPayload.WebInfo.WebSubPlatform[m.webSubPlatform] === undefined ? m.webSubPlatform : $root.proto.ClientPayload.WebInfo.WebSubPlatform[m.webSubPlatform] : m.webSubPlatform;
2581
+ if (o.oneofs)
2582
+ d._webSubPlatform = "webSubPlatform";
2583
+ }
2584
+ if (m.browser != null && m.hasOwnProperty("browser")) {
2585
+ d.browser = m.browser;
2586
+ if (o.oneofs)
2587
+ d._browser = "browser";
2588
+ }
2589
+ if (m.browserVersion != null && m.hasOwnProperty("browserVersion")) {
2590
+ d.browserVersion = m.browserVersion;
2591
+ if (o.oneofs)
2592
+ d._browserVersion = "browserVersion";
2593
+ }
2594
+ return d;
2595
+ };
2596
+ WebInfo.prototype.toJSON = function toJSON() {
2597
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2598
+ };
2599
+ WebInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2600
+ if (typeUrlPrefix === undefined) {
2601
+ typeUrlPrefix = "type.googleapis.com";
2602
+ }
2603
+ return typeUrlPrefix + "/proto.ClientPayload.WebInfo";
2604
+ };
2605
+ $lazy(WebInfo, "WebSubPlatform", function() {
2606
+ const valuesById = {}, values = Object.create(valuesById);
2607
+ values[valuesById[0] = "WEB_BROWSER"] = 0;
2608
+ values[valuesById[1] = "APP_STORE"] = 1;
2609
+ values[valuesById[2] = "WIN_STORE"] = 2;
2610
+ values[valuesById[3] = "DARWIN"] = 3;
2611
+ values[valuesById[4] = "WIN32"] = 4;
2612
+ values[valuesById[5] = "WIN_HYBRID"] = 5;
2613
+ return values;
2614
+ });
2615
+ $lazy(WebInfo, "WebdPayload", function() {
2616
+ function WebdPayload(p) {
2617
+ if (p)
2618
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
2619
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
2620
+ this[ks[i]] = p[ks[i]];
2621
+ }
2622
+ WebdPayload.prototype.usesParticipantInKey = null;
2623
+ WebdPayload.prototype.supportsStarredMessages = null;
2624
+ WebdPayload.prototype.supportsDocumentMessages = null;
2625
+ WebdPayload.prototype.supportsUrlMessages = null;
2626
+ WebdPayload.prototype.supportsMediaRetry = null;
2627
+ WebdPayload.prototype.supportsE2EImage = null;
2628
+ WebdPayload.prototype.supportsE2EVideo = null;
2629
+ WebdPayload.prototype.supportsE2EAudio = null;
2630
+ WebdPayload.prototype.supportsE2EDocument = null;
2631
+ WebdPayload.prototype.documentTypes = null;
2632
+ WebdPayload.prototype.features = null;
2633
+ let $oneOfFields;
2634
+ Object.defineProperty(WebdPayload.prototype, "_usesParticipantInKey", {
2635
+ get: $util.oneOfGetter($oneOfFields = ["usesParticipantInKey"]),
2636
+ set: $util.oneOfSetter($oneOfFields)
2637
+ });
2638
+ Object.defineProperty(WebdPayload.prototype, "_supportsStarredMessages", {
2639
+ get: $util.oneOfGetter($oneOfFields = ["supportsStarredMessages"]),
2640
+ set: $util.oneOfSetter($oneOfFields)
2641
+ });
2642
+ Object.defineProperty(WebdPayload.prototype, "_supportsDocumentMessages", {
2643
+ get: $util.oneOfGetter($oneOfFields = ["supportsDocumentMessages"]),
2644
+ set: $util.oneOfSetter($oneOfFields)
2645
+ });
2646
+ Object.defineProperty(WebdPayload.prototype, "_supportsUrlMessages", {
2647
+ get: $util.oneOfGetter($oneOfFields = ["supportsUrlMessages"]),
2648
+ set: $util.oneOfSetter($oneOfFields)
2649
+ });
2650
+ Object.defineProperty(WebdPayload.prototype, "_supportsMediaRetry", {
2651
+ get: $util.oneOfGetter($oneOfFields = ["supportsMediaRetry"]),
2652
+ set: $util.oneOfSetter($oneOfFields)
2653
+ });
2654
+ Object.defineProperty(WebdPayload.prototype, "_supportsE2EImage", {
2655
+ get: $util.oneOfGetter($oneOfFields = ["supportsE2EImage"]),
2656
+ set: $util.oneOfSetter($oneOfFields)
2657
+ });
2658
+ Object.defineProperty(WebdPayload.prototype, "_supportsE2EVideo", {
2659
+ get: $util.oneOfGetter($oneOfFields = ["supportsE2EVideo"]),
2660
+ set: $util.oneOfSetter($oneOfFields)
2661
+ });
2662
+ Object.defineProperty(WebdPayload.prototype, "_supportsE2EAudio", {
2663
+ get: $util.oneOfGetter($oneOfFields = ["supportsE2EAudio"]),
2664
+ set: $util.oneOfSetter($oneOfFields)
2665
+ });
2666
+ Object.defineProperty(WebdPayload.prototype, "_supportsE2EDocument", {
2667
+ get: $util.oneOfGetter($oneOfFields = ["supportsE2EDocument"]),
2668
+ set: $util.oneOfSetter($oneOfFields)
2669
+ });
2670
+ Object.defineProperty(WebdPayload.prototype, "_documentTypes", {
2671
+ get: $util.oneOfGetter($oneOfFields = ["documentTypes"]),
2672
+ set: $util.oneOfSetter($oneOfFields)
2673
+ });
2674
+ Object.defineProperty(WebdPayload.prototype, "_features", {
2675
+ get: $util.oneOfGetter($oneOfFields = ["features"]),
2676
+ set: $util.oneOfSetter($oneOfFields)
2677
+ });
2678
+ WebdPayload.create = function create(properties) {
2679
+ return new WebdPayload(properties);
2680
+ };
2681
+ WebdPayload.encode = function encode(m, w) {
2682
+ if (!w)
2683
+ w = $Writer.create();
2684
+ if (m.usesParticipantInKey != null && Object.hasOwnProperty.call(m, "usesParticipantInKey"))
2685
+ w.uint32(8).bool(m.usesParticipantInKey);
2686
+ if (m.supportsStarredMessages != null && Object.hasOwnProperty.call(m, "supportsStarredMessages"))
2687
+ w.uint32(16).bool(m.supportsStarredMessages);
2688
+ if (m.supportsDocumentMessages != null && Object.hasOwnProperty.call(m, "supportsDocumentMessages"))
2689
+ w.uint32(24).bool(m.supportsDocumentMessages);
2690
+ if (m.supportsUrlMessages != null && Object.hasOwnProperty.call(m, "supportsUrlMessages"))
2691
+ w.uint32(32).bool(m.supportsUrlMessages);
2692
+ if (m.supportsMediaRetry != null && Object.hasOwnProperty.call(m, "supportsMediaRetry"))
2693
+ w.uint32(40).bool(m.supportsMediaRetry);
2694
+ if (m.supportsE2EImage != null && Object.hasOwnProperty.call(m, "supportsE2EImage"))
2695
+ w.uint32(48).bool(m.supportsE2EImage);
2696
+ if (m.supportsE2EVideo != null && Object.hasOwnProperty.call(m, "supportsE2EVideo"))
2697
+ w.uint32(56).bool(m.supportsE2EVideo);
2698
+ if (m.supportsE2EAudio != null && Object.hasOwnProperty.call(m, "supportsE2EAudio"))
2699
+ w.uint32(64).bool(m.supportsE2EAudio);
2700
+ if (m.supportsE2EDocument != null && Object.hasOwnProperty.call(m, "supportsE2EDocument"))
2701
+ w.uint32(72).bool(m.supportsE2EDocument);
2702
+ if (m.documentTypes != null && Object.hasOwnProperty.call(m, "documentTypes"))
2703
+ w.uint32(82).string(m.documentTypes);
2704
+ if (m.features != null && Object.hasOwnProperty.call(m, "features"))
2705
+ w.uint32(90).bytes(m.features);
2706
+ return w;
2707
+ };
2708
+ WebdPayload.decode = function decode(r, l, e, n) {
2709
+ if (!(r instanceof $Reader))
2710
+ r = $Reader.create(r);
2711
+ if (n === undefined)
2712
+ n = 0;
2713
+ if (n > $Reader.recursionLimit)
2714
+ throw Error("maximum nesting depth exceeded");
2715
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ClientPayload.WebInfo.WebdPayload();
2716
+ while (r.pos < c) {
2717
+ var t = r.uint32();
2718
+ if (t === e)
2719
+ break;
2720
+ switch (t >>> 3) {
2721
+ case 1: {
2722
+ m.usesParticipantInKey = r.bool();
2723
+ break;
2724
+ }
2725
+ case 2: {
2726
+ m.supportsStarredMessages = r.bool();
2727
+ break;
2728
+ }
2729
+ case 3: {
2730
+ m.supportsDocumentMessages = r.bool();
2731
+ break;
2732
+ }
2733
+ case 4: {
2734
+ m.supportsUrlMessages = r.bool();
2735
+ break;
2736
+ }
2737
+ case 5: {
2738
+ m.supportsMediaRetry = r.bool();
2739
+ break;
2740
+ }
2741
+ case 6: {
2742
+ m.supportsE2EImage = r.bool();
2743
+ break;
2744
+ }
2745
+ case 7: {
2746
+ m.supportsE2EVideo = r.bool();
2747
+ break;
2748
+ }
2749
+ case 8: {
2750
+ m.supportsE2EAudio = r.bool();
2751
+ break;
2752
+ }
2753
+ case 9: {
2754
+ m.supportsE2EDocument = r.bool();
2755
+ break;
2756
+ }
2757
+ case 10: {
2758
+ m.documentTypes = r.string();
2759
+ break;
2760
+ }
2761
+ case 11: {
2762
+ m.features = r.bytes();
2763
+ break;
2764
+ }
2765
+ default:
2766
+ r.skipType(t & 7, n);
2767
+ break;
2768
+ }
2769
+ }
2770
+ return m;
2771
+ };
2772
+ WebdPayload.fromObject = function fromObject(d, n) {
2773
+ if (d instanceof $root.proto.ClientPayload.WebInfo.WebdPayload)
2774
+ return d;
2775
+ if (n === undefined)
2776
+ n = 0;
2777
+ if (n > $util.recursionLimit)
2778
+ throw Error("maximum nesting depth exceeded");
2779
+ var m = new $root.proto.ClientPayload.WebInfo.WebdPayload();
2780
+ if (d.usesParticipantInKey != null) {
2781
+ m.usesParticipantInKey = Boolean(d.usesParticipantInKey);
2782
+ }
2783
+ if (d.supportsStarredMessages != null) {
2784
+ m.supportsStarredMessages = Boolean(d.supportsStarredMessages);
2785
+ }
2786
+ if (d.supportsDocumentMessages != null) {
2787
+ m.supportsDocumentMessages = Boolean(d.supportsDocumentMessages);
2788
+ }
2789
+ if (d.supportsUrlMessages != null) {
2790
+ m.supportsUrlMessages = Boolean(d.supportsUrlMessages);
2791
+ }
2792
+ if (d.supportsMediaRetry != null) {
2793
+ m.supportsMediaRetry = Boolean(d.supportsMediaRetry);
2794
+ }
2795
+ if (d.supportsE2EImage != null) {
2796
+ m.supportsE2EImage = Boolean(d.supportsE2EImage);
2797
+ }
2798
+ if (d.supportsE2EVideo != null) {
2799
+ m.supportsE2EVideo = Boolean(d.supportsE2EVideo);
2800
+ }
2801
+ if (d.supportsE2EAudio != null) {
2802
+ m.supportsE2EAudio = Boolean(d.supportsE2EAudio);
2803
+ }
2804
+ if (d.supportsE2EDocument != null) {
2805
+ m.supportsE2EDocument = Boolean(d.supportsE2EDocument);
2806
+ }
2807
+ if (d.documentTypes != null) {
2808
+ m.documentTypes = String(d.documentTypes);
2809
+ }
2810
+ if (d.features != null) {
2811
+ if (typeof d.features === "string")
2812
+ $util.base64.decode(d.features, m.features = $util.newBuffer($util.base64.length(d.features)), 0);
2813
+ else if (d.features.length >= 0)
2814
+ m.features = d.features;
2815
+ }
2816
+ return m;
2817
+ };
2818
+ WebdPayload.toObject = function toObject(m, o) {
2819
+ if (!o)
2820
+ o = {};
2821
+ var d = {};
2822
+ if (m.usesParticipantInKey != null && m.hasOwnProperty("usesParticipantInKey")) {
2823
+ d.usesParticipantInKey = m.usesParticipantInKey;
2824
+ if (o.oneofs)
2825
+ d._usesParticipantInKey = "usesParticipantInKey";
2826
+ }
2827
+ if (m.supportsStarredMessages != null && m.hasOwnProperty("supportsStarredMessages")) {
2828
+ d.supportsStarredMessages = m.supportsStarredMessages;
2829
+ if (o.oneofs)
2830
+ d._supportsStarredMessages = "supportsStarredMessages";
2831
+ }
2832
+ if (m.supportsDocumentMessages != null && m.hasOwnProperty("supportsDocumentMessages")) {
2833
+ d.supportsDocumentMessages = m.supportsDocumentMessages;
2834
+ if (o.oneofs)
2835
+ d._supportsDocumentMessages = "supportsDocumentMessages";
2836
+ }
2837
+ if (m.supportsUrlMessages != null && m.hasOwnProperty("supportsUrlMessages")) {
2838
+ d.supportsUrlMessages = m.supportsUrlMessages;
2839
+ if (o.oneofs)
2840
+ d._supportsUrlMessages = "supportsUrlMessages";
2841
+ }
2842
+ if (m.supportsMediaRetry != null && m.hasOwnProperty("supportsMediaRetry")) {
2843
+ d.supportsMediaRetry = m.supportsMediaRetry;
2844
+ if (o.oneofs)
2845
+ d._supportsMediaRetry = "supportsMediaRetry";
2846
+ }
2847
+ if (m.supportsE2EImage != null && m.hasOwnProperty("supportsE2EImage")) {
2848
+ d.supportsE2EImage = m.supportsE2EImage;
2849
+ if (o.oneofs)
2850
+ d._supportsE2EImage = "supportsE2EImage";
2851
+ }
2852
+ if (m.supportsE2EVideo != null && m.hasOwnProperty("supportsE2EVideo")) {
2853
+ d.supportsE2EVideo = m.supportsE2EVideo;
2854
+ if (o.oneofs)
2855
+ d._supportsE2EVideo = "supportsE2EVideo";
2856
+ }
2857
+ if (m.supportsE2EAudio != null && m.hasOwnProperty("supportsE2EAudio")) {
2858
+ d.supportsE2EAudio = m.supportsE2EAudio;
2859
+ if (o.oneofs)
2860
+ d._supportsE2EAudio = "supportsE2EAudio";
2861
+ }
2862
+ if (m.supportsE2EDocument != null && m.hasOwnProperty("supportsE2EDocument")) {
2863
+ d.supportsE2EDocument = m.supportsE2EDocument;
2864
+ if (o.oneofs)
2865
+ d._supportsE2EDocument = "supportsE2EDocument";
2866
+ }
2867
+ if (m.documentTypes != null && m.hasOwnProperty("documentTypes")) {
2868
+ d.documentTypes = m.documentTypes;
2869
+ if (o.oneofs)
2870
+ d._documentTypes = "documentTypes";
2871
+ }
2872
+ if (m.features != null && m.hasOwnProperty("features")) {
2873
+ d.features = o.bytes === String ? $util.base64.encode(m.features, 0, m.features.length) : o.bytes === Array ? Array.prototype.slice.call(m.features) : m.features;
2874
+ if (o.oneofs)
2875
+ d._features = "features";
2876
+ }
2877
+ return d;
2878
+ };
2879
+ WebdPayload.prototype.toJSON = function toJSON() {
2880
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2881
+ };
2882
+ WebdPayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2883
+ if (typeUrlPrefix === undefined) {
2884
+ typeUrlPrefix = "type.googleapis.com";
2885
+ }
2886
+ return typeUrlPrefix + "/proto.ClientPayload.WebInfo.WebdPayload";
2887
+ };
2888
+ return WebdPayload;
2889
+ });
2890
+ return WebInfo;
2891
+ });
2892
+ return ClientPayload;