dcodeindra-baileyspro 2.3.9

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