foxconn-yumeeting-sdk-js
Version:
A js sdk for ion yumeeting
1,420 lines (1,223 loc) • 41 kB
JavaScript
// source: biz.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @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!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var ion_pb = require('./ion_pb.js');
goog.object.extend(proto, ion_pb);
goog.exportSymbol('proto.biz.Join', null, global);
goog.exportSymbol('proto.biz.JoinReply', null, global);
goog.exportSymbol('proto.biz.Leave', null, global);
goog.exportSymbol('proto.biz.LeaveReply', null, global);
goog.exportSymbol('proto.biz.SignalReply', null, global);
goog.exportSymbol('proto.biz.SignalReply.PayloadCase', null, global);
goog.exportSymbol('proto.biz.SignalRequest', null, global);
goog.exportSymbol('proto.biz.SignalRequest.PayloadCase', 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.biz.Join = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.biz.Join, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.biz.Join.displayName = 'proto.biz.Join';
}
/**
* 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.biz.JoinReply = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.biz.JoinReply, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.biz.JoinReply.displayName = 'proto.biz.JoinReply';
}
/**
* 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.biz.Leave = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.biz.Leave, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.biz.Leave.displayName = 'proto.biz.Leave';
}
/**
* 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.biz.LeaveReply = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.biz.LeaveReply, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.biz.LeaveReply.displayName = 'proto.biz.LeaveReply';
}
/**
* 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.biz.SignalRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.biz.SignalRequest.oneofGroups_);
};
goog.inherits(proto.biz.SignalRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.biz.SignalRequest.displayName = 'proto.biz.SignalRequest';
}
/**
* 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.biz.SignalReply = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.biz.SignalReply.oneofGroups_);
};
goog.inherits(proto.biz.SignalReply, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.biz.SignalReply.displayName = 'proto.biz.SignalReply';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.biz.Join.prototype.toObject = function(opt_includeInstance) {
return proto.biz.Join.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.biz.Join} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.Join.toObject = function(includeInstance, msg) {
var f, obj = {
peer: (f = msg.getPeer()) && ion_pb.Peer.toObject(includeInstance, f),
token: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.biz.Join}
*/
proto.biz.Join.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.biz.Join;
return proto.biz.Join.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.biz.Join} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.biz.Join}
*/
proto.biz.Join.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new ion_pb.Peer;
reader.readMessage(value,ion_pb.Peer.deserializeBinaryFromReader);
msg.setPeer(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setToken(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.biz.Join.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.biz.Join.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.biz.Join} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.Join.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPeer();
if (f != null) {
writer.writeMessage(
1,
f,
ion_pb.Peer.serializeBinaryToWriter
);
}
f = message.getToken();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional ion.Peer peer = 1;
* @return {?proto.ion.Peer}
*/
proto.biz.Join.prototype.getPeer = function() {
return /** @type{?proto.ion.Peer} */ (
jspb.Message.getWrapperField(this, ion_pb.Peer, 1));
};
/**
* @param {?proto.ion.Peer|undefined} value
* @return {!proto.biz.Join} returns this
*/
proto.biz.Join.prototype.setPeer = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.Join} returns this
*/
proto.biz.Join.prototype.clearPeer = function() {
return this.setPeer(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.Join.prototype.hasPeer = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string token = 2;
* @return {string}
*/
proto.biz.Join.prototype.getToken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.biz.Join} returns this
*/
proto.biz.Join.prototype.setToken = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.biz.JoinReply.prototype.toObject = function(opt_includeInstance) {
return proto.biz.JoinReply.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.biz.JoinReply} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.JoinReply.toObject = function(includeInstance, msg) {
var f, obj = {
success: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
reason: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.biz.JoinReply}
*/
proto.biz.JoinReply.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.biz.JoinReply;
return proto.biz.JoinReply.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.biz.JoinReply} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.biz.JoinReply}
*/
proto.biz.JoinReply.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSuccess(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setReason(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.biz.JoinReply.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.biz.JoinReply.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.biz.JoinReply} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.JoinReply.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSuccess();
if (f) {
writer.writeBool(
1,
f
);
}
f = message.getReason();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional bool success = 1;
* @return {boolean}
*/
proto.biz.JoinReply.prototype.getSuccess = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
};
/**
* @param {boolean} value
* @return {!proto.biz.JoinReply} returns this
*/
proto.biz.JoinReply.prototype.setSuccess = function(value) {
return jspb.Message.setProto3BooleanField(this, 1, value);
};
/**
* optional string reason = 2;
* @return {string}
*/
proto.biz.JoinReply.prototype.getReason = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.biz.JoinReply} returns this
*/
proto.biz.JoinReply.prototype.setReason = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.biz.Leave.prototype.toObject = function(opt_includeInstance) {
return proto.biz.Leave.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.biz.Leave} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.Leave.toObject = function(includeInstance, msg) {
var f, obj = {
uid: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.biz.Leave}
*/
proto.biz.Leave.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.biz.Leave;
return proto.biz.Leave.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.biz.Leave} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.biz.Leave}
*/
proto.biz.Leave.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setUid(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.biz.Leave.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.biz.Leave.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.biz.Leave} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.Leave.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUid();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string uid = 1;
* @return {string}
*/
proto.biz.Leave.prototype.getUid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.biz.Leave} returns this
*/
proto.biz.Leave.prototype.setUid = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.biz.LeaveReply.prototype.toObject = function(opt_includeInstance) {
return proto.biz.LeaveReply.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.biz.LeaveReply} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.LeaveReply.toObject = function(includeInstance, msg) {
var f, obj = {
reason: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.biz.LeaveReply}
*/
proto.biz.LeaveReply.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.biz.LeaveReply;
return proto.biz.LeaveReply.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.biz.LeaveReply} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.biz.LeaveReply}
*/
proto.biz.LeaveReply.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setReason(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.biz.LeaveReply.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.biz.LeaveReply.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.biz.LeaveReply} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.LeaveReply.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getReason();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string reason = 1;
* @return {string}
*/
proto.biz.LeaveReply.prototype.getReason = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.biz.LeaveReply} returns this
*/
proto.biz.LeaveReply.prototype.setReason = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.biz.SignalRequest.oneofGroups_ = [[1,2,4]];
/**
* @enum {number}
*/
proto.biz.SignalRequest.PayloadCase = {
PAYLOAD_NOT_SET: 0,
JOIN: 1,
LEAVE: 2,
MSG: 4
};
/**
* @return {proto.biz.SignalRequest.PayloadCase}
*/
proto.biz.SignalRequest.prototype.getPayloadCase = function() {
return /** @type {proto.biz.SignalRequest.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.biz.SignalRequest.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.biz.SignalRequest.prototype.toObject = function(opt_includeInstance) {
return proto.biz.SignalRequest.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.biz.SignalRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.SignalRequest.toObject = function(includeInstance, msg) {
var f, obj = {
join: (f = msg.getJoin()) && proto.biz.Join.toObject(includeInstance, f),
leave: (f = msg.getLeave()) && proto.biz.Leave.toObject(includeInstance, f),
msg: (f = msg.getMsg()) && ion_pb.Message.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.biz.SignalRequest}
*/
proto.biz.SignalRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.biz.SignalRequest;
return proto.biz.SignalRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.biz.SignalRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.biz.SignalRequest}
*/
proto.biz.SignalRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.biz.Join;
reader.readMessage(value,proto.biz.Join.deserializeBinaryFromReader);
msg.setJoin(value);
break;
case 2:
var value = new proto.biz.Leave;
reader.readMessage(value,proto.biz.Leave.deserializeBinaryFromReader);
msg.setLeave(value);
break;
case 4:
var value = new ion_pb.Message;
reader.readMessage(value,ion_pb.Message.deserializeBinaryFromReader);
msg.setMsg(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.biz.SignalRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.biz.SignalRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.biz.SignalRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.SignalRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getJoin();
if (f != null) {
writer.writeMessage(
1,
f,
proto.biz.Join.serializeBinaryToWriter
);
}
f = message.getLeave();
if (f != null) {
writer.writeMessage(
2,
f,
proto.biz.Leave.serializeBinaryToWriter
);
}
f = message.getMsg();
if (f != null) {
writer.writeMessage(
4,
f,
ion_pb.Message.serializeBinaryToWriter
);
}
};
/**
* optional Join join = 1;
* @return {?proto.biz.Join}
*/
proto.biz.SignalRequest.prototype.getJoin = function() {
return /** @type{?proto.biz.Join} */ (
jspb.Message.getWrapperField(this, proto.biz.Join, 1));
};
/**
* @param {?proto.biz.Join|undefined} value
* @return {!proto.biz.SignalRequest} returns this
*/
proto.biz.SignalRequest.prototype.setJoin = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.biz.SignalRequest.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalRequest} returns this
*/
proto.biz.SignalRequest.prototype.clearJoin = function() {
return this.setJoin(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalRequest.prototype.hasJoin = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Leave leave = 2;
* @return {?proto.biz.Leave}
*/
proto.biz.SignalRequest.prototype.getLeave = function() {
return /** @type{?proto.biz.Leave} */ (
jspb.Message.getWrapperField(this, proto.biz.Leave, 2));
};
/**
* @param {?proto.biz.Leave|undefined} value
* @return {!proto.biz.SignalRequest} returns this
*/
proto.biz.SignalRequest.prototype.setLeave = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.biz.SignalRequest.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalRequest} returns this
*/
proto.biz.SignalRequest.prototype.clearLeave = function() {
return this.setLeave(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalRequest.prototype.hasLeave = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional ion.Message msg = 4;
* @return {?proto.ion.Message}
*/
proto.biz.SignalRequest.prototype.getMsg = function() {
return /** @type{?proto.ion.Message} */ (
jspb.Message.getWrapperField(this, ion_pb.Message, 4));
};
/**
* @param {?proto.ion.Message|undefined} value
* @return {!proto.biz.SignalRequest} returns this
*/
proto.biz.SignalRequest.prototype.setMsg = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.biz.SignalRequest.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalRequest} returns this
*/
proto.biz.SignalRequest.prototype.clearMsg = function() {
return this.setMsg(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalRequest.prototype.hasMsg = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.biz.SignalReply.oneofGroups_ = [[1,2,3,4,5]];
/**
* @enum {number}
*/
proto.biz.SignalReply.PayloadCase = {
PAYLOAD_NOT_SET: 0,
JOINREPLY: 1,
LEAVEREPLY: 2,
PEEREVENT: 3,
STREAMEVENT: 4,
MSG: 5
};
/**
* @return {proto.biz.SignalReply.PayloadCase}
*/
proto.biz.SignalReply.prototype.getPayloadCase = function() {
return /** @type {proto.biz.SignalReply.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.biz.SignalReply.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.biz.SignalReply.prototype.toObject = function(opt_includeInstance) {
return proto.biz.SignalReply.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.biz.SignalReply} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.SignalReply.toObject = function(includeInstance, msg) {
var f, obj = {
joinreply: (f = msg.getJoinreply()) && proto.biz.JoinReply.toObject(includeInstance, f),
leavereply: (f = msg.getLeavereply()) && proto.biz.LeaveReply.toObject(includeInstance, f),
peerevent: (f = msg.getPeerevent()) && ion_pb.PeerEvent.toObject(includeInstance, f),
streamevent: (f = msg.getStreamevent()) && ion_pb.StreamEvent.toObject(includeInstance, f),
msg: (f = msg.getMsg()) && ion_pb.Message.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.biz.SignalReply}
*/
proto.biz.SignalReply.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.biz.SignalReply;
return proto.biz.SignalReply.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.biz.SignalReply} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.biz.SignalReply}
*/
proto.biz.SignalReply.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.biz.JoinReply;
reader.readMessage(value,proto.biz.JoinReply.deserializeBinaryFromReader);
msg.setJoinreply(value);
break;
case 2:
var value = new proto.biz.LeaveReply;
reader.readMessage(value,proto.biz.LeaveReply.deserializeBinaryFromReader);
msg.setLeavereply(value);
break;
case 3:
var value = new ion_pb.PeerEvent;
reader.readMessage(value,ion_pb.PeerEvent.deserializeBinaryFromReader);
msg.setPeerevent(value);
break;
case 4:
var value = new ion_pb.StreamEvent;
reader.readMessage(value,ion_pb.StreamEvent.deserializeBinaryFromReader);
msg.setStreamevent(value);
break;
case 5:
var value = new ion_pb.Message;
reader.readMessage(value,ion_pb.Message.deserializeBinaryFromReader);
msg.setMsg(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.biz.SignalReply.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.biz.SignalReply.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.biz.SignalReply} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.biz.SignalReply.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getJoinreply();
if (f != null) {
writer.writeMessage(
1,
f,
proto.biz.JoinReply.serializeBinaryToWriter
);
}
f = message.getLeavereply();
if (f != null) {
writer.writeMessage(
2,
f,
proto.biz.LeaveReply.serializeBinaryToWriter
);
}
f = message.getPeerevent();
if (f != null) {
writer.writeMessage(
3,
f,
ion_pb.PeerEvent.serializeBinaryToWriter
);
}
f = message.getStreamevent();
if (f != null) {
writer.writeMessage(
4,
f,
ion_pb.StreamEvent.serializeBinaryToWriter
);
}
f = message.getMsg();
if (f != null) {
writer.writeMessage(
5,
f,
ion_pb.Message.serializeBinaryToWriter
);
}
};
/**
* optional JoinReply joinReply = 1;
* @return {?proto.biz.JoinReply}
*/
proto.biz.SignalReply.prototype.getJoinreply = function() {
return /** @type{?proto.biz.JoinReply} */ (
jspb.Message.getWrapperField(this, proto.biz.JoinReply, 1));
};
/**
* @param {?proto.biz.JoinReply|undefined} value
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.setJoinreply = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.biz.SignalReply.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.clearJoinreply = function() {
return this.setJoinreply(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalReply.prototype.hasJoinreply = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional LeaveReply leaveReply = 2;
* @return {?proto.biz.LeaveReply}
*/
proto.biz.SignalReply.prototype.getLeavereply = function() {
return /** @type{?proto.biz.LeaveReply} */ (
jspb.Message.getWrapperField(this, proto.biz.LeaveReply, 2));
};
/**
* @param {?proto.biz.LeaveReply|undefined} value
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.setLeavereply = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.biz.SignalReply.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.clearLeavereply = function() {
return this.setLeavereply(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalReply.prototype.hasLeavereply = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional ion.PeerEvent peerEvent = 3;
* @return {?proto.ion.PeerEvent}
*/
proto.biz.SignalReply.prototype.getPeerevent = function() {
return /** @type{?proto.ion.PeerEvent} */ (
jspb.Message.getWrapperField(this, ion_pb.PeerEvent, 3));
};
/**
* @param {?proto.ion.PeerEvent|undefined} value
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.setPeerevent = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.biz.SignalReply.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.clearPeerevent = function() {
return this.setPeerevent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalReply.prototype.hasPeerevent = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional ion.StreamEvent streamEvent = 4;
* @return {?proto.ion.StreamEvent}
*/
proto.biz.SignalReply.prototype.getStreamevent = function() {
return /** @type{?proto.ion.StreamEvent} */ (
jspb.Message.getWrapperField(this, ion_pb.StreamEvent, 4));
};
/**
* @param {?proto.ion.StreamEvent|undefined} value
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.setStreamevent = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.biz.SignalReply.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.clearStreamevent = function() {
return this.setStreamevent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalReply.prototype.hasStreamevent = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional ion.Message msg = 5;
* @return {?proto.ion.Message}
*/
proto.biz.SignalReply.prototype.getMsg = function() {
return /** @type{?proto.ion.Message} */ (
jspb.Message.getWrapperField(this, ion_pb.Message, 5));
};
/**
* @param {?proto.ion.Message|undefined} value
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.setMsg = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.biz.SignalReply.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.biz.SignalReply} returns this
*/
proto.biz.SignalReply.prototype.clearMsg = function() {
return this.setMsg(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.biz.SignalReply.prototype.hasMsg = function() {
return jspb.Message.getField(this, 5) != null;
};
goog.object.extend(exports, proto.biz);