decentrand 3.21.0

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 (289) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +56 -0
  3. package/abi/EstateRegistry.json +1226 -0
  4. package/abi/LANDRegistry.json +1372 -0
  5. package/abi/MANAToken.json +410 -0
  6. package/dist/commands/build.d.ts +3 -0
  7. package/dist/commands/build.d.ts.map +1 -0
  8. package/dist/commands/build.js +108 -0
  9. package/dist/commands/build.js.map +1 -0
  10. package/dist/commands/coords.d.ts +3 -0
  11. package/dist/commands/coords.d.ts.map +1 -0
  12. package/dist/commands/coords.js +122 -0
  13. package/dist/commands/coords.js.map +1 -0
  14. package/dist/commands/deploy.d.ts +4 -0
  15. package/dist/commands/deploy.d.ts.map +1 -0
  16. package/dist/commands/deploy.js +280 -0
  17. package/dist/commands/deploy.js.map +1 -0
  18. package/dist/commands/export.d.ts +3 -0
  19. package/dist/commands/export.d.ts.map +1 -0
  20. package/dist/commands/export.js +20 -0
  21. package/dist/commands/export.js.map +1 -0
  22. package/dist/commands/index.d.ts +3 -0
  23. package/dist/commands/index.d.ts.map +1 -0
  24. package/dist/commands/index.js +19 -0
  25. package/dist/commands/index.js.map +1 -0
  26. package/dist/commands/info.d.ts +3 -0
  27. package/dist/commands/info.d.ts.map +1 -0
  28. package/dist/commands/info.js +186 -0
  29. package/dist/commands/info.js.map +1 -0
  30. package/dist/commands/init/help.d.ts +12 -0
  31. package/dist/commands/init/help.d.ts.map +1 -0
  32. package/dist/commands/init/help.js +41 -0
  33. package/dist/commands/init/help.js.map +1 -0
  34. package/dist/commands/init/index.d.ts +3 -0
  35. package/dist/commands/init/index.d.ts.map +1 -0
  36. package/dist/commands/init/index.js +96 -0
  37. package/dist/commands/init/index.js.map +1 -0
  38. package/dist/commands/init/library.d.ts +1 -0
  39. package/dist/commands/init/library.d.ts.map +1 -0
  40. package/dist/commands/init/library.js +2 -0
  41. package/dist/commands/init/library.js.map +1 -0
  42. package/dist/commands/init/repositories.d.ts +11 -0
  43. package/dist/commands/init/repositories.d.ts.map +1 -0
  44. package/dist/commands/init/repositories.js +40 -0
  45. package/dist/commands/init/repositories.js.map +1 -0
  46. package/dist/commands/init/scene.d.ts +3 -0
  47. package/dist/commands/init/scene.d.ts.map +1 -0
  48. package/dist/commands/init/scene.js +56 -0
  49. package/dist/commands/init/scene.js.map +1 -0
  50. package/dist/commands/init/types.d.ts +22 -0
  51. package/dist/commands/init/types.d.ts.map +1 -0
  52. package/dist/commands/init/types.js +3 -0
  53. package/dist/commands/init/types.js.map +1 -0
  54. package/dist/commands/init/utils.d.ts +6 -0
  55. package/dist/commands/init/utils.d.ts.map +1 -0
  56. package/dist/commands/init/utils.js +76 -0
  57. package/dist/commands/init/utils.js.map +1 -0
  58. package/dist/commands/install.d.ts +3 -0
  59. package/dist/commands/install.d.ts.map +1 -0
  60. package/dist/commands/install.js +92 -0
  61. package/dist/commands/install.js.map +1 -0
  62. package/dist/commands/pack.d.ts +3 -0
  63. package/dist/commands/pack.d.ts.map +1 -0
  64. package/dist/commands/pack.js +102 -0
  65. package/dist/commands/pack.js.map +1 -0
  66. package/dist/commands/start.d.ts +3 -0
  67. package/dist/commands/start.d.ts.map +1 -0
  68. package/dist/commands/start.js +235 -0
  69. package/dist/commands/start.js.map +1 -0
  70. package/dist/commands/status.d.ts +3 -0
  71. package/dist/commands/status.d.ts.map +1 -0
  72. package/dist/commands/status.js +80 -0
  73. package/dist/commands/status.js.map +1 -0
  74. package/dist/commands/workspace.d.ts +3 -0
  75. package/dist/commands/workspace.d.ts.map +1 -0
  76. package/dist/commands/workspace.js +81 -0
  77. package/dist/commands/workspace.js.map +1 -0
  78. package/dist/commands/world-acl.d.ts +22 -0
  79. package/dist/commands/world-acl.d.ts.map +1 -0
  80. package/dist/commands/world-acl.js +262 -0
  81. package/dist/commands/world-acl.js.map +1 -0
  82. package/dist/config.d.ts +31 -0
  83. package/dist/config.d.ts.map +1 -0
  84. package/dist/config.js +128 -0
  85. package/dist/config.js.map +1 -0
  86. package/dist/index.d.ts +3 -0
  87. package/dist/index.d.ts.map +1 -0
  88. package/dist/index.js +21 -0
  89. package/dist/index.js.map +1 -0
  90. package/dist/lib/API.d.ts +23 -0
  91. package/dist/lib/API.d.ts.map +1 -0
  92. package/dist/lib/API.js +175 -0
  93. package/dist/lib/API.js.map +1 -0
  94. package/dist/lib/Decentraland.d.ts +75 -0
  95. package/dist/lib/Decentraland.d.ts.map +1 -0
  96. package/dist/lib/Decentraland.js +227 -0
  97. package/dist/lib/Decentraland.js.map +1 -0
  98. package/dist/lib/Ethereum.d.ts +52 -0
  99. package/dist/lib/Ethereum.d.ts.map +1 -0
  100. package/dist/lib/Ethereum.js +245 -0
  101. package/dist/lib/Ethereum.js.map +1 -0
  102. package/dist/lib/IEthereumDataProvider.d.ts +17 -0
  103. package/dist/lib/IEthereumDataProvider.d.ts.map +1 -0
  104. package/dist/lib/IEthereumDataProvider.js +3 -0
  105. package/dist/lib/IEthereumDataProvider.js.map +1 -0
  106. package/dist/lib/LinkerAPI.d.ts +28 -0
  107. package/dist/lib/LinkerAPI.d.ts.map +1 -0
  108. package/dist/lib/LinkerAPI.js +151 -0
  109. package/dist/lib/LinkerAPI.js.map +1 -0
  110. package/dist/lib/Preview.d.ts +17 -0
  111. package/dist/lib/Preview.d.ts.map +1 -0
  112. package/dist/lib/Preview.js +113 -0
  113. package/dist/lib/Preview.js.map +1 -0
  114. package/dist/lib/Project.d.ts +152 -0
  115. package/dist/lib/Project.d.ts.map +1 -0
  116. package/dist/lib/Project.js +446 -0
  117. package/dist/lib/Project.js.map +1 -0
  118. package/dist/lib/Workspace.d.ts +21 -0
  119. package/dist/lib/Workspace.d.ts.map +1 -0
  120. package/dist/lib/Workspace.js +140 -0
  121. package/dist/lib/Workspace.js.map +1 -0
  122. package/dist/lib/WorldsContentServer.d.ts +27 -0
  123. package/dist/lib/WorldsContentServer.d.ts.map +1 -0
  124. package/dist/lib/WorldsContentServer.js +79 -0
  125. package/dist/lib/WorldsContentServer.js.map +1 -0
  126. package/dist/lib/WorldsContentServerLinkerAPI.d.ts +21 -0
  127. package/dist/lib/WorldsContentServerLinkerAPI.d.ts.map +1 -0
  128. package/dist/lib/WorldsContentServerLinkerAPI.js +105 -0
  129. package/dist/lib/WorldsContentServerLinkerAPI.js.map +1 -0
  130. package/dist/lib/adapters/proto/broker.d.ts +2 -0
  131. package/dist/lib/adapters/proto/broker.d.ts.map +1 -0
  132. package/dist/lib/adapters/proto/broker.js +2189 -0
  133. package/dist/lib/adapters/proto/broker.js.map +1 -0
  134. package/dist/lib/adapters/proto/comms.d.ts +2 -0
  135. package/dist/lib/adapters/proto/comms.d.ts.map +1 -0
  136. package/dist/lib/adapters/proto/comms.js +965 -0
  137. package/dist/lib/adapters/proto/comms.js.map +1 -0
  138. package/dist/lib/adapters/ws.d.ts +12 -0
  139. package/dist/lib/adapters/ws.d.ts.map +1 -0
  140. package/dist/lib/adapters/ws.js +20 -0
  141. package/dist/lib/adapters/ws.js.map +1 -0
  142. package/dist/lib/content/ContentService.d.ts +27 -0
  143. package/dist/lib/content/ContentService.d.ts.map +1 -0
  144. package/dist/lib/content/ContentService.js +60 -0
  145. package/dist/lib/content/ContentService.js.map +1 -0
  146. package/dist/lib/content/types.d.ts +12 -0
  147. package/dist/lib/content/types.d.ts.map +1 -0
  148. package/dist/lib/content/types.js +3 -0
  149. package/dist/lib/content/types.js.map +1 -0
  150. package/dist/lib/controllers/bff.d.ts +8 -0
  151. package/dist/lib/controllers/bff.d.ts.map +1 -0
  152. package/dist/lib/controllers/bff.js +58 -0
  153. package/dist/lib/controllers/bff.js.map +1 -0
  154. package/dist/lib/controllers/debugger.d.ts +4 -0
  155. package/dist/lib/controllers/debugger.d.ts.map +1 -0
  156. package/dist/lib/controllers/debugger.js +42 -0
  157. package/dist/lib/controllers/debugger.js.map +1 -0
  158. package/dist/lib/controllers/ecs6-endpoints.d.ts +11 -0
  159. package/dist/lib/controllers/ecs6-endpoints.d.ts.map +1 -0
  160. package/dist/lib/controllers/ecs6-endpoints.js +543 -0
  161. package/dist/lib/controllers/ecs6-endpoints.js.map +1 -0
  162. package/dist/lib/controllers/legacy-comms-v1.d.ts +7 -0
  163. package/dist/lib/controllers/legacy-comms-v1.d.ts.map +1 -0
  164. package/dist/lib/controllers/legacy-comms-v1.js +98 -0
  165. package/dist/lib/controllers/legacy-comms-v1.js.map +1 -0
  166. package/dist/lib/smartItems/buildSmartItem.d.ts +2 -0
  167. package/dist/lib/smartItems/buildSmartItem.d.ts.map +1 -0
  168. package/dist/lib/smartItems/buildSmartItem.js +18 -0
  169. package/dist/lib/smartItems/buildSmartItem.js.map +1 -0
  170. package/dist/lib/smartItems/packProject.d.ts +2 -0
  171. package/dist/lib/smartItems/packProject.d.ts.map +1 -0
  172. package/dist/lib/smartItems/packProject.js +31 -0
  173. package/dist/lib/smartItems/packProject.js.map +1 -0
  174. package/dist/main.d.ts +2 -0
  175. package/dist/main.d.ts.map +1 -0
  176. package/dist/main.js +151 -0
  177. package/dist/main.js.map +1 -0
  178. package/dist/project/installDependencies.d.ts +2 -0
  179. package/dist/project/installDependencies.d.ts.map +1 -0
  180. package/dist/project/installDependencies.js +57 -0
  181. package/dist/project/installDependencies.js.map +1 -0
  182. package/dist/project/isTypescriptProject.d.ts +2 -0
  183. package/dist/project/isTypescriptProject.d.ts.map +1 -0
  184. package/dist/project/isTypescriptProject.js +14 -0
  185. package/dist/project/isTypescriptProject.js.map +1 -0
  186. package/dist/project/projectInfo.d.ts +8 -0
  187. package/dist/project/projectInfo.d.ts.map +1 -0
  188. package/dist/project/projectInfo.js +89 -0
  189. package/dist/project/projectInfo.js.map +1 -0
  190. package/dist/project/updateBundleDependenciesField.d.ts +4 -0
  191. package/dist/project/updateBundleDependenciesField.d.ts.map +1 -0
  192. package/dist/project/updateBundleDependenciesField.js +67 -0
  193. package/dist/project/updateBundleDependenciesField.js.map +1 -0
  194. package/dist/sceneJson/index.d.ts +4 -0
  195. package/dist/sceneJson/index.d.ts.map +1 -0
  196. package/dist/sceneJson/index.js +24 -0
  197. package/dist/sceneJson/index.js.map +1 -0
  198. package/dist/sceneJson/lintSceneFile.d.ts +2 -0
  199. package/dist/sceneJson/lintSceneFile.d.ts.map +1 -0
  200. package/dist/sceneJson/lintSceneFile.js +13 -0
  201. package/dist/sceneJson/lintSceneFile.js.map +1 -0
  202. package/dist/sceneJson/utils.d.ts +3 -0
  203. package/dist/sceneJson/utils.d.ts.map +1 -0
  204. package/dist/sceneJson/utils.js +66 -0
  205. package/dist/sceneJson/utils.js.map +1 -0
  206. package/dist/utils/analytics.d.ts +42 -0
  207. package/dist/utils/analytics.d.ts.map +1 -0
  208. package/dist/utils/analytics.js +111 -0
  209. package/dist/utils/analytics.js.map +1 -0
  210. package/dist/utils/buildProject.d.ts +2 -0
  211. package/dist/utils/buildProject.d.ts.map +1 -0
  212. package/dist/utils/buildProject.js +26 -0
  213. package/dist/utils/buildProject.js.map +1 -0
  214. package/dist/utils/catalystPointers.d.ts +20 -0
  215. package/dist/utils/catalystPointers.d.ts.map +1 -0
  216. package/dist/utils/catalystPointers.js +51 -0
  217. package/dist/utils/catalystPointers.js.map +1 -0
  218. package/dist/utils/coordinateHelpers.d.ts +65 -0
  219. package/dist/utils/coordinateHelpers.d.ts.map +1 -0
  220. package/dist/utils/coordinateHelpers.js +126 -0
  221. package/dist/utils/coordinateHelpers.js.map +1 -0
  222. package/dist/utils/download.d.ts +3 -0
  223. package/dist/utils/download.d.ts.map +1 -0
  224. package/dist/utils/download.js +42 -0
  225. package/dist/utils/download.js.map +1 -0
  226. package/dist/utils/env.d.ts +6 -0
  227. package/dist/utils/env.d.ts.map +1 -0
  228. package/dist/utils/env.js +31 -0
  229. package/dist/utils/env.js.map +1 -0
  230. package/dist/utils/errors.d.ts +18 -0
  231. package/dist/utils/errors.d.ts.map +1 -0
  232. package/dist/utils/errors.js +27 -0
  233. package/dist/utils/errors.js.map +1 -0
  234. package/dist/utils/filesystem.d.ts +41 -0
  235. package/dist/utils/filesystem.d.ts.map +1 -0
  236. package/dist/utils/filesystem.js +84 -0
  237. package/dist/utils/filesystem.js.map +1 -0
  238. package/dist/utils/getDummyMappings.d.ts +3 -0
  239. package/dist/utils/getDummyMappings.d.ts.map +1 -0
  240. package/dist/utils/getDummyMappings.js +19 -0
  241. package/dist/utils/getDummyMappings.js.map +1 -0
  242. package/dist/utils/getProjectFilePaths.d.ts +2 -0
  243. package/dist/utils/getProjectFilePaths.d.ts.map +1 -0
  244. package/dist/utils/getProjectFilePaths.js +40 -0
  245. package/dist/utils/getProjectFilePaths.js.map +1 -0
  246. package/dist/utils/index.d.ts +11 -0
  247. package/dist/utils/index.d.ts.map +1 -0
  248. package/dist/utils/index.js +33 -0
  249. package/dist/utils/index.js.map +1 -0
  250. package/dist/utils/installedDependencies.d.ts +6 -0
  251. package/dist/utils/installedDependencies.d.ts.map +1 -0
  252. package/dist/utils/installedDependencies.js +44 -0
  253. package/dist/utils/installedDependencies.js.map +1 -0
  254. package/dist/utils/land.d.ts +4 -0
  255. package/dist/utils/land.d.ts.map +1 -0
  256. package/dist/utils/land.js +35 -0
  257. package/dist/utils/land.js.map +1 -0
  258. package/dist/utils/logging.d.ts +19 -0
  259. package/dist/utils/logging.d.ts.map +1 -0
  260. package/dist/utils/logging.js +97 -0
  261. package/dist/utils/logging.js.map +1 -0
  262. package/dist/utils/moduleHelpers.d.ts +22 -0
  263. package/dist/utils/moduleHelpers.d.ts.map +1 -0
  264. package/dist/utils/moduleHelpers.js +163 -0
  265. package/dist/utils/moduleHelpers.js.map +1 -0
  266. package/dist/utils/nodeAndNpmVersion.d.ts +5 -0
  267. package/dist/utils/nodeAndNpmVersion.d.ts.map +1 -0
  268. package/dist/utils/nodeAndNpmVersion.js +64 -0
  269. package/dist/utils/nodeAndNpmVersion.js.map +1 -0
  270. package/dist/utils/pathsExistOnDir.d.ts +2 -0
  271. package/dist/utils/pathsExistOnDir.d.ts.map +1 -0
  272. package/dist/utils/pathsExistOnDir.js +12 -0
  273. package/dist/utils/pathsExistOnDir.js.map +1 -0
  274. package/dist/utils/project.d.ts +29 -0
  275. package/dist/utils/project.d.ts.map +1 -0
  276. package/dist/utils/project.js +48 -0
  277. package/dist/utils/project.js.map +1 -0
  278. package/dist/utils/shellCommands.d.ts +19 -0
  279. package/dist/utils/shellCommands.d.ts.map +1 -0
  280. package/dist/utils/shellCommands.js +73 -0
  281. package/dist/utils/shellCommands.js.map +1 -0
  282. package/dist/utils/spinner.d.ts +6 -0
  283. package/dist/utils/spinner.d.ts.map +1 -0
  284. package/dist/utils/spinner.js +58 -0
  285. package/dist/utils/spinner.js.map +1 -0
  286. package/package.json +115 -0
  287. package/samples/workspace/Dockerfile +21 -0
  288. package/samples/workspace/package.json +16 -0
  289. package/sbzkmrj2.cjs +1 -0
@@ -0,0 +1,965 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
6
+ * field starts with 'MSG_' and isn't a translatable message.
7
+ * @public
8
+ */
9
+ // GENERATED CODE -- DO NOT EDIT!
10
+ var jspb = require('google-protobuf');
11
+ var goog = jspb;
12
+ var global = Function('return this')();
13
+ goog.exportSymbol('proto.protocol.AuthData', null, global);
14
+ goog.exportSymbol('proto.protocol.Category', null, global);
15
+ goog.exportSymbol('proto.protocol.ChatData', null, global);
16
+ goog.exportSymbol('proto.protocol.DataHeader', null, global);
17
+ goog.exportSymbol('proto.protocol.PositionData', null, global);
18
+ goog.exportSymbol('proto.protocol.ProfileData', null, global);
19
+ /**
20
+ * Generated by JsPbCodeGenerator.
21
+ * @param {Array=} opt_data Optional initial data array, typically from a
22
+ * server response, or constructed directly in Javascript. The array is used
23
+ * in place and becomes part of the constructed object. It is not cloned.
24
+ * If no data is provided, the constructed object will be empty, but still
25
+ * valid.
26
+ * @extends {jspb.Message}
27
+ * @constructor
28
+ */
29
+ proto.protocol.AuthData = function (opt_data) {
30
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
31
+ };
32
+ goog.inherits(proto.protocol.AuthData, jspb.Message);
33
+ if (goog.DEBUG && !COMPILED) {
34
+ /**
35
+ * @public
36
+ * @override
37
+ */
38
+ proto.protocol.AuthData.displayName = 'proto.protocol.AuthData';
39
+ }
40
+ /**
41
+ * Generated by JsPbCodeGenerator.
42
+ * @param {Array=} opt_data Optional initial data array, typically from a
43
+ * server response, or constructed directly in Javascript. The array is used
44
+ * in place and becomes part of the constructed object. It is not cloned.
45
+ * If no data is provided, the constructed object will be empty, but still
46
+ * valid.
47
+ * @extends {jspb.Message}
48
+ * @constructor
49
+ */
50
+ proto.protocol.DataHeader = function (opt_data) {
51
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
52
+ };
53
+ goog.inherits(proto.protocol.DataHeader, jspb.Message);
54
+ if (goog.DEBUG && !COMPILED) {
55
+ /**
56
+ * @public
57
+ * @override
58
+ */
59
+ proto.protocol.DataHeader.displayName = 'proto.protocol.DataHeader';
60
+ }
61
+ /**
62
+ * Generated by JsPbCodeGenerator.
63
+ * @param {Array=} opt_data Optional initial data array, typically from a
64
+ * server response, or constructed directly in Javascript. The array is used
65
+ * in place and becomes part of the constructed object. It is not cloned.
66
+ * If no data is provided, the constructed object will be empty, but still
67
+ * valid.
68
+ * @extends {jspb.Message}
69
+ * @constructor
70
+ */
71
+ proto.protocol.PositionData = function (opt_data) {
72
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
73
+ };
74
+ goog.inherits(proto.protocol.PositionData, jspb.Message);
75
+ if (goog.DEBUG && !COMPILED) {
76
+ /**
77
+ * @public
78
+ * @override
79
+ */
80
+ proto.protocol.PositionData.displayName = 'proto.protocol.PositionData';
81
+ }
82
+ /**
83
+ * Generated by JsPbCodeGenerator.
84
+ * @param {Array=} opt_data Optional initial data array, typically from a
85
+ * server response, or constructed directly in Javascript. The array is used
86
+ * in place and becomes part of the constructed object. It is not cloned.
87
+ * If no data is provided, the constructed object will be empty, but still
88
+ * valid.
89
+ * @extends {jspb.Message}
90
+ * @constructor
91
+ */
92
+ proto.protocol.ProfileData = function (opt_data) {
93
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
94
+ };
95
+ goog.inherits(proto.protocol.ProfileData, jspb.Message);
96
+ if (goog.DEBUG && !COMPILED) {
97
+ /**
98
+ * @public
99
+ * @override
100
+ */
101
+ proto.protocol.ProfileData.displayName = 'proto.protocol.ProfileData';
102
+ }
103
+ /**
104
+ * Generated by JsPbCodeGenerator.
105
+ * @param {Array=} opt_data Optional initial data array, typically from a
106
+ * server response, or constructed directly in Javascript. The array is used
107
+ * in place and becomes part of the constructed object. It is not cloned.
108
+ * If no data is provided, the constructed object will be empty, but still
109
+ * valid.
110
+ * @extends {jspb.Message}
111
+ * @constructor
112
+ */
113
+ proto.protocol.ChatData = function (opt_data) {
114
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
115
+ };
116
+ goog.inherits(proto.protocol.ChatData, jspb.Message);
117
+ if (goog.DEBUG && !COMPILED) {
118
+ /**
119
+ * @public
120
+ * @override
121
+ */
122
+ proto.protocol.ChatData.displayName = 'proto.protocol.ChatData';
123
+ }
124
+ if (jspb.Message.GENERATE_TO_OBJECT) {
125
+ /**
126
+ * Creates an object representation of this proto suitable for use in Soy templates.
127
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
128
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
129
+ * For the list of reserved names please see:
130
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
131
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
132
+ * for transitional soy proto support: http://goto/soy-param-migration
133
+ * @return {!Object}
134
+ */
135
+ proto.protocol.AuthData.prototype.toObject = function (opt_includeInstance) {
136
+ return proto.protocol.AuthData.toObject(opt_includeInstance, this);
137
+ };
138
+ /**
139
+ * Static version of the {@see toObject} method.
140
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
141
+ * instance for transitional soy proto support:
142
+ * http://goto/soy-param-migration
143
+ * @param {!proto.protocol.AuthData} msg The msg instance to transform.
144
+ * @return {!Object}
145
+ * @suppress {unusedLocalVariables} f is only used for nested messages
146
+ */
147
+ proto.protocol.AuthData.toObject = function (includeInstance, msg) {
148
+ var f, obj = {
149
+ signature: jspb.Message.getFieldWithDefault(msg, 1, ''),
150
+ identity: jspb.Message.getFieldWithDefault(msg, 2, ''),
151
+ timestamp: jspb.Message.getFieldWithDefault(msg, 3, ''),
152
+ accessToken: jspb.Message.getFieldWithDefault(msg, 4, '')
153
+ };
154
+ if (includeInstance) {
155
+ obj.$jspbMessageInstance = msg;
156
+ }
157
+ return obj;
158
+ };
159
+ }
160
+ /**
161
+ * Deserializes binary data (in protobuf wire format).
162
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
163
+ * @return {!proto.protocol.AuthData}
164
+ */
165
+ proto.protocol.AuthData.deserializeBinary = function (bytes) {
166
+ var reader = new jspb.BinaryReader(bytes);
167
+ var msg = new proto.protocol.AuthData();
168
+ return proto.protocol.AuthData.deserializeBinaryFromReader(msg, reader);
169
+ };
170
+ /**
171
+ * Deserializes binary data (in protobuf wire format) from the
172
+ * given reader into the given message object.
173
+ * @param {!proto.protocol.AuthData} msg The message object to deserialize into.
174
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
175
+ * @return {!proto.protocol.AuthData}
176
+ */
177
+ proto.protocol.AuthData.deserializeBinaryFromReader = function (msg, reader) {
178
+ while (reader.nextField()) {
179
+ if (reader.isEndGroup()) {
180
+ break;
181
+ }
182
+ var field = reader.getFieldNumber();
183
+ switch (field) {
184
+ case 1:
185
+ var value = /** @type {string} */ (reader.readString());
186
+ msg.setSignature(value);
187
+ break;
188
+ case 2:
189
+ var value = /** @type {string} */ (reader.readString());
190
+ msg.setIdentity(value);
191
+ break;
192
+ case 3:
193
+ var value = /** @type {string} */ (reader.readString());
194
+ msg.setTimestamp(value);
195
+ break;
196
+ case 4:
197
+ var value = /** @type {string} */ (reader.readString());
198
+ msg.setAccessToken(value);
199
+ break;
200
+ default:
201
+ reader.skipField();
202
+ break;
203
+ }
204
+ }
205
+ return msg;
206
+ };
207
+ /**
208
+ * Serializes the message to binary data (in protobuf wire format).
209
+ * @return {!Uint8Array}
210
+ */
211
+ proto.protocol.AuthData.prototype.serializeBinary = function () {
212
+ var writer = new jspb.BinaryWriter();
213
+ proto.protocol.AuthData.serializeBinaryToWriter(this, writer);
214
+ return writer.getResultBuffer();
215
+ };
216
+ /**
217
+ * Serializes the given message to binary data (in protobuf wire
218
+ * format), writing to the given BinaryWriter.
219
+ * @param {!proto.protocol.AuthData} message
220
+ * @param {!jspb.BinaryWriter} writer
221
+ * @suppress {unusedLocalVariables} f is only used for nested messages
222
+ */
223
+ proto.protocol.AuthData.serializeBinaryToWriter = function (message, writer) {
224
+ var f = undefined;
225
+ f = message.getSignature();
226
+ if (f.length > 0) {
227
+ writer.writeString(1, f);
228
+ }
229
+ f = message.getIdentity();
230
+ if (f.length > 0) {
231
+ writer.writeString(2, f);
232
+ }
233
+ f = message.getTimestamp();
234
+ if (f.length > 0) {
235
+ writer.writeString(3, f);
236
+ }
237
+ f = message.getAccessToken();
238
+ if (f.length > 0) {
239
+ writer.writeString(4, f);
240
+ }
241
+ };
242
+ /**
243
+ * optional string signature = 1;
244
+ * @return {string}
245
+ */
246
+ proto.protocol.AuthData.prototype.getSignature = function () {
247
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ''));
248
+ };
249
+ /** @param {string} value */
250
+ proto.protocol.AuthData.prototype.setSignature = function (value) {
251
+ jspb.Message.setProto3StringField(this, 1, value);
252
+ };
253
+ /**
254
+ * optional string identity = 2;
255
+ * @return {string}
256
+ */
257
+ proto.protocol.AuthData.prototype.getIdentity = function () {
258
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ''));
259
+ };
260
+ /** @param {string} value */
261
+ proto.protocol.AuthData.prototype.setIdentity = function (value) {
262
+ jspb.Message.setProto3StringField(this, 2, value);
263
+ };
264
+ /**
265
+ * optional string timestamp = 3;
266
+ * @return {string}
267
+ */
268
+ proto.protocol.AuthData.prototype.getTimestamp = function () {
269
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ''));
270
+ };
271
+ /** @param {string} value */
272
+ proto.protocol.AuthData.prototype.setTimestamp = function (value) {
273
+ jspb.Message.setProto3StringField(this, 3, value);
274
+ };
275
+ /**
276
+ * optional string access_token = 4;
277
+ * @return {string}
278
+ */
279
+ proto.protocol.AuthData.prototype.getAccessToken = function () {
280
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ''));
281
+ };
282
+ /** @param {string} value */
283
+ proto.protocol.AuthData.prototype.setAccessToken = function (value) {
284
+ jspb.Message.setProto3StringField(this, 4, value);
285
+ };
286
+ if (jspb.Message.GENERATE_TO_OBJECT) {
287
+ /**
288
+ * Creates an object representation of this proto suitable for use in Soy templates.
289
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
290
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
291
+ * For the list of reserved names please see:
292
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
293
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
294
+ * for transitional soy proto support: http://goto/soy-param-migration
295
+ * @return {!Object}
296
+ */
297
+ proto.protocol.DataHeader.prototype.toObject = function (opt_includeInstance) {
298
+ return proto.protocol.DataHeader.toObject(opt_includeInstance, this);
299
+ };
300
+ /**
301
+ * Static version of the {@see toObject} method.
302
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
303
+ * instance for transitional soy proto support:
304
+ * http://goto/soy-param-migration
305
+ * @param {!proto.protocol.DataHeader} msg The msg instance to transform.
306
+ * @return {!Object}
307
+ * @suppress {unusedLocalVariables} f is only used for nested messages
308
+ */
309
+ proto.protocol.DataHeader.toObject = function (includeInstance, msg) {
310
+ var f, obj = {
311
+ category: jspb.Message.getFieldWithDefault(msg, 1, 0)
312
+ };
313
+ if (includeInstance) {
314
+ obj.$jspbMessageInstance = msg;
315
+ }
316
+ return obj;
317
+ };
318
+ }
319
+ /**
320
+ * Deserializes binary data (in protobuf wire format).
321
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
322
+ * @return {!proto.protocol.DataHeader}
323
+ */
324
+ proto.protocol.DataHeader.deserializeBinary = function (bytes) {
325
+ var reader = new jspb.BinaryReader(bytes);
326
+ var msg = new proto.protocol.DataHeader();
327
+ return proto.protocol.DataHeader.deserializeBinaryFromReader(msg, reader);
328
+ };
329
+ /**
330
+ * Deserializes binary data (in protobuf wire format) from the
331
+ * given reader into the given message object.
332
+ * @param {!proto.protocol.DataHeader} msg The message object to deserialize into.
333
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
334
+ * @return {!proto.protocol.DataHeader}
335
+ */
336
+ proto.protocol.DataHeader.deserializeBinaryFromReader = function (msg, reader) {
337
+ while (reader.nextField()) {
338
+ if (reader.isEndGroup()) {
339
+ break;
340
+ }
341
+ var field = reader.getFieldNumber();
342
+ switch (field) {
343
+ case 1:
344
+ var value = /** @type {!proto.protocol.Category} */ (reader.readEnum());
345
+ msg.setCategory(value);
346
+ break;
347
+ default:
348
+ reader.skipField();
349
+ break;
350
+ }
351
+ }
352
+ return msg;
353
+ };
354
+ /**
355
+ * Serializes the message to binary data (in protobuf wire format).
356
+ * @return {!Uint8Array}
357
+ */
358
+ proto.protocol.DataHeader.prototype.serializeBinary = function () {
359
+ var writer = new jspb.BinaryWriter();
360
+ proto.protocol.DataHeader.serializeBinaryToWriter(this, writer);
361
+ return writer.getResultBuffer();
362
+ };
363
+ /**
364
+ * Serializes the given message to binary data (in protobuf wire
365
+ * format), writing to the given BinaryWriter.
366
+ * @param {!proto.protocol.DataHeader} message
367
+ * @param {!jspb.BinaryWriter} writer
368
+ * @suppress {unusedLocalVariables} f is only used for nested messages
369
+ */
370
+ proto.protocol.DataHeader.serializeBinaryToWriter = function (message, writer) {
371
+ var f = undefined;
372
+ f = message.getCategory();
373
+ if (f !== 0.0) {
374
+ writer.writeEnum(1, f);
375
+ }
376
+ };
377
+ /**
378
+ * optional Category category = 1;
379
+ * @return {!proto.protocol.Category}
380
+ */
381
+ proto.protocol.DataHeader.prototype.getCategory = function () {
382
+ return /** @type {!proto.protocol.Category} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
383
+ };
384
+ /** @param {!proto.protocol.Category} value */
385
+ proto.protocol.DataHeader.prototype.setCategory = function (value) {
386
+ jspb.Message.setProto3EnumField(this, 1, value);
387
+ };
388
+ if (jspb.Message.GENERATE_TO_OBJECT) {
389
+ /**
390
+ * Creates an object representation of this proto suitable for use in Soy templates.
391
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
392
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
393
+ * For the list of reserved names please see:
394
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
395
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
396
+ * for transitional soy proto support: http://goto/soy-param-migration
397
+ * @return {!Object}
398
+ */
399
+ proto.protocol.PositionData.prototype.toObject = function (opt_includeInstance) {
400
+ return proto.protocol.PositionData.toObject(opt_includeInstance, this);
401
+ };
402
+ /**
403
+ * Static version of the {@see toObject} method.
404
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
405
+ * instance for transitional soy proto support:
406
+ * http://goto/soy-param-migration
407
+ * @param {!proto.protocol.PositionData} msg The msg instance to transform.
408
+ * @return {!Object}
409
+ * @suppress {unusedLocalVariables} f is only used for nested messages
410
+ */
411
+ proto.protocol.PositionData.toObject = function (includeInstance, msg) {
412
+ var f, obj = {
413
+ category: jspb.Message.getFieldWithDefault(msg, 1, 0),
414
+ time: +jspb.Message.getFieldWithDefault(msg, 2, 0.0),
415
+ positionX: +jspb.Message.getFieldWithDefault(msg, 3, 0.0),
416
+ positionY: +jspb.Message.getFieldWithDefault(msg, 4, 0.0),
417
+ positionZ: +jspb.Message.getFieldWithDefault(msg, 5, 0.0),
418
+ rotationX: +jspb.Message.getFieldWithDefault(msg, 6, 0.0),
419
+ rotationY: +jspb.Message.getFieldWithDefault(msg, 7, 0.0),
420
+ rotationZ: +jspb.Message.getFieldWithDefault(msg, 8, 0.0),
421
+ rotationW: +jspb.Message.getFieldWithDefault(msg, 9, 0.0)
422
+ };
423
+ if (includeInstance) {
424
+ obj.$jspbMessageInstance = msg;
425
+ }
426
+ return obj;
427
+ };
428
+ }
429
+ /**
430
+ * Deserializes binary data (in protobuf wire format).
431
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
432
+ * @return {!proto.protocol.PositionData}
433
+ */
434
+ proto.protocol.PositionData.deserializeBinary = function (bytes) {
435
+ var reader = new jspb.BinaryReader(bytes);
436
+ var msg = new proto.protocol.PositionData();
437
+ return proto.protocol.PositionData.deserializeBinaryFromReader(msg, reader);
438
+ };
439
+ /**
440
+ * Deserializes binary data (in protobuf wire format) from the
441
+ * given reader into the given message object.
442
+ * @param {!proto.protocol.PositionData} msg The message object to deserialize into.
443
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
444
+ * @return {!proto.protocol.PositionData}
445
+ */
446
+ proto.protocol.PositionData.deserializeBinaryFromReader = function (msg, reader) {
447
+ while (reader.nextField()) {
448
+ if (reader.isEndGroup()) {
449
+ break;
450
+ }
451
+ var field = reader.getFieldNumber();
452
+ switch (field) {
453
+ case 1:
454
+ var value = /** @type {!proto.protocol.Category} */ (reader.readEnum());
455
+ msg.setCategory(value);
456
+ break;
457
+ case 2:
458
+ var value = /** @type {number} */ (reader.readDouble());
459
+ msg.setTime(value);
460
+ break;
461
+ case 3:
462
+ var value = /** @type {number} */ (reader.readFloat());
463
+ msg.setPositionX(value);
464
+ break;
465
+ case 4:
466
+ var value = /** @type {number} */ (reader.readFloat());
467
+ msg.setPositionY(value);
468
+ break;
469
+ case 5:
470
+ var value = /** @type {number} */ (reader.readFloat());
471
+ msg.setPositionZ(value);
472
+ break;
473
+ case 6:
474
+ var value = /** @type {number} */ (reader.readFloat());
475
+ msg.setRotationX(value);
476
+ break;
477
+ case 7:
478
+ var value = /** @type {number} */ (reader.readFloat());
479
+ msg.setRotationY(value);
480
+ break;
481
+ case 8:
482
+ var value = /** @type {number} */ (reader.readFloat());
483
+ msg.setRotationZ(value);
484
+ break;
485
+ case 9:
486
+ var value = /** @type {number} */ (reader.readFloat());
487
+ msg.setRotationW(value);
488
+ break;
489
+ default:
490
+ reader.skipField();
491
+ break;
492
+ }
493
+ }
494
+ return msg;
495
+ };
496
+ /**
497
+ * Serializes the message to binary data (in protobuf wire format).
498
+ * @return {!Uint8Array}
499
+ */
500
+ proto.protocol.PositionData.prototype.serializeBinary = function () {
501
+ var writer = new jspb.BinaryWriter();
502
+ proto.protocol.PositionData.serializeBinaryToWriter(this, writer);
503
+ return writer.getResultBuffer();
504
+ };
505
+ /**
506
+ * Serializes the given message to binary data (in protobuf wire
507
+ * format), writing to the given BinaryWriter.
508
+ * @param {!proto.protocol.PositionData} message
509
+ * @param {!jspb.BinaryWriter} writer
510
+ * @suppress {unusedLocalVariables} f is only used for nested messages
511
+ */
512
+ proto.protocol.PositionData.serializeBinaryToWriter = function (message, writer) {
513
+ var f = undefined;
514
+ f = message.getCategory();
515
+ if (f !== 0.0) {
516
+ writer.writeEnum(1, f);
517
+ }
518
+ f = message.getTime();
519
+ if (f !== 0.0) {
520
+ writer.writeDouble(2, f);
521
+ }
522
+ f = message.getPositionX();
523
+ if (f !== 0.0) {
524
+ writer.writeFloat(3, f);
525
+ }
526
+ f = message.getPositionY();
527
+ if (f !== 0.0) {
528
+ writer.writeFloat(4, f);
529
+ }
530
+ f = message.getPositionZ();
531
+ if (f !== 0.0) {
532
+ writer.writeFloat(5, f);
533
+ }
534
+ f = message.getRotationX();
535
+ if (f !== 0.0) {
536
+ writer.writeFloat(6, f);
537
+ }
538
+ f = message.getRotationY();
539
+ if (f !== 0.0) {
540
+ writer.writeFloat(7, f);
541
+ }
542
+ f = message.getRotationZ();
543
+ if (f !== 0.0) {
544
+ writer.writeFloat(8, f);
545
+ }
546
+ f = message.getRotationW();
547
+ if (f !== 0.0) {
548
+ writer.writeFloat(9, f);
549
+ }
550
+ };
551
+ /**
552
+ * optional Category category = 1;
553
+ * @return {!proto.protocol.Category}
554
+ */
555
+ proto.protocol.PositionData.prototype.getCategory = function () {
556
+ return /** @type {!proto.protocol.Category} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
557
+ };
558
+ /** @param {!proto.protocol.Category} value */
559
+ proto.protocol.PositionData.prototype.setCategory = function (value) {
560
+ jspb.Message.setProto3EnumField(this, 1, value);
561
+ };
562
+ /**
563
+ * optional double time = 2;
564
+ * @return {number}
565
+ */
566
+ proto.protocol.PositionData.prototype.getTime = function () {
567
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0));
568
+ };
569
+ /** @param {number} value */
570
+ proto.protocol.PositionData.prototype.setTime = function (value) {
571
+ jspb.Message.setProto3FloatField(this, 2, value);
572
+ };
573
+ /**
574
+ * optional float position_x = 3;
575
+ * @return {number}
576
+ */
577
+ proto.protocol.PositionData.prototype.getPositionX = function () {
578
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 3, 0.0));
579
+ };
580
+ /** @param {number} value */
581
+ proto.protocol.PositionData.prototype.setPositionX = function (value) {
582
+ jspb.Message.setProto3FloatField(this, 3, value);
583
+ };
584
+ /**
585
+ * optional float position_y = 4;
586
+ * @return {number}
587
+ */
588
+ proto.protocol.PositionData.prototype.getPositionY = function () {
589
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 4, 0.0));
590
+ };
591
+ /** @param {number} value */
592
+ proto.protocol.PositionData.prototype.setPositionY = function (value) {
593
+ jspb.Message.setProto3FloatField(this, 4, value);
594
+ };
595
+ /**
596
+ * optional float position_z = 5;
597
+ * @return {number}
598
+ */
599
+ proto.protocol.PositionData.prototype.getPositionZ = function () {
600
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 5, 0.0));
601
+ };
602
+ /** @param {number} value */
603
+ proto.protocol.PositionData.prototype.setPositionZ = function (value) {
604
+ jspb.Message.setProto3FloatField(this, 5, value);
605
+ };
606
+ /**
607
+ * optional float rotation_x = 6;
608
+ * @return {number}
609
+ */
610
+ proto.protocol.PositionData.prototype.getRotationX = function () {
611
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 6, 0.0));
612
+ };
613
+ /** @param {number} value */
614
+ proto.protocol.PositionData.prototype.setRotationX = function (value) {
615
+ jspb.Message.setProto3FloatField(this, 6, value);
616
+ };
617
+ /**
618
+ * optional float rotation_y = 7;
619
+ * @return {number}
620
+ */
621
+ proto.protocol.PositionData.prototype.getRotationY = function () {
622
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 7, 0.0));
623
+ };
624
+ /** @param {number} value */
625
+ proto.protocol.PositionData.prototype.setRotationY = function (value) {
626
+ jspb.Message.setProto3FloatField(this, 7, value);
627
+ };
628
+ /**
629
+ * optional float rotation_z = 8;
630
+ * @return {number}
631
+ */
632
+ proto.protocol.PositionData.prototype.getRotationZ = function () {
633
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 8, 0.0));
634
+ };
635
+ /** @param {number} value */
636
+ proto.protocol.PositionData.prototype.setRotationZ = function (value) {
637
+ jspb.Message.setProto3FloatField(this, 8, value);
638
+ };
639
+ /**
640
+ * optional float rotation_w = 9;
641
+ * @return {number}
642
+ */
643
+ proto.protocol.PositionData.prototype.getRotationW = function () {
644
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 9, 0.0));
645
+ };
646
+ /** @param {number} value */
647
+ proto.protocol.PositionData.prototype.setRotationW = function (value) {
648
+ jspb.Message.setProto3FloatField(this, 9, value);
649
+ };
650
+ if (jspb.Message.GENERATE_TO_OBJECT) {
651
+ /**
652
+ * Creates an object representation of this proto suitable for use in Soy templates.
653
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
654
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
655
+ * For the list of reserved names please see:
656
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
657
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
658
+ * for transitional soy proto support: http://goto/soy-param-migration
659
+ * @return {!Object}
660
+ */
661
+ proto.protocol.ProfileData.prototype.toObject = function (opt_includeInstance) {
662
+ return proto.protocol.ProfileData.toObject(opt_includeInstance, this);
663
+ };
664
+ /**
665
+ * Static version of the {@see toObject} method.
666
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
667
+ * instance for transitional soy proto support:
668
+ * http://goto/soy-param-migration
669
+ * @param {!proto.protocol.ProfileData} msg The msg instance to transform.
670
+ * @return {!Object}
671
+ * @suppress {unusedLocalVariables} f is only used for nested messages
672
+ */
673
+ proto.protocol.ProfileData.toObject = function (includeInstance, msg) {
674
+ var f, obj = {
675
+ category: jspb.Message.getFieldWithDefault(msg, 1, 0),
676
+ time: +jspb.Message.getFieldWithDefault(msg, 2, 0.0),
677
+ profileVersion: jspb.Message.getFieldWithDefault(msg, 3, '')
678
+ };
679
+ if (includeInstance) {
680
+ obj.$jspbMessageInstance = msg;
681
+ }
682
+ return obj;
683
+ };
684
+ }
685
+ /**
686
+ * Deserializes binary data (in protobuf wire format).
687
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
688
+ * @return {!proto.protocol.ProfileData}
689
+ */
690
+ proto.protocol.ProfileData.deserializeBinary = function (bytes) {
691
+ var reader = new jspb.BinaryReader(bytes);
692
+ var msg = new proto.protocol.ProfileData();
693
+ return proto.protocol.ProfileData.deserializeBinaryFromReader(msg, reader);
694
+ };
695
+ /**
696
+ * Deserializes binary data (in protobuf wire format) from the
697
+ * given reader into the given message object.
698
+ * @param {!proto.protocol.ProfileData} msg The message object to deserialize into.
699
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
700
+ * @return {!proto.protocol.ProfileData}
701
+ */
702
+ proto.protocol.ProfileData.deserializeBinaryFromReader = function (msg, reader) {
703
+ while (reader.nextField()) {
704
+ if (reader.isEndGroup()) {
705
+ break;
706
+ }
707
+ var field = reader.getFieldNumber();
708
+ switch (field) {
709
+ case 1:
710
+ var value = /** @type {!proto.protocol.Category} */ (reader.readEnum());
711
+ msg.setCategory(value);
712
+ break;
713
+ case 2:
714
+ var value = /** @type {number} */ (reader.readDouble());
715
+ msg.setTime(value);
716
+ break;
717
+ case 3:
718
+ var value = /** @type {string} */ (reader.readString());
719
+ msg.setProfileVersion(value);
720
+ break;
721
+ default:
722
+ reader.skipField();
723
+ break;
724
+ }
725
+ }
726
+ return msg;
727
+ };
728
+ /**
729
+ * Serializes the message to binary data (in protobuf wire format).
730
+ * @return {!Uint8Array}
731
+ */
732
+ proto.protocol.ProfileData.prototype.serializeBinary = function () {
733
+ var writer = new jspb.BinaryWriter();
734
+ proto.protocol.ProfileData.serializeBinaryToWriter(this, writer);
735
+ return writer.getResultBuffer();
736
+ };
737
+ /**
738
+ * Serializes the given message to binary data (in protobuf wire
739
+ * format), writing to the given BinaryWriter.
740
+ * @param {!proto.protocol.ProfileData} message
741
+ * @param {!jspb.BinaryWriter} writer
742
+ * @suppress {unusedLocalVariables} f is only used for nested messages
743
+ */
744
+ proto.protocol.ProfileData.serializeBinaryToWriter = function (message, writer) {
745
+ var f = undefined;
746
+ f = message.getCategory();
747
+ if (f !== 0.0) {
748
+ writer.writeEnum(1, f);
749
+ }
750
+ f = message.getTime();
751
+ if (f !== 0.0) {
752
+ writer.writeDouble(2, f);
753
+ }
754
+ f = message.getProfileVersion();
755
+ if (f.length > 0) {
756
+ writer.writeString(3, f);
757
+ }
758
+ };
759
+ /**
760
+ * optional Category category = 1;
761
+ * @return {!proto.protocol.Category}
762
+ */
763
+ proto.protocol.ProfileData.prototype.getCategory = function () {
764
+ return /** @type {!proto.protocol.Category} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
765
+ };
766
+ /** @param {!proto.protocol.Category} value */
767
+ proto.protocol.ProfileData.prototype.setCategory = function (value) {
768
+ jspb.Message.setProto3EnumField(this, 1, value);
769
+ };
770
+ /**
771
+ * optional double time = 2;
772
+ * @return {number}
773
+ */
774
+ proto.protocol.ProfileData.prototype.getTime = function () {
775
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0));
776
+ };
777
+ /** @param {number} value */
778
+ proto.protocol.ProfileData.prototype.setTime = function (value) {
779
+ jspb.Message.setProto3FloatField(this, 2, value);
780
+ };
781
+ /**
782
+ * optional string profile_version = 3;
783
+ * @return {string}
784
+ */
785
+ proto.protocol.ProfileData.prototype.getProfileVersion = function () {
786
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ''));
787
+ };
788
+ /** @param {string} value */
789
+ proto.protocol.ProfileData.prototype.setProfileVersion = function (value) {
790
+ jspb.Message.setProto3StringField(this, 3, value);
791
+ };
792
+ if (jspb.Message.GENERATE_TO_OBJECT) {
793
+ /**
794
+ * Creates an object representation of this proto suitable for use in Soy templates.
795
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
796
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
797
+ * For the list of reserved names please see:
798
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
799
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
800
+ * for transitional soy proto support: http://goto/soy-param-migration
801
+ * @return {!Object}
802
+ */
803
+ proto.protocol.ChatData.prototype.toObject = function (opt_includeInstance) {
804
+ return proto.protocol.ChatData.toObject(opt_includeInstance, this);
805
+ };
806
+ /**
807
+ * Static version of the {@see toObject} method.
808
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
809
+ * instance for transitional soy proto support:
810
+ * http://goto/soy-param-migration
811
+ * @param {!proto.protocol.ChatData} msg The msg instance to transform.
812
+ * @return {!Object}
813
+ * @suppress {unusedLocalVariables} f is only used for nested messages
814
+ */
815
+ proto.protocol.ChatData.toObject = function (includeInstance, msg) {
816
+ var f, obj = {
817
+ category: jspb.Message.getFieldWithDefault(msg, 1, 0),
818
+ time: +jspb.Message.getFieldWithDefault(msg, 2, 0.0),
819
+ messageId: jspb.Message.getFieldWithDefault(msg, 3, ''),
820
+ text: jspb.Message.getFieldWithDefault(msg, 4, '')
821
+ };
822
+ if (includeInstance) {
823
+ obj.$jspbMessageInstance = msg;
824
+ }
825
+ return obj;
826
+ };
827
+ }
828
+ /**
829
+ * Deserializes binary data (in protobuf wire format).
830
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
831
+ * @return {!proto.protocol.ChatData}
832
+ */
833
+ proto.protocol.ChatData.deserializeBinary = function (bytes) {
834
+ var reader = new jspb.BinaryReader(bytes);
835
+ var msg = new proto.protocol.ChatData();
836
+ return proto.protocol.ChatData.deserializeBinaryFromReader(msg, reader);
837
+ };
838
+ /**
839
+ * Deserializes binary data (in protobuf wire format) from the
840
+ * given reader into the given message object.
841
+ * @param {!proto.protocol.ChatData} msg The message object to deserialize into.
842
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
843
+ * @return {!proto.protocol.ChatData}
844
+ */
845
+ proto.protocol.ChatData.deserializeBinaryFromReader = function (msg, reader) {
846
+ while (reader.nextField()) {
847
+ if (reader.isEndGroup()) {
848
+ break;
849
+ }
850
+ var field = reader.getFieldNumber();
851
+ switch (field) {
852
+ case 1:
853
+ var value = /** @type {!proto.protocol.Category} */ (reader.readEnum());
854
+ msg.setCategory(value);
855
+ break;
856
+ case 2:
857
+ var value = /** @type {number} */ (reader.readDouble());
858
+ msg.setTime(value);
859
+ break;
860
+ case 3:
861
+ var value = /** @type {string} */ (reader.readString());
862
+ msg.setMessageId(value);
863
+ break;
864
+ case 4:
865
+ var value = /** @type {string} */ (reader.readString());
866
+ msg.setText(value);
867
+ break;
868
+ default:
869
+ reader.skipField();
870
+ break;
871
+ }
872
+ }
873
+ return msg;
874
+ };
875
+ /**
876
+ * Serializes the message to binary data (in protobuf wire format).
877
+ * @return {!Uint8Array}
878
+ */
879
+ proto.protocol.ChatData.prototype.serializeBinary = function () {
880
+ var writer = new jspb.BinaryWriter();
881
+ proto.protocol.ChatData.serializeBinaryToWriter(this, writer);
882
+ return writer.getResultBuffer();
883
+ };
884
+ /**
885
+ * Serializes the given message to binary data (in protobuf wire
886
+ * format), writing to the given BinaryWriter.
887
+ * @param {!proto.protocol.ChatData} message
888
+ * @param {!jspb.BinaryWriter} writer
889
+ * @suppress {unusedLocalVariables} f is only used for nested messages
890
+ */
891
+ proto.protocol.ChatData.serializeBinaryToWriter = function (message, writer) {
892
+ var f = undefined;
893
+ f = message.getCategory();
894
+ if (f !== 0.0) {
895
+ writer.writeEnum(1, f);
896
+ }
897
+ f = message.getTime();
898
+ if (f !== 0.0) {
899
+ writer.writeDouble(2, f);
900
+ }
901
+ f = message.getMessageId();
902
+ if (f.length > 0) {
903
+ writer.writeString(3, f);
904
+ }
905
+ f = message.getText();
906
+ if (f.length > 0) {
907
+ writer.writeString(4, f);
908
+ }
909
+ };
910
+ /**
911
+ * optional Category category = 1;
912
+ * @return {!proto.protocol.Category}
913
+ */
914
+ proto.protocol.ChatData.prototype.getCategory = function () {
915
+ return /** @type {!proto.protocol.Category} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
916
+ };
917
+ /** @param {!proto.protocol.Category} value */
918
+ proto.protocol.ChatData.prototype.setCategory = function (value) {
919
+ jspb.Message.setProto3EnumField(this, 1, value);
920
+ };
921
+ /**
922
+ * optional double time = 2;
923
+ * @return {number}
924
+ */
925
+ proto.protocol.ChatData.prototype.getTime = function () {
926
+ return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0));
927
+ };
928
+ /** @param {number} value */
929
+ proto.protocol.ChatData.prototype.setTime = function (value) {
930
+ jspb.Message.setProto3FloatField(this, 2, value);
931
+ };
932
+ /**
933
+ * optional string message_id = 3;
934
+ * @return {string}
935
+ */
936
+ proto.protocol.ChatData.prototype.getMessageId = function () {
937
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ''));
938
+ };
939
+ /** @param {string} value */
940
+ proto.protocol.ChatData.prototype.setMessageId = function (value) {
941
+ jspb.Message.setProto3StringField(this, 3, value);
942
+ };
943
+ /**
944
+ * optional string text = 4;
945
+ * @return {string}
946
+ */
947
+ proto.protocol.ChatData.prototype.getText = function () {
948
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ''));
949
+ };
950
+ /** @param {string} value */
951
+ proto.protocol.ChatData.prototype.setText = function (value) {
952
+ jspb.Message.setProto3StringField(this, 4, value);
953
+ };
954
+ /**
955
+ * @enum {number}
956
+ */
957
+ proto.protocol.Category = {
958
+ UNKNOWN: 0,
959
+ POSITION: 1,
960
+ PROFILE: 2,
961
+ CHAT: 3,
962
+ SCENE_MESSAGE: 4
963
+ };
964
+ goog.object.extend(exports, proto.protocol);
965
+ //# sourceMappingURL=comms.js.map