/**
 * @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_sessions_ioMappings_pb = require('../../proto/sessions/ioMappings_pb.js');
var proto_processing_processingModule_pb = require('../../proto/processing/processingModule_pb.js');
goog.exportSymbol('proto.ubii.sessions.Session', null, global);
goog.exportSymbol('proto.ubii.sessions.SessionList', null, global);
goog.exportSymbol('proto.ubii.sessions.SessionStatus', 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.sessions.Session = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.ubii.sessions.Session.repeatedFields_, null);
};
goog.inherits(proto.ubii.sessions.Session, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.ubii.sessions.Session.displayName = 'proto.ubii.sessions.Session';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.ubii.sessions.Session.repeatedFields_ = [3,4,5,7];



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.sessions.Session.prototype.toObject = function(opt_includeInstance) {
  return proto.ubii.sessions.Session.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.sessions.Session} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ubii.sessions.Session.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: jspb.Message.getFieldWithDefault(msg, 1, ""),
    name: jspb.Message.getFieldWithDefault(msg, 2, ""),
    processingModulesList: jspb.Message.toObjectList(msg.getProcessingModulesList(),
    proto_processing_processingModule_pb.ProcessingModule.toObject, includeInstance),
    ioMappingsList: jspb.Message.toObjectList(msg.getIoMappingsList(),
    proto_sessions_ioMappings_pb.IOMapping.toObject, includeInstance),
    tagsList: jspb.Message.getRepeatedField(msg, 5),
    description: jspb.Message.getFieldWithDefault(msg, 6, ""),
    authorsList: jspb.Message.getRepeatedField(msg, 7),
    status: jspb.Message.getFieldWithDefault(msg, 8, 0),
    editable: jspb.Message.getFieldWithDefault(msg, 9, 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.ubii.sessions.Session}
 */
proto.ubii.sessions.Session.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ubii.sessions.Session;
  return proto.ubii.sessions.Session.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.ubii.sessions.Session} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.ubii.sessions.Session}
 */
proto.ubii.sessions.Session.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.setId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setName(value);
      break;
    case 3:
      var value = new proto_processing_processingModule_pb.ProcessingModule;
      reader.readMessage(value,proto_processing_processingModule_pb.ProcessingModule.deserializeBinaryFromReader);
      msg.addProcessingModules(value);
      break;
    case 4:
      var value = new proto_sessions_ioMappings_pb.IOMapping;
      reader.readMessage(value,proto_sessions_ioMappings_pb.IOMapping.deserializeBinaryFromReader);
      msg.addIoMappings(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.addTags(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setDescription(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.addAuthors(value);
      break;
    case 8:
      var value = /** @type {!proto.ubii.sessions.SessionStatus} */ (reader.readEnum());
      msg.setStatus(value);
      break;
    case 9:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setEditable(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.ubii.sessions.Session.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.ubii.sessions.Session.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.sessions.Session} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ubii.sessions.Session.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getProcessingModulesList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      3,
      f,
      proto_processing_processingModule_pb.ProcessingModule.serializeBinaryToWriter
    );
  }
  f = message.getIoMappingsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      4,
      f,
      proto_sessions_ioMappings_pb.IOMapping.serializeBinaryToWriter
    );
  }
  f = message.getTagsList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      5,
      f
    );
  }
  f = message.getDescription();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = message.getAuthorsList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      7,
      f
    );
  }
  f = message.getStatus();
  if (f !== 0.0) {
    writer.writeEnum(
      8,
      f
    );
  }
  f = message.getEditable();
  if (f) {
    writer.writeBool(
      9,
      f
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.ubii.sessions.Session.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/** @param {string} value */
proto.ubii.sessions.Session.prototype.setId = function(value) {
  jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string name = 2;
 * @return {string}
 */
proto.ubii.sessions.Session.prototype.getName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/** @param {string} value */
proto.ubii.sessions.Session.prototype.setName = function(value) {
  jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * repeated ubii.processing.ProcessingModule processing_modules = 3;
 * @return {!Array<!proto.ubii.processing.ProcessingModule>}
 */
proto.ubii.sessions.Session.prototype.getProcessingModulesList = function() {
  return /** @type{!Array<!proto.ubii.processing.ProcessingModule>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto_processing_processingModule_pb.ProcessingModule, 3));
};


/** @param {!Array<!proto.ubii.processing.ProcessingModule>} value */
proto.ubii.sessions.Session.prototype.setProcessingModulesList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 3, value);
};


/**
 * @param {!proto.ubii.processing.ProcessingModule=} opt_value
 * @param {number=} opt_index
 * @return {!proto.ubii.processing.ProcessingModule}
 */
proto.ubii.sessions.Session.prototype.addProcessingModules = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ubii.processing.ProcessingModule, opt_index);
};


proto.ubii.sessions.Session.prototype.clearProcessingModulesList = function() {
  this.setProcessingModulesList([]);
};


/**
 * repeated IOMapping io_mappings = 4;
 * @return {!Array<!proto.ubii.sessions.IOMapping>}
 */
proto.ubii.sessions.Session.prototype.getIoMappingsList = function() {
  return /** @type{!Array<!proto.ubii.sessions.IOMapping>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto_sessions_ioMappings_pb.IOMapping, 4));
};


/** @param {!Array<!proto.ubii.sessions.IOMapping>} value */
proto.ubii.sessions.Session.prototype.setIoMappingsList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 4, value);
};


/**
 * @param {!proto.ubii.sessions.IOMapping=} opt_value
 * @param {number=} opt_index
 * @return {!proto.ubii.sessions.IOMapping}
 */
proto.ubii.sessions.Session.prototype.addIoMappings = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.ubii.sessions.IOMapping, opt_index);
};


proto.ubii.sessions.Session.prototype.clearIoMappingsList = function() {
  this.setIoMappingsList([]);
};


/**
 * repeated string tags = 5;
 * @return {!Array<string>}
 */
proto.ubii.sessions.Session.prototype.getTagsList = function() {
  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
};


/** @param {!Array<string>} value */
proto.ubii.sessions.Session.prototype.setTagsList = function(value) {
  jspb.Message.setField(this, 5, value || []);
};


/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.ubii.sessions.Session.prototype.addTags = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 5, value, opt_index);
};


proto.ubii.sessions.Session.prototype.clearTagsList = function() {
  this.setTagsList([]);
};


/**
 * optional string description = 6;
 * @return {string}
 */
proto.ubii.sessions.Session.prototype.getDescription = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/** @param {string} value */
proto.ubii.sessions.Session.prototype.setDescription = function(value) {
  jspb.Message.setProto3StringField(this, 6, value);
};


/**
 * repeated string authors = 7;
 * @return {!Array<string>}
 */
proto.ubii.sessions.Session.prototype.getAuthorsList = function() {
  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 7));
};


/** @param {!Array<string>} value */
proto.ubii.sessions.Session.prototype.setAuthorsList = function(value) {
  jspb.Message.setField(this, 7, value || []);
};


/**
 * @param {!string} value
 * @param {number=} opt_index
 */
proto.ubii.sessions.Session.prototype.addAuthors = function(value, opt_index) {
  jspb.Message.addToRepeatedField(this, 7, value, opt_index);
};


proto.ubii.sessions.Session.prototype.clearAuthorsList = function() {
  this.setAuthorsList([]);
};


/**
 * optional SessionStatus status = 8;
 * @return {!proto.ubii.sessions.SessionStatus}
 */
proto.ubii.sessions.Session.prototype.getStatus = function() {
  return /** @type {!proto.ubii.sessions.SessionStatus} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};


/** @param {!proto.ubii.sessions.SessionStatus} value */
proto.ubii.sessions.Session.prototype.setStatus = function(value) {
  jspb.Message.setProto3EnumField(this, 8, value);
};


/**
 * optional bool editable = 9;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.ubii.sessions.Session.prototype.getEditable = function() {
  return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 9, false));
};


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



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.sessions.SessionList.prototype.toObject = function(opt_includeInstance) {
  return proto.ubii.sessions.SessionList.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.sessions.SessionList} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.ubii.sessions.SessionList.toObject = function(includeInstance, msg) {
  var f, obj = {
    elementsList: jspb.Message.toObjectList(msg.getElementsList(),
    proto.ubii.sessions.Session.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.sessions.SessionList}
 */
proto.ubii.sessions.SessionList.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.ubii.sessions.SessionList;
  return proto.ubii.sessions.SessionList.deserializeBinaryFromReader(msg, reader);
};


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


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


/**
 * repeated Session elements = 1;
 * @return {!Array<!proto.ubii.sessions.Session>}
 */
proto.ubii.sessions.SessionList.prototype.getElementsList = function() {
  return /** @type{!Array<!proto.ubii.sessions.Session>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.ubii.sessions.Session, 1));
};


/** @param {!Array<!proto.ubii.sessions.Session>} value */
proto.ubii.sessions.SessionList.prototype.setElementsList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.ubii.sessions.Session=} opt_value
 * @param {number=} opt_index
 * @return {!proto.ubii.sessions.Session}
 */
proto.ubii.sessions.SessionList.prototype.addElements = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ubii.sessions.Session, opt_index);
};


proto.ubii.sessions.SessionList.prototype.clearElementsList = function() {
  this.setElementsList([]);
};


/**
 * @enum {number}
 */
proto.ubii.sessions.SessionStatus = {
  CREATED: 0,
  RUNNING: 1,
  PAUSED: 2,
  STOPPED: 3
};

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