// source: proto/pubsub.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {missingRequire} reports error on implicit type usages.
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
goog.exportSymbol('proto.video.CameraControl', null, global);
goog.exportSymbol('proto.video.CameraControlAck', null, global);
goog.exportSymbol('proto.video.DownstreamMessage', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.AckMessage', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.AckMessage.ErrorMessage', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.DataMessage', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.MessageCase', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.SystemMessage', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.SystemMessage.ConnectedMessage', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage', null, global);
goog.exportSymbol('proto.video.DownstreamMessage.SystemMessage.MessageCase', null, global);
goog.exportSymbol('proto.video.MessageData', null, global);
goog.exportSymbol('proto.video.MessageData.DataCase', null, global);
goog.exportSymbol('proto.video.UpstreamMessage', null, global);
goog.exportSymbol('proto.video.UpstreamMessage.EventMessage', null, global);
goog.exportSymbol('proto.video.UpstreamMessage.JoinGroupMessage', null, global);
goog.exportSymbol('proto.video.UpstreamMessage.LeaveGroupMessage', null, global);
goog.exportSymbol('proto.video.UpstreamMessage.MessageCase', null, global);
goog.exportSymbol('proto.video.UpstreamMessage.SendToGroupMessage', 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.video.UpstreamMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.video.UpstreamMessage.oneofGroups_);
};
goog.inherits(proto.video.UpstreamMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.UpstreamMessage.displayName = 'proto.video.UpstreamMessage';
}
/**
 * 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.video.UpstreamMessage.SendToGroupMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.UpstreamMessage.SendToGroupMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.UpstreamMessage.SendToGroupMessage.displayName = 'proto.video.UpstreamMessage.SendToGroupMessage';
}
/**
 * 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.video.UpstreamMessage.EventMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.UpstreamMessage.EventMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.UpstreamMessage.EventMessage.displayName = 'proto.video.UpstreamMessage.EventMessage';
}
/**
 * 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.video.UpstreamMessage.JoinGroupMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.UpstreamMessage.JoinGroupMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.UpstreamMessage.JoinGroupMessage.displayName = 'proto.video.UpstreamMessage.JoinGroupMessage';
}
/**
 * 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.video.UpstreamMessage.LeaveGroupMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.UpstreamMessage.LeaveGroupMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.UpstreamMessage.LeaveGroupMessage.displayName = 'proto.video.UpstreamMessage.LeaveGroupMessage';
}
/**
 * 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.video.DownstreamMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.video.DownstreamMessage.oneofGroups_);
};
goog.inherits(proto.video.DownstreamMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.DownstreamMessage.displayName = 'proto.video.DownstreamMessage';
}
/**
 * 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.video.DownstreamMessage.AckMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.DownstreamMessage.AckMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.DownstreamMessage.AckMessage.displayName = 'proto.video.DownstreamMessage.AckMessage';
}
/**
 * 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.video.DownstreamMessage.AckMessage.ErrorMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.DownstreamMessage.AckMessage.ErrorMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.DownstreamMessage.AckMessage.ErrorMessage.displayName = 'proto.video.DownstreamMessage.AckMessage.ErrorMessage';
}
/**
 * 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.video.DownstreamMessage.DataMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.DownstreamMessage.DataMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.DownstreamMessage.DataMessage.displayName = 'proto.video.DownstreamMessage.DataMessage';
}
/**
 * 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.video.DownstreamMessage.SystemMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.video.DownstreamMessage.SystemMessage.oneofGroups_);
};
goog.inherits(proto.video.DownstreamMessage.SystemMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.DownstreamMessage.SystemMessage.displayName = 'proto.video.DownstreamMessage.SystemMessage';
}
/**
 * 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.video.DownstreamMessage.SystemMessage.ConnectedMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.DownstreamMessage.SystemMessage.ConnectedMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.displayName = 'proto.video.DownstreamMessage.SystemMessage.ConnectedMessage';
}
/**
 * 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.video.DownstreamMessage.SystemMessage.DisconnectedMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.displayName = 'proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage';
}
/**
 * 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.video.MessageData = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.video.MessageData.oneofGroups_);
};
goog.inherits(proto.video.MessageData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.MessageData.displayName = 'proto.video.MessageData';
}
/**
 * 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.video.CameraControl = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.CameraControl, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.CameraControl.displayName = 'proto.video.CameraControl';
}
/**
 * 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.video.CameraControlAck = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.video.CameraControlAck, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.video.CameraControlAck.displayName = 'proto.video.CameraControlAck';
}

/**
 * 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.video.UpstreamMessage.oneofGroups_ = [[1,5,6,7]];

/**
 * @enum {number}
 */
proto.video.UpstreamMessage.MessageCase = {
  MESSAGE_NOT_SET: 0,
  SEND_TO_GROUP_MESSAGE: 1,
  EVENT_MESSAGE: 5,
  JOIN_GROUP_MESSAGE: 6,
  LEAVE_GROUP_MESSAGE: 7
};

/**
 * @return {proto.video.UpstreamMessage.MessageCase}
 */
proto.video.UpstreamMessage.prototype.getMessageCase = function() {
  return /** @type {proto.video.UpstreamMessage.MessageCase} */(jspb.Message.computeOneofCase(this, proto.video.UpstreamMessage.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.video.UpstreamMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.UpstreamMessage.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.video.UpstreamMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    sendToGroupMessage: (f = msg.getSendToGroupMessage()) && proto.video.UpstreamMessage.SendToGroupMessage.toObject(includeInstance, f),
    eventMessage: (f = msg.getEventMessage()) && proto.video.UpstreamMessage.EventMessage.toObject(includeInstance, f),
    joinGroupMessage: (f = msg.getJoinGroupMessage()) && proto.video.UpstreamMessage.JoinGroupMessage.toObject(includeInstance, f),
    leaveGroupMessage: (f = msg.getLeaveGroupMessage()) && proto.video.UpstreamMessage.LeaveGroupMessage.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.video.UpstreamMessage}
 */
proto.video.UpstreamMessage.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.video.UpstreamMessage;
  return proto.video.UpstreamMessage.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.UpstreamMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.UpstreamMessage}
 */
proto.video.UpstreamMessage.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.video.UpstreamMessage.SendToGroupMessage;
      reader.readMessage(value,proto.video.UpstreamMessage.SendToGroupMessage.deserializeBinaryFromReader);
      msg.setSendToGroupMessage(value);
      break;
    case 5:
      var value = new proto.video.UpstreamMessage.EventMessage;
      reader.readMessage(value,proto.video.UpstreamMessage.EventMessage.deserializeBinaryFromReader);
      msg.setEventMessage(value);
      break;
    case 6:
      var value = new proto.video.UpstreamMessage.JoinGroupMessage;
      reader.readMessage(value,proto.video.UpstreamMessage.JoinGroupMessage.deserializeBinaryFromReader);
      msg.setJoinGroupMessage(value);
      break;
    case 7:
      var value = new proto.video.UpstreamMessage.LeaveGroupMessage;
      reader.readMessage(value,proto.video.UpstreamMessage.LeaveGroupMessage.deserializeBinaryFromReader);
      msg.setLeaveGroupMessage(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.UpstreamMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSendToGroupMessage();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.video.UpstreamMessage.SendToGroupMessage.serializeBinaryToWriter
    );
  }
  f = message.getEventMessage();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      proto.video.UpstreamMessage.EventMessage.serializeBinaryToWriter
    );
  }
  f = message.getJoinGroupMessage();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      proto.video.UpstreamMessage.JoinGroupMessage.serializeBinaryToWriter
    );
  }
  f = message.getLeaveGroupMessage();
  if (f != null) {
    writer.writeMessage(
      7,
      f,
      proto.video.UpstreamMessage.LeaveGroupMessage.serializeBinaryToWriter
    );
  }
};





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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.UpstreamMessage.SendToGroupMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.UpstreamMessage.SendToGroupMessage}
 */
proto.video.UpstreamMessage.SendToGroupMessage.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.setGroup(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setAckId(value);
      break;
    case 3:
      var value = new proto.video.MessageData;
      reader.readMessage(value,proto.video.MessageData.deserializeBinaryFromReader);
      msg.setData(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.UpstreamMessage.SendToGroupMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.SendToGroupMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGroup();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeInt32(
      2,
      f
    );
  }
  f = message.getData();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.video.MessageData.serializeBinaryToWriter
    );
  }
};


/**
 * optional string group = 1;
 * @return {string}
 */
proto.video.UpstreamMessage.SendToGroupMessage.prototype.getGroup = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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


/**
 * optional int32 ack_id = 2;
 * @return {number}
 */
proto.video.UpstreamMessage.SendToGroupMessage.prototype.getAckId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.video.UpstreamMessage.SendToGroupMessage} returns this
 */
proto.video.UpstreamMessage.SendToGroupMessage.prototype.setAckId = function(value) {
  return jspb.Message.setField(this, 2, value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.video.UpstreamMessage.SendToGroupMessage} returns this
 */
proto.video.UpstreamMessage.SendToGroupMessage.prototype.clearAckId = function() {
  return jspb.Message.setField(this, 2, undefined);
};


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


/**
 * optional MessageData data = 3;
 * @return {?proto.video.MessageData}
 */
proto.video.UpstreamMessage.SendToGroupMessage.prototype.getData = function() {
  return /** @type{?proto.video.MessageData} */ (
    jspb.Message.getWrapperField(this, proto.video.MessageData, 3));
};


/**
 * @param {?proto.video.MessageData|undefined} value
 * @return {!proto.video.UpstreamMessage.SendToGroupMessage} returns this
*/
proto.video.UpstreamMessage.SendToGroupMessage.prototype.setData = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.UpstreamMessage.SendToGroupMessage} returns this
 */
proto.video.UpstreamMessage.SendToGroupMessage.prototype.clearData = function() {
  return this.setData(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.UpstreamMessage.SendToGroupMessage.prototype.hasData = function() {
  return jspb.Message.getField(this, 3) != 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.video.UpstreamMessage.EventMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.UpstreamMessage.EventMessage.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.video.UpstreamMessage.EventMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.EventMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    event: jspb.Message.getFieldWithDefault(msg, 1, ""),
    data: (f = msg.getData()) && proto.video.MessageData.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.video.UpstreamMessage.EventMessage}
 */
proto.video.UpstreamMessage.EventMessage.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.video.UpstreamMessage.EventMessage;
  return proto.video.UpstreamMessage.EventMessage.deserializeBinaryFromReader(msg, reader);
};


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


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


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


/**
 * optional string event = 1;
 * @return {string}
 */
proto.video.UpstreamMessage.EventMessage.prototype.getEvent = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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


/**
 * optional MessageData data = 2;
 * @return {?proto.video.MessageData}
 */
proto.video.UpstreamMessage.EventMessage.prototype.getData = function() {
  return /** @type{?proto.video.MessageData} */ (
    jspb.Message.getWrapperField(this, proto.video.MessageData, 2));
};


/**
 * @param {?proto.video.MessageData|undefined} value
 * @return {!proto.video.UpstreamMessage.EventMessage} returns this
*/
proto.video.UpstreamMessage.EventMessage.prototype.setData = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.UpstreamMessage.EventMessage} returns this
 */
proto.video.UpstreamMessage.EventMessage.prototype.clearData = function() {
  return this.setData(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.UpstreamMessage.EventMessage.prototype.hasData = function() {
  return jspb.Message.getField(this, 2) != 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.video.UpstreamMessage.JoinGroupMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.UpstreamMessage.JoinGroupMessage.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.video.UpstreamMessage.JoinGroupMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.JoinGroupMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    group: jspb.Message.getFieldWithDefault(msg, 1, ""),
    ackId: jspb.Message.getFieldWithDefault(msg, 2, 0)
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.UpstreamMessage.JoinGroupMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.UpstreamMessage.JoinGroupMessage}
 */
proto.video.UpstreamMessage.JoinGroupMessage.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.setGroup(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setAckId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.UpstreamMessage.JoinGroupMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.JoinGroupMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGroup();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeInt32(
      2,
      f
    );
  }
};


/**
 * optional string group = 1;
 * @return {string}
 */
proto.video.UpstreamMessage.JoinGroupMessage.prototype.getGroup = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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


/**
 * optional int32 ack_id = 2;
 * @return {number}
 */
proto.video.UpstreamMessage.JoinGroupMessage.prototype.getAckId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.video.UpstreamMessage.JoinGroupMessage} returns this
 */
proto.video.UpstreamMessage.JoinGroupMessage.prototype.setAckId = function(value) {
  return jspb.Message.setField(this, 2, value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.video.UpstreamMessage.JoinGroupMessage} returns this
 */
proto.video.UpstreamMessage.JoinGroupMessage.prototype.clearAckId = function() {
  return jspb.Message.setField(this, 2, undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.UpstreamMessage.JoinGroupMessage.prototype.hasAckId = function() {
  return jspb.Message.getField(this, 2) != 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.video.UpstreamMessage.LeaveGroupMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.UpstreamMessage.LeaveGroupMessage.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.video.UpstreamMessage.LeaveGroupMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.LeaveGroupMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    group: jspb.Message.getFieldWithDefault(msg, 1, ""),
    ackId: jspb.Message.getFieldWithDefault(msg, 2, 0)
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.UpstreamMessage.LeaveGroupMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.UpstreamMessage.LeaveGroupMessage}
 */
proto.video.UpstreamMessage.LeaveGroupMessage.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.setGroup(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setAckId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.UpstreamMessage.LeaveGroupMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.UpstreamMessage.LeaveGroupMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGroup();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = /** @type {number} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeInt32(
      2,
      f
    );
  }
};


/**
 * optional string group = 1;
 * @return {string}
 */
proto.video.UpstreamMessage.LeaveGroupMessage.prototype.getGroup = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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


/**
 * optional int32 ack_id = 2;
 * @return {number}
 */
proto.video.UpstreamMessage.LeaveGroupMessage.prototype.getAckId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.video.UpstreamMessage.LeaveGroupMessage} returns this
 */
proto.video.UpstreamMessage.LeaveGroupMessage.prototype.setAckId = function(value) {
  return jspb.Message.setField(this, 2, value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.video.UpstreamMessage.LeaveGroupMessage} returns this
 */
proto.video.UpstreamMessage.LeaveGroupMessage.prototype.clearAckId = function() {
  return jspb.Message.setField(this, 2, undefined);
};


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


/**
 * optional SendToGroupMessage send_to_group_message = 1;
 * @return {?proto.video.UpstreamMessage.SendToGroupMessage}
 */
proto.video.UpstreamMessage.prototype.getSendToGroupMessage = function() {
  return /** @type{?proto.video.UpstreamMessage.SendToGroupMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.UpstreamMessage.SendToGroupMessage, 1));
};


/**
 * @param {?proto.video.UpstreamMessage.SendToGroupMessage|undefined} value
 * @return {!proto.video.UpstreamMessage} returns this
*/
proto.video.UpstreamMessage.prototype.setSendToGroupMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.video.UpstreamMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.UpstreamMessage} returns this
 */
proto.video.UpstreamMessage.prototype.clearSendToGroupMessage = function() {
  return this.setSendToGroupMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.UpstreamMessage.prototype.hasSendToGroupMessage = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional EventMessage event_message = 5;
 * @return {?proto.video.UpstreamMessage.EventMessage}
 */
proto.video.UpstreamMessage.prototype.getEventMessage = function() {
  return /** @type{?proto.video.UpstreamMessage.EventMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.UpstreamMessage.EventMessage, 5));
};


/**
 * @param {?proto.video.UpstreamMessage.EventMessage|undefined} value
 * @return {!proto.video.UpstreamMessage} returns this
*/
proto.video.UpstreamMessage.prototype.setEventMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 5, proto.video.UpstreamMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.UpstreamMessage} returns this
 */
proto.video.UpstreamMessage.prototype.clearEventMessage = function() {
  return this.setEventMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.UpstreamMessage.prototype.hasEventMessage = function() {
  return jspb.Message.getField(this, 5) != null;
};


/**
 * optional JoinGroupMessage join_group_message = 6;
 * @return {?proto.video.UpstreamMessage.JoinGroupMessage}
 */
proto.video.UpstreamMessage.prototype.getJoinGroupMessage = function() {
  return /** @type{?proto.video.UpstreamMessage.JoinGroupMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.UpstreamMessage.JoinGroupMessage, 6));
};


/**
 * @param {?proto.video.UpstreamMessage.JoinGroupMessage|undefined} value
 * @return {!proto.video.UpstreamMessage} returns this
*/
proto.video.UpstreamMessage.prototype.setJoinGroupMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 6, proto.video.UpstreamMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.UpstreamMessage} returns this
 */
proto.video.UpstreamMessage.prototype.clearJoinGroupMessage = function() {
  return this.setJoinGroupMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.UpstreamMessage.prototype.hasJoinGroupMessage = function() {
  return jspb.Message.getField(this, 6) != null;
};


/**
 * optional LeaveGroupMessage leave_group_message = 7;
 * @return {?proto.video.UpstreamMessage.LeaveGroupMessage}
 */
proto.video.UpstreamMessage.prototype.getLeaveGroupMessage = function() {
  return /** @type{?proto.video.UpstreamMessage.LeaveGroupMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.UpstreamMessage.LeaveGroupMessage, 7));
};


/**
 * @param {?proto.video.UpstreamMessage.LeaveGroupMessage|undefined} value
 * @return {!proto.video.UpstreamMessage} returns this
*/
proto.video.UpstreamMessage.prototype.setLeaveGroupMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 7, proto.video.UpstreamMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.UpstreamMessage} returns this
 */
proto.video.UpstreamMessage.prototype.clearLeaveGroupMessage = function() {
  return this.setLeaveGroupMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.UpstreamMessage.prototype.hasLeaveGroupMessage = function() {
  return jspb.Message.getField(this, 7) != null;
};



/**
 * Oneof group definitions for this message. Each group defines the field
 * numbers belonging to that group. When of these fields' value is set, all
 * other fields in the group are cleared. During deserialization, if multiple
 * fields are encountered for a group, only the last value seen will be kept.
 * @private {!Array<!Array<number>>}
 * @const
 */
proto.video.DownstreamMessage.oneofGroups_ = [[1,2,3]];

/**
 * @enum {number}
 */
proto.video.DownstreamMessage.MessageCase = {
  MESSAGE_NOT_SET: 0,
  ACK_MESSAGE: 1,
  DATA_MESSAGE: 2,
  SYSTEM_MESSAGE: 3
};

/**
 * @return {proto.video.DownstreamMessage.MessageCase}
 */
proto.video.DownstreamMessage.prototype.getMessageCase = function() {
  return /** @type {proto.video.DownstreamMessage.MessageCase} */(jspb.Message.computeOneofCase(this, proto.video.DownstreamMessage.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.video.DownstreamMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.DownstreamMessage.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.video.DownstreamMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    ackMessage: (f = msg.getAckMessage()) && proto.video.DownstreamMessage.AckMessage.toObject(includeInstance, f),
    dataMessage: (f = msg.getDataMessage()) && proto.video.DownstreamMessage.DataMessage.toObject(includeInstance, f),
    systemMessage: (f = msg.getSystemMessage()) && proto.video.DownstreamMessage.SystemMessage.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.video.DownstreamMessage}
 */
proto.video.DownstreamMessage.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.video.DownstreamMessage;
  return proto.video.DownstreamMessage.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.DownstreamMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.DownstreamMessage}
 */
proto.video.DownstreamMessage.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.video.DownstreamMessage.AckMessage;
      reader.readMessage(value,proto.video.DownstreamMessage.AckMessage.deserializeBinaryFromReader);
      msg.setAckMessage(value);
      break;
    case 2:
      var value = new proto.video.DownstreamMessage.DataMessage;
      reader.readMessage(value,proto.video.DownstreamMessage.DataMessage.deserializeBinaryFromReader);
      msg.setDataMessage(value);
      break;
    case 3:
      var value = new proto.video.DownstreamMessage.SystemMessage;
      reader.readMessage(value,proto.video.DownstreamMessage.SystemMessage.deserializeBinaryFromReader);
      msg.setSystemMessage(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.DownstreamMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getAckMessage();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.video.DownstreamMessage.AckMessage.serializeBinaryToWriter
    );
  }
  f = message.getDataMessage();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.video.DownstreamMessage.DataMessage.serializeBinaryToWriter
    );
  }
  f = message.getSystemMessage();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.video.DownstreamMessage.SystemMessage.serializeBinaryToWriter
    );
  }
};





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.video.DownstreamMessage.AckMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.DownstreamMessage.AckMessage.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.video.DownstreamMessage.AckMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.AckMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    ackId: jspb.Message.getFieldWithDefault(msg, 1, 0),
    success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
    error: (f = msg.getError()) && proto.video.DownstreamMessage.AckMessage.ErrorMessage.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.video.DownstreamMessage.AckMessage}
 */
proto.video.DownstreamMessage.AckMessage.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.video.DownstreamMessage.AckMessage;
  return proto.video.DownstreamMessage.AckMessage.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.DownstreamMessage.AckMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.DownstreamMessage.AckMessage}
 */
proto.video.DownstreamMessage.AckMessage.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.setAckId(value);
      break;
    case 2:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setSuccess(value);
      break;
    case 3:
      var value = new proto.video.DownstreamMessage.AckMessage.ErrorMessage;
      reader.readMessage(value,proto.video.DownstreamMessage.AckMessage.ErrorMessage.deserializeBinaryFromReader);
      msg.setError(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.DownstreamMessage.AckMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.AckMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getAckId();
  if (f !== 0) {
    writer.writeInt32(
      1,
      f
    );
  }
  f = message.getSuccess();
  if (f) {
    writer.writeBool(
      2,
      f
    );
  }
  f = message.getError();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.video.DownstreamMessage.AckMessage.ErrorMessage.serializeBinaryToWriter
    );
  }
};





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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.DownstreamMessage.AckMessage.ErrorMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.DownstreamMessage.AckMessage.ErrorMessage}
 */
proto.video.DownstreamMessage.AckMessage.ErrorMessage.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.setName(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setMessage(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


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


/**
 * optional string name = 1;
 * @return {string}
 */
proto.video.DownstreamMessage.AckMessage.ErrorMessage.prototype.getName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.video.DownstreamMessage.AckMessage.ErrorMessage} returns this
 */
proto.video.DownstreamMessage.AckMessage.ErrorMessage.prototype.setName = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string message = 2;
 * @return {string}
 */
proto.video.DownstreamMessage.AckMessage.ErrorMessage.prototype.getMessage = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.video.DownstreamMessage.AckMessage.ErrorMessage} returns this
 */
proto.video.DownstreamMessage.AckMessage.ErrorMessage.prototype.setMessage = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional int32 ack_id = 1;
 * @return {number}
 */
proto.video.DownstreamMessage.AckMessage.prototype.getAckId = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.video.DownstreamMessage.AckMessage} returns this
 */
proto.video.DownstreamMessage.AckMessage.prototype.setAckId = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional bool success = 2;
 * @return {boolean}
 */
proto.video.DownstreamMessage.AckMessage.prototype.getSuccess = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};


/**
 * @param {boolean} value
 * @return {!proto.video.DownstreamMessage.AckMessage} returns this
 */
proto.video.DownstreamMessage.AckMessage.prototype.setSuccess = function(value) {
  return jspb.Message.setProto3BooleanField(this, 2, value);
};


/**
 * optional ErrorMessage error = 3;
 * @return {?proto.video.DownstreamMessage.AckMessage.ErrorMessage}
 */
proto.video.DownstreamMessage.AckMessage.prototype.getError = function() {
  return /** @type{?proto.video.DownstreamMessage.AckMessage.ErrorMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.DownstreamMessage.AckMessage.ErrorMessage, 3));
};


/**
 * @param {?proto.video.DownstreamMessage.AckMessage.ErrorMessage|undefined} value
 * @return {!proto.video.DownstreamMessage.AckMessage} returns this
*/
proto.video.DownstreamMessage.AckMessage.prototype.setError = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.DownstreamMessage.AckMessage} returns this
 */
proto.video.DownstreamMessage.AckMessage.prototype.clearError = function() {
  return this.setError(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.DownstreamMessage.AckMessage.prototype.hasError = function() {
  return jspb.Message.getField(this, 3) != 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.video.DownstreamMessage.DataMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.DownstreamMessage.DataMessage.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.video.DownstreamMessage.DataMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.DataMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    from: jspb.Message.getFieldWithDefault(msg, 1, ""),
    group: jspb.Message.getFieldWithDefault(msg, 2, ""),
    data: (f = msg.getData()) && proto.video.MessageData.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.video.DownstreamMessage.DataMessage}
 */
proto.video.DownstreamMessage.DataMessage.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.video.DownstreamMessage.DataMessage;
  return proto.video.DownstreamMessage.DataMessage.deserializeBinaryFromReader(msg, reader);
};


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


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.DownstreamMessage.DataMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.DataMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getFrom();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = /** @type {string} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getData();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.video.MessageData.serializeBinaryToWriter
    );
  }
};


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


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


/**
 * optional string group = 2;
 * @return {string}
 */
proto.video.DownstreamMessage.DataMessage.prototype.getGroup = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.video.DownstreamMessage.DataMessage} returns this
 */
proto.video.DownstreamMessage.DataMessage.prototype.setGroup = function(value) {
  return jspb.Message.setField(this, 2, value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.video.DownstreamMessage.DataMessage} returns this
 */
proto.video.DownstreamMessage.DataMessage.prototype.clearGroup = function() {
  return jspb.Message.setField(this, 2, undefined);
};


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


/**
 * optional MessageData data = 3;
 * @return {?proto.video.MessageData}
 */
proto.video.DownstreamMessage.DataMessage.prototype.getData = function() {
  return /** @type{?proto.video.MessageData} */ (
    jspb.Message.getWrapperField(this, proto.video.MessageData, 3));
};


/**
 * @param {?proto.video.MessageData|undefined} value
 * @return {!proto.video.DownstreamMessage.DataMessage} returns this
*/
proto.video.DownstreamMessage.DataMessage.prototype.setData = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.DownstreamMessage.DataMessage} returns this
 */
proto.video.DownstreamMessage.DataMessage.prototype.clearData = function() {
  return this.setData(undefined);
};


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



/**
 * Oneof group definitions for this message. Each group defines the field
 * numbers belonging to that group. When of these fields' value is set, all
 * other fields in the group are cleared. During deserialization, if multiple
 * fields are encountered for a group, only the last value seen will be kept.
 * @private {!Array<!Array<number>>}
 * @const
 */
proto.video.DownstreamMessage.SystemMessage.oneofGroups_ = [[1,2]];

/**
 * @enum {number}
 */
proto.video.DownstreamMessage.SystemMessage.MessageCase = {
  MESSAGE_NOT_SET: 0,
  CONNECTED_MESSAGE: 1,
  DISCONNECTED_MESSAGE: 2
};

/**
 * @return {proto.video.DownstreamMessage.SystemMessage.MessageCase}
 */
proto.video.DownstreamMessage.SystemMessage.prototype.getMessageCase = function() {
  return /** @type {proto.video.DownstreamMessage.SystemMessage.MessageCase} */(jspb.Message.computeOneofCase(this, proto.video.DownstreamMessage.SystemMessage.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.video.DownstreamMessage.SystemMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.video.DownstreamMessage.SystemMessage.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.video.DownstreamMessage.SystemMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.SystemMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    connectedMessage: (f = msg.getConnectedMessage()) && proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.toObject(includeInstance, f),
    disconnectedMessage: (f = msg.getDisconnectedMessage()) && proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.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.video.DownstreamMessage.SystemMessage}
 */
proto.video.DownstreamMessage.SystemMessage.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.video.DownstreamMessage.SystemMessage;
  return proto.video.DownstreamMessage.SystemMessage.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.DownstreamMessage.SystemMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.DownstreamMessage.SystemMessage}
 */
proto.video.DownstreamMessage.SystemMessage.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.video.DownstreamMessage.SystemMessage.ConnectedMessage;
      reader.readMessage(value,proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.deserializeBinaryFromReader);
      msg.setConnectedMessage(value);
      break;
    case 2:
      var value = new proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage;
      reader.readMessage(value,proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.deserializeBinaryFromReader);
      msg.setDisconnectedMessage(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.DownstreamMessage.SystemMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.DownstreamMessage.SystemMessage.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getConnectedMessage();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.serializeBinaryToWriter
    );
  }
  f = message.getDisconnectedMessage();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.serializeBinaryToWriter
    );
  }
};





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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.DownstreamMessage.SystemMessage.ConnectedMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.DownstreamMessage.SystemMessage.ConnectedMessage}
 */
proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.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.setConnectionId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setUserId(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


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


/**
 * optional string connection_id = 1;
 * @return {string}
 */
proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.prototype.getConnectionId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.video.DownstreamMessage.SystemMessage.ConnectedMessage} returns this
 */
proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.prototype.setConnectionId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string user_id = 2;
 * @return {string}
 */
proto.video.DownstreamMessage.SystemMessage.ConnectedMessage.prototype.getUserId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage}
 */
proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.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.setConnectionId(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.video.DownstreamMessage.SystemMessage.DisconnectedMessage.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


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


/**
 * optional string connection_id = 1;
 * @return {string}
 */
proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.prototype.getConnectionId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage} returns this
 */
proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.prototype.setConnectionId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


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


/**
 * @param {string} value
 * @return {!proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage} returns this
 */
proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage.prototype.setReason = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional ConnectedMessage connected_message = 1;
 * @return {?proto.video.DownstreamMessage.SystemMessage.ConnectedMessage}
 */
proto.video.DownstreamMessage.SystemMessage.prototype.getConnectedMessage = function() {
  return /** @type{?proto.video.DownstreamMessage.SystemMessage.ConnectedMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.DownstreamMessage.SystemMessage.ConnectedMessage, 1));
};


/**
 * @param {?proto.video.DownstreamMessage.SystemMessage.ConnectedMessage|undefined} value
 * @return {!proto.video.DownstreamMessage.SystemMessage} returns this
*/
proto.video.DownstreamMessage.SystemMessage.prototype.setConnectedMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.video.DownstreamMessage.SystemMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.DownstreamMessage.SystemMessage} returns this
 */
proto.video.DownstreamMessage.SystemMessage.prototype.clearConnectedMessage = function() {
  return this.setConnectedMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.DownstreamMessage.SystemMessage.prototype.hasConnectedMessage = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional DisconnectedMessage disconnected_message = 2;
 * @return {?proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage}
 */
proto.video.DownstreamMessage.SystemMessage.prototype.getDisconnectedMessage = function() {
  return /** @type{?proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage, 2));
};


/**
 * @param {?proto.video.DownstreamMessage.SystemMessage.DisconnectedMessage|undefined} value
 * @return {!proto.video.DownstreamMessage.SystemMessage} returns this
*/
proto.video.DownstreamMessage.SystemMessage.prototype.setDisconnectedMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.video.DownstreamMessage.SystemMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.DownstreamMessage.SystemMessage} returns this
 */
proto.video.DownstreamMessage.SystemMessage.prototype.clearDisconnectedMessage = function() {
  return this.setDisconnectedMessage(undefined);
};


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


/**
 * optional AckMessage ack_message = 1;
 * @return {?proto.video.DownstreamMessage.AckMessage}
 */
proto.video.DownstreamMessage.prototype.getAckMessage = function() {
  return /** @type{?proto.video.DownstreamMessage.AckMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.DownstreamMessage.AckMessage, 1));
};


/**
 * @param {?proto.video.DownstreamMessage.AckMessage|undefined} value
 * @return {!proto.video.DownstreamMessage} returns this
*/
proto.video.DownstreamMessage.prototype.setAckMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.video.DownstreamMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.DownstreamMessage} returns this
 */
proto.video.DownstreamMessage.prototype.clearAckMessage = function() {
  return this.setAckMessage(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.DownstreamMessage.prototype.hasAckMessage = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional DataMessage data_message = 2;
 * @return {?proto.video.DownstreamMessage.DataMessage}
 */
proto.video.DownstreamMessage.prototype.getDataMessage = function() {
  return /** @type{?proto.video.DownstreamMessage.DataMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.DownstreamMessage.DataMessage, 2));
};


/**
 * @param {?proto.video.DownstreamMessage.DataMessage|undefined} value
 * @return {!proto.video.DownstreamMessage} returns this
*/
proto.video.DownstreamMessage.prototype.setDataMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.video.DownstreamMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.DownstreamMessage} returns this
 */
proto.video.DownstreamMessage.prototype.clearDataMessage = function() {
  return this.setDataMessage(undefined);
};


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


/**
 * optional SystemMessage system_message = 3;
 * @return {?proto.video.DownstreamMessage.SystemMessage}
 */
proto.video.DownstreamMessage.prototype.getSystemMessage = function() {
  return /** @type{?proto.video.DownstreamMessage.SystemMessage} */ (
    jspb.Message.getWrapperField(this, proto.video.DownstreamMessage.SystemMessage, 3));
};


/**
 * @param {?proto.video.DownstreamMessage.SystemMessage|undefined} value
 * @return {!proto.video.DownstreamMessage} returns this
*/
proto.video.DownstreamMessage.prototype.setSystemMessage = function(value) {
  return jspb.Message.setOneofWrapperField(this, 3, proto.video.DownstreamMessage.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.DownstreamMessage} returns this
 */
proto.video.DownstreamMessage.prototype.clearSystemMessage = function() {
  return this.setSystemMessage(undefined);
};


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



/**
 * Oneof group definitions for this message. Each group defines the field
 * numbers belonging to that group. When of these fields' value is set, all
 * other fields in the group are cleared. During deserialization, if multiple
 * fields are encountered for a group, only the last value seen will be kept.
 * @private {!Array<!Array<number>>}
 * @const
 */
proto.video.MessageData.oneofGroups_ = [[1,2,3]];

/**
 * @enum {number}
 */
proto.video.MessageData.DataCase = {
  DATA_NOT_SET: 0,
  TEXT_DATA: 1,
  BINARY_DATA: 2,
  PROTOBUF_DATA: 3
};

/**
 * @return {proto.video.MessageData.DataCase}
 */
proto.video.MessageData.prototype.getDataCase = function() {
  return /** @type {proto.video.MessageData.DataCase} */(jspb.Message.computeOneofCase(this, proto.video.MessageData.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.video.MessageData.prototype.toObject = function(opt_includeInstance) {
  return proto.video.MessageData.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.video.MessageData} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.MessageData.toObject = function(includeInstance, msg) {
  var f, obj = {
    textData: jspb.Message.getFieldWithDefault(msg, 1, ""),
    binaryData: msg.getBinaryData_asB64(),
    protobufData: (f = msg.getProtobufData()) && google_protobuf_any_pb.Any.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.video.MessageData}
 */
proto.video.MessageData.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.video.MessageData;
  return proto.video.MessageData.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.MessageData} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.MessageData}
 */
proto.video.MessageData.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.setTextData(value);
      break;
    case 2:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setBinaryData(value);
      break;
    case 3:
      var value = new google_protobuf_any_pb.Any;
      reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
      msg.setProtobufData(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.MessageData} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.MessageData.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = /** @type {string} */ (jspb.Message.getField(message, 1));
  if (f != null) {
    writer.writeString(
      1,
      f
    );
  }
  f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2));
  if (f != null) {
    writer.writeBytes(
      2,
      f
    );
  }
  f = message.getProtobufData();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
};


/**
 * optional string text_data = 1;
 * @return {string}
 */
proto.video.MessageData.prototype.getTextData = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.video.MessageData} returns this
 */
proto.video.MessageData.prototype.setTextData = function(value) {
  return jspb.Message.setOneofField(this, 1, proto.video.MessageData.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.video.MessageData} returns this
 */
proto.video.MessageData.prototype.clearTextData = function() {
  return jspb.Message.setOneofField(this, 1, proto.video.MessageData.oneofGroups_[0], undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.MessageData.prototype.hasTextData = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional bytes binary_data = 2;
 * @return {!(string|Uint8Array)}
 */
proto.video.MessageData.prototype.getBinaryData = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * optional bytes binary_data = 2;
 * This is a type-conversion wrapper around `getBinaryData()`
 * @return {string}
 */
proto.video.MessageData.prototype.getBinaryData_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getBinaryData()));
};


/**
 * optional bytes binary_data = 2;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getBinaryData()`
 * @return {!Uint8Array}
 */
proto.video.MessageData.prototype.getBinaryData_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getBinaryData()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.video.MessageData} returns this
 */
proto.video.MessageData.prototype.setBinaryData = function(value) {
  return jspb.Message.setOneofField(this, 2, proto.video.MessageData.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.video.MessageData} returns this
 */
proto.video.MessageData.prototype.clearBinaryData = function() {
  return jspb.Message.setOneofField(this, 2, proto.video.MessageData.oneofGroups_[0], undefined);
};


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


/**
 * optional google.protobuf.Any protobuf_data = 3;
 * @return {?proto.google.protobuf.Any}
 */
proto.video.MessageData.prototype.getProtobufData = function() {
  return /** @type{?proto.google.protobuf.Any} */ (
    jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3));
};


/**
 * @param {?proto.google.protobuf.Any|undefined} value
 * @return {!proto.video.MessageData} returns this
*/
proto.video.MessageData.prototype.setProtobufData = function(value) {
  return jspb.Message.setOneofWrapperField(this, 3, proto.video.MessageData.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.video.MessageData} returns this
 */
proto.video.MessageData.prototype.clearProtobufData = function() {
  return this.setProtobufData(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.video.MessageData.prototype.hasProtobufData = function() {
  return jspb.Message.getField(this, 3) != 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.video.CameraControl.prototype.toObject = function(opt_includeInstance) {
  return proto.video.CameraControl.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.video.CameraControl} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.CameraControl.toObject = function(includeInstance, msg) {
  var f, obj = {
    shareId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    sender: jspb.Message.getFieldWithDefault(msg, 2, ""),
    reciver: jspb.Message.getFieldWithDefault(msg, 3, "")
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.CameraControl} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.CameraControl}
 */
proto.video.CameraControl.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.setShareId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setSender(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setReciver(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


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


/**
 * optional string share_id = 1;
 * @return {string}
 */
proto.video.CameraControl.prototype.getShareId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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


/**
 * optional string sender = 2;
 * @return {string}
 */
proto.video.CameraControl.prototype.getSender = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


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


/**
 * optional string reciver = 3;
 * @return {string}
 */
proto.video.CameraControl.prototype.getReciver = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.video.CameraControl} returns this
 */
proto.video.CameraControl.prototype.setReciver = function(value) {
  return jspb.Message.setProto3StringField(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.video.CameraControlAck.prototype.toObject = function(opt_includeInstance) {
  return proto.video.CameraControlAck.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.video.CameraControlAck} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.CameraControlAck.toObject = function(includeInstance, msg) {
  var f, obj = {
    shareId: jspb.Message.getFieldWithDefault(msg, 1, ""),
    approved: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
    sender: jspb.Message.getFieldWithDefault(msg, 3, ""),
    reciver: jspb.Message.getFieldWithDefault(msg, 4, "")
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.video.CameraControlAck} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.video.CameraControlAck}
 */
proto.video.CameraControlAck.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.setShareId(value);
      break;
    case 2:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setApproved(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setSender(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setReciver(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.video.CameraControlAck} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.video.CameraControlAck.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getShareId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getApproved();
  if (f) {
    writer.writeBool(
      2,
      f
    );
  }
  f = message.getSender();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getReciver();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
};


/**
 * optional string share_id = 1;
 * @return {string}
 */
proto.video.CameraControlAck.prototype.getShareId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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


/**
 * optional bool approved = 2;
 * @return {boolean}
 */
proto.video.CameraControlAck.prototype.getApproved = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};


/**
 * @param {boolean} value
 * @return {!proto.video.CameraControlAck} returns this
 */
proto.video.CameraControlAck.prototype.setApproved = function(value) {
  return jspb.Message.setProto3BooleanField(this, 2, value);
};


/**
 * optional string sender = 3;
 * @return {string}
 */
proto.video.CameraControlAck.prototype.getSender = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


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


/**
 * optional string reciver = 4;
 * @return {string}
 */
proto.video.CameraControlAck.prototype.getReciver = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


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


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