Source: proto/spine/server/integration/broker_pb.js

// source: spine/server/integration/broker.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_core_actor_context_pb = require('../../../spine/core/actor_context_pb.js');
goog.object.extend(proto, spine_core_actor_context_pb);
var spine_core_bounded_context_pb = require('../../../spine/core/bounded_context_pb.js');
goog.object.extend(proto, spine_core_bounded_context_pb);
goog.exportSymbol('proto.spine.server.integration.ExternalMessage', null, global);
goog.exportSymbol('proto.spine.server.integration.ExternalMessageType', null, global);
goog.exportSymbol('proto.spine.server.integration.ExternalMessageValidationError', null, global);
goog.exportSymbol('proto.spine.server.integration.ExternalMessagesSourceAvailable', null, global);
goog.exportSymbol('proto.spine.server.integration.RequestForExternalMessages', 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.integration.ExternalMessage = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.server.integration.ExternalMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.integration.ExternalMessage.displayName = 'proto.spine.server.integration.ExternalMessage';
}
/**
 * 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.integration.RequestForExternalMessages = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.server.integration.RequestForExternalMessages.repeatedFields_, null);
};
goog.inherits(proto.spine.server.integration.RequestForExternalMessages, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.integration.RequestForExternalMessages.displayName = 'proto.spine.server.integration.RequestForExternalMessages';
}
/**
 * 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.integration.ExternalMessageType = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.server.integration.ExternalMessageType, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.integration.ExternalMessageType.displayName = 'proto.spine.server.integration.ExternalMessageType';
}
/**
 * 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.integration.ExternalMessagesSourceAvailable = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.server.integration.ExternalMessagesSourceAvailable, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.spine.server.integration.ExternalMessagesSourceAvailable.displayName = 'proto.spine.server.integration.ExternalMessagesSourceAvailable';
}



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.integration.ExternalMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.spine.server.integration.ExternalMessage.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.integration.ExternalMessage} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.integration.ExternalMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: (f = msg.getId()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
    originalMessage: (f = msg.getOriginalMessage()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
    actorContext: (f = msg.getActorContext()) && spine_core_actor_context_pb.ActorContext.toObject(includeInstance, f),
    boundedContextName: (f = msg.getBoundedContextName()) && spine_core_bounded_context_pb.BoundedContextName.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.integration.ExternalMessage}
 */
proto.spine.server.integration.ExternalMessage.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.server.integration.ExternalMessage;
  return proto.spine.server.integration.ExternalMessage.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.spine.server.integration.ExternalMessage} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.spine.server.integration.ExternalMessage}
 */
proto.spine.server.integration.ExternalMessage.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.setOriginalMessage(value);
      break;
    case 3:
      var value = new spine_core_actor_context_pb.ActorContext;
      reader.readMessage(value,spine_core_actor_context_pb.ActorContext.deserializeBinaryFromReader);
      msg.setActorContext(value);
      break;
    case 4:
      var value = new spine_core_bounded_context_pb.BoundedContextName;
      reader.readMessage(value,spine_core_bounded_context_pb.BoundedContextName.deserializeBinaryFromReader);
      msg.setBoundedContextName(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.spine.server.integration.ExternalMessage.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.spine.server.integration.ExternalMessage.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.integration.ExternalMessage} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.spine.server.integration.ExternalMessage.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.getOriginalMessage();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
  f = message.getActorContext();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      spine_core_actor_context_pb.ActorContext.serializeBinaryToWriter
    );
  }
  f = message.getBoundedContextName();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      spine_core_bounded_context_pb.BoundedContextName.serializeBinaryToWriter
    );
  }
};


/**
 * optional google.protobuf.Any id = 1;
 * @return {?proto.google.protobuf.Any}
 */
proto.spine.server.integration.ExternalMessage.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.server.integration.ExternalMessage} returns this
*/
proto.spine.server.integration.ExternalMessage.prototype.setId = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


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


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


/**
 * optional google.protobuf.Any original_message = 2;
 * @return {?proto.google.protobuf.Any}
 */
proto.spine.server.integration.ExternalMessage.prototype.getOriginalMessage = 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.server.integration.ExternalMessage} returns this
*/
proto.spine.server.integration.ExternalMessage.prototype.setOriginalMessage = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.integration.ExternalMessage} returns this
 */
proto.spine.server.integration.ExternalMessage.prototype.clearOriginalMessage = function() {
  return this.setOriginalMessage(undefined);
};


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


/**
 * optional spine.core.ActorContext actor_context = 3;
 * @return {?proto.spine.core.ActorContext}
 */
proto.spine.server.integration.ExternalMessage.prototype.getActorContext = function() {
  return /** @type{?proto.spine.core.ActorContext} */ (
    jspb.Message.getWrapperField(this, spine_core_actor_context_pb.ActorContext, 3));
};


/**
 * @param {?proto.spine.core.ActorContext|undefined} value
 * @return {!proto.spine.server.integration.ExternalMessage} returns this
*/
proto.spine.server.integration.ExternalMessage.prototype.setActorContext = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.integration.ExternalMessage} returns this
 */
proto.spine.server.integration.ExternalMessage.prototype.clearActorContext = function() {
  return this.setActorContext(undefined);
};


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


/**
 * optional spine.core.BoundedContextName bounded_context_name = 4;
 * @return {?proto.spine.core.BoundedContextName}
 */
proto.spine.server.integration.ExternalMessage.prototype.getBoundedContextName = function() {
  return /** @type{?proto.spine.core.BoundedContextName} */ (
    jspb.Message.getWrapperField(this, spine_core_bounded_context_pb.BoundedContextName, 4));
};


/**
 * @param {?proto.spine.core.BoundedContextName|undefined} value
 * @return {!proto.spine.server.integration.ExternalMessage} returns this
*/
proto.spine.server.integration.ExternalMessage.prototype.setBoundedContextName = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.spine.server.integration.ExternalMessage} returns this
 */
proto.spine.server.integration.ExternalMessage.prototype.clearBoundedContextName = function() {
  return this.setBoundedContextName(undefined);
};


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



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


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


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


/**
 * repeated ExternalMessageType requested_message_type = 1;
 * @return {!Array<!proto.spine.server.integration.ExternalMessageType>}
 */
proto.spine.server.integration.RequestForExternalMessages.prototype.getRequestedMessageTypeList = function() {
  return /** @type{!Array<!proto.spine.server.integration.ExternalMessageType>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.spine.server.integration.ExternalMessageType, 1));
};


/**
 * @param {!Array<!proto.spine.server.integration.ExternalMessageType>} value
 * @return {!proto.spine.server.integration.RequestForExternalMessages} returns this
*/
proto.spine.server.integration.RequestForExternalMessages.prototype.setRequestedMessageTypeList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.spine.server.integration.ExternalMessageType=} opt_value
 * @param {number=} opt_index
 * @return {!proto.spine.server.integration.ExternalMessageType}
 */
proto.spine.server.integration.RequestForExternalMessages.prototype.addRequestedMessageType = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.server.integration.ExternalMessageType, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.spine.server.integration.RequestForExternalMessages} returns this
 */
proto.spine.server.integration.RequestForExternalMessages.prototype.clearRequestedMessageTypeList = function() {
  return this.setRequestedMessageTypeList([]);
};





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

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


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


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


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


/**
 * optional string message_type_url = 1;
 * @return {string}
 */
proto.spine.server.integration.ExternalMessageType.prototype.getMessageTypeUrl = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


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


/**
 * optional string wrapper_type_url = 2;
 * @return {string}
 */
proto.spine.server.integration.ExternalMessageType.prototype.getWrapperTypeUrl = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.spine.server.integration.ExternalMessageType} returns this
 */
proto.spine.server.integration.ExternalMessageType.prototype.setWrapperTypeUrl = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};





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

  };

  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.integration.ExternalMessagesSourceAvailable}
 */
proto.spine.server.integration.ExternalMessagesSourceAvailable.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.spine.server.integration.ExternalMessagesSourceAvailable;
  return proto.spine.server.integration.ExternalMessagesSourceAvailable.deserializeBinaryFromReader(msg, reader);
};


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


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


/**
 * @enum {number}
 */
proto.spine.server.integration.ExternalMessageValidationError = {
  EM_UNKNOWN_REASON: 0,
  UNSUPPORTED_EXTERNAL_MESSAGE: 1
};

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

// 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.integration.RequestForExternalMessages.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.integration.RequestForExternalMessages.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.integration.RequestForExternalMessages.Parser.prototype.constructor = proto.spine.server.integration.RequestForExternalMessages.Parser;
proto.spine.server.integration.RequestForExternalMessages.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.integration.RequestForExternalMessages();
  
  if (obj.requestedMessageType !== undefined && obj.requestedMessageType !== null) {
    obj.requestedMessageType.forEach(
      (listItem, index, array) => {
        if (listItem === null) {
          msg.addRequestedMessageType(null);
        } else {
          let value = TypeParsers.parserFor('type.spine.io/spine.server.integration.ExternalMessageType').fromObject(listItem);
          msg.addRequestedMessageType(value);
        }
      }
    );
  }
  return msg;
};

proto.spine.server.integration.ExternalMessageType.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.integration.ExternalMessageType.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.integration.ExternalMessageType.Parser.prototype.constructor = proto.spine.server.integration.ExternalMessageType.Parser;
proto.spine.server.integration.ExternalMessageType.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.integration.ExternalMessageType();
  
  if (obj.messageTypeUrl !== undefined) {
    if (obj.messageTypeUrl !== null) {
      let value = obj.messageTypeUrl;
      msg.setMessageTypeUrl(value);
    }
  }
  
  if (obj.wrapperTypeUrl !== undefined) {
    if (obj.wrapperTypeUrl !== null) {
      let value = obj.wrapperTypeUrl;
      msg.setWrapperTypeUrl(value);
    }
  }
  return msg;
};

proto.spine.server.integration.ExternalMessagesSourceAvailable.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.integration.ExternalMessagesSourceAvailable.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.integration.ExternalMessagesSourceAvailable.Parser.prototype.constructor = proto.spine.server.integration.ExternalMessagesSourceAvailable.Parser;
proto.spine.server.integration.ExternalMessagesSourceAvailable.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.integration.ExternalMessagesSourceAvailable();
  return msg;
};

proto.spine.server.integration.ExternalMessage.Parser = function() {
  ObjectParser.call(this);
};
proto.spine.server.integration.ExternalMessage.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.integration.ExternalMessage.Parser.prototype.constructor = proto.spine.server.integration.ExternalMessage.Parser;
proto.spine.server.integration.ExternalMessage.Parser.prototype.fromObject = function(obj) {
  if (obj === null) {
    return null;
  }
  
  let msg = new proto.spine.server.integration.ExternalMessage();
  
  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.originalMessage !== undefined) {
    if (obj.originalMessage === null) {
      msg.setOriginalMessage(null);
    } else {
      let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Any').fromObject(obj.originalMessage);
      msg.setOriginalMessage(value);
    }
  }
  
  if (obj.actorContext !== undefined) {
    if (obj.actorContext === null) {
      msg.setActorContext(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.ActorContext').fromObject(obj.actorContext);
      msg.setActorContext(value);
    }
  }
  
  if (obj.boundedContextName !== undefined) {
    if (obj.boundedContextName === null) {
      msg.setBoundedContextName(null);
    } else {
      let value = TypeParsers.parserFor('type.spine.io/spine.core.BoundedContextName').fromObject(obj.boundedContextName);
      msg.setBoundedContextName(value);
    }
  }
  return msg;
};

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

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

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

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

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