Source: proto/spine/client/subscription_pb.js

// source: spine/client/subscription.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

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

var spine_options_pb = require('../../spine/options_pb.js');
goog.object.extend(proto, spine_options_pb);
var google_protobuf_any_pb = require('../../google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var google_protobuf_field_mask_pb = require('../../google/protobuf/field_mask_pb.js');
goog.object.extend(proto, google_protobuf_field_mask_pb);
var spine_core_user_id_pb = require('../../spine/core/user_id_pb.js');
goog.object.extend(proto, spine_core_user_id_pb);
var spine_core_tenant_id_pb = require('../../spine/core/tenant_id_pb.js');
goog.object.extend(proto, spine_core_tenant_id_pb);
var spine_core_actor_context_pb = require('../../spine/core/actor_context_pb.js');
goog.object.extend(proto, spine_core_actor_context_pb);
var spine_core_event_pb = require('../../spine/core/event_pb.js');
goog.object.extend(proto, spine_core_event_pb);
var spine_core_response_pb = require('../../spine/core/response_pb.js');
goog.object.extend(proto, spine_core_response_pb);
var spine_client_filters_pb = require('../../spine/client/filters_pb.js');
goog.object.extend(proto, spine_client_filters_pb);
goog.exportSymbol('proto.spine.client.EntityStateUpdate', null, global);
goog.exportSymbol('proto.spine.client.EntityStateUpdate.KindCase', null, global);
goog.exportSymbol('proto.spine.client.EntityUpdates', null, global);
goog.exportSymbol('proto.spine.client.EventUpdates', null, global);
goog.exportSymbol('proto.spine.client.Subscription', null, global);
goog.exportSymbol('proto.spine.client.SubscriptionId', null, global);
goog.exportSymbol('proto.spine.client.SubscriptionUpdate', null, global);
goog.exportSymbol('proto.spine.client.SubscriptionUpdate.UpdateCase', null, global);
goog.exportSymbol('proto.spine.client.SubscriptionValidationError', null, global);
goog.exportSymbol('proto.spine.client.Topic', null, global);
goog.exportSymbol('proto.spine.client.TopicId', null, global);
goog.exportSymbol('proto.spine.client.TopicValidationError', 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.spine.client.TopicId = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.TopicId, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.TopicId.displayName = 'proto.spine.client.TopicId';
}
/**
 * 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.spine.client.Topic = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.Topic, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.Topic.displayName = 'proto.spine.client.Topic';
}
/**
 * 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.spine.client.SubscriptionUpdate = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.spine.client.SubscriptionUpdate.oneofGroups_);
};
goog.inherits(proto.spine.client.SubscriptionUpdate, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.SubscriptionUpdate.displayName = 'proto.spine.client.SubscriptionUpdate';
}
/**
 * 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.spine.client.EntityUpdates = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.client.EntityUpdates.repeatedFields_, null);
};
goog.inherits(proto.spine.client.EntityUpdates, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.EntityUpdates.displayName = 'proto.spine.client.EntityUpdates';
}
/**
 * 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.spine.client.EntityStateUpdate = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.spine.client.EntityStateUpdate.oneofGroups_);
};
goog.inherits(proto.spine.client.EntityStateUpdate, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.EntityStateUpdate.displayName = 'proto.spine.client.EntityStateUpdate';
}
/**
 * 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.spine.client.EventUpdates = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.client.EventUpdates.repeatedFields_, null);
};
goog.inherits(proto.spine.client.EventUpdates, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.EventUpdates.displayName = 'proto.spine.client.EventUpdates';
}
/**
 * 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.spine.client.SubscriptionId = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.SubscriptionId, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.SubscriptionId.displayName = 'proto.spine.client.SubscriptionId';
}
/**
 * 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.spine.client.Subscription = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.client.Subscription, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.client.Subscription.displayName = 'proto.spine.client.Subscription';
}



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

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


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


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


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


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


/**
 * optional string value = 1;
 * @return {string}
 */
proto.spine.client.TopicId.prototype.getValue = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.spine.client.Topic.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.Topic.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.spine.client.Topic} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Topic.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: (f = msg.getId()) && proto.spine.client.TopicId.toObject(includeInstance, f),
    target: (f = msg.getTarget()) && spine_client_filters_pb.Target.toObject(includeInstance, f),
    fieldMask: (f = msg.getFieldMask()) && google_protobuf_field_mask_pb.FieldMask.toObject(includeInstance, f),
    context: (f = msg.getContext()) && spine_core_actor_context_pb.ActorContext.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.spine.client.Topic}
 */
proto.spine.client.Topic.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.Topic;
  return proto.spine.client.Topic.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.Topic} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.Topic}
 */
proto.spine.client.Topic.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.spine.client.TopicId;
      reader.readMessage(value,proto.spine.client.TopicId.deserializeBinaryFromReader);
      msg.setId(value);
      break;
    case 2:
      var value = new spine_client_filters_pb.Target;
      reader.readMessage(value,spine_client_filters_pb.Target.deserializeBinaryFromReader);
      msg.setTarget(value);
      break;
    case 3:
      var value = new google_protobuf_field_mask_pb.FieldMask;
      reader.readMessage(value,google_protobuf_field_mask_pb.FieldMask.deserializeBinaryFromReader);
      msg.setFieldMask(value);
      break;
    case 4:
      var value = new spine_core_actor_context_pb.ActorContext;
      reader.readMessage(value,spine_core_actor_context_pb.ActorContext.deserializeBinaryFromReader);
      msg.setContext(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.Topic} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Topic.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.spine.client.TopicId.serializeBinaryToWriter
    );
  }
  f = message.getTarget();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      spine_client_filters_pb.Target.serializeBinaryToWriter
    );
  }
  f = message.getFieldMask();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      google_protobuf_field_mask_pb.FieldMask.serializeBinaryToWriter
    );
  }
  f = message.getContext();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      spine_core_actor_context_pb.ActorContext.serializeBinaryToWriter
    );
  }
};


/**
 * optional TopicId id = 1;
 * @return {?proto.spine.client.TopicId}
 */
proto.spine.client.Topic.prototype.getId = function() {
  return /** @type{?proto.spine.client.TopicId} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.TopicId, 1));
};


/**
 * @param {?proto.spine.client.TopicId|undefined} value
 * @return {!proto.spine.client.Topic} returns this
*/
proto.spine.client.Topic.prototype.setId = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Topic} returns this
 */
proto.spine.client.Topic.prototype.clearId = function() {
  return this.setId(undefined);
};


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


/**
 * optional Target target = 2;
 * @return {?proto.spine.client.Target}
 */
proto.spine.client.Topic.prototype.getTarget = function() {
  return /** @type{?proto.spine.client.Target} */ (
    jspb.Message.getWrapperField(this, spine_client_filters_pb.Target, 2));
};


/**
 * @param {?proto.spine.client.Target|undefined} value
 * @return {!proto.spine.client.Topic} returns this
*/
proto.spine.client.Topic.prototype.setTarget = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Topic} returns this
 */
proto.spine.client.Topic.prototype.clearTarget = function() {
  return this.setTarget(undefined);
};


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


/**
 * optional google.protobuf.FieldMask field_mask = 3;
 * @return {?proto.google.protobuf.FieldMask}
 */
proto.spine.client.Topic.prototype.getFieldMask = function() {
  return /** @type{?proto.google.protobuf.FieldMask} */ (
    jspb.Message.getWrapperField(this, google_protobuf_field_mask_pb.FieldMask, 3));
};


/**
 * @param {?proto.google.protobuf.FieldMask|undefined} value
 * @return {!proto.spine.client.Topic} returns this
*/
proto.spine.client.Topic.prototype.setFieldMask = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Topic} returns this
 */
proto.spine.client.Topic.prototype.clearFieldMask = function() {
  return this.setFieldMask(undefined);
};


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


/**
 * optional spine.core.ActorContext context = 4;
 * @return {?proto.spine.core.ActorContext}
 */
proto.spine.client.Topic.prototype.getContext = function() {
  return /** @type{?proto.spine.core.ActorContext} */ (
    jspb.Message.getWrapperField(this, spine_core_actor_context_pb.ActorContext, 4));
};


/**
 * @param {?proto.spine.core.ActorContext|undefined} value
 * @return {!proto.spine.client.Topic} returns this
*/
proto.spine.client.Topic.prototype.setContext = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Topic} returns this
 */
proto.spine.client.Topic.prototype.clearContext = function() {
  return this.setContext(undefined);
};


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



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

/**
 * @enum {number}
 */
proto.spine.client.SubscriptionUpdate.UpdateCase = {
  UPDATE_NOT_SET: 0,
  ENTITY_UPDATES: 12,
  EVENT_UPDATES: 13
};

/**
 * @return {proto.spine.client.SubscriptionUpdate.UpdateCase}
 */
proto.spine.client.SubscriptionUpdate.prototype.getUpdateCase = function() {
  return /** @type {proto.spine.client.SubscriptionUpdate.UpdateCase} */(jspb.Message.computeOneofCase(this, proto.spine.client.SubscriptionUpdate.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.spine.client.SubscriptionUpdate.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.SubscriptionUpdate.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.spine.client.SubscriptionUpdate} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.SubscriptionUpdate.toObject = function(includeInstance, msg) {
  var f, obj = {
    subscription: (f = msg.getSubscription()) && proto.spine.client.Subscription.toObject(includeInstance, f),
    response: (f = msg.getResponse()) && spine_core_response_pb.Response.toObject(includeInstance, f),
    entityUpdates: (f = msg.getEntityUpdates()) && proto.spine.client.EntityUpdates.toObject(includeInstance, f),
    eventUpdates: (f = msg.getEventUpdates()) && proto.spine.client.EventUpdates.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.spine.client.SubscriptionUpdate}
 */
proto.spine.client.SubscriptionUpdate.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.SubscriptionUpdate;
  return proto.spine.client.SubscriptionUpdate.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.SubscriptionUpdate} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.SubscriptionUpdate}
 */
proto.spine.client.SubscriptionUpdate.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.spine.client.Subscription;
      reader.readMessage(value,proto.spine.client.Subscription.deserializeBinaryFromReader);
      msg.setSubscription(value);
      break;
    case 2:
      var value = new spine_core_response_pb.Response;
      reader.readMessage(value,spine_core_response_pb.Response.deserializeBinaryFromReader);
      msg.setResponse(value);
      break;
    case 12:
      var value = new proto.spine.client.EntityUpdates;
      reader.readMessage(value,proto.spine.client.EntityUpdates.deserializeBinaryFromReader);
      msg.setEntityUpdates(value);
      break;
    case 13:
      var value = new proto.spine.client.EventUpdates;
      reader.readMessage(value,proto.spine.client.EventUpdates.deserializeBinaryFromReader);
      msg.setEventUpdates(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.SubscriptionUpdate} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.SubscriptionUpdate.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSubscription();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.spine.client.Subscription.serializeBinaryToWriter
    );
  }
  f = message.getResponse();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      spine_core_response_pb.Response.serializeBinaryToWriter
    );
  }
  f = message.getEntityUpdates();
  if (f != null) {
    writer.writeMessage(
      12,
      f,
      proto.spine.client.EntityUpdates.serializeBinaryToWriter
    );
  }
  f = message.getEventUpdates();
  if (f != null) {
    writer.writeMessage(
      13,
      f,
      proto.spine.client.EventUpdates.serializeBinaryToWriter
    );
  }
};


/**
 * optional Subscription subscription = 1;
 * @return {?proto.spine.client.Subscription}
 */
proto.spine.client.SubscriptionUpdate.prototype.getSubscription = function() {
  return /** @type{?proto.spine.client.Subscription} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.Subscription, 1));
};


/**
 * @param {?proto.spine.client.Subscription|undefined} value
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
*/
proto.spine.client.SubscriptionUpdate.prototype.setSubscription = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
 */
proto.spine.client.SubscriptionUpdate.prototype.clearSubscription = function() {
  return this.setSubscription(undefined);
};


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


/**
 * optional spine.core.Response response = 2;
 * @return {?proto.spine.core.Response}
 */
proto.spine.client.SubscriptionUpdate.prototype.getResponse = function() {
  return /** @type{?proto.spine.core.Response} */ (
    jspb.Message.getWrapperField(this, spine_core_response_pb.Response, 2));
};


/**
 * @param {?proto.spine.core.Response|undefined} value
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
*/
proto.spine.client.SubscriptionUpdate.prototype.setResponse = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
 */
proto.spine.client.SubscriptionUpdate.prototype.clearResponse = function() {
  return this.setResponse(undefined);
};


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


/**
 * optional EntityUpdates entity_updates = 12;
 * @return {?proto.spine.client.EntityUpdates}
 */
proto.spine.client.SubscriptionUpdate.prototype.getEntityUpdates = function() {
  return /** @type{?proto.spine.client.EntityUpdates} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.EntityUpdates, 12));
};


/**
 * @param {?proto.spine.client.EntityUpdates|undefined} value
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
*/
proto.spine.client.SubscriptionUpdate.prototype.setEntityUpdates = function(value) {
  return jspb.Message.setOneofWrapperField(this, 12, proto.spine.client.SubscriptionUpdate.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
 */
proto.spine.client.SubscriptionUpdate.prototype.clearEntityUpdates = function() {
  return this.setEntityUpdates(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.client.SubscriptionUpdate.prototype.hasEntityUpdates = function() {
  return jspb.Message.getField(this, 12) != null;
};


/**
 * optional EventUpdates event_updates = 13;
 * @return {?proto.spine.client.EventUpdates}
 */
proto.spine.client.SubscriptionUpdate.prototype.getEventUpdates = function() {
  return /** @type{?proto.spine.client.EventUpdates} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.EventUpdates, 13));
};


/**
 * @param {?proto.spine.client.EventUpdates|undefined} value
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
*/
proto.spine.client.SubscriptionUpdate.prototype.setEventUpdates = function(value) {
  return jspb.Message.setOneofWrapperField(this, 13, proto.spine.client.SubscriptionUpdate.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.SubscriptionUpdate} returns this
 */
proto.spine.client.SubscriptionUpdate.prototype.clearEventUpdates = function() {
  return this.setEventUpdates(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.client.SubscriptionUpdate.prototype.hasEventUpdates = function() {
  return jspb.Message.getField(this, 13) != null;
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.client.EntityUpdates.repeatedFields_ = [1];



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.spine.client.EntityUpdates.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.EntityUpdates.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.spine.client.EntityUpdates} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.EntityUpdates.toObject = function(includeInstance, msg) {
  var f, obj = {
    updateList: jspb.Message.toObjectList(msg.getUpdateList(),
    proto.spine.client.EntityStateUpdate.toObject, includeInstance)
  };

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


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


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


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


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


/**
 * repeated EntityStateUpdate update = 1;
 * @return {!Array<!proto.spine.client.EntityStateUpdate>}
 */
proto.spine.client.EntityUpdates.prototype.getUpdateList = function() {
  return /** @type{!Array<!proto.spine.client.EntityStateUpdate>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.spine.client.EntityStateUpdate, 1));
};


/**
 * @param {!Array<!proto.spine.client.EntityStateUpdate>} value
 * @return {!proto.spine.client.EntityUpdates} returns this
*/
proto.spine.client.EntityUpdates.prototype.setUpdateList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.spine.client.EntityStateUpdate=} opt_value
 * @param {number=} opt_index
 * @return {!proto.spine.client.EntityStateUpdate}
 */
proto.spine.client.EntityUpdates.prototype.addUpdate = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.client.EntityStateUpdate, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.client.EntityUpdates} returns this
 */
proto.spine.client.EntityUpdates.prototype.clearUpdateList = function() {
  return this.setUpdateList([]);
};



/**
 * 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.spine.client.EntityStateUpdate.oneofGroups_ = [[2,3]];

/**
 * @enum {number}
 */
proto.spine.client.EntityStateUpdate.KindCase = {
  KIND_NOT_SET: 0,
  STATE: 2,
  NO_LONGER_MATCHING: 3
};

/**
 * @return {proto.spine.client.EntityStateUpdate.KindCase}
 */
proto.spine.client.EntityStateUpdate.prototype.getKindCase = function() {
  return /** @type {proto.spine.client.EntityStateUpdate.KindCase} */(jspb.Message.computeOneofCase(this, proto.spine.client.EntityStateUpdate.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.spine.client.EntityStateUpdate.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.EntityStateUpdate.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.spine.client.EntityStateUpdate} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.EntityStateUpdate.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: (f = msg.getId()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
    state: (f = msg.getState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
    noLongerMatching: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.EntityStateUpdate} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.EntityStateUpdate}
 */
proto.spine.client.EntityStateUpdate.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new google_protobuf_any_pb.Any;
      reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
      msg.setId(value);
      break;
    case 2:
      var value = new google_protobuf_any_pb.Any;
      reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
      msg.setState(value);
      break;
    case 3:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setNoLongerMatching(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.EntityStateUpdate} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.EntityStateUpdate.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
  f = message.getState();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
  f = /** @type {boolean} */ (jspb.Message.getField(message, 3));
  if (f != null) {
    writer.writeBool(
      3,
      f
    );
  }
};


/**
 * optional google.protobuf.Any id = 1;
 * @return {?proto.google.protobuf.Any}
 */
proto.spine.client.EntityStateUpdate.prototype.getId = function() {
  return /** @type{?proto.google.protobuf.Any} */ (
    jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 1));
};


/**
 * @param {?proto.google.protobuf.Any|undefined} value
 * @return {!proto.spine.client.EntityStateUpdate} returns this
*/
proto.spine.client.EntityStateUpdate.prototype.setId = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.EntityStateUpdate} returns this
 */
proto.spine.client.EntityStateUpdate.prototype.clearId = function() {
  return this.setId(undefined);
};


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


/**
 * optional google.protobuf.Any state = 2;
 * @return {?proto.google.protobuf.Any}
 */
proto.spine.client.EntityStateUpdate.prototype.getState = function() {
  return /** @type{?proto.google.protobuf.Any} */ (
    jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2));
};


/**
 * @param {?proto.google.protobuf.Any|undefined} value
 * @return {!proto.spine.client.EntityStateUpdate} returns this
*/
proto.spine.client.EntityStateUpdate.prototype.setState = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.spine.client.EntityStateUpdate.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.EntityStateUpdate} returns this
 */
proto.spine.client.EntityStateUpdate.prototype.clearState = function() {
  return this.setState(undefined);
};


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


/**
 * optional bool no_longer_matching = 3;
 * @return {boolean}
 */
proto.spine.client.EntityStateUpdate.prototype.getNoLongerMatching = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};


/**
 * @param {boolean} value
 * @return {!proto.spine.client.EntityStateUpdate} returns this
 */
proto.spine.client.EntityStateUpdate.prototype.setNoLongerMatching = function(value) {
  return jspb.Message.setOneofField(this, 3, proto.spine.client.EntityStateUpdate.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.spine.client.EntityStateUpdate} returns this
 */
proto.spine.client.EntityStateUpdate.prototype.clearNoLongerMatching = function() {
  return jspb.Message.setOneofField(this, 3, proto.spine.client.EntityStateUpdate.oneofGroups_[0], undefined);
};


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



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.client.EventUpdates.repeatedFields_ = [1];



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.spine.client.EventUpdates.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.EventUpdates.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.spine.client.EventUpdates} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.EventUpdates.toObject = function(includeInstance, msg) {
  var f, obj = {
    eventList: jspb.Message.toObjectList(msg.getEventList(),
    spine_core_event_pb.Event.toObject, includeInstance)
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.client.EventUpdates} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.client.EventUpdates}
 */
proto.spine.client.EventUpdates.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new spine_core_event_pb.Event;
      reader.readMessage(value,spine_core_event_pb.Event.deserializeBinaryFromReader);
      msg.addEvent(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


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


/**
 * repeated spine.core.Event event = 1;
 * @return {!Array<!proto.spine.core.Event>}
 */
proto.spine.client.EventUpdates.prototype.getEventList = function() {
  return /** @type{!Array<!proto.spine.core.Event>} */ (
    jspb.Message.getRepeatedWrapperField(this, spine_core_event_pb.Event, 1));
};


/**
 * @param {!Array<!proto.spine.core.Event>} value
 * @return {!proto.spine.client.EventUpdates} returns this
*/
proto.spine.client.EventUpdates.prototype.setEventList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.spine.core.Event=} opt_value
 * @param {number=} opt_index
 * @return {!proto.spine.core.Event}
 */
proto.spine.client.EventUpdates.prototype.addEvent = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.core.Event, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.client.EventUpdates} returns this
 */
proto.spine.client.EventUpdates.prototype.clearEventList = function() {
  return this.setEventList([]);
};





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

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


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


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


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


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


/**
 * optional string value = 1;
 * @return {string}
 */
proto.spine.client.SubscriptionId.prototype.getValue = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.spine.client.Subscription.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.client.Subscription.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.spine.client.Subscription} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Subscription.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: (f = msg.getId()) && proto.spine.client.SubscriptionId.toObject(includeInstance, f),
    topic: (f = msg.getTopic()) && proto.spine.client.Topic.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.spine.client.Subscription}
 */
proto.spine.client.Subscription.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.client.Subscription;
  return proto.spine.client.Subscription.deserializeBinaryFromReader(msg, reader);
};


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


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.spine.client.Subscription} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.client.Subscription.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.spine.client.SubscriptionId.serializeBinaryToWriter
    );
  }
  f = message.getTopic();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.spine.client.Topic.serializeBinaryToWriter
    );
  }
};


/**
 * optional SubscriptionId id = 1;
 * @return {?proto.spine.client.SubscriptionId}
 */
proto.spine.client.Subscription.prototype.getId = function() {
  return /** @type{?proto.spine.client.SubscriptionId} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.SubscriptionId, 1));
};


/**
 * @param {?proto.spine.client.SubscriptionId|undefined} value
 * @return {!proto.spine.client.Subscription} returns this
*/
proto.spine.client.Subscription.prototype.setId = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Subscription} returns this
 */
proto.spine.client.Subscription.prototype.clearId = function() {
  return this.setId(undefined);
};


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


/**
 * optional Topic topic = 2;
 * @return {?proto.spine.client.Topic}
 */
proto.spine.client.Subscription.prototype.getTopic = function() {
  return /** @type{?proto.spine.client.Topic} */ (
    jspb.Message.getWrapperField(this, proto.spine.client.Topic, 2));
};


/**
 * @param {?proto.spine.client.Topic|undefined} value
 * @return {!proto.spine.client.Subscription} returns this
*/
proto.spine.client.Subscription.prototype.setTopic = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.client.Subscription} returns this
 */
proto.spine.client.Subscription.prototype.clearTopic = function() {
  return this.setTopic(undefined);
};


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


/**
 * @enum {number}
 */
proto.spine.client.TopicValidationError = {
  TVE_UNKNOWN_REASON: 0,
  UNSUPPORTED_TOPIC_TARGET: 1,
  INVALID_TOPIC: 2
};

/**
 * @enum {number}
 */
proto.spine.client.SubscriptionValidationError = {
  SVE_UNKNOWN_REASON: 0,
  UNSUPPORTED_SUBSCRIPTION_TARGET: 1,
  INVALID_SUBSCRIPTION: 2,
  UNKNOWN_SUBSCRIPTION: 3
};

goog.object.extend(exports, proto.spine.client);

// Generated by Spine ProtoJs Plugin

let ObjectParser = require('../../../client/parser/object-parser.js').default;
let TypeParsers = require('../../../client/parser/type-parsers.js').default;

proto.spine.client.EntityStateUpdate.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.EntityStateUpdate.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.EntityStateUpdate.Parser.prototype.constructor = proto.spine.client.EntityStateUpdate.Parser;
proto.spine.client.EntityStateUpdate.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.EntityStateUpdate();
  
  if (obj.id !== undefined) {
    if (obj.id === null) {
      msg.setId(null);
    } else {
      let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.id);
      msg.setId(value);
    }
  }
  
  if (obj.state !== undefined) {
    if (obj.state === null) {
      msg.setState(null);
    } else {
      let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.state);
      msg.setState(value);
    }
  }
  
  if (obj.noLongerMatching !== undefined) {
    if (obj.noLongerMatching !== null) {
      let value = obj.noLongerMatching;
      msg.setNoLongerMatching(value);
    }
  }
  return msg;
};

proto.spine.client.EntityUpdates.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.EntityUpdates.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.EntityUpdates.Parser.prototype.constructor = proto.spine.client.EntityUpdates.Parser;
proto.spine.client.EntityUpdates.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.EntityUpdates();
  
  if (obj.update !== undefined && obj.update !== null) {
    obj.update.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addUpdate(null);
        } else {
          let value = TypeParsers.parserFor('type.spine.io/spine.client.EntityStateUpdate').fromObject(listItem);
          msg.addUpdate(value);
        }
      }
    );
  }
  return msg;
};

proto.spine.client.SubscriptionId.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.SubscriptionId.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.SubscriptionId.Parser.prototype.constructor = proto.spine.client.SubscriptionId.Parser;
proto.spine.client.SubscriptionId.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.SubscriptionId();
  
  if (obj.value !== undefined) {
    if (obj.value !== null) {
      let value = obj.value;
      msg.setValue(value);
    }
  }
  return msg;
};

proto.spine.client.Topic.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.Topic.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.Topic.Parser.prototype.constructor = proto.spine.client.Topic.Parser;
proto.spine.client.Topic.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.Topic();
  
  if (obj.id !== undefined) {
    if (obj.id === null) {
      msg.setId(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.TopicId').fromObject(obj.id);
      msg.setId(value);
    }
  }
  
  if (obj.target !== undefined) {
    if (obj.target === null) {
      msg.setTarget(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.Target').fromObject(obj.target);
      msg.setTarget(value);
    }
  }
  
  if (obj.fieldMask !== undefined) {
    if (obj.fieldMask === null) {
      msg.setFieldMask(null);
    } else {
      let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.FieldMask').fromObject(obj.fieldMask);
      msg.setFieldMask(value);
    }
  }
  
  if (obj.context !== undefined) {
    if (obj.context === null) {
      msg.setContext(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.ActorContext').fromObject(obj.context);
      msg.setContext(value);
    }
  }
  return msg;
};

proto.spine.client.TopicId.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.TopicId.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.TopicId.Parser.prototype.constructor = proto.spine.client.TopicId.Parser;
proto.spine.client.TopicId.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.TopicId();
  
  if (obj.value !== undefined) {
    if (obj.value !== null) {
      let value = obj.value;
      msg.setValue(value);
    }
  }
  return msg;
};

proto.spine.client.SubscriptionUpdate.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.SubscriptionUpdate.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.SubscriptionUpdate.Parser.prototype.constructor = proto.spine.client.SubscriptionUpdate.Parser;
proto.spine.client.SubscriptionUpdate.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.SubscriptionUpdate();
  
  if (obj.subscription !== undefined) {
    if (obj.subscription === null) {
      msg.setSubscription(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.Subscription').fromObject(obj.subscription);
      msg.setSubscription(value);
    }
  }
  
  if (obj.response !== undefined) {
    if (obj.response === null) {
      msg.setResponse(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.Response').fromObject(obj.response);
      msg.setResponse(value);
    }
  }
  
  if (obj.entityUpdates !== undefined) {
    if (obj.entityUpdates === null) {
      msg.setEntityUpdates(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.EntityUpdates').fromObject(obj.entityUpdates);
      msg.setEntityUpdates(value);
    }
  }
  
  if (obj.eventUpdates !== undefined) {
    if (obj.eventUpdates === null) {
      msg.setEventUpdates(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.EventUpdates').fromObject(obj.eventUpdates);
      msg.setEventUpdates(value);
    }
  }
  return msg;
};

proto.spine.client.EventUpdates.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.EventUpdates.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.EventUpdates.Parser.prototype.constructor = proto.spine.client.EventUpdates.Parser;
proto.spine.client.EventUpdates.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.EventUpdates();
  
  if (obj.event !== undefined && obj.event !== null) {
    obj.event.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addEvent(null);
        } else {
          let value = TypeParsers.parserFor('type.spine.io/spine.core.Event').fromObject(listItem);
          msg.addEvent(value);
        }
      }
    );
  }
  return msg;
};

proto.spine.client.Subscription.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.client.Subscription.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.client.Subscription.Parser.prototype.constructor = proto.spine.client.Subscription.Parser;
proto.spine.client.Subscription.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.client.Subscription();
  
  if (obj.id !== undefined) {
    if (obj.id === null) {
      msg.setId(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.SubscriptionId').fromObject(obj.id);
      msg.setId(value);
    }
  }
  
  if (obj.topic !== undefined) {
    if (obj.topic === null) {
      msg.setTopic(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.client.Topic').fromObject(obj.topic);
      msg.setTopic(value);
    }
  }
  return msg;
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.EntityStateUpdate.typeUrl = function() {
  return 'type.spine.io/spine.client.EntityStateUpdate';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.EntityUpdates.typeUrl = function() {
  return 'type.spine.io/spine.client.EntityUpdates';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.SubscriptionId.typeUrl = function() {
  return 'type.spine.io/spine.client.SubscriptionId';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.Topic.typeUrl = function() {
  return 'type.spine.io/spine.client.Topic';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.TopicId.typeUrl = function() {
  return 'type.spine.io/spine.client.TopicId';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.SubscriptionUpdate.typeUrl = function() {
  return 'type.spine.io/spine.client.SubscriptionUpdate';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.EventUpdates.typeUrl = function() {
  return 'type.spine.io/spine.client.EventUpdates';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.Subscription.typeUrl = function() {
  return 'type.spine.io/spine.client.Subscription';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.SubscriptionValidationError.typeUrl = function() {
  return 'type.spine.io/spine.client.SubscriptionValidationError';
};

// Generated by Spine ProtoJs Plugin
proto.spine.client.TopicValidationError.typeUrl = function() {
  return 'type.spine.io/spine.client.TopicValidationError';
};