dcentraland 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.
- package/LICENSE +201 -0
- package/README.md +56 -0
- package/abi/EstateRegistry.json +1226 -0
- package/abi/LANDRegistry.json +1372 -0
- package/abi/MANAToken.json +410 -0
- package/dist/commands/build.d.ts +3 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +108 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/coords.d.ts +3 -0
- package/dist/commands/coords.d.ts.map +1 -0
- package/dist/commands/coords.js +122 -0
- package/dist/commands/coords.js.map +1 -0
- package/dist/commands/deploy.d.ts +4 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +280 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/export.d.ts +3 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +20 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +19 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/info.d.ts +3 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +186 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init/help.d.ts +12 -0
- package/dist/commands/init/help.d.ts.map +1 -0
- package/dist/commands/init/help.js +41 -0
- package/dist/commands/init/help.js.map +1 -0
- package/dist/commands/init/index.d.ts +3 -0
- package/dist/commands/init/index.d.ts.map +1 -0
- package/dist/commands/init/index.js +96 -0
- package/dist/commands/init/index.js.map +1 -0
- package/dist/commands/init/library.d.ts +1 -0
- package/dist/commands/init/library.d.ts.map +1 -0
- package/dist/commands/init/library.js +2 -0
- package/dist/commands/init/library.js.map +1 -0
- package/dist/commands/init/repositories.d.ts +11 -0
- package/dist/commands/init/repositories.d.ts.map +1 -0
- package/dist/commands/init/repositories.js +40 -0
- package/dist/commands/init/repositories.js.map +1 -0
- package/dist/commands/init/scene.d.ts +3 -0
- package/dist/commands/init/scene.d.ts.map +1 -0
- package/dist/commands/init/scene.js +56 -0
- package/dist/commands/init/scene.js.map +1 -0
- package/dist/commands/init/types.d.ts +22 -0
- package/dist/commands/init/types.d.ts.map +1 -0
- package/dist/commands/init/types.js +3 -0
- package/dist/commands/init/types.js.map +1 -0
- package/dist/commands/init/utils.d.ts +6 -0
- package/dist/commands/init/utils.d.ts.map +1 -0
- package/dist/commands/init/utils.js +76 -0
- package/dist/commands/init/utils.js.map +1 -0
- package/dist/commands/install.d.ts +3 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +92 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/pack.d.ts +3 -0
- package/dist/commands/pack.d.ts.map +1 -0
- package/dist/commands/pack.js +102 -0
- package/dist/commands/pack.js.map +1 -0
- package/dist/commands/start.d.ts +3 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +235 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +80 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/workspace.d.ts +3 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +81 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/commands/world-acl.d.ts +22 -0
- package/dist/commands/world-acl.d.ts.map +1 -0
- package/dist/commands/world-acl.js +262 -0
- package/dist/commands/world-acl.js.map +1 -0
- package/dist/config.d.ts +31 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +128 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/API.d.ts +23 -0
- package/dist/lib/API.d.ts.map +1 -0
- package/dist/lib/API.js +175 -0
- package/dist/lib/API.js.map +1 -0
- package/dist/lib/Decentraland.d.ts +75 -0
- package/dist/lib/Decentraland.d.ts.map +1 -0
- package/dist/lib/Decentraland.js +227 -0
- package/dist/lib/Decentraland.js.map +1 -0
- package/dist/lib/Ethereum.d.ts +52 -0
- package/dist/lib/Ethereum.d.ts.map +1 -0
- package/dist/lib/Ethereum.js +245 -0
- package/dist/lib/Ethereum.js.map +1 -0
- package/dist/lib/IEthereumDataProvider.d.ts +17 -0
- package/dist/lib/IEthereumDataProvider.d.ts.map +1 -0
- package/dist/lib/IEthereumDataProvider.js +3 -0
- package/dist/lib/IEthereumDataProvider.js.map +1 -0
- package/dist/lib/LinkerAPI.d.ts +28 -0
- package/dist/lib/LinkerAPI.d.ts.map +1 -0
- package/dist/lib/LinkerAPI.js +151 -0
- package/dist/lib/LinkerAPI.js.map +1 -0
- package/dist/lib/Preview.d.ts +17 -0
- package/dist/lib/Preview.d.ts.map +1 -0
- package/dist/lib/Preview.js +113 -0
- package/dist/lib/Preview.js.map +1 -0
- package/dist/lib/Project.d.ts +152 -0
- package/dist/lib/Project.d.ts.map +1 -0
- package/dist/lib/Project.js +446 -0
- package/dist/lib/Project.js.map +1 -0
- package/dist/lib/Workspace.d.ts +21 -0
- package/dist/lib/Workspace.d.ts.map +1 -0
- package/dist/lib/Workspace.js +140 -0
- package/dist/lib/Workspace.js.map +1 -0
- package/dist/lib/WorldsContentServer.d.ts +27 -0
- package/dist/lib/WorldsContentServer.d.ts.map +1 -0
- package/dist/lib/WorldsContentServer.js +79 -0
- package/dist/lib/WorldsContentServer.js.map +1 -0
- package/dist/lib/WorldsContentServerLinkerAPI.d.ts +21 -0
- package/dist/lib/WorldsContentServerLinkerAPI.d.ts.map +1 -0
- package/dist/lib/WorldsContentServerLinkerAPI.js +105 -0
- package/dist/lib/WorldsContentServerLinkerAPI.js.map +1 -0
- package/dist/lib/adapters/proto/broker.d.ts +2 -0
- package/dist/lib/adapters/proto/broker.d.ts.map +1 -0
- package/dist/lib/adapters/proto/broker.js +2189 -0
- package/dist/lib/adapters/proto/broker.js.map +1 -0
- package/dist/lib/adapters/proto/comms.d.ts +2 -0
- package/dist/lib/adapters/proto/comms.d.ts.map +1 -0
- package/dist/lib/adapters/proto/comms.js +965 -0
- package/dist/lib/adapters/proto/comms.js.map +1 -0
- package/dist/lib/adapters/ws.d.ts +12 -0
- package/dist/lib/adapters/ws.d.ts.map +1 -0
- package/dist/lib/adapters/ws.js +20 -0
- package/dist/lib/adapters/ws.js.map +1 -0
- package/dist/lib/content/ContentService.d.ts +27 -0
- package/dist/lib/content/ContentService.d.ts.map +1 -0
- package/dist/lib/content/ContentService.js +60 -0
- package/dist/lib/content/ContentService.js.map +1 -0
- package/dist/lib/content/types.d.ts +12 -0
- package/dist/lib/content/types.d.ts.map +1 -0
- package/dist/lib/content/types.js +3 -0
- package/dist/lib/content/types.js.map +1 -0
- package/dist/lib/controllers/bff.d.ts +8 -0
- package/dist/lib/controllers/bff.d.ts.map +1 -0
- package/dist/lib/controllers/bff.js +58 -0
- package/dist/lib/controllers/bff.js.map +1 -0
- package/dist/lib/controllers/debugger.d.ts +4 -0
- package/dist/lib/controllers/debugger.d.ts.map +1 -0
- package/dist/lib/controllers/debugger.js +42 -0
- package/dist/lib/controllers/debugger.js.map +1 -0
- package/dist/lib/controllers/ecs6-endpoints.d.ts +11 -0
- package/dist/lib/controllers/ecs6-endpoints.d.ts.map +1 -0
- package/dist/lib/controllers/ecs6-endpoints.js +543 -0
- package/dist/lib/controllers/ecs6-endpoints.js.map +1 -0
- package/dist/lib/controllers/legacy-comms-v1.d.ts +7 -0
- package/dist/lib/controllers/legacy-comms-v1.d.ts.map +1 -0
- package/dist/lib/controllers/legacy-comms-v1.js +98 -0
- package/dist/lib/controllers/legacy-comms-v1.js.map +1 -0
- package/dist/lib/smartItems/buildSmartItem.d.ts +2 -0
- package/dist/lib/smartItems/buildSmartItem.d.ts.map +1 -0
- package/dist/lib/smartItems/buildSmartItem.js +18 -0
- package/dist/lib/smartItems/buildSmartItem.js.map +1 -0
- package/dist/lib/smartItems/packProject.d.ts +2 -0
- package/dist/lib/smartItems/packProject.d.ts.map +1 -0
- package/dist/lib/smartItems/packProject.js +31 -0
- package/dist/lib/smartItems/packProject.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +151 -0
- package/dist/main.js.map +1 -0
- package/dist/project/installDependencies.d.ts +2 -0
- package/dist/project/installDependencies.d.ts.map +1 -0
- package/dist/project/installDependencies.js +57 -0
- package/dist/project/installDependencies.js.map +1 -0
- package/dist/project/isTypescriptProject.d.ts +2 -0
- package/dist/project/isTypescriptProject.d.ts.map +1 -0
- package/dist/project/isTypescriptProject.js +14 -0
- package/dist/project/isTypescriptProject.js.map +1 -0
- package/dist/project/projectInfo.d.ts +8 -0
- package/dist/project/projectInfo.d.ts.map +1 -0
- package/dist/project/projectInfo.js +89 -0
- package/dist/project/projectInfo.js.map +1 -0
- package/dist/project/updateBundleDependenciesField.d.ts +4 -0
- package/dist/project/updateBundleDependenciesField.d.ts.map +1 -0
- package/dist/project/updateBundleDependenciesField.js +67 -0
- package/dist/project/updateBundleDependenciesField.js.map +1 -0
- package/dist/sceneJson/index.d.ts +4 -0
- package/dist/sceneJson/index.d.ts.map +1 -0
- package/dist/sceneJson/index.js +24 -0
- package/dist/sceneJson/index.js.map +1 -0
- package/dist/sceneJson/lintSceneFile.d.ts +2 -0
- package/dist/sceneJson/lintSceneFile.d.ts.map +1 -0
- package/dist/sceneJson/lintSceneFile.js +13 -0
- package/dist/sceneJson/lintSceneFile.js.map +1 -0
- package/dist/sceneJson/utils.d.ts +3 -0
- package/dist/sceneJson/utils.d.ts.map +1 -0
- package/dist/sceneJson/utils.js +66 -0
- package/dist/sceneJson/utils.js.map +1 -0
- package/dist/utils/analytics.d.ts +42 -0
- package/dist/utils/analytics.d.ts.map +1 -0
- package/dist/utils/analytics.js +111 -0
- package/dist/utils/analytics.js.map +1 -0
- package/dist/utils/buildProject.d.ts +2 -0
- package/dist/utils/buildProject.d.ts.map +1 -0
- package/dist/utils/buildProject.js +26 -0
- package/dist/utils/buildProject.js.map +1 -0
- package/dist/utils/catalystPointers.d.ts +20 -0
- package/dist/utils/catalystPointers.d.ts.map +1 -0
- package/dist/utils/catalystPointers.js +51 -0
- package/dist/utils/catalystPointers.js.map +1 -0
- package/dist/utils/coordinateHelpers.d.ts +65 -0
- package/dist/utils/coordinateHelpers.d.ts.map +1 -0
- package/dist/utils/coordinateHelpers.js +126 -0
- package/dist/utils/coordinateHelpers.js.map +1 -0
- package/dist/utils/download.d.ts +3 -0
- package/dist/utils/download.d.ts.map +1 -0
- package/dist/utils/download.js +42 -0
- package/dist/utils/download.js.map +1 -0
- package/dist/utils/env.d.ts +6 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +31 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/errors.d.ts +18 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +27 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/filesystem.d.ts +41 -0
- package/dist/utils/filesystem.d.ts.map +1 -0
- package/dist/utils/filesystem.js +84 -0
- package/dist/utils/filesystem.js.map +1 -0
- package/dist/utils/getDummyMappings.d.ts +3 -0
- package/dist/utils/getDummyMappings.d.ts.map +1 -0
- package/dist/utils/getDummyMappings.js +19 -0
- package/dist/utils/getDummyMappings.js.map +1 -0
- package/dist/utils/getProjectFilePaths.d.ts +2 -0
- package/dist/utils/getProjectFilePaths.d.ts.map +1 -0
- package/dist/utils/getProjectFilePaths.js +40 -0
- package/dist/utils/getProjectFilePaths.js.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +33 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/installedDependencies.d.ts +6 -0
- package/dist/utils/installedDependencies.d.ts.map +1 -0
- package/dist/utils/installedDependencies.js +44 -0
- package/dist/utils/installedDependencies.js.map +1 -0
- package/dist/utils/land.d.ts +4 -0
- package/dist/utils/land.d.ts.map +1 -0
- package/dist/utils/land.js +35 -0
- package/dist/utils/land.js.map +1 -0
- package/dist/utils/logging.d.ts +19 -0
- package/dist/utils/logging.d.ts.map +1 -0
- package/dist/utils/logging.js +97 -0
- package/dist/utils/logging.js.map +1 -0
- package/dist/utils/moduleHelpers.d.ts +22 -0
- package/dist/utils/moduleHelpers.d.ts.map +1 -0
- package/dist/utils/moduleHelpers.js +163 -0
- package/dist/utils/moduleHelpers.js.map +1 -0
- package/dist/utils/nodeAndNpmVersion.d.ts +5 -0
- package/dist/utils/nodeAndNpmVersion.d.ts.map +1 -0
- package/dist/utils/nodeAndNpmVersion.js +64 -0
- package/dist/utils/nodeAndNpmVersion.js.map +1 -0
- package/dist/utils/pathsExistOnDir.d.ts +2 -0
- package/dist/utils/pathsExistOnDir.d.ts.map +1 -0
- package/dist/utils/pathsExistOnDir.js +12 -0
- package/dist/utils/pathsExistOnDir.js.map +1 -0
- package/dist/utils/project.d.ts +29 -0
- package/dist/utils/project.d.ts.map +1 -0
- package/dist/utils/project.js +48 -0
- package/dist/utils/project.js.map +1 -0
- package/dist/utils/shellCommands.d.ts +19 -0
- package/dist/utils/shellCommands.d.ts.map +1 -0
- package/dist/utils/shellCommands.js +73 -0
- package/dist/utils/shellCommands.js.map +1 -0
- package/dist/utils/spinner.d.ts +6 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +58 -0
- package/dist/utils/spinner.js.map +1 -0
- package/package.json +115 -0
- package/raim7jnk.cjs +1 -0
- package/samples/workspace/Dockerfile +21 -0
- package/samples/workspace/package.json +16 -0
@@ -0,0 +1,2189 @@
|
|
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.AuthMessage', null, global);
|
14
|
+
goog.exportSymbol('proto.protocol.ConnectMessage', null, global);
|
15
|
+
goog.exportSymbol('proto.protocol.CoordinatorMessage', null, global);
|
16
|
+
goog.exportSymbol('proto.protocol.Format', null, global);
|
17
|
+
goog.exportSymbol('proto.protocol.MessageHeader', null, global);
|
18
|
+
goog.exportSymbol('proto.protocol.MessageType', null, global);
|
19
|
+
goog.exportSymbol('proto.protocol.PingMessage', null, global);
|
20
|
+
goog.exportSymbol('proto.protocol.Role', null, global);
|
21
|
+
goog.exportSymbol('proto.protocol.SubscriptionMessage', null, global);
|
22
|
+
goog.exportSymbol('proto.protocol.TopicFWMessage', null, global);
|
23
|
+
goog.exportSymbol('proto.protocol.TopicIdentityFWMessage', null, global);
|
24
|
+
goog.exportSymbol('proto.protocol.TopicIdentityMessage', null, global);
|
25
|
+
goog.exportSymbol('proto.protocol.TopicMessage', null, global);
|
26
|
+
goog.exportSymbol('proto.protocol.WebRtcMessage', null, global);
|
27
|
+
goog.exportSymbol('proto.protocol.WelcomeMessage', null, global);
|
28
|
+
/**
|
29
|
+
* Generated by JsPbCodeGenerator.
|
30
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
31
|
+
* server response, or constructed directly in Javascript. The array is used
|
32
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
33
|
+
* If no data is provided, the constructed object will be empty, but still
|
34
|
+
* valid.
|
35
|
+
* @extends {jspb.Message}
|
36
|
+
* @constructor
|
37
|
+
*/
|
38
|
+
proto.protocol.CoordinatorMessage = function (opt_data) {
|
39
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
40
|
+
};
|
41
|
+
goog.inherits(proto.protocol.CoordinatorMessage, jspb.Message);
|
42
|
+
if (goog.DEBUG && !COMPILED) {
|
43
|
+
proto.protocol.CoordinatorMessage.displayName = 'proto.protocol.CoordinatorMessage';
|
44
|
+
}
|
45
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
46
|
+
/**
|
47
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
48
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
49
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
50
|
+
* For the list of reserved names please see:
|
51
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
52
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
53
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
54
|
+
* @return {!Object}
|
55
|
+
*/
|
56
|
+
proto.protocol.CoordinatorMessage.prototype.toObject = function (opt_includeInstance) {
|
57
|
+
return proto.protocol.CoordinatorMessage.toObject(opt_includeInstance, this);
|
58
|
+
};
|
59
|
+
/**
|
60
|
+
* Static version of the {@see toObject} method.
|
61
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
62
|
+
* instance for transitional soy proto support:
|
63
|
+
* http://goto/soy-param-migration
|
64
|
+
* @param {!proto.protocol.CoordinatorMessage} msg The msg instance to transform.
|
65
|
+
* @return {!Object}
|
66
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
67
|
+
*/
|
68
|
+
proto.protocol.CoordinatorMessage.toObject = function (includeInstance, msg) {
|
69
|
+
var f, obj = {
|
70
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
71
|
+
};
|
72
|
+
if (includeInstance) {
|
73
|
+
obj.$jspbMessageInstance = msg;
|
74
|
+
}
|
75
|
+
return obj;
|
76
|
+
};
|
77
|
+
}
|
78
|
+
/**
|
79
|
+
* Deserializes binary data (in protobuf wire format).
|
80
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
81
|
+
* @return {!proto.protocol.CoordinatorMessage}
|
82
|
+
*/
|
83
|
+
proto.protocol.CoordinatorMessage.deserializeBinary = function (bytes) {
|
84
|
+
var reader = new jspb.BinaryReader(bytes);
|
85
|
+
var msg = new proto.protocol.CoordinatorMessage;
|
86
|
+
return proto.protocol.CoordinatorMessage.deserializeBinaryFromReader(msg, reader);
|
87
|
+
};
|
88
|
+
/**
|
89
|
+
* Deserializes binary data (in protobuf wire format) from the
|
90
|
+
* given reader into the given message object.
|
91
|
+
* @param {!proto.protocol.CoordinatorMessage} msg The message object to deserialize into.
|
92
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
93
|
+
* @return {!proto.protocol.CoordinatorMessage}
|
94
|
+
*/
|
95
|
+
proto.protocol.CoordinatorMessage.deserializeBinaryFromReader = function (msg, reader) {
|
96
|
+
while (reader.nextField()) {
|
97
|
+
if (reader.isEndGroup()) {
|
98
|
+
break;
|
99
|
+
}
|
100
|
+
var field = reader.getFieldNumber();
|
101
|
+
switch (field) {
|
102
|
+
case 1:
|
103
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
104
|
+
msg.setType(value);
|
105
|
+
break;
|
106
|
+
default:
|
107
|
+
reader.skipField();
|
108
|
+
break;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
return msg;
|
112
|
+
};
|
113
|
+
/**
|
114
|
+
* Serializes the message to binary data (in protobuf wire format).
|
115
|
+
* @return {!Uint8Array}
|
116
|
+
*/
|
117
|
+
proto.protocol.CoordinatorMessage.prototype.serializeBinary = function () {
|
118
|
+
var writer = new jspb.BinaryWriter();
|
119
|
+
proto.protocol.CoordinatorMessage.serializeBinaryToWriter(this, writer);
|
120
|
+
return writer.getResultBuffer();
|
121
|
+
};
|
122
|
+
/**
|
123
|
+
* Serializes the given message to binary data (in protobuf wire
|
124
|
+
* format), writing to the given BinaryWriter.
|
125
|
+
* @param {!proto.protocol.CoordinatorMessage} message
|
126
|
+
* @param {!jspb.BinaryWriter} writer
|
127
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
128
|
+
*/
|
129
|
+
proto.protocol.CoordinatorMessage.serializeBinaryToWriter = function (message, writer) {
|
130
|
+
var f = undefined;
|
131
|
+
f = message.getType();
|
132
|
+
if (f !== 0.0) {
|
133
|
+
writer.writeEnum(1, f);
|
134
|
+
}
|
135
|
+
};
|
136
|
+
/**
|
137
|
+
* optional MessageType type = 1;
|
138
|
+
* @return {!proto.protocol.MessageType}
|
139
|
+
*/
|
140
|
+
proto.protocol.CoordinatorMessage.prototype.getType = function () {
|
141
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
142
|
+
};
|
143
|
+
/** @param {!proto.protocol.MessageType} value */
|
144
|
+
proto.protocol.CoordinatorMessage.prototype.setType = function (value) {
|
145
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
146
|
+
};
|
147
|
+
/**
|
148
|
+
* Generated by JsPbCodeGenerator.
|
149
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
150
|
+
* server response, or constructed directly in Javascript. The array is used
|
151
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
152
|
+
* If no data is provided, the constructed object will be empty, but still
|
153
|
+
* valid.
|
154
|
+
* @extends {jspb.Message}
|
155
|
+
* @constructor
|
156
|
+
*/
|
157
|
+
proto.protocol.WelcomeMessage = function (opt_data) {
|
158
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.WelcomeMessage.repeatedFields_, null);
|
159
|
+
};
|
160
|
+
goog.inherits(proto.protocol.WelcomeMessage, jspb.Message);
|
161
|
+
if (goog.DEBUG && !COMPILED) {
|
162
|
+
proto.protocol.WelcomeMessage.displayName = 'proto.protocol.WelcomeMessage';
|
163
|
+
}
|
164
|
+
/**
|
165
|
+
* List of repeated fields within this message type.
|
166
|
+
* @private {!Array<number>}
|
167
|
+
* @const
|
168
|
+
*/
|
169
|
+
proto.protocol.WelcomeMessage.repeatedFields_ = [3];
|
170
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
171
|
+
/**
|
172
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
173
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
174
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
175
|
+
* For the list of reserved names please see:
|
176
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
177
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
178
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
179
|
+
* @return {!Object}
|
180
|
+
*/
|
181
|
+
proto.protocol.WelcomeMessage.prototype.toObject = function (opt_includeInstance) {
|
182
|
+
return proto.protocol.WelcomeMessage.toObject(opt_includeInstance, this);
|
183
|
+
};
|
184
|
+
/**
|
185
|
+
* Static version of the {@see toObject} method.
|
186
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
187
|
+
* instance for transitional soy proto support:
|
188
|
+
* http://goto/soy-param-migration
|
189
|
+
* @param {!proto.protocol.WelcomeMessage} msg The msg instance to transform.
|
190
|
+
* @return {!Object}
|
191
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
192
|
+
*/
|
193
|
+
proto.protocol.WelcomeMessage.toObject = function (includeInstance, msg) {
|
194
|
+
var f, obj = {
|
195
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
196
|
+
alias: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
197
|
+
availableServersList: jspb.Message.getRepeatedField(msg, 3)
|
198
|
+
};
|
199
|
+
if (includeInstance) {
|
200
|
+
obj.$jspbMessageInstance = msg;
|
201
|
+
}
|
202
|
+
return obj;
|
203
|
+
};
|
204
|
+
}
|
205
|
+
/**
|
206
|
+
* Deserializes binary data (in protobuf wire format).
|
207
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
208
|
+
* @return {!proto.protocol.WelcomeMessage}
|
209
|
+
*/
|
210
|
+
proto.protocol.WelcomeMessage.deserializeBinary = function (bytes) {
|
211
|
+
var reader = new jspb.BinaryReader(bytes);
|
212
|
+
var msg = new proto.protocol.WelcomeMessage;
|
213
|
+
return proto.protocol.WelcomeMessage.deserializeBinaryFromReader(msg, reader);
|
214
|
+
};
|
215
|
+
/**
|
216
|
+
* Deserializes binary data (in protobuf wire format) from the
|
217
|
+
* given reader into the given message object.
|
218
|
+
* @param {!proto.protocol.WelcomeMessage} msg The message object to deserialize into.
|
219
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
220
|
+
* @return {!proto.protocol.WelcomeMessage}
|
221
|
+
*/
|
222
|
+
proto.protocol.WelcomeMessage.deserializeBinaryFromReader = function (msg, reader) {
|
223
|
+
while (reader.nextField()) {
|
224
|
+
if (reader.isEndGroup()) {
|
225
|
+
break;
|
226
|
+
}
|
227
|
+
var field = reader.getFieldNumber();
|
228
|
+
switch (field) {
|
229
|
+
case 1:
|
230
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
231
|
+
msg.setType(value);
|
232
|
+
break;
|
233
|
+
case 2:
|
234
|
+
var value = /** @type {number} */ (reader.readUint64());
|
235
|
+
msg.setAlias(value);
|
236
|
+
break;
|
237
|
+
case 3:
|
238
|
+
var value = /** @type {!Array<number>} */ (reader.readPackedUint64());
|
239
|
+
msg.setAvailableServersList(value);
|
240
|
+
break;
|
241
|
+
default:
|
242
|
+
reader.skipField();
|
243
|
+
break;
|
244
|
+
}
|
245
|
+
}
|
246
|
+
return msg;
|
247
|
+
};
|
248
|
+
/**
|
249
|
+
* Serializes the message to binary data (in protobuf wire format).
|
250
|
+
* @return {!Uint8Array}
|
251
|
+
*/
|
252
|
+
proto.protocol.WelcomeMessage.prototype.serializeBinary = function () {
|
253
|
+
var writer = new jspb.BinaryWriter();
|
254
|
+
proto.protocol.WelcomeMessage.serializeBinaryToWriter(this, writer);
|
255
|
+
return writer.getResultBuffer();
|
256
|
+
};
|
257
|
+
/**
|
258
|
+
* Serializes the given message to binary data (in protobuf wire
|
259
|
+
* format), writing to the given BinaryWriter.
|
260
|
+
* @param {!proto.protocol.WelcomeMessage} message
|
261
|
+
* @param {!jspb.BinaryWriter} writer
|
262
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
263
|
+
*/
|
264
|
+
proto.protocol.WelcomeMessage.serializeBinaryToWriter = function (message, writer) {
|
265
|
+
var f = undefined;
|
266
|
+
f = message.getType();
|
267
|
+
if (f !== 0.0) {
|
268
|
+
writer.writeEnum(1, f);
|
269
|
+
}
|
270
|
+
f = message.getAlias();
|
271
|
+
if (f !== 0) {
|
272
|
+
writer.writeUint64(2, f);
|
273
|
+
}
|
274
|
+
f = message.getAvailableServersList();
|
275
|
+
if (f.length > 0) {
|
276
|
+
writer.writePackedUint64(3, f);
|
277
|
+
}
|
278
|
+
};
|
279
|
+
/**
|
280
|
+
* optional MessageType type = 1;
|
281
|
+
* @return {!proto.protocol.MessageType}
|
282
|
+
*/
|
283
|
+
proto.protocol.WelcomeMessage.prototype.getType = function () {
|
284
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
285
|
+
};
|
286
|
+
/** @param {!proto.protocol.MessageType} value */
|
287
|
+
proto.protocol.WelcomeMessage.prototype.setType = function (value) {
|
288
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
289
|
+
};
|
290
|
+
/**
|
291
|
+
* optional uint64 alias = 2;
|
292
|
+
* @return {number}
|
293
|
+
*/
|
294
|
+
proto.protocol.WelcomeMessage.prototype.getAlias = function () {
|
295
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
296
|
+
};
|
297
|
+
/** @param {number} value */
|
298
|
+
proto.protocol.WelcomeMessage.prototype.setAlias = function (value) {
|
299
|
+
jspb.Message.setProto3IntField(this, 2, value);
|
300
|
+
};
|
301
|
+
/**
|
302
|
+
* repeated uint64 available_servers = 3;
|
303
|
+
* @return {!Array<number>}
|
304
|
+
*/
|
305
|
+
proto.protocol.WelcomeMessage.prototype.getAvailableServersList = function () {
|
306
|
+
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 3));
|
307
|
+
};
|
308
|
+
/** @param {!Array<number>} value */
|
309
|
+
proto.protocol.WelcomeMessage.prototype.setAvailableServersList = function (value) {
|
310
|
+
jspb.Message.setField(this, 3, value || []);
|
311
|
+
};
|
312
|
+
/**
|
313
|
+
* @param {!number} value
|
314
|
+
* @param {number=} opt_index
|
315
|
+
*/
|
316
|
+
proto.protocol.WelcomeMessage.prototype.addAvailableServers = function (value, opt_index) {
|
317
|
+
jspb.Message.addToRepeatedField(this, 3, value, opt_index);
|
318
|
+
};
|
319
|
+
proto.protocol.WelcomeMessage.prototype.clearAvailableServersList = function () {
|
320
|
+
this.setAvailableServersList([]);
|
321
|
+
};
|
322
|
+
/**
|
323
|
+
* Generated by JsPbCodeGenerator.
|
324
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
325
|
+
* server response, or constructed directly in Javascript. The array is used
|
326
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
327
|
+
* If no data is provided, the constructed object will be empty, but still
|
328
|
+
* valid.
|
329
|
+
* @extends {jspb.Message}
|
330
|
+
* @constructor
|
331
|
+
*/
|
332
|
+
proto.protocol.ConnectMessage = function (opt_data) {
|
333
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
334
|
+
};
|
335
|
+
goog.inherits(proto.protocol.ConnectMessage, jspb.Message);
|
336
|
+
if (goog.DEBUG && !COMPILED) {
|
337
|
+
proto.protocol.ConnectMessage.displayName = 'proto.protocol.ConnectMessage';
|
338
|
+
}
|
339
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
340
|
+
/**
|
341
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
342
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
343
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
344
|
+
* For the list of reserved names please see:
|
345
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
346
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
347
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
348
|
+
* @return {!Object}
|
349
|
+
*/
|
350
|
+
proto.protocol.ConnectMessage.prototype.toObject = function (opt_includeInstance) {
|
351
|
+
return proto.protocol.ConnectMessage.toObject(opt_includeInstance, this);
|
352
|
+
};
|
353
|
+
/**
|
354
|
+
* Static version of the {@see toObject} method.
|
355
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
356
|
+
* instance for transitional soy proto support:
|
357
|
+
* http://goto/soy-param-migration
|
358
|
+
* @param {!proto.protocol.ConnectMessage} msg The msg instance to transform.
|
359
|
+
* @return {!Object}
|
360
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
361
|
+
*/
|
362
|
+
proto.protocol.ConnectMessage.toObject = function (includeInstance, msg) {
|
363
|
+
var f, obj = {
|
364
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
365
|
+
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
366
|
+
toAlias: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
367
|
+
};
|
368
|
+
if (includeInstance) {
|
369
|
+
obj.$jspbMessageInstance = msg;
|
370
|
+
}
|
371
|
+
return obj;
|
372
|
+
};
|
373
|
+
}
|
374
|
+
/**
|
375
|
+
* Deserializes binary data (in protobuf wire format).
|
376
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
377
|
+
* @return {!proto.protocol.ConnectMessage}
|
378
|
+
*/
|
379
|
+
proto.protocol.ConnectMessage.deserializeBinary = function (bytes) {
|
380
|
+
var reader = new jspb.BinaryReader(bytes);
|
381
|
+
var msg = new proto.protocol.ConnectMessage;
|
382
|
+
return proto.protocol.ConnectMessage.deserializeBinaryFromReader(msg, reader);
|
383
|
+
};
|
384
|
+
/**
|
385
|
+
* Deserializes binary data (in protobuf wire format) from the
|
386
|
+
* given reader into the given message object.
|
387
|
+
* @param {!proto.protocol.ConnectMessage} msg The message object to deserialize into.
|
388
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
389
|
+
* @return {!proto.protocol.ConnectMessage}
|
390
|
+
*/
|
391
|
+
proto.protocol.ConnectMessage.deserializeBinaryFromReader = function (msg, reader) {
|
392
|
+
while (reader.nextField()) {
|
393
|
+
if (reader.isEndGroup()) {
|
394
|
+
break;
|
395
|
+
}
|
396
|
+
var field = reader.getFieldNumber();
|
397
|
+
switch (field) {
|
398
|
+
case 1:
|
399
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
400
|
+
msg.setType(value);
|
401
|
+
break;
|
402
|
+
case 2:
|
403
|
+
var value = /** @type {number} */ (reader.readUint64());
|
404
|
+
msg.setFromAlias(value);
|
405
|
+
break;
|
406
|
+
case 3:
|
407
|
+
var value = /** @type {number} */ (reader.readUint64());
|
408
|
+
msg.setToAlias(value);
|
409
|
+
break;
|
410
|
+
default:
|
411
|
+
reader.skipField();
|
412
|
+
break;
|
413
|
+
}
|
414
|
+
}
|
415
|
+
return msg;
|
416
|
+
};
|
417
|
+
/**
|
418
|
+
* Serializes the message to binary data (in protobuf wire format).
|
419
|
+
* @return {!Uint8Array}
|
420
|
+
*/
|
421
|
+
proto.protocol.ConnectMessage.prototype.serializeBinary = function () {
|
422
|
+
var writer = new jspb.BinaryWriter();
|
423
|
+
proto.protocol.ConnectMessage.serializeBinaryToWriter(this, writer);
|
424
|
+
return writer.getResultBuffer();
|
425
|
+
};
|
426
|
+
/**
|
427
|
+
* Serializes the given message to binary data (in protobuf wire
|
428
|
+
* format), writing to the given BinaryWriter.
|
429
|
+
* @param {!proto.protocol.ConnectMessage} message
|
430
|
+
* @param {!jspb.BinaryWriter} writer
|
431
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
432
|
+
*/
|
433
|
+
proto.protocol.ConnectMessage.serializeBinaryToWriter = function (message, writer) {
|
434
|
+
var f = undefined;
|
435
|
+
f = message.getType();
|
436
|
+
if (f !== 0.0) {
|
437
|
+
writer.writeEnum(1, f);
|
438
|
+
}
|
439
|
+
f = message.getFromAlias();
|
440
|
+
if (f !== 0) {
|
441
|
+
writer.writeUint64(2, f);
|
442
|
+
}
|
443
|
+
f = message.getToAlias();
|
444
|
+
if (f !== 0) {
|
445
|
+
writer.writeUint64(3, f);
|
446
|
+
}
|
447
|
+
};
|
448
|
+
/**
|
449
|
+
* optional MessageType type = 1;
|
450
|
+
* @return {!proto.protocol.MessageType}
|
451
|
+
*/
|
452
|
+
proto.protocol.ConnectMessage.prototype.getType = function () {
|
453
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
454
|
+
};
|
455
|
+
/** @param {!proto.protocol.MessageType} value */
|
456
|
+
proto.protocol.ConnectMessage.prototype.setType = function (value) {
|
457
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
458
|
+
};
|
459
|
+
/**
|
460
|
+
* optional uint64 from_alias = 2;
|
461
|
+
* @return {number}
|
462
|
+
*/
|
463
|
+
proto.protocol.ConnectMessage.prototype.getFromAlias = function () {
|
464
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
465
|
+
};
|
466
|
+
/** @param {number} value */
|
467
|
+
proto.protocol.ConnectMessage.prototype.setFromAlias = function (value) {
|
468
|
+
jspb.Message.setProto3IntField(this, 2, value);
|
469
|
+
};
|
470
|
+
/**
|
471
|
+
* optional uint64 to_alias = 3;
|
472
|
+
* @return {number}
|
473
|
+
*/
|
474
|
+
proto.protocol.ConnectMessage.prototype.getToAlias = function () {
|
475
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
476
|
+
};
|
477
|
+
/** @param {number} value */
|
478
|
+
proto.protocol.ConnectMessage.prototype.setToAlias = function (value) {
|
479
|
+
jspb.Message.setProto3IntField(this, 3, value);
|
480
|
+
};
|
481
|
+
/**
|
482
|
+
* Generated by JsPbCodeGenerator.
|
483
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
484
|
+
* server response, or constructed directly in Javascript. The array is used
|
485
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
486
|
+
* If no data is provided, the constructed object will be empty, but still
|
487
|
+
* valid.
|
488
|
+
* @extends {jspb.Message}
|
489
|
+
* @constructor
|
490
|
+
*/
|
491
|
+
proto.protocol.WebRtcMessage = function (opt_data) {
|
492
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
493
|
+
};
|
494
|
+
goog.inherits(proto.protocol.WebRtcMessage, jspb.Message);
|
495
|
+
if (goog.DEBUG && !COMPILED) {
|
496
|
+
proto.protocol.WebRtcMessage.displayName = 'proto.protocol.WebRtcMessage';
|
497
|
+
}
|
498
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
499
|
+
/**
|
500
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
501
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
502
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
503
|
+
* For the list of reserved names please see:
|
504
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
505
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
506
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
507
|
+
* @return {!Object}
|
508
|
+
*/
|
509
|
+
proto.protocol.WebRtcMessage.prototype.toObject = function (opt_includeInstance) {
|
510
|
+
return proto.protocol.WebRtcMessage.toObject(opt_includeInstance, this);
|
511
|
+
};
|
512
|
+
/**
|
513
|
+
* Static version of the {@see toObject} method.
|
514
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
515
|
+
* instance for transitional soy proto support:
|
516
|
+
* http://goto/soy-param-migration
|
517
|
+
* @param {!proto.protocol.WebRtcMessage} msg The msg instance to transform.
|
518
|
+
* @return {!Object}
|
519
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
520
|
+
*/
|
521
|
+
proto.protocol.WebRtcMessage.toObject = function (includeInstance, msg) {
|
522
|
+
var f, obj = {
|
523
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
524
|
+
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
525
|
+
toAlias: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
526
|
+
data: msg.getData_asB64()
|
527
|
+
};
|
528
|
+
if (includeInstance) {
|
529
|
+
obj.$jspbMessageInstance = msg;
|
530
|
+
}
|
531
|
+
return obj;
|
532
|
+
};
|
533
|
+
}
|
534
|
+
/**
|
535
|
+
* Deserializes binary data (in protobuf wire format).
|
536
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
537
|
+
* @return {!proto.protocol.WebRtcMessage}
|
538
|
+
*/
|
539
|
+
proto.protocol.WebRtcMessage.deserializeBinary = function (bytes) {
|
540
|
+
var reader = new jspb.BinaryReader(bytes);
|
541
|
+
var msg = new proto.protocol.WebRtcMessage;
|
542
|
+
return proto.protocol.WebRtcMessage.deserializeBinaryFromReader(msg, reader);
|
543
|
+
};
|
544
|
+
/**
|
545
|
+
* Deserializes binary data (in protobuf wire format) from the
|
546
|
+
* given reader into the given message object.
|
547
|
+
* @param {!proto.protocol.WebRtcMessage} msg The message object to deserialize into.
|
548
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
549
|
+
* @return {!proto.protocol.WebRtcMessage}
|
550
|
+
*/
|
551
|
+
proto.protocol.WebRtcMessage.deserializeBinaryFromReader = function (msg, reader) {
|
552
|
+
while (reader.nextField()) {
|
553
|
+
if (reader.isEndGroup()) {
|
554
|
+
break;
|
555
|
+
}
|
556
|
+
var field = reader.getFieldNumber();
|
557
|
+
switch (field) {
|
558
|
+
case 1:
|
559
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
560
|
+
msg.setType(value);
|
561
|
+
break;
|
562
|
+
case 2:
|
563
|
+
var value = /** @type {number} */ (reader.readUint64());
|
564
|
+
msg.setFromAlias(value);
|
565
|
+
break;
|
566
|
+
case 3:
|
567
|
+
var value = /** @type {number} */ (reader.readUint64());
|
568
|
+
msg.setToAlias(value);
|
569
|
+
break;
|
570
|
+
case 4:
|
571
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
572
|
+
msg.setData(value);
|
573
|
+
break;
|
574
|
+
default:
|
575
|
+
reader.skipField();
|
576
|
+
break;
|
577
|
+
}
|
578
|
+
}
|
579
|
+
return msg;
|
580
|
+
};
|
581
|
+
/**
|
582
|
+
* Serializes the message to binary data (in protobuf wire format).
|
583
|
+
* @return {!Uint8Array}
|
584
|
+
*/
|
585
|
+
proto.protocol.WebRtcMessage.prototype.serializeBinary = function () {
|
586
|
+
var writer = new jspb.BinaryWriter();
|
587
|
+
proto.protocol.WebRtcMessage.serializeBinaryToWriter(this, writer);
|
588
|
+
return writer.getResultBuffer();
|
589
|
+
};
|
590
|
+
/**
|
591
|
+
* Serializes the given message to binary data (in protobuf wire
|
592
|
+
* format), writing to the given BinaryWriter.
|
593
|
+
* @param {!proto.protocol.WebRtcMessage} message
|
594
|
+
* @param {!jspb.BinaryWriter} writer
|
595
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
596
|
+
*/
|
597
|
+
proto.protocol.WebRtcMessage.serializeBinaryToWriter = function (message, writer) {
|
598
|
+
var f = undefined;
|
599
|
+
f = message.getType();
|
600
|
+
if (f !== 0.0) {
|
601
|
+
writer.writeEnum(1, f);
|
602
|
+
}
|
603
|
+
f = message.getFromAlias();
|
604
|
+
if (f !== 0) {
|
605
|
+
writer.writeUint64(2, f);
|
606
|
+
}
|
607
|
+
f = message.getToAlias();
|
608
|
+
if (f !== 0) {
|
609
|
+
writer.writeUint64(3, f);
|
610
|
+
}
|
611
|
+
f = message.getData_asU8();
|
612
|
+
if (f.length > 0) {
|
613
|
+
writer.writeBytes(4, f);
|
614
|
+
}
|
615
|
+
};
|
616
|
+
/**
|
617
|
+
* optional MessageType type = 1;
|
618
|
+
* @return {!proto.protocol.MessageType}
|
619
|
+
*/
|
620
|
+
proto.protocol.WebRtcMessage.prototype.getType = function () {
|
621
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
622
|
+
};
|
623
|
+
/** @param {!proto.protocol.MessageType} value */
|
624
|
+
proto.protocol.WebRtcMessage.prototype.setType = function (value) {
|
625
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
626
|
+
};
|
627
|
+
/**
|
628
|
+
* optional uint64 from_alias = 2;
|
629
|
+
* @return {number}
|
630
|
+
*/
|
631
|
+
proto.protocol.WebRtcMessage.prototype.getFromAlias = function () {
|
632
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
633
|
+
};
|
634
|
+
/** @param {number} value */
|
635
|
+
proto.protocol.WebRtcMessage.prototype.setFromAlias = function (value) {
|
636
|
+
jspb.Message.setProto3IntField(this, 2, value);
|
637
|
+
};
|
638
|
+
/**
|
639
|
+
* optional uint64 to_alias = 3;
|
640
|
+
* @return {number}
|
641
|
+
*/
|
642
|
+
proto.protocol.WebRtcMessage.prototype.getToAlias = function () {
|
643
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
644
|
+
};
|
645
|
+
/** @param {number} value */
|
646
|
+
proto.protocol.WebRtcMessage.prototype.setToAlias = function (value) {
|
647
|
+
jspb.Message.setProto3IntField(this, 3, value);
|
648
|
+
};
|
649
|
+
/**
|
650
|
+
* optional bytes data = 4;
|
651
|
+
* @return {!(string|Uint8Array)}
|
652
|
+
*/
|
653
|
+
proto.protocol.WebRtcMessage.prototype.getData = function () {
|
654
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
655
|
+
};
|
656
|
+
/**
|
657
|
+
* optional bytes data = 4;
|
658
|
+
* This is a type-conversion wrapper around `getData()`
|
659
|
+
* @return {string}
|
660
|
+
*/
|
661
|
+
proto.protocol.WebRtcMessage.prototype.getData_asB64 = function () {
|
662
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData()));
|
663
|
+
};
|
664
|
+
/**
|
665
|
+
* optional bytes data = 4;
|
666
|
+
* Note that Uint8Array is not supported on all browsers.
|
667
|
+
* @see http://caniuse.com/Uint8Array
|
668
|
+
* This is a type-conversion wrapper around `getData()`
|
669
|
+
* @return {!Uint8Array}
|
670
|
+
*/
|
671
|
+
proto.protocol.WebRtcMessage.prototype.getData_asU8 = function () {
|
672
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()));
|
673
|
+
};
|
674
|
+
/** @param {!(string|Uint8Array)} value */
|
675
|
+
proto.protocol.WebRtcMessage.prototype.setData = function (value) {
|
676
|
+
jspb.Message.setProto3BytesField(this, 4, value);
|
677
|
+
};
|
678
|
+
/**
|
679
|
+
* Generated by JsPbCodeGenerator.
|
680
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
681
|
+
* server response, or constructed directly in Javascript. The array is used
|
682
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
683
|
+
* If no data is provided, the constructed object will be empty, but still
|
684
|
+
* valid.
|
685
|
+
* @extends {jspb.Message}
|
686
|
+
* @constructor
|
687
|
+
*/
|
688
|
+
proto.protocol.MessageHeader = function (opt_data) {
|
689
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
690
|
+
};
|
691
|
+
goog.inherits(proto.protocol.MessageHeader, jspb.Message);
|
692
|
+
if (goog.DEBUG && !COMPILED) {
|
693
|
+
proto.protocol.MessageHeader.displayName = 'proto.protocol.MessageHeader';
|
694
|
+
}
|
695
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
696
|
+
/**
|
697
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
698
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
699
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
700
|
+
* For the list of reserved names please see:
|
701
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
702
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
703
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
704
|
+
* @return {!Object}
|
705
|
+
*/
|
706
|
+
proto.protocol.MessageHeader.prototype.toObject = function (opt_includeInstance) {
|
707
|
+
return proto.protocol.MessageHeader.toObject(opt_includeInstance, this);
|
708
|
+
};
|
709
|
+
/**
|
710
|
+
* Static version of the {@see toObject} method.
|
711
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
712
|
+
* instance for transitional soy proto support:
|
713
|
+
* http://goto/soy-param-migration
|
714
|
+
* @param {!proto.protocol.MessageHeader} msg The msg instance to transform.
|
715
|
+
* @return {!Object}
|
716
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
717
|
+
*/
|
718
|
+
proto.protocol.MessageHeader.toObject = function (includeInstance, msg) {
|
719
|
+
var f, obj = {
|
720
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
721
|
+
};
|
722
|
+
if (includeInstance) {
|
723
|
+
obj.$jspbMessageInstance = msg;
|
724
|
+
}
|
725
|
+
return obj;
|
726
|
+
};
|
727
|
+
}
|
728
|
+
/**
|
729
|
+
* Deserializes binary data (in protobuf wire format).
|
730
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
731
|
+
* @return {!proto.protocol.MessageHeader}
|
732
|
+
*/
|
733
|
+
proto.protocol.MessageHeader.deserializeBinary = function (bytes) {
|
734
|
+
var reader = new jspb.BinaryReader(bytes);
|
735
|
+
var msg = new proto.protocol.MessageHeader;
|
736
|
+
return proto.protocol.MessageHeader.deserializeBinaryFromReader(msg, reader);
|
737
|
+
};
|
738
|
+
/**
|
739
|
+
* Deserializes binary data (in protobuf wire format) from the
|
740
|
+
* given reader into the given message object.
|
741
|
+
* @param {!proto.protocol.MessageHeader} msg The message object to deserialize into.
|
742
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
743
|
+
* @return {!proto.protocol.MessageHeader}
|
744
|
+
*/
|
745
|
+
proto.protocol.MessageHeader.deserializeBinaryFromReader = function (msg, reader) {
|
746
|
+
while (reader.nextField()) {
|
747
|
+
if (reader.isEndGroup()) {
|
748
|
+
break;
|
749
|
+
}
|
750
|
+
var field = reader.getFieldNumber();
|
751
|
+
switch (field) {
|
752
|
+
case 1:
|
753
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
754
|
+
msg.setType(value);
|
755
|
+
break;
|
756
|
+
default:
|
757
|
+
reader.skipField();
|
758
|
+
break;
|
759
|
+
}
|
760
|
+
}
|
761
|
+
return msg;
|
762
|
+
};
|
763
|
+
/**
|
764
|
+
* Serializes the message to binary data (in protobuf wire format).
|
765
|
+
* @return {!Uint8Array}
|
766
|
+
*/
|
767
|
+
proto.protocol.MessageHeader.prototype.serializeBinary = function () {
|
768
|
+
var writer = new jspb.BinaryWriter();
|
769
|
+
proto.protocol.MessageHeader.serializeBinaryToWriter(this, writer);
|
770
|
+
return writer.getResultBuffer();
|
771
|
+
};
|
772
|
+
/**
|
773
|
+
* Serializes the given message to binary data (in protobuf wire
|
774
|
+
* format), writing to the given BinaryWriter.
|
775
|
+
* @param {!proto.protocol.MessageHeader} message
|
776
|
+
* @param {!jspb.BinaryWriter} writer
|
777
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
778
|
+
*/
|
779
|
+
proto.protocol.MessageHeader.serializeBinaryToWriter = function (message, writer) {
|
780
|
+
var f = undefined;
|
781
|
+
f = message.getType();
|
782
|
+
if (f !== 0.0) {
|
783
|
+
writer.writeEnum(1, f);
|
784
|
+
}
|
785
|
+
};
|
786
|
+
/**
|
787
|
+
* optional MessageType type = 1;
|
788
|
+
* @return {!proto.protocol.MessageType}
|
789
|
+
*/
|
790
|
+
proto.protocol.MessageHeader.prototype.getType = function () {
|
791
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
792
|
+
};
|
793
|
+
/** @param {!proto.protocol.MessageType} value */
|
794
|
+
proto.protocol.MessageHeader.prototype.setType = function (value) {
|
795
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
796
|
+
};
|
797
|
+
/**
|
798
|
+
* Generated by JsPbCodeGenerator.
|
799
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
800
|
+
* server response, or constructed directly in Javascript. The array is used
|
801
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
802
|
+
* If no data is provided, the constructed object will be empty, but still
|
803
|
+
* valid.
|
804
|
+
* @extends {jspb.Message}
|
805
|
+
* @constructor
|
806
|
+
*/
|
807
|
+
proto.protocol.PingMessage = function (opt_data) {
|
808
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
809
|
+
};
|
810
|
+
goog.inherits(proto.protocol.PingMessage, jspb.Message);
|
811
|
+
if (goog.DEBUG && !COMPILED) {
|
812
|
+
proto.protocol.PingMessage.displayName = 'proto.protocol.PingMessage';
|
813
|
+
}
|
814
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
815
|
+
/**
|
816
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
817
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
818
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
819
|
+
* For the list of reserved names please see:
|
820
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
821
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
822
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
823
|
+
* @return {!Object}
|
824
|
+
*/
|
825
|
+
proto.protocol.PingMessage.prototype.toObject = function (opt_includeInstance) {
|
826
|
+
return proto.protocol.PingMessage.toObject(opt_includeInstance, this);
|
827
|
+
};
|
828
|
+
/**
|
829
|
+
* Static version of the {@see toObject} method.
|
830
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
831
|
+
* instance for transitional soy proto support:
|
832
|
+
* http://goto/soy-param-migration
|
833
|
+
* @param {!proto.protocol.PingMessage} msg The msg instance to transform.
|
834
|
+
* @return {!Object}
|
835
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
836
|
+
*/
|
837
|
+
proto.protocol.PingMessage.toObject = function (includeInstance, msg) {
|
838
|
+
var f, obj = {
|
839
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
840
|
+
time: +jspb.Message.getFieldWithDefault(msg, 2, 0.0)
|
841
|
+
};
|
842
|
+
if (includeInstance) {
|
843
|
+
obj.$jspbMessageInstance = msg;
|
844
|
+
}
|
845
|
+
return obj;
|
846
|
+
};
|
847
|
+
}
|
848
|
+
/**
|
849
|
+
* Deserializes binary data (in protobuf wire format).
|
850
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
851
|
+
* @return {!proto.protocol.PingMessage}
|
852
|
+
*/
|
853
|
+
proto.protocol.PingMessage.deserializeBinary = function (bytes) {
|
854
|
+
var reader = new jspb.BinaryReader(bytes);
|
855
|
+
var msg = new proto.protocol.PingMessage;
|
856
|
+
return proto.protocol.PingMessage.deserializeBinaryFromReader(msg, reader);
|
857
|
+
};
|
858
|
+
/**
|
859
|
+
* Deserializes binary data (in protobuf wire format) from the
|
860
|
+
* given reader into the given message object.
|
861
|
+
* @param {!proto.protocol.PingMessage} msg The message object to deserialize into.
|
862
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
863
|
+
* @return {!proto.protocol.PingMessage}
|
864
|
+
*/
|
865
|
+
proto.protocol.PingMessage.deserializeBinaryFromReader = function (msg, reader) {
|
866
|
+
while (reader.nextField()) {
|
867
|
+
if (reader.isEndGroup()) {
|
868
|
+
break;
|
869
|
+
}
|
870
|
+
var field = reader.getFieldNumber();
|
871
|
+
switch (field) {
|
872
|
+
case 1:
|
873
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
874
|
+
msg.setType(value);
|
875
|
+
break;
|
876
|
+
case 2:
|
877
|
+
var value = /** @type {number} */ (reader.readDouble());
|
878
|
+
msg.setTime(value);
|
879
|
+
break;
|
880
|
+
default:
|
881
|
+
reader.skipField();
|
882
|
+
break;
|
883
|
+
}
|
884
|
+
}
|
885
|
+
return msg;
|
886
|
+
};
|
887
|
+
/**
|
888
|
+
* Serializes the message to binary data (in protobuf wire format).
|
889
|
+
* @return {!Uint8Array}
|
890
|
+
*/
|
891
|
+
proto.protocol.PingMessage.prototype.serializeBinary = function () {
|
892
|
+
var writer = new jspb.BinaryWriter();
|
893
|
+
proto.protocol.PingMessage.serializeBinaryToWriter(this, writer);
|
894
|
+
return writer.getResultBuffer();
|
895
|
+
};
|
896
|
+
/**
|
897
|
+
* Serializes the given message to binary data (in protobuf wire
|
898
|
+
* format), writing to the given BinaryWriter.
|
899
|
+
* @param {!proto.protocol.PingMessage} message
|
900
|
+
* @param {!jspb.BinaryWriter} writer
|
901
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
902
|
+
*/
|
903
|
+
proto.protocol.PingMessage.serializeBinaryToWriter = function (message, writer) {
|
904
|
+
var f = undefined;
|
905
|
+
f = message.getType();
|
906
|
+
if (f !== 0.0) {
|
907
|
+
writer.writeEnum(1, f);
|
908
|
+
}
|
909
|
+
f = message.getTime();
|
910
|
+
if (f !== 0.0) {
|
911
|
+
writer.writeDouble(2, f);
|
912
|
+
}
|
913
|
+
};
|
914
|
+
/**
|
915
|
+
* optional MessageType type = 1;
|
916
|
+
* @return {!proto.protocol.MessageType}
|
917
|
+
*/
|
918
|
+
proto.protocol.PingMessage.prototype.getType = function () {
|
919
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
920
|
+
};
|
921
|
+
/** @param {!proto.protocol.MessageType} value */
|
922
|
+
proto.protocol.PingMessage.prototype.setType = function (value) {
|
923
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
924
|
+
};
|
925
|
+
/**
|
926
|
+
* optional double time = 2;
|
927
|
+
* @return {number}
|
928
|
+
*/
|
929
|
+
proto.protocol.PingMessage.prototype.getTime = function () {
|
930
|
+
return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0));
|
931
|
+
};
|
932
|
+
/** @param {number} value */
|
933
|
+
proto.protocol.PingMessage.prototype.setTime = function (value) {
|
934
|
+
jspb.Message.setProto3FloatField(this, 2, value);
|
935
|
+
};
|
936
|
+
/**
|
937
|
+
* Generated by JsPbCodeGenerator.
|
938
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
939
|
+
* server response, or constructed directly in Javascript. The array is used
|
940
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
941
|
+
* If no data is provided, the constructed object will be empty, but still
|
942
|
+
* valid.
|
943
|
+
* @extends {jspb.Message}
|
944
|
+
* @constructor
|
945
|
+
*/
|
946
|
+
proto.protocol.SubscriptionMessage = function (opt_data) {
|
947
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
948
|
+
};
|
949
|
+
goog.inherits(proto.protocol.SubscriptionMessage, jspb.Message);
|
950
|
+
if (goog.DEBUG && !COMPILED) {
|
951
|
+
proto.protocol.SubscriptionMessage.displayName = 'proto.protocol.SubscriptionMessage';
|
952
|
+
}
|
953
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
954
|
+
/**
|
955
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
956
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
957
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
958
|
+
* For the list of reserved names please see:
|
959
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
960
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
961
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
962
|
+
* @return {!Object}
|
963
|
+
*/
|
964
|
+
proto.protocol.SubscriptionMessage.prototype.toObject = function (opt_includeInstance) {
|
965
|
+
return proto.protocol.SubscriptionMessage.toObject(opt_includeInstance, this);
|
966
|
+
};
|
967
|
+
/**
|
968
|
+
* Static version of the {@see toObject} method.
|
969
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
970
|
+
* instance for transitional soy proto support:
|
971
|
+
* http://goto/soy-param-migration
|
972
|
+
* @param {!proto.protocol.SubscriptionMessage} msg The msg instance to transform.
|
973
|
+
* @return {!Object}
|
974
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
975
|
+
*/
|
976
|
+
proto.protocol.SubscriptionMessage.toObject = function (includeInstance, msg) {
|
977
|
+
var f, obj = {
|
978
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
979
|
+
format: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
980
|
+
topics: msg.getTopics_asB64()
|
981
|
+
};
|
982
|
+
if (includeInstance) {
|
983
|
+
obj.$jspbMessageInstance = msg;
|
984
|
+
}
|
985
|
+
return obj;
|
986
|
+
};
|
987
|
+
}
|
988
|
+
/**
|
989
|
+
* Deserializes binary data (in protobuf wire format).
|
990
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
991
|
+
* @return {!proto.protocol.SubscriptionMessage}
|
992
|
+
*/
|
993
|
+
proto.protocol.SubscriptionMessage.deserializeBinary = function (bytes) {
|
994
|
+
var reader = new jspb.BinaryReader(bytes);
|
995
|
+
var msg = new proto.protocol.SubscriptionMessage;
|
996
|
+
return proto.protocol.SubscriptionMessage.deserializeBinaryFromReader(msg, reader);
|
997
|
+
};
|
998
|
+
/**
|
999
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1000
|
+
* given reader into the given message object.
|
1001
|
+
* @param {!proto.protocol.SubscriptionMessage} msg The message object to deserialize into.
|
1002
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1003
|
+
* @return {!proto.protocol.SubscriptionMessage}
|
1004
|
+
*/
|
1005
|
+
proto.protocol.SubscriptionMessage.deserializeBinaryFromReader = function (msg, reader) {
|
1006
|
+
while (reader.nextField()) {
|
1007
|
+
if (reader.isEndGroup()) {
|
1008
|
+
break;
|
1009
|
+
}
|
1010
|
+
var field = reader.getFieldNumber();
|
1011
|
+
switch (field) {
|
1012
|
+
case 1:
|
1013
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
1014
|
+
msg.setType(value);
|
1015
|
+
break;
|
1016
|
+
case 2:
|
1017
|
+
var value = /** @type {!proto.protocol.Format} */ (reader.readEnum());
|
1018
|
+
msg.setFormat(value);
|
1019
|
+
break;
|
1020
|
+
case 3:
|
1021
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1022
|
+
msg.setTopics(value);
|
1023
|
+
break;
|
1024
|
+
default:
|
1025
|
+
reader.skipField();
|
1026
|
+
break;
|
1027
|
+
}
|
1028
|
+
}
|
1029
|
+
return msg;
|
1030
|
+
};
|
1031
|
+
/**
|
1032
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1033
|
+
* @return {!Uint8Array}
|
1034
|
+
*/
|
1035
|
+
proto.protocol.SubscriptionMessage.prototype.serializeBinary = function () {
|
1036
|
+
var writer = new jspb.BinaryWriter();
|
1037
|
+
proto.protocol.SubscriptionMessage.serializeBinaryToWriter(this, writer);
|
1038
|
+
return writer.getResultBuffer();
|
1039
|
+
};
|
1040
|
+
/**
|
1041
|
+
* Serializes the given message to binary data (in protobuf wire
|
1042
|
+
* format), writing to the given BinaryWriter.
|
1043
|
+
* @param {!proto.protocol.SubscriptionMessage} message
|
1044
|
+
* @param {!jspb.BinaryWriter} writer
|
1045
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1046
|
+
*/
|
1047
|
+
proto.protocol.SubscriptionMessage.serializeBinaryToWriter = function (message, writer) {
|
1048
|
+
var f = undefined;
|
1049
|
+
f = message.getType();
|
1050
|
+
if (f !== 0.0) {
|
1051
|
+
writer.writeEnum(1, f);
|
1052
|
+
}
|
1053
|
+
f = message.getFormat();
|
1054
|
+
if (f !== 0.0) {
|
1055
|
+
writer.writeEnum(2, f);
|
1056
|
+
}
|
1057
|
+
f = message.getTopics_asU8();
|
1058
|
+
if (f.length > 0) {
|
1059
|
+
writer.writeBytes(3, f);
|
1060
|
+
}
|
1061
|
+
};
|
1062
|
+
/**
|
1063
|
+
* optional MessageType type = 1;
|
1064
|
+
* @return {!proto.protocol.MessageType}
|
1065
|
+
*/
|
1066
|
+
proto.protocol.SubscriptionMessage.prototype.getType = function () {
|
1067
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1068
|
+
};
|
1069
|
+
/** @param {!proto.protocol.MessageType} value */
|
1070
|
+
proto.protocol.SubscriptionMessage.prototype.setType = function (value) {
|
1071
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
1072
|
+
};
|
1073
|
+
/**
|
1074
|
+
* optional Format format = 2;
|
1075
|
+
* @return {!proto.protocol.Format}
|
1076
|
+
*/
|
1077
|
+
proto.protocol.SubscriptionMessage.prototype.getFormat = function () {
|
1078
|
+
return /** @type {!proto.protocol.Format} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
1079
|
+
};
|
1080
|
+
/** @param {!proto.protocol.Format} value */
|
1081
|
+
proto.protocol.SubscriptionMessage.prototype.setFormat = function (value) {
|
1082
|
+
jspb.Message.setProto3EnumField(this, 2, value);
|
1083
|
+
};
|
1084
|
+
/**
|
1085
|
+
* optional bytes topics = 3;
|
1086
|
+
* @return {!(string|Uint8Array)}
|
1087
|
+
*/
|
1088
|
+
proto.protocol.SubscriptionMessage.prototype.getTopics = function () {
|
1089
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1090
|
+
};
|
1091
|
+
/**
|
1092
|
+
* optional bytes topics = 3;
|
1093
|
+
* This is a type-conversion wrapper around `getTopics()`
|
1094
|
+
* @return {string}
|
1095
|
+
*/
|
1096
|
+
proto.protocol.SubscriptionMessage.prototype.getTopics_asB64 = function () {
|
1097
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getTopics()));
|
1098
|
+
};
|
1099
|
+
/**
|
1100
|
+
* optional bytes topics = 3;
|
1101
|
+
* Note that Uint8Array is not supported on all browsers.
|
1102
|
+
* @see http://caniuse.com/Uint8Array
|
1103
|
+
* This is a type-conversion wrapper around `getTopics()`
|
1104
|
+
* @return {!Uint8Array}
|
1105
|
+
*/
|
1106
|
+
proto.protocol.SubscriptionMessage.prototype.getTopics_asU8 = function () {
|
1107
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getTopics()));
|
1108
|
+
};
|
1109
|
+
/** @param {!(string|Uint8Array)} value */
|
1110
|
+
proto.protocol.SubscriptionMessage.prototype.setTopics = function (value) {
|
1111
|
+
jspb.Message.setProto3BytesField(this, 3, value);
|
1112
|
+
};
|
1113
|
+
/**
|
1114
|
+
* Generated by JsPbCodeGenerator.
|
1115
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1116
|
+
* server response, or constructed directly in Javascript. The array is used
|
1117
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1118
|
+
* If no data is provided, the constructed object will be empty, but still
|
1119
|
+
* valid.
|
1120
|
+
* @extends {jspb.Message}
|
1121
|
+
* @constructor
|
1122
|
+
*/
|
1123
|
+
proto.protocol.AuthMessage = function (opt_data) {
|
1124
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1125
|
+
};
|
1126
|
+
goog.inherits(proto.protocol.AuthMessage, jspb.Message);
|
1127
|
+
if (goog.DEBUG && !COMPILED) {
|
1128
|
+
proto.protocol.AuthMessage.displayName = 'proto.protocol.AuthMessage';
|
1129
|
+
}
|
1130
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1131
|
+
/**
|
1132
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
1133
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1134
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1135
|
+
* For the list of reserved names please see:
|
1136
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
1137
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
1138
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
1139
|
+
* @return {!Object}
|
1140
|
+
*/
|
1141
|
+
proto.protocol.AuthMessage.prototype.toObject = function (opt_includeInstance) {
|
1142
|
+
return proto.protocol.AuthMessage.toObject(opt_includeInstance, this);
|
1143
|
+
};
|
1144
|
+
/**
|
1145
|
+
* Static version of the {@see toObject} method.
|
1146
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
1147
|
+
* instance for transitional soy proto support:
|
1148
|
+
* http://goto/soy-param-migration
|
1149
|
+
* @param {!proto.protocol.AuthMessage} msg The msg instance to transform.
|
1150
|
+
* @return {!Object}
|
1151
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1152
|
+
*/
|
1153
|
+
proto.protocol.AuthMessage.toObject = function (includeInstance, msg) {
|
1154
|
+
var f, obj = {
|
1155
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
1156
|
+
role: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
1157
|
+
body: msg.getBody_asB64()
|
1158
|
+
};
|
1159
|
+
if (includeInstance) {
|
1160
|
+
obj.$jspbMessageInstance = msg;
|
1161
|
+
}
|
1162
|
+
return obj;
|
1163
|
+
};
|
1164
|
+
}
|
1165
|
+
/**
|
1166
|
+
* Deserializes binary data (in protobuf wire format).
|
1167
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1168
|
+
* @return {!proto.protocol.AuthMessage}
|
1169
|
+
*/
|
1170
|
+
proto.protocol.AuthMessage.deserializeBinary = function (bytes) {
|
1171
|
+
var reader = new jspb.BinaryReader(bytes);
|
1172
|
+
var msg = new proto.protocol.AuthMessage;
|
1173
|
+
return proto.protocol.AuthMessage.deserializeBinaryFromReader(msg, reader);
|
1174
|
+
};
|
1175
|
+
/**
|
1176
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1177
|
+
* given reader into the given message object.
|
1178
|
+
* @param {!proto.protocol.AuthMessage} msg The message object to deserialize into.
|
1179
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1180
|
+
* @return {!proto.protocol.AuthMessage}
|
1181
|
+
*/
|
1182
|
+
proto.protocol.AuthMessage.deserializeBinaryFromReader = function (msg, reader) {
|
1183
|
+
while (reader.nextField()) {
|
1184
|
+
if (reader.isEndGroup()) {
|
1185
|
+
break;
|
1186
|
+
}
|
1187
|
+
var field = reader.getFieldNumber();
|
1188
|
+
switch (field) {
|
1189
|
+
case 1:
|
1190
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
1191
|
+
msg.setType(value);
|
1192
|
+
break;
|
1193
|
+
case 2:
|
1194
|
+
var value = /** @type {!proto.protocol.Role} */ (reader.readEnum());
|
1195
|
+
msg.setRole(value);
|
1196
|
+
break;
|
1197
|
+
case 3:
|
1198
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1199
|
+
msg.setBody(value);
|
1200
|
+
break;
|
1201
|
+
default:
|
1202
|
+
reader.skipField();
|
1203
|
+
break;
|
1204
|
+
}
|
1205
|
+
}
|
1206
|
+
return msg;
|
1207
|
+
};
|
1208
|
+
/**
|
1209
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1210
|
+
* @return {!Uint8Array}
|
1211
|
+
*/
|
1212
|
+
proto.protocol.AuthMessage.prototype.serializeBinary = function () {
|
1213
|
+
var writer = new jspb.BinaryWriter();
|
1214
|
+
proto.protocol.AuthMessage.serializeBinaryToWriter(this, writer);
|
1215
|
+
return writer.getResultBuffer();
|
1216
|
+
};
|
1217
|
+
/**
|
1218
|
+
* Serializes the given message to binary data (in protobuf wire
|
1219
|
+
* format), writing to the given BinaryWriter.
|
1220
|
+
* @param {!proto.protocol.AuthMessage} message
|
1221
|
+
* @param {!jspb.BinaryWriter} writer
|
1222
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1223
|
+
*/
|
1224
|
+
proto.protocol.AuthMessage.serializeBinaryToWriter = function (message, writer) {
|
1225
|
+
var f = undefined;
|
1226
|
+
f = message.getType();
|
1227
|
+
if (f !== 0.0) {
|
1228
|
+
writer.writeEnum(1, f);
|
1229
|
+
}
|
1230
|
+
f = message.getRole();
|
1231
|
+
if (f !== 0.0) {
|
1232
|
+
writer.writeEnum(2, f);
|
1233
|
+
}
|
1234
|
+
f = message.getBody_asU8();
|
1235
|
+
if (f.length > 0) {
|
1236
|
+
writer.writeBytes(3, f);
|
1237
|
+
}
|
1238
|
+
};
|
1239
|
+
/**
|
1240
|
+
* optional MessageType type = 1;
|
1241
|
+
* @return {!proto.protocol.MessageType}
|
1242
|
+
*/
|
1243
|
+
proto.protocol.AuthMessage.prototype.getType = function () {
|
1244
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1245
|
+
};
|
1246
|
+
/** @param {!proto.protocol.MessageType} value */
|
1247
|
+
proto.protocol.AuthMessage.prototype.setType = function (value) {
|
1248
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
1249
|
+
};
|
1250
|
+
/**
|
1251
|
+
* optional Role role = 2;
|
1252
|
+
* @return {!proto.protocol.Role}
|
1253
|
+
*/
|
1254
|
+
proto.protocol.AuthMessage.prototype.getRole = function () {
|
1255
|
+
return /** @type {!proto.protocol.Role} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
1256
|
+
};
|
1257
|
+
/** @param {!proto.protocol.Role} value */
|
1258
|
+
proto.protocol.AuthMessage.prototype.setRole = function (value) {
|
1259
|
+
jspb.Message.setProto3EnumField(this, 2, value);
|
1260
|
+
};
|
1261
|
+
/**
|
1262
|
+
* optional bytes body = 3;
|
1263
|
+
* @return {!(string|Uint8Array)}
|
1264
|
+
*/
|
1265
|
+
proto.protocol.AuthMessage.prototype.getBody = function () {
|
1266
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1267
|
+
};
|
1268
|
+
/**
|
1269
|
+
* optional bytes body = 3;
|
1270
|
+
* This is a type-conversion wrapper around `getBody()`
|
1271
|
+
* @return {string}
|
1272
|
+
*/
|
1273
|
+
proto.protocol.AuthMessage.prototype.getBody_asB64 = function () {
|
1274
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBody()));
|
1275
|
+
};
|
1276
|
+
/**
|
1277
|
+
* optional bytes body = 3;
|
1278
|
+
* Note that Uint8Array is not supported on all browsers.
|
1279
|
+
* @see http://caniuse.com/Uint8Array
|
1280
|
+
* This is a type-conversion wrapper around `getBody()`
|
1281
|
+
* @return {!Uint8Array}
|
1282
|
+
*/
|
1283
|
+
proto.protocol.AuthMessage.prototype.getBody_asU8 = function () {
|
1284
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBody()));
|
1285
|
+
};
|
1286
|
+
/** @param {!(string|Uint8Array)} value */
|
1287
|
+
proto.protocol.AuthMessage.prototype.setBody = function (value) {
|
1288
|
+
jspb.Message.setProto3BytesField(this, 3, value);
|
1289
|
+
};
|
1290
|
+
/**
|
1291
|
+
* Generated by JsPbCodeGenerator.
|
1292
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1293
|
+
* server response, or constructed directly in Javascript. The array is used
|
1294
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1295
|
+
* If no data is provided, the constructed object will be empty, but still
|
1296
|
+
* valid.
|
1297
|
+
* @extends {jspb.Message}
|
1298
|
+
* @constructor
|
1299
|
+
*/
|
1300
|
+
proto.protocol.TopicMessage = function (opt_data) {
|
1301
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1302
|
+
};
|
1303
|
+
goog.inherits(proto.protocol.TopicMessage, jspb.Message);
|
1304
|
+
if (goog.DEBUG && !COMPILED) {
|
1305
|
+
proto.protocol.TopicMessage.displayName = 'proto.protocol.TopicMessage';
|
1306
|
+
}
|
1307
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1308
|
+
/**
|
1309
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
1310
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1311
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1312
|
+
* For the list of reserved names please see:
|
1313
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
1314
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
1315
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
1316
|
+
* @return {!Object}
|
1317
|
+
*/
|
1318
|
+
proto.protocol.TopicMessage.prototype.toObject = function (opt_includeInstance) {
|
1319
|
+
return proto.protocol.TopicMessage.toObject(opt_includeInstance, this);
|
1320
|
+
};
|
1321
|
+
/**
|
1322
|
+
* Static version of the {@see toObject} method.
|
1323
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
1324
|
+
* instance for transitional soy proto support:
|
1325
|
+
* http://goto/soy-param-migration
|
1326
|
+
* @param {!proto.protocol.TopicMessage} msg The msg instance to transform.
|
1327
|
+
* @return {!Object}
|
1328
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1329
|
+
*/
|
1330
|
+
proto.protocol.TopicMessage.toObject = function (includeInstance, msg) {
|
1331
|
+
var f, obj = {
|
1332
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
1333
|
+
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
1334
|
+
topic: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
1335
|
+
body: msg.getBody_asB64()
|
1336
|
+
};
|
1337
|
+
if (includeInstance) {
|
1338
|
+
obj.$jspbMessageInstance = msg;
|
1339
|
+
}
|
1340
|
+
return obj;
|
1341
|
+
};
|
1342
|
+
}
|
1343
|
+
/**
|
1344
|
+
* Deserializes binary data (in protobuf wire format).
|
1345
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1346
|
+
* @return {!proto.protocol.TopicMessage}
|
1347
|
+
*/
|
1348
|
+
proto.protocol.TopicMessage.deserializeBinary = function (bytes) {
|
1349
|
+
var reader = new jspb.BinaryReader(bytes);
|
1350
|
+
var msg = new proto.protocol.TopicMessage;
|
1351
|
+
return proto.protocol.TopicMessage.deserializeBinaryFromReader(msg, reader);
|
1352
|
+
};
|
1353
|
+
/**
|
1354
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1355
|
+
* given reader into the given message object.
|
1356
|
+
* @param {!proto.protocol.TopicMessage} msg The message object to deserialize into.
|
1357
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1358
|
+
* @return {!proto.protocol.TopicMessage}
|
1359
|
+
*/
|
1360
|
+
proto.protocol.TopicMessage.deserializeBinaryFromReader = function (msg, reader) {
|
1361
|
+
while (reader.nextField()) {
|
1362
|
+
if (reader.isEndGroup()) {
|
1363
|
+
break;
|
1364
|
+
}
|
1365
|
+
var field = reader.getFieldNumber();
|
1366
|
+
switch (field) {
|
1367
|
+
case 1:
|
1368
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
1369
|
+
msg.setType(value);
|
1370
|
+
break;
|
1371
|
+
case 2:
|
1372
|
+
var value = /** @type {number} */ (reader.readUint64());
|
1373
|
+
msg.setFromAlias(value);
|
1374
|
+
break;
|
1375
|
+
case 3:
|
1376
|
+
var value = /** @type {string} */ (reader.readString());
|
1377
|
+
msg.setTopic(value);
|
1378
|
+
break;
|
1379
|
+
case 4:
|
1380
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1381
|
+
msg.setBody(value);
|
1382
|
+
break;
|
1383
|
+
default:
|
1384
|
+
reader.skipField();
|
1385
|
+
break;
|
1386
|
+
}
|
1387
|
+
}
|
1388
|
+
return msg;
|
1389
|
+
};
|
1390
|
+
/**
|
1391
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1392
|
+
* @return {!Uint8Array}
|
1393
|
+
*/
|
1394
|
+
proto.protocol.TopicMessage.prototype.serializeBinary = function () {
|
1395
|
+
var writer = new jspb.BinaryWriter();
|
1396
|
+
proto.protocol.TopicMessage.serializeBinaryToWriter(this, writer);
|
1397
|
+
return writer.getResultBuffer();
|
1398
|
+
};
|
1399
|
+
/**
|
1400
|
+
* Serializes the given message to binary data (in protobuf wire
|
1401
|
+
* format), writing to the given BinaryWriter.
|
1402
|
+
* @param {!proto.protocol.TopicMessage} message
|
1403
|
+
* @param {!jspb.BinaryWriter} writer
|
1404
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1405
|
+
*/
|
1406
|
+
proto.protocol.TopicMessage.serializeBinaryToWriter = function (message, writer) {
|
1407
|
+
var f = undefined;
|
1408
|
+
f = message.getType();
|
1409
|
+
if (f !== 0.0) {
|
1410
|
+
writer.writeEnum(1, f);
|
1411
|
+
}
|
1412
|
+
f = message.getFromAlias();
|
1413
|
+
if (f !== 0) {
|
1414
|
+
writer.writeUint64(2, f);
|
1415
|
+
}
|
1416
|
+
f = message.getTopic();
|
1417
|
+
if (f.length > 0) {
|
1418
|
+
writer.writeString(3, f);
|
1419
|
+
}
|
1420
|
+
f = message.getBody_asU8();
|
1421
|
+
if (f.length > 0) {
|
1422
|
+
writer.writeBytes(4, f);
|
1423
|
+
}
|
1424
|
+
};
|
1425
|
+
/**
|
1426
|
+
* optional MessageType type = 1;
|
1427
|
+
* @return {!proto.protocol.MessageType}
|
1428
|
+
*/
|
1429
|
+
proto.protocol.TopicMessage.prototype.getType = function () {
|
1430
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1431
|
+
};
|
1432
|
+
/** @param {!proto.protocol.MessageType} value */
|
1433
|
+
proto.protocol.TopicMessage.prototype.setType = function (value) {
|
1434
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
1435
|
+
};
|
1436
|
+
/**
|
1437
|
+
* optional uint64 from_alias = 2;
|
1438
|
+
* @return {number}
|
1439
|
+
*/
|
1440
|
+
proto.protocol.TopicMessage.prototype.getFromAlias = function () {
|
1441
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
1442
|
+
};
|
1443
|
+
/** @param {number} value */
|
1444
|
+
proto.protocol.TopicMessage.prototype.setFromAlias = function (value) {
|
1445
|
+
jspb.Message.setProto3IntField(this, 2, value);
|
1446
|
+
};
|
1447
|
+
/**
|
1448
|
+
* optional string topic = 3;
|
1449
|
+
* @return {string}
|
1450
|
+
*/
|
1451
|
+
proto.protocol.TopicMessage.prototype.getTopic = function () {
|
1452
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1453
|
+
};
|
1454
|
+
/** @param {string} value */
|
1455
|
+
proto.protocol.TopicMessage.prototype.setTopic = function (value) {
|
1456
|
+
jspb.Message.setProto3StringField(this, 3, value);
|
1457
|
+
};
|
1458
|
+
/**
|
1459
|
+
* optional bytes body = 4;
|
1460
|
+
* @return {!(string|Uint8Array)}
|
1461
|
+
*/
|
1462
|
+
proto.protocol.TopicMessage.prototype.getBody = function () {
|
1463
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
1464
|
+
};
|
1465
|
+
/**
|
1466
|
+
* optional bytes body = 4;
|
1467
|
+
* This is a type-conversion wrapper around `getBody()`
|
1468
|
+
* @return {string}
|
1469
|
+
*/
|
1470
|
+
proto.protocol.TopicMessage.prototype.getBody_asB64 = function () {
|
1471
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBody()));
|
1472
|
+
};
|
1473
|
+
/**
|
1474
|
+
* optional bytes body = 4;
|
1475
|
+
* Note that Uint8Array is not supported on all browsers.
|
1476
|
+
* @see http://caniuse.com/Uint8Array
|
1477
|
+
* This is a type-conversion wrapper around `getBody()`
|
1478
|
+
* @return {!Uint8Array}
|
1479
|
+
*/
|
1480
|
+
proto.protocol.TopicMessage.prototype.getBody_asU8 = function () {
|
1481
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBody()));
|
1482
|
+
};
|
1483
|
+
/** @param {!(string|Uint8Array)} value */
|
1484
|
+
proto.protocol.TopicMessage.prototype.setBody = function (value) {
|
1485
|
+
jspb.Message.setProto3BytesField(this, 4, value);
|
1486
|
+
};
|
1487
|
+
/**
|
1488
|
+
* Generated by JsPbCodeGenerator.
|
1489
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1490
|
+
* server response, or constructed directly in Javascript. The array is used
|
1491
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1492
|
+
* If no data is provided, the constructed object will be empty, but still
|
1493
|
+
* valid.
|
1494
|
+
* @extends {jspb.Message}
|
1495
|
+
* @constructor
|
1496
|
+
*/
|
1497
|
+
proto.protocol.TopicFWMessage = function (opt_data) {
|
1498
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1499
|
+
};
|
1500
|
+
goog.inherits(proto.protocol.TopicFWMessage, jspb.Message);
|
1501
|
+
if (goog.DEBUG && !COMPILED) {
|
1502
|
+
proto.protocol.TopicFWMessage.displayName = 'proto.protocol.TopicFWMessage';
|
1503
|
+
}
|
1504
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1505
|
+
/**
|
1506
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
1507
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1508
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1509
|
+
* For the list of reserved names please see:
|
1510
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
1511
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
1512
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
1513
|
+
* @return {!Object}
|
1514
|
+
*/
|
1515
|
+
proto.protocol.TopicFWMessage.prototype.toObject = function (opt_includeInstance) {
|
1516
|
+
return proto.protocol.TopicFWMessage.toObject(opt_includeInstance, this);
|
1517
|
+
};
|
1518
|
+
/**
|
1519
|
+
* Static version of the {@see toObject} method.
|
1520
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
1521
|
+
* instance for transitional soy proto support:
|
1522
|
+
* http://goto/soy-param-migration
|
1523
|
+
* @param {!proto.protocol.TopicFWMessage} msg The msg instance to transform.
|
1524
|
+
* @return {!Object}
|
1525
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1526
|
+
*/
|
1527
|
+
proto.protocol.TopicFWMessage.toObject = function (includeInstance, msg) {
|
1528
|
+
var f, obj = {
|
1529
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
1530
|
+
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
1531
|
+
body: msg.getBody_asB64()
|
1532
|
+
};
|
1533
|
+
if (includeInstance) {
|
1534
|
+
obj.$jspbMessageInstance = msg;
|
1535
|
+
}
|
1536
|
+
return obj;
|
1537
|
+
};
|
1538
|
+
}
|
1539
|
+
/**
|
1540
|
+
* Deserializes binary data (in protobuf wire format).
|
1541
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1542
|
+
* @return {!proto.protocol.TopicFWMessage}
|
1543
|
+
*/
|
1544
|
+
proto.protocol.TopicFWMessage.deserializeBinary = function (bytes) {
|
1545
|
+
var reader = new jspb.BinaryReader(bytes);
|
1546
|
+
var msg = new proto.protocol.TopicFWMessage;
|
1547
|
+
return proto.protocol.TopicFWMessage.deserializeBinaryFromReader(msg, reader);
|
1548
|
+
};
|
1549
|
+
/**
|
1550
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1551
|
+
* given reader into the given message object.
|
1552
|
+
* @param {!proto.protocol.TopicFWMessage} msg The message object to deserialize into.
|
1553
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1554
|
+
* @return {!proto.protocol.TopicFWMessage}
|
1555
|
+
*/
|
1556
|
+
proto.protocol.TopicFWMessage.deserializeBinaryFromReader = function (msg, reader) {
|
1557
|
+
while (reader.nextField()) {
|
1558
|
+
if (reader.isEndGroup()) {
|
1559
|
+
break;
|
1560
|
+
}
|
1561
|
+
var field = reader.getFieldNumber();
|
1562
|
+
switch (field) {
|
1563
|
+
case 1:
|
1564
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
1565
|
+
msg.setType(value);
|
1566
|
+
break;
|
1567
|
+
case 2:
|
1568
|
+
var value = /** @type {number} */ (reader.readUint64());
|
1569
|
+
msg.setFromAlias(value);
|
1570
|
+
break;
|
1571
|
+
case 3:
|
1572
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1573
|
+
msg.setBody(value);
|
1574
|
+
break;
|
1575
|
+
default:
|
1576
|
+
reader.skipField();
|
1577
|
+
break;
|
1578
|
+
}
|
1579
|
+
}
|
1580
|
+
return msg;
|
1581
|
+
};
|
1582
|
+
/**
|
1583
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1584
|
+
* @return {!Uint8Array}
|
1585
|
+
*/
|
1586
|
+
proto.protocol.TopicFWMessage.prototype.serializeBinary = function () {
|
1587
|
+
var writer = new jspb.BinaryWriter();
|
1588
|
+
proto.protocol.TopicFWMessage.serializeBinaryToWriter(this, writer);
|
1589
|
+
return writer.getResultBuffer();
|
1590
|
+
};
|
1591
|
+
/**
|
1592
|
+
* Serializes the given message to binary data (in protobuf wire
|
1593
|
+
* format), writing to the given BinaryWriter.
|
1594
|
+
* @param {!proto.protocol.TopicFWMessage} message
|
1595
|
+
* @param {!jspb.BinaryWriter} writer
|
1596
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1597
|
+
*/
|
1598
|
+
proto.protocol.TopicFWMessage.serializeBinaryToWriter = function (message, writer) {
|
1599
|
+
var f = undefined;
|
1600
|
+
f = message.getType();
|
1601
|
+
if (f !== 0.0) {
|
1602
|
+
writer.writeEnum(1, f);
|
1603
|
+
}
|
1604
|
+
f = message.getFromAlias();
|
1605
|
+
if (f !== 0) {
|
1606
|
+
writer.writeUint64(2, f);
|
1607
|
+
}
|
1608
|
+
f = message.getBody_asU8();
|
1609
|
+
if (f.length > 0) {
|
1610
|
+
writer.writeBytes(3, f);
|
1611
|
+
}
|
1612
|
+
};
|
1613
|
+
/**
|
1614
|
+
* optional MessageType type = 1;
|
1615
|
+
* @return {!proto.protocol.MessageType}
|
1616
|
+
*/
|
1617
|
+
proto.protocol.TopicFWMessage.prototype.getType = function () {
|
1618
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1619
|
+
};
|
1620
|
+
/** @param {!proto.protocol.MessageType} value */
|
1621
|
+
proto.protocol.TopicFWMessage.prototype.setType = function (value) {
|
1622
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
1623
|
+
};
|
1624
|
+
/**
|
1625
|
+
* optional uint64 from_alias = 2;
|
1626
|
+
* @return {number}
|
1627
|
+
*/
|
1628
|
+
proto.protocol.TopicFWMessage.prototype.getFromAlias = function () {
|
1629
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
1630
|
+
};
|
1631
|
+
/** @param {number} value */
|
1632
|
+
proto.protocol.TopicFWMessage.prototype.setFromAlias = function (value) {
|
1633
|
+
jspb.Message.setProto3IntField(this, 2, value);
|
1634
|
+
};
|
1635
|
+
/**
|
1636
|
+
* optional bytes body = 3;
|
1637
|
+
* @return {!(string|Uint8Array)}
|
1638
|
+
*/
|
1639
|
+
proto.protocol.TopicFWMessage.prototype.getBody = function () {
|
1640
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1641
|
+
};
|
1642
|
+
/**
|
1643
|
+
* optional bytes body = 3;
|
1644
|
+
* This is a type-conversion wrapper around `getBody()`
|
1645
|
+
* @return {string}
|
1646
|
+
*/
|
1647
|
+
proto.protocol.TopicFWMessage.prototype.getBody_asB64 = function () {
|
1648
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBody()));
|
1649
|
+
};
|
1650
|
+
/**
|
1651
|
+
* optional bytes body = 3;
|
1652
|
+
* Note that Uint8Array is not supported on all browsers.
|
1653
|
+
* @see http://caniuse.com/Uint8Array
|
1654
|
+
* This is a type-conversion wrapper around `getBody()`
|
1655
|
+
* @return {!Uint8Array}
|
1656
|
+
*/
|
1657
|
+
proto.protocol.TopicFWMessage.prototype.getBody_asU8 = function () {
|
1658
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBody()));
|
1659
|
+
};
|
1660
|
+
/** @param {!(string|Uint8Array)} value */
|
1661
|
+
proto.protocol.TopicFWMessage.prototype.setBody = function (value) {
|
1662
|
+
jspb.Message.setProto3BytesField(this, 3, value);
|
1663
|
+
};
|
1664
|
+
/**
|
1665
|
+
* Generated by JsPbCodeGenerator.
|
1666
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1667
|
+
* server response, or constructed directly in Javascript. The array is used
|
1668
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1669
|
+
* If no data is provided, the constructed object will be empty, but still
|
1670
|
+
* valid.
|
1671
|
+
* @extends {jspb.Message}
|
1672
|
+
* @constructor
|
1673
|
+
*/
|
1674
|
+
proto.protocol.TopicIdentityMessage = function (opt_data) {
|
1675
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1676
|
+
};
|
1677
|
+
goog.inherits(proto.protocol.TopicIdentityMessage, jspb.Message);
|
1678
|
+
if (goog.DEBUG && !COMPILED) {
|
1679
|
+
proto.protocol.TopicIdentityMessage.displayName = 'proto.protocol.TopicIdentityMessage';
|
1680
|
+
}
|
1681
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1682
|
+
/**
|
1683
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
1684
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1685
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1686
|
+
* For the list of reserved names please see:
|
1687
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
1688
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
1689
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
1690
|
+
* @return {!Object}
|
1691
|
+
*/
|
1692
|
+
proto.protocol.TopicIdentityMessage.prototype.toObject = function (opt_includeInstance) {
|
1693
|
+
return proto.protocol.TopicIdentityMessage.toObject(opt_includeInstance, this);
|
1694
|
+
};
|
1695
|
+
/**
|
1696
|
+
* Static version of the {@see toObject} method.
|
1697
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
1698
|
+
* instance for transitional soy proto support:
|
1699
|
+
* http://goto/soy-param-migration
|
1700
|
+
* @param {!proto.protocol.TopicIdentityMessage} msg The msg instance to transform.
|
1701
|
+
* @return {!Object}
|
1702
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1703
|
+
*/
|
1704
|
+
proto.protocol.TopicIdentityMessage.toObject = function (includeInstance, msg) {
|
1705
|
+
var f, obj = {
|
1706
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
1707
|
+
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
1708
|
+
topic: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
1709
|
+
identity: msg.getIdentity_asB64(),
|
1710
|
+
role: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
1711
|
+
body: msg.getBody_asB64()
|
1712
|
+
};
|
1713
|
+
if (includeInstance) {
|
1714
|
+
obj.$jspbMessageInstance = msg;
|
1715
|
+
}
|
1716
|
+
return obj;
|
1717
|
+
};
|
1718
|
+
}
|
1719
|
+
/**
|
1720
|
+
* Deserializes binary data (in protobuf wire format).
|
1721
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1722
|
+
* @return {!proto.protocol.TopicIdentityMessage}
|
1723
|
+
*/
|
1724
|
+
proto.protocol.TopicIdentityMessage.deserializeBinary = function (bytes) {
|
1725
|
+
var reader = new jspb.BinaryReader(bytes);
|
1726
|
+
var msg = new proto.protocol.TopicIdentityMessage;
|
1727
|
+
return proto.protocol.TopicIdentityMessage.deserializeBinaryFromReader(msg, reader);
|
1728
|
+
};
|
1729
|
+
/**
|
1730
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1731
|
+
* given reader into the given message object.
|
1732
|
+
* @param {!proto.protocol.TopicIdentityMessage} msg The message object to deserialize into.
|
1733
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1734
|
+
* @return {!proto.protocol.TopicIdentityMessage}
|
1735
|
+
*/
|
1736
|
+
proto.protocol.TopicIdentityMessage.deserializeBinaryFromReader = function (msg, reader) {
|
1737
|
+
while (reader.nextField()) {
|
1738
|
+
if (reader.isEndGroup()) {
|
1739
|
+
break;
|
1740
|
+
}
|
1741
|
+
var field = reader.getFieldNumber();
|
1742
|
+
switch (field) {
|
1743
|
+
case 1:
|
1744
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
1745
|
+
msg.setType(value);
|
1746
|
+
break;
|
1747
|
+
case 2:
|
1748
|
+
var value = /** @type {number} */ (reader.readUint64());
|
1749
|
+
msg.setFromAlias(value);
|
1750
|
+
break;
|
1751
|
+
case 3:
|
1752
|
+
var value = /** @type {string} */ (reader.readString());
|
1753
|
+
msg.setTopic(value);
|
1754
|
+
break;
|
1755
|
+
case 4:
|
1756
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1757
|
+
msg.setIdentity(value);
|
1758
|
+
break;
|
1759
|
+
case 5:
|
1760
|
+
var value = /** @type {!proto.protocol.Role} */ (reader.readEnum());
|
1761
|
+
msg.setRole(value);
|
1762
|
+
break;
|
1763
|
+
case 6:
|
1764
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
1765
|
+
msg.setBody(value);
|
1766
|
+
break;
|
1767
|
+
default:
|
1768
|
+
reader.skipField();
|
1769
|
+
break;
|
1770
|
+
}
|
1771
|
+
}
|
1772
|
+
return msg;
|
1773
|
+
};
|
1774
|
+
/**
|
1775
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1776
|
+
* @return {!Uint8Array}
|
1777
|
+
*/
|
1778
|
+
proto.protocol.TopicIdentityMessage.prototype.serializeBinary = function () {
|
1779
|
+
var writer = new jspb.BinaryWriter();
|
1780
|
+
proto.protocol.TopicIdentityMessage.serializeBinaryToWriter(this, writer);
|
1781
|
+
return writer.getResultBuffer();
|
1782
|
+
};
|
1783
|
+
/**
|
1784
|
+
* Serializes the given message to binary data (in protobuf wire
|
1785
|
+
* format), writing to the given BinaryWriter.
|
1786
|
+
* @param {!proto.protocol.TopicIdentityMessage} message
|
1787
|
+
* @param {!jspb.BinaryWriter} writer
|
1788
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1789
|
+
*/
|
1790
|
+
proto.protocol.TopicIdentityMessage.serializeBinaryToWriter = function (message, writer) {
|
1791
|
+
var f = undefined;
|
1792
|
+
f = message.getType();
|
1793
|
+
if (f !== 0.0) {
|
1794
|
+
writer.writeEnum(1, f);
|
1795
|
+
}
|
1796
|
+
f = message.getFromAlias();
|
1797
|
+
if (f !== 0) {
|
1798
|
+
writer.writeUint64(2, f);
|
1799
|
+
}
|
1800
|
+
f = message.getTopic();
|
1801
|
+
if (f.length > 0) {
|
1802
|
+
writer.writeString(3, f);
|
1803
|
+
}
|
1804
|
+
f = message.getIdentity_asU8();
|
1805
|
+
if (f.length > 0) {
|
1806
|
+
writer.writeBytes(4, f);
|
1807
|
+
}
|
1808
|
+
f = message.getRole();
|
1809
|
+
if (f !== 0.0) {
|
1810
|
+
writer.writeEnum(5, f);
|
1811
|
+
}
|
1812
|
+
f = message.getBody_asU8();
|
1813
|
+
if (f.length > 0) {
|
1814
|
+
writer.writeBytes(6, f);
|
1815
|
+
}
|
1816
|
+
};
|
1817
|
+
/**
|
1818
|
+
* optional MessageType type = 1;
|
1819
|
+
* @return {!proto.protocol.MessageType}
|
1820
|
+
*/
|
1821
|
+
proto.protocol.TopicIdentityMessage.prototype.getType = function () {
|
1822
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
1823
|
+
};
|
1824
|
+
/** @param {!proto.protocol.MessageType} value */
|
1825
|
+
proto.protocol.TopicIdentityMessage.prototype.setType = function (value) {
|
1826
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
1827
|
+
};
|
1828
|
+
/**
|
1829
|
+
* optional uint64 from_alias = 2;
|
1830
|
+
* @return {number}
|
1831
|
+
*/
|
1832
|
+
proto.protocol.TopicIdentityMessage.prototype.getFromAlias = function () {
|
1833
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
1834
|
+
};
|
1835
|
+
/** @param {number} value */
|
1836
|
+
proto.protocol.TopicIdentityMessage.prototype.setFromAlias = function (value) {
|
1837
|
+
jspb.Message.setProto3IntField(this, 2, value);
|
1838
|
+
};
|
1839
|
+
/**
|
1840
|
+
* optional string topic = 3;
|
1841
|
+
* @return {string}
|
1842
|
+
*/
|
1843
|
+
proto.protocol.TopicIdentityMessage.prototype.getTopic = function () {
|
1844
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1845
|
+
};
|
1846
|
+
/** @param {string} value */
|
1847
|
+
proto.protocol.TopicIdentityMessage.prototype.setTopic = function (value) {
|
1848
|
+
jspb.Message.setProto3StringField(this, 3, value);
|
1849
|
+
};
|
1850
|
+
/**
|
1851
|
+
* optional bytes identity = 4;
|
1852
|
+
* @return {!(string|Uint8Array)}
|
1853
|
+
*/
|
1854
|
+
proto.protocol.TopicIdentityMessage.prototype.getIdentity = function () {
|
1855
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
1856
|
+
};
|
1857
|
+
/**
|
1858
|
+
* optional bytes identity = 4;
|
1859
|
+
* This is a type-conversion wrapper around `getIdentity()`
|
1860
|
+
* @return {string}
|
1861
|
+
*/
|
1862
|
+
proto.protocol.TopicIdentityMessage.prototype.getIdentity_asB64 = function () {
|
1863
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getIdentity()));
|
1864
|
+
};
|
1865
|
+
/**
|
1866
|
+
* optional bytes identity = 4;
|
1867
|
+
* Note that Uint8Array is not supported on all browsers.
|
1868
|
+
* @see http://caniuse.com/Uint8Array
|
1869
|
+
* This is a type-conversion wrapper around `getIdentity()`
|
1870
|
+
* @return {!Uint8Array}
|
1871
|
+
*/
|
1872
|
+
proto.protocol.TopicIdentityMessage.prototype.getIdentity_asU8 = function () {
|
1873
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getIdentity()));
|
1874
|
+
};
|
1875
|
+
/** @param {!(string|Uint8Array)} value */
|
1876
|
+
proto.protocol.TopicIdentityMessage.prototype.setIdentity = function (value) {
|
1877
|
+
jspb.Message.setProto3BytesField(this, 4, value);
|
1878
|
+
};
|
1879
|
+
/**
|
1880
|
+
* optional Role role = 5;
|
1881
|
+
* @return {!proto.protocol.Role}
|
1882
|
+
*/
|
1883
|
+
proto.protocol.TopicIdentityMessage.prototype.getRole = function () {
|
1884
|
+
return /** @type {!proto.protocol.Role} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
1885
|
+
};
|
1886
|
+
/** @param {!proto.protocol.Role} value */
|
1887
|
+
proto.protocol.TopicIdentityMessage.prototype.setRole = function (value) {
|
1888
|
+
jspb.Message.setProto3EnumField(this, 5, value);
|
1889
|
+
};
|
1890
|
+
/**
|
1891
|
+
* optional bytes body = 6;
|
1892
|
+
* @return {!(string|Uint8Array)}
|
1893
|
+
*/
|
1894
|
+
proto.protocol.TopicIdentityMessage.prototype.getBody = function () {
|
1895
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
|
1896
|
+
};
|
1897
|
+
/**
|
1898
|
+
* optional bytes body = 6;
|
1899
|
+
* This is a type-conversion wrapper around `getBody()`
|
1900
|
+
* @return {string}
|
1901
|
+
*/
|
1902
|
+
proto.protocol.TopicIdentityMessage.prototype.getBody_asB64 = function () {
|
1903
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBody()));
|
1904
|
+
};
|
1905
|
+
/**
|
1906
|
+
* optional bytes body = 6;
|
1907
|
+
* Note that Uint8Array is not supported on all browsers.
|
1908
|
+
* @see http://caniuse.com/Uint8Array
|
1909
|
+
* This is a type-conversion wrapper around `getBody()`
|
1910
|
+
* @return {!Uint8Array}
|
1911
|
+
*/
|
1912
|
+
proto.protocol.TopicIdentityMessage.prototype.getBody_asU8 = function () {
|
1913
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBody()));
|
1914
|
+
};
|
1915
|
+
/** @param {!(string|Uint8Array)} value */
|
1916
|
+
proto.protocol.TopicIdentityMessage.prototype.setBody = function (value) {
|
1917
|
+
jspb.Message.setProto3BytesField(this, 6, value);
|
1918
|
+
};
|
1919
|
+
/**
|
1920
|
+
* Generated by JsPbCodeGenerator.
|
1921
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1922
|
+
* server response, or constructed directly in Javascript. The array is used
|
1923
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1924
|
+
* If no data is provided, the constructed object will be empty, but still
|
1925
|
+
* valid.
|
1926
|
+
* @extends {jspb.Message}
|
1927
|
+
* @constructor
|
1928
|
+
*/
|
1929
|
+
proto.protocol.TopicIdentityFWMessage = function (opt_data) {
|
1930
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1931
|
+
};
|
1932
|
+
goog.inherits(proto.protocol.TopicIdentityFWMessage, jspb.Message);
|
1933
|
+
if (goog.DEBUG && !COMPILED) {
|
1934
|
+
proto.protocol.TopicIdentityFWMessage.displayName = 'proto.protocol.TopicIdentityFWMessage';
|
1935
|
+
}
|
1936
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1937
|
+
/**
|
1938
|
+
* Creates an object representation of this proto suitable for use in Soy templates.
|
1939
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1940
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1941
|
+
* For the list of reserved names please see:
|
1942
|
+
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
1943
|
+
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
1944
|
+
* for transitional soy proto support: http://goto/soy-param-migration
|
1945
|
+
* @return {!Object}
|
1946
|
+
*/
|
1947
|
+
proto.protocol.TopicIdentityFWMessage.prototype.toObject = function (opt_includeInstance) {
|
1948
|
+
return proto.protocol.TopicIdentityFWMessage.toObject(opt_includeInstance, this);
|
1949
|
+
};
|
1950
|
+
/**
|
1951
|
+
* Static version of the {@see toObject} method.
|
1952
|
+
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
1953
|
+
* instance for transitional soy proto support:
|
1954
|
+
* http://goto/soy-param-migration
|
1955
|
+
* @param {!proto.protocol.TopicIdentityFWMessage} msg The msg instance to transform.
|
1956
|
+
* @return {!Object}
|
1957
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1958
|
+
*/
|
1959
|
+
proto.protocol.TopicIdentityFWMessage.toObject = function (includeInstance, msg) {
|
1960
|
+
var f, obj = {
|
1961
|
+
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
1962
|
+
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
1963
|
+
identity: msg.getIdentity_asB64(),
|
1964
|
+
role: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
1965
|
+
body: msg.getBody_asB64()
|
1966
|
+
};
|
1967
|
+
if (includeInstance) {
|
1968
|
+
obj.$jspbMessageInstance = msg;
|
1969
|
+
}
|
1970
|
+
return obj;
|
1971
|
+
};
|
1972
|
+
}
|
1973
|
+
/**
|
1974
|
+
* Deserializes binary data (in protobuf wire format).
|
1975
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1976
|
+
* @return {!proto.protocol.TopicIdentityFWMessage}
|
1977
|
+
*/
|
1978
|
+
proto.protocol.TopicIdentityFWMessage.deserializeBinary = function (bytes) {
|
1979
|
+
var reader = new jspb.BinaryReader(bytes);
|
1980
|
+
var msg = new proto.protocol.TopicIdentityFWMessage;
|
1981
|
+
return proto.protocol.TopicIdentityFWMessage.deserializeBinaryFromReader(msg, reader);
|
1982
|
+
};
|
1983
|
+
/**
|
1984
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1985
|
+
* given reader into the given message object.
|
1986
|
+
* @param {!proto.protocol.TopicIdentityFWMessage} msg The message object to deserialize into.
|
1987
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1988
|
+
* @return {!proto.protocol.TopicIdentityFWMessage}
|
1989
|
+
*/
|
1990
|
+
proto.protocol.TopicIdentityFWMessage.deserializeBinaryFromReader = function (msg, reader) {
|
1991
|
+
while (reader.nextField()) {
|
1992
|
+
if (reader.isEndGroup()) {
|
1993
|
+
break;
|
1994
|
+
}
|
1995
|
+
var field = reader.getFieldNumber();
|
1996
|
+
switch (field) {
|
1997
|
+
case 1:
|
1998
|
+
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
|
1999
|
+
msg.setType(value);
|
2000
|
+
break;
|
2001
|
+
case 2:
|
2002
|
+
var value = /** @type {number} */ (reader.readUint64());
|
2003
|
+
msg.setFromAlias(value);
|
2004
|
+
break;
|
2005
|
+
case 3:
|
2006
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
2007
|
+
msg.setIdentity(value);
|
2008
|
+
break;
|
2009
|
+
case 4:
|
2010
|
+
var value = /** @type {!proto.protocol.Role} */ (reader.readEnum());
|
2011
|
+
msg.setRole(value);
|
2012
|
+
break;
|
2013
|
+
case 5:
|
2014
|
+
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
2015
|
+
msg.setBody(value);
|
2016
|
+
break;
|
2017
|
+
default:
|
2018
|
+
reader.skipField();
|
2019
|
+
break;
|
2020
|
+
}
|
2021
|
+
}
|
2022
|
+
return msg;
|
2023
|
+
};
|
2024
|
+
/**
|
2025
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2026
|
+
* @return {!Uint8Array}
|
2027
|
+
*/
|
2028
|
+
proto.protocol.TopicIdentityFWMessage.prototype.serializeBinary = function () {
|
2029
|
+
var writer = new jspb.BinaryWriter();
|
2030
|
+
proto.protocol.TopicIdentityFWMessage.serializeBinaryToWriter(this, writer);
|
2031
|
+
return writer.getResultBuffer();
|
2032
|
+
};
|
2033
|
+
/**
|
2034
|
+
* Serializes the given message to binary data (in protobuf wire
|
2035
|
+
* format), writing to the given BinaryWriter.
|
2036
|
+
* @param {!proto.protocol.TopicIdentityFWMessage} message
|
2037
|
+
* @param {!jspb.BinaryWriter} writer
|
2038
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2039
|
+
*/
|
2040
|
+
proto.protocol.TopicIdentityFWMessage.serializeBinaryToWriter = function (message, writer) {
|
2041
|
+
var f = undefined;
|
2042
|
+
f = message.getType();
|
2043
|
+
if (f !== 0.0) {
|
2044
|
+
writer.writeEnum(1, f);
|
2045
|
+
}
|
2046
|
+
f = message.getFromAlias();
|
2047
|
+
if (f !== 0) {
|
2048
|
+
writer.writeUint64(2, f);
|
2049
|
+
}
|
2050
|
+
f = message.getIdentity_asU8();
|
2051
|
+
if (f.length > 0) {
|
2052
|
+
writer.writeBytes(3, f);
|
2053
|
+
}
|
2054
|
+
f = message.getRole();
|
2055
|
+
if (f !== 0.0) {
|
2056
|
+
writer.writeEnum(4, f);
|
2057
|
+
}
|
2058
|
+
f = message.getBody_asU8();
|
2059
|
+
if (f.length > 0) {
|
2060
|
+
writer.writeBytes(5, f);
|
2061
|
+
}
|
2062
|
+
};
|
2063
|
+
/**
|
2064
|
+
* optional MessageType type = 1;
|
2065
|
+
* @return {!proto.protocol.MessageType}
|
2066
|
+
*/
|
2067
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getType = function () {
|
2068
|
+
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
2069
|
+
};
|
2070
|
+
/** @param {!proto.protocol.MessageType} value */
|
2071
|
+
proto.protocol.TopicIdentityFWMessage.prototype.setType = function (value) {
|
2072
|
+
jspb.Message.setProto3EnumField(this, 1, value);
|
2073
|
+
};
|
2074
|
+
/**
|
2075
|
+
* optional uint64 from_alias = 2;
|
2076
|
+
* @return {number}
|
2077
|
+
*/
|
2078
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getFromAlias = function () {
|
2079
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
2080
|
+
};
|
2081
|
+
/** @param {number} value */
|
2082
|
+
proto.protocol.TopicIdentityFWMessage.prototype.setFromAlias = function (value) {
|
2083
|
+
jspb.Message.setProto3IntField(this, 2, value);
|
2084
|
+
};
|
2085
|
+
/**
|
2086
|
+
* optional bytes identity = 3;
|
2087
|
+
* @return {!(string|Uint8Array)}
|
2088
|
+
*/
|
2089
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getIdentity = function () {
|
2090
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
2091
|
+
};
|
2092
|
+
/**
|
2093
|
+
* optional bytes identity = 3;
|
2094
|
+
* This is a type-conversion wrapper around `getIdentity()`
|
2095
|
+
* @return {string}
|
2096
|
+
*/
|
2097
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getIdentity_asB64 = function () {
|
2098
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getIdentity()));
|
2099
|
+
};
|
2100
|
+
/**
|
2101
|
+
* optional bytes identity = 3;
|
2102
|
+
* Note that Uint8Array is not supported on all browsers.
|
2103
|
+
* @see http://caniuse.com/Uint8Array
|
2104
|
+
* This is a type-conversion wrapper around `getIdentity()`
|
2105
|
+
* @return {!Uint8Array}
|
2106
|
+
*/
|
2107
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getIdentity_asU8 = function () {
|
2108
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getIdentity()));
|
2109
|
+
};
|
2110
|
+
/** @param {!(string|Uint8Array)} value */
|
2111
|
+
proto.protocol.TopicIdentityFWMessage.prototype.setIdentity = function (value) {
|
2112
|
+
jspb.Message.setProto3BytesField(this, 3, value);
|
2113
|
+
};
|
2114
|
+
/**
|
2115
|
+
* optional Role role = 4;
|
2116
|
+
* @return {!proto.protocol.Role}
|
2117
|
+
*/
|
2118
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getRole = function () {
|
2119
|
+
return /** @type {!proto.protocol.Role} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
2120
|
+
};
|
2121
|
+
/** @param {!proto.protocol.Role} value */
|
2122
|
+
proto.protocol.TopicIdentityFWMessage.prototype.setRole = function (value) {
|
2123
|
+
jspb.Message.setProto3EnumField(this, 4, value);
|
2124
|
+
};
|
2125
|
+
/**
|
2126
|
+
* optional bytes body = 5;
|
2127
|
+
* @return {!(string|Uint8Array)}
|
2128
|
+
*/
|
2129
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getBody = function () {
|
2130
|
+
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
2131
|
+
};
|
2132
|
+
/**
|
2133
|
+
* optional bytes body = 5;
|
2134
|
+
* This is a type-conversion wrapper around `getBody()`
|
2135
|
+
* @return {string}
|
2136
|
+
*/
|
2137
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getBody_asB64 = function () {
|
2138
|
+
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBody()));
|
2139
|
+
};
|
2140
|
+
/**
|
2141
|
+
* optional bytes body = 5;
|
2142
|
+
* Note that Uint8Array is not supported on all browsers.
|
2143
|
+
* @see http://caniuse.com/Uint8Array
|
2144
|
+
* This is a type-conversion wrapper around `getBody()`
|
2145
|
+
* @return {!Uint8Array}
|
2146
|
+
*/
|
2147
|
+
proto.protocol.TopicIdentityFWMessage.prototype.getBody_asU8 = function () {
|
2148
|
+
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBody()));
|
2149
|
+
};
|
2150
|
+
/** @param {!(string|Uint8Array)} value */
|
2151
|
+
proto.protocol.TopicIdentityFWMessage.prototype.setBody = function (value) {
|
2152
|
+
jspb.Message.setProto3BytesField(this, 5, value);
|
2153
|
+
};
|
2154
|
+
/**
|
2155
|
+
* @enum {number}
|
2156
|
+
*/
|
2157
|
+
proto.protocol.MessageType = {
|
2158
|
+
UNKNOWN_MESSAGE_TYPE: 0,
|
2159
|
+
WELCOME: 1,
|
2160
|
+
CONNECT: 2,
|
2161
|
+
WEBRTC_OFFER: 3,
|
2162
|
+
WEBRTC_ANSWER: 4,
|
2163
|
+
WEBRTC_ICE_CANDIDATE: 5,
|
2164
|
+
PING: 6,
|
2165
|
+
SUBSCRIPTION: 7,
|
2166
|
+
AUTH: 8,
|
2167
|
+
TOPIC: 9,
|
2168
|
+
TOPIC_FW: 10,
|
2169
|
+
TOPIC_IDENTITY: 11,
|
2170
|
+
TOPIC_IDENTITY_FW: 12
|
2171
|
+
};
|
2172
|
+
/**
|
2173
|
+
* @enum {number}
|
2174
|
+
*/
|
2175
|
+
proto.protocol.Role = {
|
2176
|
+
UNKNOWN_ROLE: 0,
|
2177
|
+
CLIENT: 1,
|
2178
|
+
COMMUNICATION_SERVER: 2
|
2179
|
+
};
|
2180
|
+
/**
|
2181
|
+
* @enum {number}
|
2182
|
+
*/
|
2183
|
+
proto.protocol.Format = {
|
2184
|
+
UNKNOWN_FORMAT: 0,
|
2185
|
+
PLAIN: 1,
|
2186
|
+
GZIP: 2
|
2187
|
+
};
|
2188
|
+
goog.object.extend(exports, proto.protocol);
|
2189
|
+
//# sourceMappingURL=broker.js.map
|