Source: proto/spine/server/dispatch/dispatching_pb.js

// source: spine/server/dispatch/dispatching.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 spine_base_error_pb = require('../../../spine/base/error_pb.js');
goog.object.extend(proto, spine_base_error_pb);
var spine_core_command_pb = require('../../../spine/core/command_pb.js');
goog.object.extend(proto, spine_core_command_pb);
var spine_core_diagnostics_pb = require('../../../spine/core/diagnostics_pb.js');
goog.object.extend(proto, spine_core_diagnostics_pb);
var spine_core_event_pb = require('../../../spine/core/event_pb.js');
goog.object.extend(proto, spine_core_event_pb);
goog.exportSymbol('proto.spine.server.dispatch.BatchDispatchOutcome', null, global);
goog.exportSymbol('proto.spine.server.dispatch.DispatchOutcome', null, global);
goog.exportSymbol('proto.spine.server.dispatch.DispatchOutcome.ResultCase', null, global);
goog.exportSymbol('proto.spine.server.dispatch.Ignore', null, global);
goog.exportSymbol('proto.spine.server.dispatch.InboxAddresses', null, global);
goog.exportSymbol('proto.spine.server.dispatch.Interruption', null, global);
goog.exportSymbol('proto.spine.server.dispatch.ProducedCommands', null, global);
goog.exportSymbol('proto.spine.server.dispatch.ProducedEvents', null, global);
goog.exportSymbol('proto.spine.server.dispatch.Success', null, global);
goog.exportSymbol('proto.spine.server.dispatch.Success.ExhaustCase', 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.server.dispatch.BatchDispatchOutcome = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.server.dispatch.BatchDispatchOutcome.repeatedFields_, null);
};
goog.inherits(proto.spine.server.dispatch.BatchDispatchOutcome, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.BatchDispatchOutcome.displayName = 'proto.spine.server.dispatch.BatchDispatchOutcome';
}
/**
 * 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.server.dispatch.DispatchOutcome = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_);
};
goog.inherits(proto.spine.server.dispatch.DispatchOutcome, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.DispatchOutcome.displayName = 'proto.spine.server.dispatch.DispatchOutcome';
}
/**
 * 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.server.dispatch.Success = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.spine.server.dispatch.Success.oneofGroups_);
};
goog.inherits(proto.spine.server.dispatch.Success, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.Success.displayName = 'proto.spine.server.dispatch.Success';
}
/**
 * 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.server.dispatch.ProducedEvents = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.server.dispatch.ProducedEvents.repeatedFields_, null);
};
goog.inherits(proto.spine.server.dispatch.ProducedEvents, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.ProducedEvents.displayName = 'proto.spine.server.dispatch.ProducedEvents';
}
/**
 * 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.server.dispatch.ProducedCommands = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.server.dispatch.ProducedCommands.repeatedFields_, null);
};
goog.inherits(proto.spine.server.dispatch.ProducedCommands, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.ProducedCommands.displayName = 'proto.spine.server.dispatch.ProducedCommands';
}
/**
 * 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.server.dispatch.Interruption = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.server.dispatch.Interruption, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.Interruption.displayName = 'proto.spine.server.dispatch.Interruption';
}
/**
 * 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.server.dispatch.Ignore = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.server.dispatch.Ignore, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.Ignore.displayName = 'proto.spine.server.dispatch.Ignore';
}
/**
 * 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.server.dispatch.InboxAddresses = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.server.dispatch.InboxAddresses.repeatedFields_, null);
};
goog.inherits(proto.spine.server.dispatch.InboxAddresses, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.dispatch.InboxAddresses.displayName = 'proto.spine.server.dispatch.InboxAddresses';
}

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



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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.server.dispatch.BatchDispatchOutcome} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.server.dispatch.BatchDispatchOutcome}
 */
proto.spine.server.dispatch.BatchDispatchOutcome.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new spine_core_diagnostics_pb.MessageId;
      reader.readMessage(value,spine_core_diagnostics_pb.MessageId.deserializeBinaryFromReader);
      msg.setTargetEntity(value);
      break;
    case 2:
      var value = new proto.spine.server.dispatch.DispatchOutcome;
      reader.readMessage(value,proto.spine.server.dispatch.DispatchOutcome.deserializeBinaryFromReader);
      msg.addOutcome(value);
      break;
    case 3:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setSuccessful(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.BatchDispatchOutcome.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.server.dispatch.BatchDispatchOutcome} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.BatchDispatchOutcome.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getTargetEntity();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      spine_core_diagnostics_pb.MessageId.serializeBinaryToWriter
    );
  }
  f = message.getOutcomeList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.spine.server.dispatch.DispatchOutcome.serializeBinaryToWriter
    );
  }
  f = message.getSuccessful();
  if (f) {
    writer.writeBool(
      3,
      f
    );
  }
};


/**
 * optional spine.core.MessageId target_entity = 1;
 * @return {?proto.spine.core.MessageId}
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.getTargetEntity = function() {
  return /** @type{?proto.spine.core.MessageId} */ (
    jspb.Message.getWrapperField(this, spine_core_diagnostics_pb.MessageId, 1));
};


/**
 * @param {?proto.spine.core.MessageId|undefined} value
 * @return {!proto.spine.server.dispatch.BatchDispatchOutcome} returns this
*/
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.setTargetEntity = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.BatchDispatchOutcome} returns this
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.clearTargetEntity = function() {
  return this.setTargetEntity(undefined);
};


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


/**
 * repeated DispatchOutcome outcome = 2;
 * @return {!Array<!proto.spine.server.dispatch.DispatchOutcome>}
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.getOutcomeList = function() {
  return /** @type{!Array<!proto.spine.server.dispatch.DispatchOutcome>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.spine.server.dispatch.DispatchOutcome, 2));
};


/**
 * @param {!Array<!proto.spine.server.dispatch.DispatchOutcome>} value
 * @return {!proto.spine.server.dispatch.BatchDispatchOutcome} returns this
*/
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.setOutcomeList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.spine.server.dispatch.DispatchOutcome=} opt_value
 * @param {number=} opt_index
 * @return {!proto.spine.server.dispatch.DispatchOutcome}
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.addOutcome = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.spine.server.dispatch.DispatchOutcome, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.server.dispatch.BatchDispatchOutcome} returns this
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.clearOutcomeList = function() {
  return this.setOutcomeList([]);
};


/**
 * optional bool successful = 3;
 * @return {boolean}
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.getSuccessful = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};


/**
 * @param {boolean} value
 * @return {!proto.spine.server.dispatch.BatchDispatchOutcome} returns this
 */
proto.spine.server.dispatch.BatchDispatchOutcome.prototype.setSuccessful = function(value) {
  return jspb.Message.setProto3BooleanField(this, 3, value);
};



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

/**
 * @enum {number}
 */
proto.spine.server.dispatch.DispatchOutcome.ResultCase = {
  RESULT_NOT_SET: 0,
  SUCCESS: 2,
  ERROR: 3,
  INTERRUPTED: 4,
  IGNORED: 5,
  SENT_TO_INBOX: 6,
  PUBLISHED_TO_REMOTE: 7,
  NO_TARGETS_TO_ROUTE: 8
};

/**
 * @return {proto.spine.server.dispatch.DispatchOutcome.ResultCase}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getResultCase = function() {
  return /** @type {proto.spine.server.dispatch.DispatchOutcome.ResultCase} */(jspb.Message.computeOneofCase(this, proto.spine.server.dispatch.DispatchOutcome.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.server.dispatch.DispatchOutcome.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.server.dispatch.DispatchOutcome.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.server.dispatch.DispatchOutcome} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.DispatchOutcome.toObject = function(includeInstance, msg) {
  var f, obj = {
    propagatedSignal: (f = msg.getPropagatedSignal()) && spine_core_diagnostics_pb.MessageId.toObject(includeInstance, f),
    success: (f = msg.getSuccess()) && proto.spine.server.dispatch.Success.toObject(includeInstance, f),
    error: (f = msg.getError()) && spine_base_error_pb.Error.toObject(includeInstance, f),
    interrupted: (f = msg.getInterrupted()) && proto.spine.server.dispatch.Interruption.toObject(includeInstance, f),
    ignored: (f = msg.getIgnored()) && proto.spine.server.dispatch.Ignore.toObject(includeInstance, f),
    sentToInbox: (f = msg.getSentToInbox()) && proto.spine.server.dispatch.InboxAddresses.toObject(includeInstance, f),
    publishedToRemote: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
    noTargetsToRoute: jspb.Message.getBooleanFieldWithDefault(msg, 8, 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.server.dispatch.DispatchOutcome}
 */
proto.spine.server.dispatch.DispatchOutcome.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.server.dispatch.DispatchOutcome;
  return proto.spine.server.dispatch.DispatchOutcome.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.server.dispatch.DispatchOutcome} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.server.dispatch.DispatchOutcome}
 */
proto.spine.server.dispatch.DispatchOutcome.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new spine_core_diagnostics_pb.MessageId;
      reader.readMessage(value,spine_core_diagnostics_pb.MessageId.deserializeBinaryFromReader);
      msg.setPropagatedSignal(value);
      break;
    case 2:
      var value = new proto.spine.server.dispatch.Success;
      reader.readMessage(value,proto.spine.server.dispatch.Success.deserializeBinaryFromReader);
      msg.setSuccess(value);
      break;
    case 3:
      var value = new spine_base_error_pb.Error;
      reader.readMessage(value,spine_base_error_pb.Error.deserializeBinaryFromReader);
      msg.setError(value);
      break;
    case 4:
      var value = new proto.spine.server.dispatch.Interruption;
      reader.readMessage(value,proto.spine.server.dispatch.Interruption.deserializeBinaryFromReader);
      msg.setInterrupted(value);
      break;
    case 5:
      var value = new proto.spine.server.dispatch.Ignore;
      reader.readMessage(value,proto.spine.server.dispatch.Ignore.deserializeBinaryFromReader);
      msg.setIgnored(value);
      break;
    case 6:
      var value = new proto.spine.server.dispatch.InboxAddresses;
      reader.readMessage(value,proto.spine.server.dispatch.InboxAddresses.deserializeBinaryFromReader);
      msg.setSentToInbox(value);
      break;
    case 7:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setPublishedToRemote(value);
      break;
    case 8:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setNoTargetsToRoute(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.DispatchOutcome.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.server.dispatch.DispatchOutcome} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.DispatchOutcome.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getPropagatedSignal();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      spine_core_diagnostics_pb.MessageId.serializeBinaryToWriter
    );
  }
  f = message.getSuccess();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.spine.server.dispatch.Success.serializeBinaryToWriter
    );
  }
  f = message.getError();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      spine_base_error_pb.Error.serializeBinaryToWriter
    );
  }
  f = message.getInterrupted();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.spine.server.dispatch.Interruption.serializeBinaryToWriter
    );
  }
  f = message.getIgnored();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      proto.spine.server.dispatch.Ignore.serializeBinaryToWriter
    );
  }
  f = message.getSentToInbox();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      proto.spine.server.dispatch.InboxAddresses.serializeBinaryToWriter
    );
  }
  f = /** @type {boolean} */ (jspb.Message.getField(message, 7));
  if (f != null) {
    writer.writeBool(
      7,
      f
    );
  }
  f = /** @type {boolean} */ (jspb.Message.getField(message, 8));
  if (f != null) {
    writer.writeBool(
      8,
      f
    );
  }
};


/**
 * optional spine.core.MessageId propagated_signal = 1;
 * @return {?proto.spine.core.MessageId}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getPropagatedSignal = function() {
  return /** @type{?proto.spine.core.MessageId} */ (
    jspb.Message.getWrapperField(this, spine_core_diagnostics_pb.MessageId, 1));
};


/**
 * @param {?proto.spine.core.MessageId|undefined} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
*/
proto.spine.server.dispatch.DispatchOutcome.prototype.setPropagatedSignal = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearPropagatedSignal = function() {
  return this.setPropagatedSignal(undefined);
};


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


/**
 * optional Success success = 2;
 * @return {?proto.spine.server.dispatch.Success}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getSuccess = function() {
  return /** @type{?proto.spine.server.dispatch.Success} */ (
    jspb.Message.getWrapperField(this, proto.spine.server.dispatch.Success, 2));
};


/**
 * @param {?proto.spine.server.dispatch.Success|undefined} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
*/
proto.spine.server.dispatch.DispatchOutcome.prototype.setSuccess = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearSuccess = function() {
  return this.setSuccess(undefined);
};


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


/**
 * optional spine.base.Error error = 3;
 * @return {?proto.spine.base.Error}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getError = function() {
  return /** @type{?proto.spine.base.Error} */ (
    jspb.Message.getWrapperField(this, spine_base_error_pb.Error, 3));
};


/**
 * @param {?proto.spine.base.Error|undefined} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
*/
proto.spine.server.dispatch.DispatchOutcome.prototype.setError = function(value) {
  return jspb.Message.setOneofWrapperField(this, 3, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearError = function() {
  return this.setError(undefined);
};


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


/**
 * optional Interruption interrupted = 4;
 * @return {?proto.spine.server.dispatch.Interruption}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getInterrupted = function() {
  return /** @type{?proto.spine.server.dispatch.Interruption} */ (
    jspb.Message.getWrapperField(this, proto.spine.server.dispatch.Interruption, 4));
};


/**
 * @param {?proto.spine.server.dispatch.Interruption|undefined} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
*/
proto.spine.server.dispatch.DispatchOutcome.prototype.setInterrupted = function(value) {
  return jspb.Message.setOneofWrapperField(this, 4, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearInterrupted = function() {
  return this.setInterrupted(undefined);
};


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


/**
 * optional Ignore ignored = 5;
 * @return {?proto.spine.server.dispatch.Ignore}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getIgnored = function() {
  return /** @type{?proto.spine.server.dispatch.Ignore} */ (
    jspb.Message.getWrapperField(this, proto.spine.server.dispatch.Ignore, 5));
};


/**
 * @param {?proto.spine.server.dispatch.Ignore|undefined} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
*/
proto.spine.server.dispatch.DispatchOutcome.prototype.setIgnored = function(value) {
  return jspb.Message.setOneofWrapperField(this, 5, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearIgnored = function() {
  return this.setIgnored(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.hasIgnored = function() {
  return jspb.Message.getField(this, 5) != null;
};


/**
 * optional InboxAddresses sent_to_inbox = 6;
 * @return {?proto.spine.server.dispatch.InboxAddresses}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getSentToInbox = function() {
  return /** @type{?proto.spine.server.dispatch.InboxAddresses} */ (
    jspb.Message.getWrapperField(this, proto.spine.server.dispatch.InboxAddresses, 6));
};


/**
 * @param {?proto.spine.server.dispatch.InboxAddresses|undefined} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
*/
proto.spine.server.dispatch.DispatchOutcome.prototype.setSentToInbox = function(value) {
  return jspb.Message.setOneofWrapperField(this, 6, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearSentToInbox = function() {
  return this.setSentToInbox(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.hasSentToInbox = function() {
  return jspb.Message.getField(this, 6) != null;
};


/**
 * optional bool published_to_remote = 7;
 * @return {boolean}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getPublishedToRemote = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
};


/**
 * @param {boolean} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.setPublishedToRemote = function(value) {
  return jspb.Message.setOneofField(this, 7, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearPublishedToRemote = function() {
  return jspb.Message.setOneofField(this, 7, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.hasPublishedToRemote = function() {
  return jspb.Message.getField(this, 7) != null;
};


/**
 * optional bool no_targets_to_route = 8;
 * @return {boolean}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.getNoTargetsToRoute = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
};


/**
 * @param {boolean} value
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.setNoTargetsToRoute = function(value) {
  return jspb.Message.setOneofField(this, 8, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], value);
};


/**
 * Clears the field making it undefined.
 * @return {!proto.spine.server.dispatch.DispatchOutcome} returns this
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.clearNoTargetsToRoute = function() {
  return jspb.Message.setOneofField(this, 8, proto.spine.server.dispatch.DispatchOutcome.oneofGroups_[0], undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.server.dispatch.DispatchOutcome.prototype.hasNoTargetsToRoute = function() {
  return jspb.Message.getField(this, 8) != 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.server.dispatch.Success.oneofGroups_ = [[1,2,3]];

/**
 * @enum {number}
 */
proto.spine.server.dispatch.Success.ExhaustCase = {
  EXHAUST_NOT_SET: 0,
  PRODUCED_EVENTS: 1,
  PRODUCED_COMMANDS: 2,
  REJECTION: 3
};

/**
 * @return {proto.spine.server.dispatch.Success.ExhaustCase}
 */
proto.spine.server.dispatch.Success.prototype.getExhaustCase = function() {
  return /** @type {proto.spine.server.dispatch.Success.ExhaustCase} */(jspb.Message.computeOneofCase(this, proto.spine.server.dispatch.Success.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.server.dispatch.Success.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.server.dispatch.Success.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.server.dispatch.Success} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.Success.toObject = function(includeInstance, msg) {
  var f, obj = {
    producedEvents: (f = msg.getProducedEvents()) && proto.spine.server.dispatch.ProducedEvents.toObject(includeInstance, f),
    producedCommands: (f = msg.getProducedCommands()) && proto.spine.server.dispatch.ProducedCommands.toObject(includeInstance, f),
    rejection: (f = msg.getRejection()) && spine_core_event_pb.Event.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.server.dispatch.Success}
 */
proto.spine.server.dispatch.Success.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.server.dispatch.Success;
  return proto.spine.server.dispatch.Success.deserializeBinaryFromReader(msg, reader);
};


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.dispatch.Success.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.Success.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.server.dispatch.Success} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.Success.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getProducedEvents();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.spine.server.dispatch.ProducedEvents.serializeBinaryToWriter
    );
  }
  f = message.getProducedCommands();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.spine.server.dispatch.ProducedCommands.serializeBinaryToWriter
    );
  }
  f = message.getRejection();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      spine_core_event_pb.Event.serializeBinaryToWriter
    );
  }
};


/**
 * optional ProducedEvents produced_events = 1;
 * @return {?proto.spine.server.dispatch.ProducedEvents}
 */
proto.spine.server.dispatch.Success.prototype.getProducedEvents = function() {
  return /** @type{?proto.spine.server.dispatch.ProducedEvents} */ (
    jspb.Message.getWrapperField(this, proto.spine.server.dispatch.ProducedEvents, 1));
};


/**
 * @param {?proto.spine.server.dispatch.ProducedEvents|undefined} value
 * @return {!proto.spine.server.dispatch.Success} returns this
*/
proto.spine.server.dispatch.Success.prototype.setProducedEvents = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.spine.server.dispatch.Success.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.Success} returns this
 */
proto.spine.server.dispatch.Success.prototype.clearProducedEvents = function() {
  return this.setProducedEvents(undefined);
};


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


/**
 * optional ProducedCommands produced_commands = 2;
 * @return {?proto.spine.server.dispatch.ProducedCommands}
 */
proto.spine.server.dispatch.Success.prototype.getProducedCommands = function() {
  return /** @type{?proto.spine.server.dispatch.ProducedCommands} */ (
    jspb.Message.getWrapperField(this, proto.spine.server.dispatch.ProducedCommands, 2));
};


/**
 * @param {?proto.spine.server.dispatch.ProducedCommands|undefined} value
 * @return {!proto.spine.server.dispatch.Success} returns this
*/
proto.spine.server.dispatch.Success.prototype.setProducedCommands = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.spine.server.dispatch.Success.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.Success} returns this
 */
proto.spine.server.dispatch.Success.prototype.clearProducedCommands = function() {
  return this.setProducedCommands(undefined);
};


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


/**
 * optional spine.core.Event rejection = 3;
 * @return {?proto.spine.core.Event}
 */
proto.spine.server.dispatch.Success.prototype.getRejection = function() {
  return /** @type{?proto.spine.core.Event} */ (
    jspb.Message.getWrapperField(this, spine_core_event_pb.Event, 3));
};


/**
 * @param {?proto.spine.core.Event|undefined} value
 * @return {!proto.spine.server.dispatch.Success} returns this
*/
proto.spine.server.dispatch.Success.prototype.setRejection = function(value) {
  return jspb.Message.setOneofWrapperField(this, 3, proto.spine.server.dispatch.Success.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.Success} returns this
 */
proto.spine.server.dispatch.Success.prototype.clearRejection = function() {
  return this.setRejection(undefined);
};


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



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents}
 */
proto.spine.server.dispatch.ProducedEvents.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.server.dispatch.ProducedEvents;
  return proto.spine.server.dispatch.ProducedEvents.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.server.dispatch.ProducedEvents} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.server.dispatch.ProducedEvents}
 */
proto.spine.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents} returns this
*/
proto.spine.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents.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.server.dispatch.ProducedEvents} returns this
 */
proto.spine.server.dispatch.ProducedEvents.prototype.clearEventList = function() {
  return this.setEventList([]);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.server.dispatch.ProducedCommands.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.server.dispatch.ProducedCommands.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.server.dispatch.ProducedCommands.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.server.dispatch.ProducedCommands} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.ProducedCommands.toObject = function(includeInstance, msg) {
  var f, obj = {
    commandList: jspb.Message.toObjectList(msg.getCommandList(),
    spine_core_command_pb.Command.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.server.dispatch.ProducedCommands}
 */
proto.spine.server.dispatch.ProducedCommands.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.server.dispatch.ProducedCommands;
  return proto.spine.server.dispatch.ProducedCommands.deserializeBinaryFromReader(msg, reader);
};


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.dispatch.ProducedCommands.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.ProducedCommands.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.server.dispatch.ProducedCommands} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.ProducedCommands.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getCommandList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      spine_core_command_pb.Command.serializeBinaryToWriter
    );
  }
};


/**
 * repeated spine.core.Command command = 1;
 * @return {!Array<!proto.spine.core.Command>}
 */
proto.spine.server.dispatch.ProducedCommands.prototype.getCommandList = function() {
  return /** @type{!Array<!proto.spine.core.Command>} */ (
    jspb.Message.getRepeatedWrapperField(this, spine_core_command_pb.Command, 1));
};


/**
 * @param {!Array<!proto.spine.core.Command>} value
 * @return {!proto.spine.server.dispatch.ProducedCommands} returns this
*/
proto.spine.server.dispatch.ProducedCommands.prototype.setCommandList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.spine.core.Command=} opt_value
 * @param {number=} opt_index
 * @return {!proto.spine.core.Command}
 */
proto.spine.server.dispatch.ProducedCommands.prototype.addCommand = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.core.Command, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.server.dispatch.ProducedCommands} returns this
 */
proto.spine.server.dispatch.ProducedCommands.prototype.clearCommandList = function() {
  return this.setCommandList([]);
};





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


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.dispatch.Interruption.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.Interruption.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.server.dispatch.Interruption} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.Interruption.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getStoppedAt();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      spine_core_diagnostics_pb.MessageId.serializeBinaryToWriter
    );
  }
};


/**
 * optional spine.core.MessageId stopped_at = 1;
 * @return {?proto.spine.core.MessageId}
 */
proto.spine.server.dispatch.Interruption.prototype.getStoppedAt = function() {
  return /** @type{?proto.spine.core.MessageId} */ (
    jspb.Message.getWrapperField(this, spine_core_diagnostics_pb.MessageId, 1));
};


/**
 * @param {?proto.spine.core.MessageId|undefined} value
 * @return {!proto.spine.server.dispatch.Interruption} returns this
*/
proto.spine.server.dispatch.Interruption.prototype.setStoppedAt = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.dispatch.Interruption} returns this
 */
proto.spine.server.dispatch.Interruption.prototype.clearStoppedAt = function() {
  return this.setStoppedAt(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.spine.server.dispatch.Interruption.prototype.hasStoppedAt = function() {
  return jspb.Message.getField(this, 1) != 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.spine.server.dispatch.Ignore.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.server.dispatch.Ignore.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.server.dispatch.Ignore} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.Ignore.toObject = function(includeInstance, msg) {
  var f, obj = {
    reason: jspb.Message.getFieldWithDefault(msg, 1, "")
  };

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


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


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.dispatch.Ignore.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.Ignore.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.server.dispatch.Ignore} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.Ignore.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getReason();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
};


/**
 * optional string reason = 1;
 * @return {string}
 */
proto.spine.server.dispatch.Ignore.prototype.getReason = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.spine.server.dispatch.Ignore} returns this
 */
proto.spine.server.dispatch.Ignore.prototype.setReason = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.spine.server.dispatch.InboxAddresses.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.server.dispatch.InboxAddresses.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.server.dispatch.InboxAddresses.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.server.dispatch.InboxAddresses} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.InboxAddresses.toObject = function(includeInstance, msg) {
  var f, obj = {
    idList: jspb.Message.toObjectList(msg.getIdList(),
    google_protobuf_any_pb.Any.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.server.dispatch.InboxAddresses}
 */
proto.spine.server.dispatch.InboxAddresses.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.server.dispatch.InboxAddresses;
  return proto.spine.server.dispatch.InboxAddresses.deserializeBinaryFromReader(msg, reader);
};


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


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.dispatch.InboxAddresses.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.dispatch.InboxAddresses.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.server.dispatch.InboxAddresses} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.dispatch.InboxAddresses.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getIdList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
};


/**
 * repeated google.protobuf.Any id = 1;
 * @return {!Array<!proto.google.protobuf.Any>}
 */
proto.spine.server.dispatch.InboxAddresses.prototype.getIdList = function() {
  return /** @type{!Array<!proto.google.protobuf.Any>} */ (
    jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1));
};


/**
 * @param {!Array<!proto.google.protobuf.Any>} value
 * @return {!proto.spine.server.dispatch.InboxAddresses} returns this
*/
proto.spine.server.dispatch.InboxAddresses.prototype.setIdList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.google.protobuf.Any=} opt_value
 * @param {number=} opt_index
 * @return {!proto.google.protobuf.Any}
 */
proto.spine.server.dispatch.InboxAddresses.prototype.addId = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Any, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.server.dispatch.InboxAddresses} returns this
 */
proto.spine.server.dispatch.InboxAddresses.prototype.clearIdList = function() {
  return this.setIdList([]);
};


goog.object.extend(exports, proto.spine.server.dispatch);

// 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.server.dispatch.InboxAddresses.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.dispatch.InboxAddresses.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.dispatch.InboxAddresses.Parser.prototype.constructor = proto.spine.server.dispatch.InboxAddresses.Parser;
proto.spine.server.dispatch.InboxAddresses.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.dispatch.InboxAddresses();
  
  if (obj.id !== undefined && obj.id !== null) {
    obj.id.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addId(null);
        } else {
          let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(listItem);
          msg.addId(value);
        }
      }
    );
  }
  return msg;
};

proto.spine.server.dispatch.BatchDispatchOutcome.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.dispatch.BatchDispatchOutcome.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.dispatch.BatchDispatchOutcome.Parser.prototype.constructor = proto.spine.server.dispatch.BatchDispatchOutcome.Parser;
proto.spine.server.dispatch.BatchDispatchOutcome.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.dispatch.BatchDispatchOutcome();
  
  if (obj.targetEntity !== undefined) {
    if (obj.targetEntity === null) {
      msg.setTargetEntity(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.MessageId').fromObject(obj.targetEntity);
      msg.setTargetEntity(value);
    }
  }
  
  if (obj.outcome !== undefined && obj.outcome !== null) {
    obj.outcome.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addOutcome(null);
        } else {
          let value = TypeParsers.parserFor('type.spine.io/spine.server.dispatch.DispatchOutcome').fromObject(listItem);
          msg.addOutcome(value);
        }
      }
    );
  }
  
  if (obj.successful !== undefined) {
    if (obj.successful !== null) {
      let value = obj.successful;
      msg.setSuccessful(value);
    }
  }
  return msg;
};

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

proto.spine.server.dispatch.Success.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.dispatch.Success.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.dispatch.Success.Parser.prototype.constructor = proto.spine.server.dispatch.Success.Parser;
proto.spine.server.dispatch.Success.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.dispatch.Success();
  
  if (obj.producedEvents !== undefined) {
    if (obj.producedEvents === null) {
      msg.setProducedEvents(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.server.dispatch.ProducedEvents').fromObject(obj.producedEvents);
      msg.setProducedEvents(value);
    }
  }
  
  if (obj.producedCommands !== undefined) {
    if (obj.producedCommands === null) {
      msg.setProducedCommands(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.server.dispatch.ProducedCommands').fromObject(obj.producedCommands);
      msg.setProducedCommands(value);
    }
  }
  
  if (obj.rejection !== undefined) {
    if (obj.rejection === null) {
      msg.setRejection(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.Event').fromObject(obj.rejection);
      msg.setRejection(value);
    }
  }
  return msg;
};

proto.spine.server.dispatch.DispatchOutcome.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.dispatch.DispatchOutcome.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.dispatch.DispatchOutcome.Parser.prototype.constructor = proto.spine.server.dispatch.DispatchOutcome.Parser;
proto.spine.server.dispatch.DispatchOutcome.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.dispatch.DispatchOutcome();
  
  if (obj.propagatedSignal !== undefined) {
    if (obj.propagatedSignal === null) {
      msg.setPropagatedSignal(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.MessageId').fromObject(obj.propagatedSignal);
      msg.setPropagatedSignal(value);
    }
  }
  
  if (obj.success !== undefined) {
    if (obj.success === null) {
      msg.setSuccess(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.server.dispatch.Success').fromObject(obj.success);
      msg.setSuccess(value);
    }
  }
  
  if (obj.error !== undefined) {
    if (obj.error === null) {
      msg.setError(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.base.Error').fromObject(obj.error);
      msg.setError(value);
    }
  }
  
  if (obj.interrupted !== undefined) {
    if (obj.interrupted === null) {
      msg.setInterrupted(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.server.dispatch.Interruption').fromObject(obj.interrupted);
      msg.setInterrupted(value);
    }
  }
  
  if (obj.ignored !== undefined) {
    if (obj.ignored === null) {
      msg.setIgnored(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.server.dispatch.Ignore').fromObject(obj.ignored);
      msg.setIgnored(value);
    }
  }
  
  if (obj.sentToInbox !== undefined) {
    if (obj.sentToInbox === null) {
      msg.setSentToInbox(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.server.dispatch.InboxAddresses').fromObject(obj.sentToInbox);
      msg.setSentToInbox(value);
    }
  }
  
  if (obj.publishedToRemote !== undefined) {
    if (obj.publishedToRemote !== null) {
      let value = obj.publishedToRemote;
      msg.setPublishedToRemote(value);
    }
  }
  
  if (obj.noTargetsToRoute !== undefined) {
    if (obj.noTargetsToRoute !== null) {
      let value = obj.noTargetsToRoute;
      msg.setNoTargetsToRoute(value);
    }
  }
  return msg;
};

proto.spine.server.dispatch.ProducedEvents.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.dispatch.ProducedEvents.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.dispatch.ProducedEvents.Parser.prototype.constructor = proto.spine.server.dispatch.ProducedEvents.Parser;
proto.spine.server.dispatch.ProducedEvents.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.dispatch.ProducedEvents();
  
  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.server.dispatch.Interruption.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.dispatch.Interruption.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.dispatch.Interruption.Parser.prototype.constructor = proto.spine.server.dispatch.Interruption.Parser;
proto.spine.server.dispatch.Interruption.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.dispatch.Interruption();
  
  if (obj.stoppedAt !== undefined) {
    if (obj.stoppedAt === null) {
      msg.setStoppedAt(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.MessageId').fromObject(obj.stoppedAt);
      msg.setStoppedAt(value);
    }
  }
  return msg;
};

proto.spine.server.dispatch.Ignore.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.dispatch.Ignore.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.dispatch.Ignore.Parser.prototype.constructor = proto.spine.server.dispatch.Ignore.Parser;
proto.spine.server.dispatch.Ignore.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.dispatch.Ignore();
  
  if (obj.reason !== undefined) {
    if (obj.reason !== null) {
      let value = obj.reason;
      msg.setReason(value);
    }
  }
  return msg;
};

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

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

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

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

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

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

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

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