decentrand
Version:
Decentraland CLI developer tool.
1,295 lines • 83 kB
JavaScript
"use strict";
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
goog.exportSymbol('proto.protocol.AuthMessage', null, global);
goog.exportSymbol('proto.protocol.ConnectMessage', null, global);
goog.exportSymbol('proto.protocol.CoordinatorMessage', null, global);
goog.exportSymbol('proto.protocol.Format', null, global);
goog.exportSymbol('proto.protocol.MessageHeader', null, global);
goog.exportSymbol('proto.protocol.MessageType', null, global);
goog.exportSymbol('proto.protocol.PingMessage', null, global);
goog.exportSymbol('proto.protocol.Role', null, global);
goog.exportSymbol('proto.protocol.SubscriptionMessage', null, global);
goog.exportSymbol('proto.protocol.TopicFWMessage', null, global);
goog.exportSymbol('proto.protocol.TopicIdentityFWMessage', null, global);
goog.exportSymbol('proto.protocol.TopicIdentityMessage', null, global);
goog.exportSymbol('proto.protocol.TopicMessage', null, global);
goog.exportSymbol('proto.protocol.WebRtcMessage', null, global);
goog.exportSymbol('proto.protocol.WelcomeMessage', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.CoordinatorMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.CoordinatorMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.CoordinatorMessage.displayName = 'proto.protocol.CoordinatorMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.CoordinatorMessage.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.CoordinatorMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.CoordinatorMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.CoordinatorMessage.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.CoordinatorMessage}
*/
proto.protocol.CoordinatorMessage.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.CoordinatorMessage;
return proto.protocol.CoordinatorMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.CoordinatorMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.CoordinatorMessage}
*/
proto.protocol.CoordinatorMessage.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.CoordinatorMessage.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.CoordinatorMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.CoordinatorMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.CoordinatorMessage.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.CoordinatorMessage.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.CoordinatorMessage.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.WelcomeMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.WelcomeMessage.repeatedFields_, null);
};
goog.inherits(proto.protocol.WelcomeMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.WelcomeMessage.displayName = 'proto.protocol.WelcomeMessage';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.protocol.WelcomeMessage.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.WelcomeMessage.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.WelcomeMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.WelcomeMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.WelcomeMessage.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
alias: jspb.Message.getFieldWithDefault(msg, 2, 0),
availableServersList: jspb.Message.getRepeatedField(msg, 3)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.WelcomeMessage}
*/
proto.protocol.WelcomeMessage.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.WelcomeMessage;
return proto.protocol.WelcomeMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.WelcomeMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.WelcomeMessage}
*/
proto.protocol.WelcomeMessage.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setAlias(value);
break;
case 3:
var value = /** @type {!Array<number>} */ (reader.readPackedUint64());
msg.setAvailableServersList(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.WelcomeMessage.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.WelcomeMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.WelcomeMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.WelcomeMessage.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
f = message.getAlias();
if (f !== 0) {
writer.writeUint64(2, f);
}
f = message.getAvailableServersList();
if (f.length > 0) {
writer.writePackedUint64(3, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.WelcomeMessage.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.WelcomeMessage.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional uint64 alias = 2;
* @return {number}
*/
proto.protocol.WelcomeMessage.prototype.getAlias = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.protocol.WelcomeMessage.prototype.setAlias = function (value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* repeated uint64 available_servers = 3;
* @return {!Array<number>}
*/
proto.protocol.WelcomeMessage.prototype.getAvailableServersList = function () {
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 3));
};
/** @param {!Array<number>} value */
proto.protocol.WelcomeMessage.prototype.setAvailableServersList = function (value) {
jspb.Message.setField(this, 3, value || []);
};
/**
* @param {!number} value
* @param {number=} opt_index
*/
proto.protocol.WelcomeMessage.prototype.addAvailableServers = function (value, opt_index) {
jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
proto.protocol.WelcomeMessage.prototype.clearAvailableServersList = function () {
this.setAvailableServersList([]);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.ConnectMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.ConnectMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.ConnectMessage.displayName = 'proto.protocol.ConnectMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.ConnectMessage.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.ConnectMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.ConnectMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.ConnectMessage.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
toAlias: jspb.Message.getFieldWithDefault(msg, 3, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.ConnectMessage}
*/
proto.protocol.ConnectMessage.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.ConnectMessage;
return proto.protocol.ConnectMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.ConnectMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.ConnectMessage}
*/
proto.protocol.ConnectMessage.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setFromAlias(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setToAlias(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.ConnectMessage.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.ConnectMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.ConnectMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.ConnectMessage.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
f = message.getFromAlias();
if (f !== 0) {
writer.writeUint64(2, f);
}
f = message.getToAlias();
if (f !== 0) {
writer.writeUint64(3, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.ConnectMessage.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.ConnectMessage.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional uint64 from_alias = 2;
* @return {number}
*/
proto.protocol.ConnectMessage.prototype.getFromAlias = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.protocol.ConnectMessage.prototype.setFromAlias = function (value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint64 to_alias = 3;
* @return {number}
*/
proto.protocol.ConnectMessage.prototype.getToAlias = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.protocol.ConnectMessage.prototype.setToAlias = function (value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.WebRtcMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.WebRtcMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.WebRtcMessage.displayName = 'proto.protocol.WebRtcMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.WebRtcMessage.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.WebRtcMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.WebRtcMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.WebRtcMessage.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
fromAlias: jspb.Message.getFieldWithDefault(msg, 2, 0),
toAlias: jspb.Message.getFieldWithDefault(msg, 3, 0),
data: msg.getData_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.WebRtcMessage}
*/
proto.protocol.WebRtcMessage.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.WebRtcMessage;
return proto.protocol.WebRtcMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.WebRtcMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.WebRtcMessage}
*/
proto.protocol.WebRtcMessage.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setFromAlias(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setToAlias(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.WebRtcMessage.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.WebRtcMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.WebRtcMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.WebRtcMessage.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
f = message.getFromAlias();
if (f !== 0) {
writer.writeUint64(2, f);
}
f = message.getToAlias();
if (f !== 0) {
writer.writeUint64(3, f);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(4, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.WebRtcMessage.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.WebRtcMessage.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional uint64 from_alias = 2;
* @return {number}
*/
proto.protocol.WebRtcMessage.prototype.getFromAlias = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.protocol.WebRtcMessage.prototype.setFromAlias = function (value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional uint64 to_alias = 3;
* @return {number}
*/
proto.protocol.WebRtcMessage.prototype.getToAlias = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.protocol.WebRtcMessage.prototype.setToAlias = function (value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional bytes data = 4;
* @return {!(string|Uint8Array)}
*/
proto.protocol.WebRtcMessage.prototype.getData = function () {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes data = 4;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.protocol.WebRtcMessage.prototype.getData_asB64 = function () {
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData()));
};
/**
* optional bytes data = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.protocol.WebRtcMessage.prototype.getData_asU8 = function () {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData()));
};
/** @param {!(string|Uint8Array)} value */
proto.protocol.WebRtcMessage.prototype.setData = function (value) {
jspb.Message.setProto3BytesField(this, 4, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.MessageHeader = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.MessageHeader, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.MessageHeader.displayName = 'proto.protocol.MessageHeader';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.MessageHeader.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.MessageHeader.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.MessageHeader} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.MessageHeader.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.MessageHeader}
*/
proto.protocol.MessageHeader.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.MessageHeader;
return proto.protocol.MessageHeader.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.MessageHeader} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.MessageHeader}
*/
proto.protocol.MessageHeader.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.MessageHeader.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.MessageHeader.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.MessageHeader} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.MessageHeader.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.MessageHeader.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.MessageHeader.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.PingMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.PingMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.PingMessage.displayName = 'proto.protocol.PingMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.PingMessage.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.PingMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.PingMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.PingMessage.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
time: +jspb.Message.getFieldWithDefault(msg, 2, 0.0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.PingMessage}
*/
proto.protocol.PingMessage.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.PingMessage;
return proto.protocol.PingMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.PingMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.PingMessage}
*/
proto.protocol.PingMessage.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
case 2:
var value = /** @type {number} */ (reader.readDouble());
msg.setTime(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.PingMessage.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.PingMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.PingMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.PingMessage.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
f = message.getTime();
if (f !== 0.0) {
writer.writeDouble(2, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.PingMessage.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.PingMessage.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional double time = 2;
* @return {number}
*/
proto.protocol.PingMessage.prototype.getTime = function () {
return /** @type {number} */ (+jspb.Message.getFieldWithDefault(this, 2, 0.0));
};
/** @param {number} value */
proto.protocol.PingMessage.prototype.setTime = function (value) {
jspb.Message.setProto3FloatField(this, 2, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.SubscriptionMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.SubscriptionMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.SubscriptionMessage.displayName = 'proto.protocol.SubscriptionMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.SubscriptionMessage.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.SubscriptionMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.SubscriptionMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.SubscriptionMessage.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
format: jspb.Message.getFieldWithDefault(msg, 2, 0),
topics: msg.getTopics_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.SubscriptionMessage}
*/
proto.protocol.SubscriptionMessage.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.SubscriptionMessage;
return proto.protocol.SubscriptionMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.SubscriptionMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.SubscriptionMessage}
*/
proto.protocol.SubscriptionMessage.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
case 2:
var value = /** @type {!proto.protocol.Format} */ (reader.readEnum());
msg.setFormat(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setTopics(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.SubscriptionMessage.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.SubscriptionMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.SubscriptionMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.SubscriptionMessage.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
f = message.getFormat();
if (f !== 0.0) {
writer.writeEnum(2, f);
}
f = message.getTopics_asU8();
if (f.length > 0) {
writer.writeBytes(3, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.SubscriptionMessage.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.SubscriptionMessage.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional Format format = 2;
* @return {!proto.protocol.Format}
*/
proto.protocol.SubscriptionMessage.prototype.getFormat = function () {
return /** @type {!proto.protocol.Format} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {!proto.protocol.Format} value */
proto.protocol.SubscriptionMessage.prototype.setFormat = function (value) {
jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional bytes topics = 3;
* @return {!(string|Uint8Array)}
*/
proto.protocol.SubscriptionMessage.prototype.getTopics = function () {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes topics = 3;
* This is a type-conversion wrapper around `getTopics()`
* @return {string}
*/
proto.protocol.SubscriptionMessage.prototype.getTopics_asB64 = function () {
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getTopics()));
};
/**
* optional bytes topics = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getTopics()`
* @return {!Uint8Array}
*/
proto.protocol.SubscriptionMessage.prototype.getTopics_asU8 = function () {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getTopics()));
};
/** @param {!(string|Uint8Array)} value */
proto.protocol.SubscriptionMessage.prototype.setTopics = function (value) {
jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.protocol.AuthMessage = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.protocol.AuthMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.protocol.AuthMessage.displayName = 'proto.protocol.AuthMessage';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.protocol.AuthMessage.prototype.toObject = function (opt_includeInstance) {
return proto.protocol.AuthMessage.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.protocol.AuthMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.AuthMessage.toObject = function (includeInstance, msg) {
var f, obj = {
type: jspb.Message.getFieldWithDefault(msg, 1, 0),
role: jspb.Message.getFieldWithDefault(msg, 2, 0),
body: msg.getBody_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.protocol.AuthMessage}
*/
proto.protocol.AuthMessage.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.protocol.AuthMessage;
return proto.protocol.AuthMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.protocol.AuthMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.protocol.AuthMessage}
*/
proto.protocol.AuthMessage.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.protocol.MessageType} */ (reader.readEnum());
msg.setType(value);
break;
case 2:
var value = /** @type {!proto.protocol.Role} */ (reader.readEnum());
msg.setRole(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setBody(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.protocol.AuthMessage.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.protocol.AuthMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.protocol.AuthMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.protocol.AuthMessage.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getType();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
f = message.getRole();
if (f !== 0.0) {
writer.writeEnum(2, f);
}
f = message.getBody_asU8();
if (f.length > 0) {
writer.writeBytes(3, f);
}
};
/**
* optional MessageType type = 1;
* @return {!proto.protocol.MessageType}
*/
proto.protocol.AuthMessage.prototype.getType = function () {
return /** @type {!proto.protocol.MessageType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {!proto.protocol.MessageType} value */
proto.protocol.AuthMessage.prototype.setType = function (value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional Role role = 2;
* @return {!proto.protocol.Role}
*/
proto.protocol.AuthMessage.prototype.getRole = function () {
return /** @type {!proto.protocol.Role} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {!proto.protocol.Role} value */
proto.protocol.AuthMessage.prototype.setRole = function (value) {
jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional bytes body = 3;
* @return {!(string|Uint8Array)}
*/
proto.protocol.AuthMessage.prototype.getBody = function () {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes body = 3;
* This is a type-conversion wrapper around `getBody()`
* @return {string}
*/
proto.protocol.AuthMessage.prototype.getBody_asB64 = function () {
return /** @type {string} */ (jspb.Message.bytesAsB64(this.getBody()));
};
/**
* optional bytes body = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getBody()`
* @return {!Uint8Array}
*/
proto.protocol.AuthMessage.prototype.getBody_asU8 = function () {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getBody()));
};
/** @param {!(string|Uint8Array)} value */
proto.protocol.AuthMessage.prototype.setBody = function (value) {
jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will