UNPKG

foxconn-yumeeting-sdk-js

Version:

A js sdk for ion yumeeting

3,894 lines 108 kB
// source: ion.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')();

goog.exportSymbol('proto.ion.Empty', null, global);
goog.exportSymbol('proto.ion.Error', null, global);
goog.exportSymbol('proto.ion.JoinResponseEvent', null, global);
goog.exportSymbol('proto.ion.JoinResponseEvent.PayloadCase', null, global);
goog.exportSymbol('proto.ion.Message', null, global);
goog.exportSymbol('proto.ion.MessageEvent', null, global);
goog.exportSymbol('proto.ion.Node', null, global);
goog.exportSymbol('proto.ion.NodeInfo', null, global);
goog.exportSymbol('proto.ion.Peer', null, global);
goog.exportSymbol('proto.ion.PeerEvent', null, global);
goog.exportSymbol('proto.ion.PeerEvent.State', null, global);
goog.exportSymbol('proto.ion.RPC', null, global);
goog.exportSymbol('proto.ion.RoomInfo', null, global);
goog.exportSymbol('proto.ion.RoomInfo.State', null, global);
goog.exportSymbol('proto.ion.SessionEvent', null, global);
goog.exportSymbol('proto.ion.SessionEvent.State', null, global);
goog.exportSymbol('proto.ion.Stream', null, global);
goog.exportSymbol('proto.ion.StreamEvent', null, global);
goog.exportSymbol('proto.ion.StreamEvent.State', null, global);
goog.exportSymbol('proto.ion.Track', 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.ion.Empty = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.Empty, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.Empty.displayName = 'proto.ion.Empty';
}
/**
 * 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.ion.Error = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.Error, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.Error.displayName = 'proto.ion.Error';
}
/**
 * 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.ion.NodeInfo = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.NodeInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.NodeInfo.displayName = 'proto.ion.NodeInfo';
}
/**
 * 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.ion.Track = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.Track, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.Track.displayName = 'proto.ion.Track';
}
/**
 * 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.ion.Stream = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.ion.Stream.repeatedFields_, null);
};
goog.inherits(proto.ion.Stream, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.Stream.displayName = 'proto.ion.Stream';
}
/**
 * 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.ion.Peer = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.Peer, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.Peer.displayName = 'proto.ion.Peer';
}
/**
 * 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.ion.SessionEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.SessionEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.SessionEvent.displayName = 'proto.ion.SessionEvent';
}
/**
 * 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.ion.StreamEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.ion.StreamEvent.repeatedFields_, null);
};
goog.inherits(proto.ion.StreamEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.StreamEvent.displayName = 'proto.ion.StreamEvent';
}
/**
 * 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.ion.RoomInfo = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.RoomInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.RoomInfo.displayName = 'proto.ion.RoomInfo';
}
/**
 * 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.ion.JoinResponseEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ion.JoinResponseEvent.oneofGroups_);
};
goog.inherits(proto.ion.JoinResponseEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.JoinResponseEvent.displayName = 'proto.ion.JoinResponseEvent';
}
/**
 * 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.ion.PeerEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.PeerEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.PeerEvent.displayName = 'proto.ion.PeerEvent';
}
/**
 * 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.ion.MessageEvent = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.MessageEvent, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.MessageEvent.displayName = 'proto.ion.MessageEvent';
}
/**
 * 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.ion.Message = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.Message, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.Message.displayName = 'proto.ion.Message';
}
/**
 * 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.ion.RPC = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.RPC, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.RPC.displayName = 'proto.ion.RPC';
}
/**
 * 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.ion.Node = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ion.Node, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.ion.Node.displayName = 'proto.ion.Node';
}



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.ion.Empty.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.Empty.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.ion.Empty} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Empty.toObject = function(includeInstance, msg) {
  var f, obj = {
    isfirst: 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.ion.Empty}
 */
proto.ion.Empty.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.Empty;
  return proto.ion.Empty.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.Empty} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.Empty}
 */
proto.ion.Empty.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.setIsfirst(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.Empty.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.Empty.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.Empty} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Empty.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getIsfirst();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
};


/**
 * optional string isFirst = 1;
 * @return {string}
 */
proto.ion.Empty.prototype.getIsfirst = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Empty} returns this
 */
proto.ion.Empty.prototype.setIsfirst = 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.ion.Error.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.Error.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.ion.Error} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Error.toObject = function(includeInstance, msg) {
  var f, obj = {
    code: jspb.Message.getFieldWithDefault(msg, 1, 0),
    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.ion.Error}
 */
proto.ion.Error.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.Error;
  return proto.ion.Error.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.Error} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.Error}
 */
proto.ion.Error.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setCode(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.ion.Error.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.Error.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.Error} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Error.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getCode();
  if (f !== 0) {
    writer.writeInt32(
      1,
      f
    );
  }
  f = message.getReason();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


/**
 * optional int32 code = 1;
 * @return {number}
 */
proto.ion.Error.prototype.getCode = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.ion.Error} returns this
 */
proto.ion.Error.prototype.setCode = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional string reason = 2;
 * @return {string}
 */
proto.ion.Error.prototype.getReason = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Error} returns this
 */
proto.ion.Error.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.ion.NodeInfo.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.NodeInfo.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.ion.NodeInfo} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.NodeInfo.toObject = function(includeInstance, msg) {
  var f, obj = {
    nid: 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.ion.NodeInfo}
 */
proto.ion.NodeInfo.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.NodeInfo;
  return proto.ion.NodeInfo.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.NodeInfo} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.NodeInfo}
 */
proto.ion.NodeInfo.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.setNid(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.NodeInfo.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.NodeInfo.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.NodeInfo} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.NodeInfo.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getNid();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
};


/**
 * optional string nid = 1;
 * @return {string}
 */
proto.ion.NodeInfo.prototype.getNid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.NodeInfo} returns this
 */
proto.ion.NodeInfo.prototype.setNid = 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.ion.Track.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.Track.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.ion.Track} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Track.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: jspb.Message.getFieldWithDefault(msg, 1, ""),
    label: jspb.Message.getFieldWithDefault(msg, 2, ""),
    kind: jspb.Message.getFieldWithDefault(msg, 3, ""),
    simulcastMap: (f = msg.getSimulcastMap()) ? f.toObject(includeInstance, undefined) : [],
    direction: jspb.Message.getFieldWithDefault(msg, 5, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.ion.Track}
 */
proto.ion.Track.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.Track;
  return proto.ion.Track.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.Track} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.Track}
 */
proto.ion.Track.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.setId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setLabel(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setKind(value);
      break;
    case 4:
      var value = msg.getSimulcastMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setDirection(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.Track.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.Track.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.Track} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Track.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getLabel();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getKind();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getSimulcastMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = message.getDirection();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.ion.Track.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Track} returns this
 */
proto.ion.Track.prototype.setId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string label = 2;
 * @return {string}
 */
proto.ion.Track.prototype.getLabel = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Track} returns this
 */
proto.ion.Track.prototype.setLabel = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string kind = 3;
 * @return {string}
 */
proto.ion.Track.prototype.getKind = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Track} returns this
 */
proto.ion.Track.prototype.setKind = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * map<string, string> simulcast = 4;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.ion.Track.prototype.getSimulcastMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 4, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.ion.Track} returns this
 */
proto.ion.Track.prototype.clearSimulcastMap = function() {
  this.getSimulcastMap().clear();
  return this;};


/**
 * optional string direction = 5;
 * @return {string}
 */
proto.ion.Track.prototype.getDirection = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Track} returns this
 */
proto.ion.Track.prototype.setDirection = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.ion.Stream.repeatedFields_ = [2];



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.ion.Stream.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.Stream.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.ion.Stream} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Stream.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: jspb.Message.getFieldWithDefault(msg, 1, ""),
    tracksList: jspb.Message.toObjectList(msg.getTracksList(),
    proto.ion.Track.toObject, includeInstance)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.ion.Stream}
 */
proto.ion.Stream.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.Stream;
  return proto.ion.Stream.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.Stream} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.Stream}
 */
proto.ion.Stream.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.setId(value);
      break;
    case 2:
      var value = new proto.ion.Track;
      reader.readMessage(value,proto.ion.Track.deserializeBinaryFromReader);
      msg.addTracks(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.Stream.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.Stream.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.Stream} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Stream.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTracksList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.ion.Track.serializeBinaryToWriter
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.ion.Stream.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Stream} returns this
 */
proto.ion.Stream.prototype.setId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * repeated Track tracks = 2;
 * @return {!Array<!proto.ion.Track>}
 */
proto.ion.Stream.prototype.getTracksList = function() {
  return /** @type{!Array<!proto.ion.Track>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.ion.Track, 2));
};


/**
 * @param {!Array<!proto.ion.Track>} value
 * @return {!proto.ion.Stream} returns this
*/
proto.ion.Stream.prototype.setTracksList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.ion.Track=} opt_value
 * @param {number=} opt_index
 * @return {!proto.ion.Track}
 */
proto.ion.Stream.prototype.addTracks = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ion.Track, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.ion.Stream} returns this
 */
proto.ion.Stream.prototype.clearTracksList = function() {
  return this.setTracksList([]);
};





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.ion.Peer.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.Peer.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.ion.Peer} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Peer.toObject = function(includeInstance, msg) {
  var f, obj = {
    sid: jspb.Message.getFieldWithDefault(msg, 1, ""),
    uid: jspb.Message.getFieldWithDefault(msg, 2, ""),
    info: msg.getInfo_asB64(),
    dc: jspb.Message.getFieldWithDefault(msg, 4, ""),
    nid: jspb.Message.getFieldWithDefault(msg, 5, ""),
    ip: jspb.Message.getFieldWithDefault(msg, 6, ""),
    account: jspb.Message.getFieldWithDefault(msg, 7, ""),
    npi: jspb.Message.getFieldWithDefault(msg, 8, ""),
    role: jspb.Message.getFieldWithDefault(msg, 9, ""),
    platform: jspb.Message.getFieldWithDefault(msg, 10, ""),
    system: jspb.Message.getFieldWithDefault(msg, 11, ""),
    version: jspb.Message.getFieldWithDefault(msg, 12, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.ion.Peer}
 */
proto.ion.Peer.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.Peer;
  return proto.ion.Peer.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.Peer} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.Peer}
 */
proto.ion.Peer.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.setSid(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setUid(value);
      break;
    case 3:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setInfo(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setDc(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setNid(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setIp(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setAccount(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readString());
      msg.setNpi(value);
      break;
    case 9:
      var value = /** @type {string} */ (reader.readString());
      msg.setRole(value);
      break;
    case 10:
      var value = /** @type {string} */ (reader.readString());
      msg.setPlatform(value);
      break;
    case 11:
      var value = /** @type {string} */ (reader.readString());
      msg.setSystem(value);
      break;
    case 12:
      var value = /** @type {string} */ (reader.readString());
      msg.setVersion(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.Peer.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.Peer.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.Peer} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Peer.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSid();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getUid();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getInfo_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      3,
      f
    );
  }
  f = message.getDc();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getNid();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getIp();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = message.getAccount();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getNpi();
  if (f.length > 0) {
    writer.writeString(
      8,
      f
    );
  }
  f = message.getRole();
  if (f.length > 0) {
    writer.writeString(
      9,
      f
    );
  }
  f = message.getPlatform();
  if (f.length > 0) {
    writer.writeString(
      10,
      f
    );
  }
  f = message.getSystem();
  if (f.length > 0) {
    writer.writeString(
      11,
      f
    );
  }
  f = message.getVersion();
  if (f.length > 0) {
    writer.writeString(
      12,
      f
    );
  }
};


/**
 * optional string sid = 1;
 * @return {string}
 */
proto.ion.Peer.prototype.getSid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setSid = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string uid = 2;
 * @return {string}
 */
proto.ion.Peer.prototype.getUid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setUid = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional bytes info = 3;
 * @return {!(string|Uint8Array)}
 */
proto.ion.Peer.prototype.getInfo = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * optional bytes info = 3;
 * This is a type-conversion wrapper around `getInfo()`
 * @return {string}
 */
proto.ion.Peer.prototype.getInfo_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getInfo()));
};


/**
 * optional bytes info = 3;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getInfo()`
 * @return {!Uint8Array}
 */
proto.ion.Peer.prototype.getInfo_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getInfo()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setInfo = function(value) {
  return jspb.Message.setProto3BytesField(this, 3, value);
};


/**
 * optional string dc = 4;
 * @return {string}
 */
proto.ion.Peer.prototype.getDc = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setDc = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string nid = 5;
 * @return {string}
 */
proto.ion.Peer.prototype.getNid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setNid = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * optional string ip = 6;
 * @return {string}
 */
proto.ion.Peer.prototype.getIp = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setIp = function(value) {
  return jspb.Message.setProto3StringField(this, 6, value);
};


/**
 * optional string account = 7;
 * @return {string}
 */
proto.ion.Peer.prototype.getAccount = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setAccount = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional string npi = 8;
 * @return {string}
 */
proto.ion.Peer.prototype.getNpi = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setNpi = function(value) {
  return jspb.Message.setProto3StringField(this, 8, value);
};


/**
 * optional string role = 9;
 * @return {string}
 */
proto.ion.Peer.prototype.getRole = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setRole = function(value) {
  return jspb.Message.setProto3StringField(this, 9, value);
};


/**
 * optional string platform = 10;
 * @return {string}
 */
proto.ion.Peer.prototype.getPlatform = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setPlatform = function(value) {
  return jspb.Message.setProto3StringField(this, 10, value);
};


/**
 * optional string system = 11;
 * @return {string}
 */
proto.ion.Peer.prototype.getSystem = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setSystem = function(value) {
  return jspb.Message.setProto3StringField(this, 11, value);
};


/**
 * optional string version = 12;
 * @return {string}
 */
proto.ion.Peer.prototype.getVersion = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Peer} returns this
 */
proto.ion.Peer.prototype.setVersion = function(value) {
  return jspb.Message.setProto3StringField(this, 12, 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.ion.SessionEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.SessionEvent.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.ion.SessionEvent} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.SessionEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    state: jspb.Message.getFieldWithDefault(msg, 2, 0),
    nid: jspb.Message.getFieldWithDefault(msg, 3, ""),
    sid: jspb.Message.getFieldWithDefault(msg, 4, ""),
    svc: jspb.Message.getFieldWithDefault(msg, 5, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.ion.SessionEvent}
 */
proto.ion.SessionEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.SessionEvent;
  return proto.ion.SessionEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.SessionEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.SessionEvent}
 */
proto.ion.SessionEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 2:
      var value = /** @type {!proto.ion.SessionEvent.State} */ (reader.readEnum());
      msg.setState(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setNid(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setSid(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setSvc(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.SessionEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.SessionEvent.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.SessionEvent} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.SessionEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getState();
  if (f !== 0.0) {
    writer.writeEnum(
      2,
      f
    );
  }
  f = message.getNid();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getSid();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getSvc();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
};


/**
 * @enum {number}
 */
proto.ion.SessionEvent.State = {
  ADD: 0,
  REMOVE: 1
};

/**
 * optional State state = 2;
 * @return {!proto.ion.SessionEvent.State}
 */
proto.ion.SessionEvent.prototype.getState = function() {
  return /** @type {!proto.ion.SessionEvent.State} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {!proto.ion.SessionEvent.State} value
 * @return {!proto.ion.SessionEvent} returns this
 */
proto.ion.SessionEvent.prototype.setState = function(value) {
  return jspb.Message.setProto3EnumField(this, 2, value);
};


/**
 * optional string nid = 3;
 * @return {string}
 */
proto.ion.SessionEvent.prototype.getNid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.SessionEvent} returns this
 */
proto.ion.SessionEvent.prototype.setNid = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string sid = 4;
 * @return {string}
 */
proto.ion.SessionEvent.prototype.getSid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.SessionEvent} returns this
 */
proto.ion.SessionEvent.prototype.setSid = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string svc = 5;
 * @return {string}
 */
proto.ion.SessionEvent.prototype.getSvc = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.SessionEvent} returns this
 */
proto.ion.SessionEvent.prototype.setSvc = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.ion.StreamEvent.repeatedFields_ = [6];



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.ion.StreamEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.StreamEvent.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.ion.StreamEvent} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.StreamEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    state: jspb.Message.getFieldWithDefault(msg, 2, 0),
    nid: jspb.Message.getFieldWithDefault(msg, 3, ""),
    sid: jspb.Message.getFieldWithDefault(msg, 4, ""),
    uid: jspb.Message.getFieldWithDefault(msg, 5, ""),
    streamsList: jspb.Message.toObjectList(msg.getStreamsList(),
    proto.ion.Stream.toObject, includeInstance),
    dc: jspb.Message.getFieldWithDefault(msg, 7, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.ion.StreamEvent}
 */
proto.ion.StreamEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.StreamEvent;
  return proto.ion.StreamEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.StreamEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.StreamEvent}
 */
proto.ion.StreamEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 2:
      var value = /** @type {!proto.ion.StreamEvent.State} */ (reader.readEnum());
      msg.setState(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setNid(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setSid(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setUid(value);
      break;
    case 6:
      var value = new proto.ion.Stream;
      reader.readMessage(value,proto.ion.Stream.deserializeBinaryFromReader);
      msg.addStreams(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setDc(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.StreamEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.StreamEvent.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.StreamEvent} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.StreamEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getState();
  if (f !== 0.0) {
    writer.writeEnum(
      2,
      f
    );
  }
  f = message.getNid();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getSid();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getUid();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getStreamsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      6,
      f,
      proto.ion.Stream.serializeBinaryToWriter
    );
  }
  f = message.getDc();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
};


/**
 * @enum {number}
 */
proto.ion.StreamEvent.State = {
  ADD: 0,
  REMOVE: 1
};

/**
 * optional State state = 2;
 * @return {!proto.ion.StreamEvent.State}
 */
proto.ion.StreamEvent.prototype.getState = function() {
  return /** @type {!proto.ion.StreamEvent.State} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {!proto.ion.StreamEvent.State} value
 * @return {!proto.ion.StreamEvent} returns this
 */
proto.ion.StreamEvent.prototype.setState = function(value) {
  return jspb.Message.setProto3EnumField(this, 2, value);
};


/**
 * optional string nid = 3;
 * @return {string}
 */
proto.ion.StreamEvent.prototype.getNid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.StreamEvent} returns this
 */
proto.ion.StreamEvent.prototype.setNid = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string sid = 4;
 * @return {string}
 */
proto.ion.StreamEvent.prototype.getSid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.StreamEvent} returns this
 */
proto.ion.StreamEvent.prototype.setSid = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string uid = 5;
 * @return {string}
 */
proto.ion.StreamEvent.prototype.getUid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.StreamEvent} returns this
 */
proto.ion.StreamEvent.prototype.setUid = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * repeated Stream streams = 6;
 * @return {!Array<!proto.ion.Stream>}
 */
proto.ion.StreamEvent.prototype.getStreamsList = function() {
  return /** @type{!Array<!proto.ion.Stream>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.ion.Stream, 6));
};


/**
 * @param {!Array<!proto.ion.Stream>} value
 * @return {!proto.ion.StreamEvent} returns this
*/
proto.ion.StreamEvent.prototype.setStreamsList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 6, value);
};


/**
 * @param {!proto.ion.Stream=} opt_value
 * @param {number=} opt_index
 * @return {!proto.ion.Stream}
 */
proto.ion.StreamEvent.prototype.addStreams = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.ion.Stream, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.ion.StreamEvent} returns this
 */
proto.ion.StreamEvent.prototype.clearStreamsList = function() {
  return this.setStreamsList([]);
};


/**
 * optional string dc = 7;
 * @return {string}
 */
proto.ion.StreamEvent.prototype.getDc = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.StreamEvent} returns this
 */
proto.ion.StreamEvent.prototype.setDc = function(value) {
  return jspb.Message.setProto3StringField(this, 7, 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.ion.RoomInfo.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.RoomInfo.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.ion.RoomInfo} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.RoomInfo.toObject = function(includeInstance, msg) {
  var f, obj = {
    state: jspb.Message.getFieldWithDefault(msg, 2, 0),
    dc: jspb.Message.getFieldWithDefault(msg, 3, ""),
    servicenode: jspb.Message.getFieldWithDefault(msg, 4, ""),
    sid: jspb.Message.getFieldWithDefault(msg, 5, ""),
    uid: jspb.Message.getFieldWithDefault(msg, 6, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.ion.RoomInfo}
 */
proto.ion.RoomInfo.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.RoomInfo;
  return proto.ion.RoomInfo.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.RoomInfo} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.RoomInfo}
 */
proto.ion.RoomInfo.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 2:
      var value = /** @type {!proto.ion.RoomInfo.State} */ (reader.readEnum());
      msg.setState(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDc(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setServicenode(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setSid(value);
      break;
    case 6:
      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.ion.RoomInfo.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.RoomInfo.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.RoomInfo} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.RoomInfo.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getState();
  if (f !== 0.0) {
    writer.writeEnum(
      2,
      f
    );
  }
  f = message.getDc();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getServicenode();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getSid();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getUid();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
};


/**
 * @enum {number}
 */
proto.ion.RoomInfo.State = {
  ADD: 0,
  REMOVE: 1
};

/**
 * optional State state = 2;
 * @return {!proto.ion.RoomInfo.State}
 */
proto.ion.RoomInfo.prototype.getState = function() {
  return /** @type {!proto.ion.RoomInfo.State} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {!proto.ion.RoomInfo.State} value
 * @return {!proto.ion.RoomInfo} returns this
 */
proto.ion.RoomInfo.prototype.setState = function(value) {
  return jspb.Message.setProto3EnumField(this, 2, value);
};


/**
 * optional string dc = 3;
 * @return {string}
 */
proto.ion.RoomInfo.prototype.getDc = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.RoomInfo} returns this
 */
proto.ion.RoomInfo.prototype.setDc = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string serviceNode = 4;
 * @return {string}
 */
proto.ion.RoomInfo.prototype.getServicenode = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.RoomInfo} returns this
 */
proto.ion.RoomInfo.prototype.setServicenode = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string sid = 5;
 * @return {string}
 */
proto.ion.RoomInfo.prototype.getSid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.RoomInfo} returns this
 */
proto.ion.RoomInfo.prototype.setSid = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * optional string uid = 6;
 * @return {string}
 */
proto.ion.RoomInfo.prototype.getUid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.RoomInfo} returns this
 */
proto.ion.RoomInfo.prototype.setUid = function(value) {
  return jspb.Message.setProto3StringField(this, 6, 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.ion.JoinResponseEvent.oneofGroups_ = [[2,3,4]];

/**
 * @enum {number}
 */
proto.ion.JoinResponseEvent.PayloadCase = {
  PAYLOAD_NOT_SET: 0,
  PEER: 2,
  STREAM: 3,
  MESSAGE: 4
};

/**
 * @return {proto.ion.JoinResponseEvent.PayloadCase}
 */
proto.ion.JoinResponseEvent.prototype.getPayloadCase = function() {
  return /** @type {proto.ion.JoinResponseEvent.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.ion.JoinResponseEvent.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.ion.JoinResponseEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.JoinResponseEvent.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.ion.JoinResponseEvent} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.JoinResponseEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    touid: jspb.Message.getFieldWithDefault(msg, 1, ""),
    peer: (f = msg.getPeer()) && proto.ion.Peer.toObject(includeInstance, f),
    stream: (f = msg.getStream()) && proto.ion.StreamEvent.toObject(includeInstance, f),
    message: (f = msg.getMessage()) && proto.ion.MessageEvent.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.ion.JoinResponseEvent}
 */
proto.ion.JoinResponseEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.JoinResponseEvent;
  return proto.ion.JoinResponseEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.JoinResponseEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.JoinResponseEvent}
 */
proto.ion.JoinResponseEvent.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.setTouid(value);
      break;
    case 2:
      var value = new proto.ion.Peer;
      reader.readMessage(value,proto.ion.Peer.deserializeBinaryFromReader);
      msg.setPeer(value);
      break;
    case 3:
      var value = new proto.ion.StreamEvent;
      reader.readMessage(value,proto.ion.StreamEvent.deserializeBinaryFromReader);
      msg.setStream(value);
      break;
    case 4:
      var value = new proto.ion.MessageEvent;
      reader.readMessage(value,proto.ion.MessageEvent.deserializeBinaryFromReader);
      msg.setMessage(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.JoinResponseEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.JoinResponseEvent.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.JoinResponseEvent} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.JoinResponseEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getTouid();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getPeer();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.ion.Peer.serializeBinaryToWriter
    );
  }
  f = message.getStream();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.ion.StreamEvent.serializeBinaryToWriter
    );
  }
  f = message.getMessage();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.ion.MessageEvent.serializeBinaryToWriter
    );
  }
};


/**
 * optional string toUid = 1;
 * @return {string}
 */
proto.ion.JoinResponseEvent.prototype.getTouid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.JoinResponseEvent} returns this
 */
proto.ion.JoinResponseEvent.prototype.setTouid = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional Peer peer = 2;
 * @return {?proto.ion.Peer}
 */
proto.ion.JoinResponseEvent.prototype.getPeer = function() {
  return /** @type{?proto.ion.Peer} */ (
    jspb.Message.getWrapperField(this, proto.ion.Peer, 2));
};


/**
 * @param {?proto.ion.Peer|undefined} value
 * @return {!proto.ion.JoinResponseEvent} returns this
*/
proto.ion.JoinResponseEvent.prototype.setPeer = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.ion.JoinResponseEvent.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.ion.JoinResponseEvent} returns this
 */
proto.ion.JoinResponseEvent.prototype.clearPeer = function() {
  return this.setPeer(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.ion.JoinResponseEvent.prototype.hasPeer = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional StreamEvent stream = 3;
 * @return {?proto.ion.StreamEvent}
 */
proto.ion.JoinResponseEvent.prototype.getStream = function() {
  return /** @type{?proto.ion.StreamEvent} */ (
    jspb.Message.getWrapperField(this, proto.ion.StreamEvent, 3));
};


/**
 * @param {?proto.ion.StreamEvent|undefined} value
 * @return {!proto.ion.JoinResponseEvent} returns this
*/
proto.ion.JoinResponseEvent.prototype.setStream = function(value) {
  return jspb.Message.setOneofWrapperField(this, 3, proto.ion.JoinResponseEvent.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.ion.JoinResponseEvent} returns this
 */
proto.ion.JoinResponseEvent.prototype.clearStream = function() {
  return this.setStream(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.ion.JoinResponseEvent.prototype.hasStream = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * optional MessageEvent message = 4;
 * @return {?proto.ion.MessageEvent}
 */
proto.ion.JoinResponseEvent.prototype.getMessage = function() {
  return /** @type{?proto.ion.MessageEvent} */ (
    jspb.Message.getWrapperField(this, proto.ion.MessageEvent, 4));
};


/**
 * @param {?proto.ion.MessageEvent|undefined} value
 * @return {!proto.ion.JoinResponseEvent} returns this
*/
proto.ion.JoinResponseEvent.prototype.setMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 4, proto.ion.JoinResponseEvent.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.ion.JoinResponseEvent} returns this
 */
proto.ion.JoinResponseEvent.prototype.clearMessage = function() {
  return this.setMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.ion.JoinResponseEvent.prototype.hasMessage = function() {
  return jspb.Message.getField(this, 4) != null;
};





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.ion.PeerEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.PeerEvent.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.ion.PeerEvent} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.PeerEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    state: jspb.Message.getFieldWithDefault(msg, 3, 0),
    peer: (f = msg.getPeer()) && proto.ion.Peer.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.ion.PeerEvent}
 */
proto.ion.PeerEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.PeerEvent;
  return proto.ion.PeerEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.PeerEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.PeerEvent}
 */
proto.ion.PeerEvent.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 3:
      var value = /** @type {!proto.ion.PeerEvent.State} */ (reader.readEnum());
      msg.setState(value);
      break;
    case 4:
      var value = new proto.ion.Peer;
      reader.readMessage(value,proto.ion.Peer.deserializeBinaryFromReader);
      msg.setPeer(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.PeerEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.PeerEvent.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.PeerEvent} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.PeerEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getState();
  if (f !== 0.0) {
    writer.writeEnum(
      3,
      f
    );
  }
  f = message.getPeer();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.ion.Peer.serializeBinaryToWriter
    );
  }
};


/**
 * @enum {number}
 */
proto.ion.PeerEvent.State = {
  JOIN: 0,
  UPDATE: 1,
  LEAVE: 2
};

/**
 * optional State state = 3;
 * @return {!proto.ion.PeerEvent.State}
 */
proto.ion.PeerEvent.prototype.getState = function() {
  return /** @type {!proto.ion.PeerEvent.State} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {!proto.ion.PeerEvent.State} value
 * @return {!proto.ion.PeerEvent} returns this
 */
proto.ion.PeerEvent.prototype.setState = function(value) {
  return jspb.Message.setProto3EnumField(this, 3, value);
};


/**
 * optional Peer peer = 4;
 * @return {?proto.ion.Peer}
 */
proto.ion.PeerEvent.prototype.getPeer = function() {
  return /** @type{?proto.ion.Peer} */ (
    jspb.Message.getWrapperField(this, proto.ion.Peer, 4));
};


/**
 * @param {?proto.ion.Peer|undefined} value
 * @return {!proto.ion.PeerEvent} returns this
*/
proto.ion.PeerEvent.prototype.setPeer = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.ion.PeerEvent} returns this
 */
proto.ion.PeerEvent.prototype.clearPeer = function() {
  return this.setPeer(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.ion.PeerEvent.prototype.hasPeer = function() {
  return jspb.Message.getField(this, 4) != null;
};





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.ion.MessageEvent.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.MessageEvent.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.ion.MessageEvent} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.MessageEvent.toObject = function(includeInstance, msg) {
  var f, obj = {
    dc: jspb.Message.getFieldWithDefault(msg, 1, ""),
    nid: jspb.Message.getFieldWithDefault(msg, 2, ""),
    tosid: jspb.Message.getFieldWithDefault(msg, 3, ""),
    message: (f = msg.getMessage()) && proto.ion.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.ion.MessageEvent}
 */
proto.ion.MessageEvent.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.MessageEvent;
  return proto.ion.MessageEvent.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.MessageEvent} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.MessageEvent}
 */
proto.ion.MessageEvent.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.setDc(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setNid(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setTosid(value);
      break;
    case 4:
      var value = new proto.ion.Message;
      reader.readMessage(value,proto.ion.Message.deserializeBinaryFromReader);
      msg.setMessage(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.MessageEvent.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.MessageEvent.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.MessageEvent} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.MessageEvent.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDc();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getNid();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getTosid();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getMessage();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.ion.Message.serializeBinaryToWriter
    );
  }
};


/**
 * optional string dc = 1;
 * @return {string}
 */
proto.ion.MessageEvent.prototype.getDc = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.MessageEvent} returns this
 */
proto.ion.MessageEvent.prototype.setDc = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string nid = 2;
 * @return {string}
 */
proto.ion.MessageEvent.prototype.getNid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.MessageEvent} returns this
 */
proto.ion.MessageEvent.prototype.setNid = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string toSid = 3;
 * @return {string}
 */
proto.ion.MessageEvent.prototype.getTosid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.MessageEvent} returns this
 */
proto.ion.MessageEvent.prototype.setTosid = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional Message message = 4;
 * @return {?proto.ion.Message}
 */
proto.ion.MessageEvent.prototype.getMessage = function() {
  return /** @type{?proto.ion.Message} */ (
    jspb.Message.getWrapperField(this, proto.ion.Message, 4));
};


/**
 * @param {?proto.ion.Message|undefined} value
 * @return {!proto.ion.MessageEvent} returns this
*/
proto.ion.MessageEvent.prototype.setMessage = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.ion.MessageEvent} returns this
 */
proto.ion.MessageEvent.prototype.clearMessage = function() {
  return this.setMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.ion.MessageEvent.prototype.hasMessage = function() {
  return jspb.Message.getField(this, 4) != null;
};





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.ion.Message.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.Message.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.ion.Message} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Message.toObject = function(includeInstance, msg) {
  var f, obj = {
    from: jspb.Message.getFieldWithDefault(msg, 1, ""),
    to: jspb.Message.getFieldWithDefault(msg, 2, ""),
    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.ion.Message}
 */
proto.ion.Message.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.Message;
  return proto.ion.Message.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.Message} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.Message}
 */
proto.ion.Message.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.setFrom(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setTo(value);
      break;
    case 3:
      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.ion.Message.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.Message.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.Message} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Message.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getFrom();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getTo();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      3,
      f
    );
  }
};


/**
 * optional string from = 1;
 * @return {string}
 */
proto.ion.Message.prototype.getFrom = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Message} returns this
 */
proto.ion.Message.prototype.setFrom = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string to = 2;
 * @return {string}
 */
proto.ion.Message.prototype.getTo = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Message} returns this
 */
proto.ion.Message.prototype.setTo = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional bytes data = 3;
 * @return {!(string|Uint8Array)}
 */
proto.ion.Message.prototype.getData = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * optional bytes data = 3;
 * This is a type-conversion wrapper around `getData()`
 * @return {string}
 */
proto.ion.Message.prototype.getData_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getData()));
};


/**
 * optional bytes data = 3;
 * 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.ion.Message.prototype.getData_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getData()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.ion.Message} returns this
 */
proto.ion.Message.prototype.setData = function(value) {
  return jspb.Message.setProto3BytesField(this, 3, 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.ion.RPC.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.RPC.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.ion.RPC} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.RPC.toObject = function(includeInstance, msg) {
  var f, obj = {
    protocol: jspb.Message.getFieldWithDefault(msg, 1, ""),
    addr: jspb.Message.getFieldWithDefault(msg, 2, ""),
    paramsMap: (f = msg.getParamsMap()) ? f.toObject(includeInstance, undefined) : []
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.ion.RPC}
 */
proto.ion.RPC.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.RPC;
  return proto.ion.RPC.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.RPC} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.RPC}
 */
proto.ion.RPC.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.setProtocol(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setAddr(value);
      break;
    case 3:
      var value = msg.getParamsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.RPC.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.RPC.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.RPC} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.RPC.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getProtocol();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getAddr();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getParamsMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
};


/**
 * optional string protocol = 1;
 * @return {string}
 */
proto.ion.RPC.prototype.getProtocol = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.RPC} returns this
 */
proto.ion.RPC.prototype.setProtocol = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string addr = 2;
 * @return {string}
 */
proto.ion.RPC.prototype.getAddr = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.RPC} returns this
 */
proto.ion.RPC.prototype.setAddr = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * map<string, string> params = 3;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.ion.RPC.prototype.getParamsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 3, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.ion.RPC} returns this
 */
proto.ion.RPC.prototype.clearParamsMap = function() {
  this.getParamsMap().clear();
  return this;};





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.ion.Node.prototype.toObject = function(opt_includeInstance) {
  return proto.ion.Node.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.ion.Node} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Node.toObject = function(includeInstance, msg) {
  var f, obj = {
    dc: jspb.Message.getFieldWithDefault(msg, 1, ""),
    nid: jspb.Message.getFieldWithDefault(msg, 2, ""),
    service: jspb.Message.getFieldWithDefault(msg, 3, ""),
    rpc: (f = msg.getRpc()) && proto.ion.RPC.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.ion.Node}
 */
proto.ion.Node.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ion.Node;
  return proto.ion.Node.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ion.Node} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ion.Node}
 */
proto.ion.Node.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.setDc(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setNid(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setService(value);
      break;
    case 4:
      var value = new proto.ion.RPC;
      reader.readMessage(value,proto.ion.RPC.deserializeBinaryFromReader);
      msg.setRpc(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ion.Node.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ion.Node.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ion.Node} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ion.Node.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDc();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getNid();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getService();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getRpc();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.ion.RPC.serializeBinaryToWriter
    );
  }
};


/**
 * optional string dc = 1;
 * @return {string}
 */
proto.ion.Node.prototype.getDc = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Node} returns this
 */
proto.ion.Node.prototype.setDc = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string nid = 2;
 * @return {string}
 */
proto.ion.Node.prototype.getNid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Node} returns this
 */
proto.ion.Node.prototype.setNid = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string service = 3;
 * @return {string}
 */
proto.ion.Node.prototype.getService = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.ion.Node} returns this
 */
proto.ion.Node.prototype.setService = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional RPC rpc = 4;
 * @return {?proto.ion.RPC}
 */
proto.ion.Node.prototype.getRpc = function() {
  return /** @type{?proto.ion.RPC} */ (
    jspb.Message.getWrapperField(this, proto.ion.RPC, 4));
};


/**
 * @param {?proto.ion.RPC|undefined} value
 * @return {!proto.ion.Node} returns this
*/
proto.ion.Node.prototype.setRpc = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.ion.Node} returns this
 */
proto.ion.Node.prototype.clearRpc = function() {
  return this.setRpc(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.ion.Node.prototype.hasRpc = function() {
  return jspb.Message.getField(this, 4) != null;
};


goog.object.extend(exports, proto.ion);