/**
 * @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 proto_topicData_topicDataRecord_topicDataRecord_pb = require('../../proto/topicData/topicDataRecord/topicDataRecord_pb.js');
goog.exportSymbol('proto.ubii.processing.LockstepProcessingReply', null, global);
goog.exportSymbol('proto.ubii.processing.LockstepProcessingRequest', 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.ubii.processing.LockstepProcessingRequest = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.ubii.processing.LockstepProcessingRequest.repeatedFields_, null);
};
goog.inherits(proto.ubii.processing.LockstepProcessingRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.ubii.processing.LockstepProcessingRequest.displayName = 'proto.ubii.processing.LockstepProcessingRequest';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.ubii.processing.LockstepProcessingRequest.repeatedFields_ = [1,2];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.ubii.processing.LockstepProcessingRequest.prototype.toObject = function(opt_includeInstance) {
  return proto.ubii.processing.LockstepProcessingRequest.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.ubii.processing.LockstepProcessingRequest} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ubii.processing.LockstepProcessingRequest.toObject = function(includeInstance, msg) {
  var f, obj = {
    processingModuleIdsList: jspb.Message.getRepeatedField(msg, 1),
    recordsList: jspb.Message.toObjectList(msg.getRecordsList(),
    proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord.toObject, includeInstance),
    deltaTimeMs: jspb.Message.getFieldWithDefault(msg, 3, 0)
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ubii.processing.LockstepProcessingRequest} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ubii.processing.LockstepProcessingRequest}
 */
proto.ubii.processing.LockstepProcessingRequest.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.addProcessingModuleIds(value);
      break;
    case 2:
      var value = new proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord;
      reader.readMessage(value,proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord.deserializeBinaryFromReader);
      msg.addRecords(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setDeltaTimeMs(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ubii.processing.LockstepProcessingRequest} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ubii.processing.LockstepProcessingRequest.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getProcessingModuleIdsList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      1,
      f
    );
  }
  f = message.getRecordsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord.serializeBinaryToWriter
    );
  }
  f = message.getDeltaTimeMs();
  if (f !== 0) {
    writer.writeInt32(
      3,
      f
    );
  }
};


/**
 * repeated string processing_module_ids = 1;
 * @return {!Array<string>}
 */
proto.ubii.processing.LockstepProcessingRequest.prototype.getProcessingModuleIdsList = function() {
  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};


/** @param {!Array<string>} value */
proto.ubii.processing.LockstepProcessingRequest.prototype.setProcessingModuleIdsList = function(value) {
  jspb.Message.setField(this, 1, value || []);
};


/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.ubii.processing.LockstepProcessingRequest.prototype.addProcessingModuleIds = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};


proto.ubii.processing.LockstepProcessingRequest.prototype.clearProcessingModuleIdsList = function() {
  this.setProcessingModuleIdsList([]);
};


/**
 * repeated ubii.topicData.TopicDataRecord records = 2;
 * @return {!Array<!proto.ubii.topicData.TopicDataRecord>}
 */
proto.ubii.processing.LockstepProcessingRequest.prototype.getRecordsList = function() {
  return /** @type{!Array<!proto.ubii.topicData.TopicDataRecord>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord, 2));
};


/** @param {!Array<!proto.ubii.topicData.TopicDataRecord>} value */
proto.ubii.processing.LockstepProcessingRequest.prototype.setRecordsList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.ubii.topicData.TopicDataRecord=} opt_value
 * @param {number=} opt_index
 * @return {!proto.ubii.topicData.TopicDataRecord}
 */
proto.ubii.processing.LockstepProcessingRequest.prototype.addRecords = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ubii.topicData.TopicDataRecord, opt_index);
};


proto.ubii.processing.LockstepProcessingRequest.prototype.clearRecordsList = function() {
  this.setRecordsList([]);
};


/**
 * optional int32 delta_time_ms = 3;
 * @return {number}
 */
proto.ubii.processing.LockstepProcessingRequest.prototype.getDeltaTimeMs = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/** @param {number} value */
proto.ubii.processing.LockstepProcessingRequest.prototype.setDeltaTimeMs = function(value) {
  jspb.Message.setProto3IntField(this, 3, value);
};



/**
 * 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.ubii.processing.LockstepProcessingReply = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.ubii.processing.LockstepProcessingReply.repeatedFields_, null);
};
goog.inherits(proto.ubii.processing.LockstepProcessingReply, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.ubii.processing.LockstepProcessingReply.displayName = 'proto.ubii.processing.LockstepProcessingReply';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.ubii.processing.LockstepProcessingReply.repeatedFields_ = [1,2];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.ubii.processing.LockstepProcessingReply.prototype.toObject = function(opt_includeInstance) {
  return proto.ubii.processing.LockstepProcessingReply.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.ubii.processing.LockstepProcessingReply} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ubii.processing.LockstepProcessingReply.toObject = function(includeInstance, msg) {
  var f, obj = {
    processingModuleIdsList: jspb.Message.getRepeatedField(msg, 1),
    recordsList: jspb.Message.toObjectList(msg.getRecordsList(),
    proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord.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.ubii.processing.LockstepProcessingReply}
 */
proto.ubii.processing.LockstepProcessingReply.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ubii.processing.LockstepProcessingReply;
  return proto.ubii.processing.LockstepProcessingReply.deserializeBinaryFromReader(msg, reader);
};


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


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.ubii.processing.LockstepProcessingReply} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ubii.processing.LockstepProcessingReply.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getProcessingModuleIdsList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      1,
      f
    );
  }
  f = message.getRecordsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord.serializeBinaryToWriter
    );
  }
};


/**
 * repeated string processing_module_ids = 1;
 * @return {!Array<string>}
 */
proto.ubii.processing.LockstepProcessingReply.prototype.getProcessingModuleIdsList = function() {
  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};


/** @param {!Array<string>} value */
proto.ubii.processing.LockstepProcessingReply.prototype.setProcessingModuleIdsList = function(value) {
  jspb.Message.setField(this, 1, value || []);
};


/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.ubii.processing.LockstepProcessingReply.prototype.addProcessingModuleIds = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};


proto.ubii.processing.LockstepProcessingReply.prototype.clearProcessingModuleIdsList = function() {
  this.setProcessingModuleIdsList([]);
};


/**
 * repeated ubii.topicData.TopicDataRecord records = 2;
 * @return {!Array<!proto.ubii.topicData.TopicDataRecord>}
 */
proto.ubii.processing.LockstepProcessingReply.prototype.getRecordsList = function() {
  return /** @type{!Array<!proto.ubii.topicData.TopicDataRecord>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto_topicData_topicDataRecord_topicDataRecord_pb.TopicDataRecord, 2));
};


/** @param {!Array<!proto.ubii.topicData.TopicDataRecord>} value */
proto.ubii.processing.LockstepProcessingReply.prototype.setRecordsList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.ubii.topicData.TopicDataRecord=} opt_value
 * @param {number=} opt_index
 * @return {!proto.ubii.topicData.TopicDataRecord}
 */
proto.ubii.processing.LockstepProcessingReply.prototype.addRecords = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ubii.topicData.TopicDataRecord, opt_index);
};


proto.ubii.processing.LockstepProcessingReply.prototype.clearRecordsList = function() {
  this.setRecordsList([]);
};


goog.object.extend(exports, proto.ubii.processing);
