phenopackets/schema/v2/core/base_pb.js

// source: phenopackets/schema/v2/core/base.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {missingRequire} reports error on implicit type usages.
 * @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!
/* eslint-disable */
// @ts-nocheck

var jspb = require('google-protobuf');
var goog = jspb;
var global =
    (typeof globalThis !== 'undefined' && globalThis) ||
    (typeof window !== 'undefined' && window) ||
    (typeof global !== 'undefined' && global) ||
    (typeof self !== 'undefined' && self) ||
    (function () { return this; }).call(null) ||
    Function('return this')();

var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Age', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.AgeRange', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Evidence', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.ExternalReference', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.File', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.GestationalAge', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.OntologyClass', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Procedure', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TimeElement', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TimeElement.ElementCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TimeInterval', 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.org.phenopackets.schema.v2.core.OntologyClass = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.OntologyClass, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.OntologyClass.displayName = 'proto.org.phenopackets.schema.v2.core.OntologyClass';
}
/**
 * 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.org.phenopackets.schema.v2.core.ExternalReference = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.ExternalReference, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.ExternalReference.displayName = 'proto.org.phenopackets.schema.v2.core.ExternalReference';
}
/**
 * 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.org.phenopackets.schema.v2.core.Evidence = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Evidence, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.Evidence.displayName = 'proto.org.phenopackets.schema.v2.core.Evidence';
}
/**
 * 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.org.phenopackets.schema.v2.core.Procedure = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Procedure, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.Procedure.displayName = 'proto.org.phenopackets.schema.v2.core.Procedure';
}
/**
 * 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.org.phenopackets.schema.v2.core.GestationalAge = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.GestationalAge, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.GestationalAge.displayName = 'proto.org.phenopackets.schema.v2.core.GestationalAge';
}
/**
 * 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.org.phenopackets.schema.v2.core.Age = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Age, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.Age.displayName = 'proto.org.phenopackets.schema.v2.core.Age';
}
/**
 * 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.org.phenopackets.schema.v2.core.AgeRange = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.AgeRange, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.AgeRange.displayName = 'proto.org.phenopackets.schema.v2.core.AgeRange';
}
/**
 * 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.org.phenopackets.schema.v2.core.TimeInterval = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.TimeInterval, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.TimeInterval.displayName = 'proto.org.phenopackets.schema.v2.core.TimeInterval';
}
/**
 * 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.org.phenopackets.schema.v2.core.TimeElement = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.TimeElement, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.TimeElement.displayName = 'proto.org.phenopackets.schema.v2.core.TimeElement';
}
/**
 * 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.org.phenopackets.schema.v2.core.File = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.File, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.File.displayName = 'proto.org.phenopackets.schema.v2.core.File';
}



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.org.phenopackets.schema.v2.core.OntologyClass.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.OntologyClass.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.org.phenopackets.schema.v2.core.OntologyClass} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.OntologyClass.toObject = function(includeInstance, msg) {
  var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
label: 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.org.phenopackets.schema.v2.core.OntologyClass}
 */
proto.org.phenopackets.schema.v2.core.OntologyClass.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.OntologyClass;
  return proto.org.phenopackets.schema.v2.core.OntologyClass.deserializeBinaryFromReader(msg, reader);
};


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


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.OntologyClass} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.OntologyClass.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getLabel();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.org.phenopackets.schema.v2.core.OntologyClass.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.phenopackets.schema.v2.core.OntologyClass} returns this
 */
proto.org.phenopackets.schema.v2.core.OntologyClass.prototype.setId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string label = 2;
 * @return {string}
 */
proto.org.phenopackets.schema.v2.core.OntologyClass.prototype.getLabel = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.phenopackets.schema.v2.core.OntologyClass} returns this
 */
proto.org.phenopackets.schema.v2.core.OntologyClass.prototype.setLabel = 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.org.phenopackets.schema.v2.core.ExternalReference.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.ExternalReference.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.org.phenopackets.schema.v2.core.ExternalReference} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.toObject = function(includeInstance, msg) {
  var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
reference: jspb.Message.getFieldWithDefault(msg, 2, ""),
description: jspb.Message.getFieldWithDefault(msg, 3, "")
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.ExternalReference} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.ExternalReference}
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.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.setReference(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setDescription(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.ExternalReference} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getReference();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getDescription();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.phenopackets.schema.v2.core.ExternalReference} returns this
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.prototype.setId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string reference = 2;
 * @return {string}
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.prototype.getReference = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.phenopackets.schema.v2.core.ExternalReference} returns this
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.prototype.setReference = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string description = 3;
 * @return {string}
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.prototype.getDescription = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.phenopackets.schema.v2.core.ExternalReference} returns this
 */
proto.org.phenopackets.schema.v2.core.ExternalReference.prototype.setDescription = function(value) {
  return jspb.Message.setProto3StringField(this, 3, 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.org.phenopackets.schema.v2.core.Evidence.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.Evidence.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.org.phenopackets.schema.v2.core.Evidence} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Evidence.toObject = function(includeInstance, msg) {
  var f, obj = {
evidenceCode: (f = msg.getEvidenceCode()) && proto.org.phenopackets.schema.v2.core.OntologyClass.toObject(includeInstance, f),
reference: (f = msg.getReference()) && proto.org.phenopackets.schema.v2.core.ExternalReference.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.org.phenopackets.schema.v2.core.Evidence}
 */
proto.org.phenopackets.schema.v2.core.Evidence.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.Evidence;
  return proto.org.phenopackets.schema.v2.core.Evidence.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.Evidence} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.Evidence}
 */
proto.org.phenopackets.schema.v2.core.Evidence.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.org.phenopackets.schema.v2.core.OntologyClass;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.OntologyClass.deserializeBinaryFromReader);
      msg.setEvidenceCode(value);
      break;
    case 2:
      var value = new proto.org.phenopackets.schema.v2.core.ExternalReference;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.ExternalReference.deserializeBinaryFromReader);
      msg.setReference(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.Evidence} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Evidence.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getEvidenceCode();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.org.phenopackets.schema.v2.core.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getReference();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.org.phenopackets.schema.v2.core.ExternalReference.serializeBinaryToWriter
    );
  }
};


/**
 * optional OntologyClass evidence_code = 1;
 * @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
 */
proto.org.phenopackets.schema.v2.core.Evidence.prototype.getEvidenceCode = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.OntologyClass, 1));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.Evidence} returns this
*/
proto.org.phenopackets.schema.v2.core.Evidence.prototype.setEvidenceCode = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.Evidence} returns this
 */
proto.org.phenopackets.schema.v2.core.Evidence.prototype.clearEvidenceCode = function() {
  return this.setEvidenceCode(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.Evidence.prototype.hasEvidenceCode = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional ExternalReference reference = 2;
 * @return {?proto.org.phenopackets.schema.v2.core.ExternalReference}
 */
proto.org.phenopackets.schema.v2.core.Evidence.prototype.getReference = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.ExternalReference} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.ExternalReference, 2));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.ExternalReference|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.Evidence} returns this
*/
proto.org.phenopackets.schema.v2.core.Evidence.prototype.setReference = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.Evidence} returns this
 */
proto.org.phenopackets.schema.v2.core.Evidence.prototype.clearReference = function() {
  return this.setReference(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.Evidence.prototype.hasReference = function() {
  return jspb.Message.getField(this, 2) != 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.org.phenopackets.schema.v2.core.Procedure.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.Procedure.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.org.phenopackets.schema.v2.core.Procedure} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Procedure.toObject = function(includeInstance, msg) {
  var f, obj = {
code: (f = msg.getCode()) && proto.org.phenopackets.schema.v2.core.OntologyClass.toObject(includeInstance, f),
bodySite: (f = msg.getBodySite()) && proto.org.phenopackets.schema.v2.core.OntologyClass.toObject(includeInstance, f),
performed: (f = msg.getPerformed()) && proto.org.phenopackets.schema.v2.core.TimeElement.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.org.phenopackets.schema.v2.core.Procedure}
 */
proto.org.phenopackets.schema.v2.core.Procedure.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.Procedure;
  return proto.org.phenopackets.schema.v2.core.Procedure.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.Procedure} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.Procedure}
 */
proto.org.phenopackets.schema.v2.core.Procedure.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.org.phenopackets.schema.v2.core.OntologyClass;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.OntologyClass.deserializeBinaryFromReader);
      msg.setCode(value);
      break;
    case 2:
      var value = new proto.org.phenopackets.schema.v2.core.OntologyClass;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.OntologyClass.deserializeBinaryFromReader);
      msg.setBodySite(value);
      break;
    case 3:
      var value = new proto.org.phenopackets.schema.v2.core.TimeElement;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.TimeElement.deserializeBinaryFromReader);
      msg.setPerformed(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.Procedure} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Procedure.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getCode();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.org.phenopackets.schema.v2.core.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getBodySite();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.org.phenopackets.schema.v2.core.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getPerformed();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.org.phenopackets.schema.v2.core.TimeElement.serializeBinaryToWriter
    );
  }
};


/**
 * optional OntologyClass code = 1;
 * @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.getCode = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.OntologyClass, 1));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.Procedure} returns this
*/
proto.org.phenopackets.schema.v2.core.Procedure.prototype.setCode = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.Procedure} returns this
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.clearCode = function() {
  return this.setCode(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.hasCode = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional OntologyClass body_site = 2;
 * @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.getBodySite = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.OntologyClass, 2));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.Procedure} returns this
*/
proto.org.phenopackets.schema.v2.core.Procedure.prototype.setBodySite = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.Procedure} returns this
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.clearBodySite = function() {
  return this.setBodySite(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.hasBodySite = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional TimeElement performed = 3;
 * @return {?proto.org.phenopackets.schema.v2.core.TimeElement}
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.getPerformed = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.TimeElement} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.TimeElement, 3));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.TimeElement|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.Procedure} returns this
*/
proto.org.phenopackets.schema.v2.core.Procedure.prototype.setPerformed = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.Procedure} returns this
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.clearPerformed = function() {
  return this.setPerformed(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.Procedure.prototype.hasPerformed = function() {
  return jspb.Message.getField(this, 3) != 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.org.phenopackets.schema.v2.core.GestationalAge.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.GestationalAge.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.org.phenopackets.schema.v2.core.GestationalAge} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.toObject = function(includeInstance, msg) {
  var f, obj = {
weeks: jspb.Message.getFieldWithDefault(msg, 1, 0),
days: jspb.Message.getFieldWithDefault(msg, 2, 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.org.phenopackets.schema.v2.core.GestationalAge}
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.GestationalAge;
  return proto.org.phenopackets.schema.v2.core.GestationalAge.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.GestationalAge} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.GestationalAge}
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setWeeks(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt32());
      msg.setDays(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.GestationalAge} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getWeeks();
  if (f !== 0) {
    writer.writeInt32(
      1,
      f
    );
  }
  f = message.getDays();
  if (f !== 0) {
    writer.writeInt32(
      2,
      f
    );
  }
};


/**
 * optional int32 weeks = 1;
 * @return {number}
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.prototype.getWeeks = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.phenopackets.schema.v2.core.GestationalAge} returns this
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.prototype.setWeeks = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional int32 days = 2;
 * @return {number}
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.prototype.getDays = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.org.phenopackets.schema.v2.core.GestationalAge} returns this
 */
proto.org.phenopackets.schema.v2.core.GestationalAge.prototype.setDays = function(value) {
  return jspb.Message.setProto3IntField(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.org.phenopackets.schema.v2.core.Age.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.Age.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.org.phenopackets.schema.v2.core.Age} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Age.toObject = function(includeInstance, msg) {
  var f, obj = {
iso8601duration: 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.org.phenopackets.schema.v2.core.Age}
 */
proto.org.phenopackets.schema.v2.core.Age.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.Age;
  return proto.org.phenopackets.schema.v2.core.Age.deserializeBinaryFromReader(msg, reader);
};


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


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


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


/**
 * optional string iso8601duration = 1;
 * @return {string}
 */
proto.org.phenopackets.schema.v2.core.Age.prototype.getIso8601duration = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.phenopackets.schema.v2.core.Age} returns this
 */
proto.org.phenopackets.schema.v2.core.Age.prototype.setIso8601duration = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};





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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.AgeRange} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.AgeRange}
 */
proto.org.phenopackets.schema.v2.core.AgeRange.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.org.phenopackets.schema.v2.core.Age;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Age.deserializeBinaryFromReader);
      msg.setStart(value);
      break;
    case 2:
      var value = new proto.org.phenopackets.schema.v2.core.Age;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Age.deserializeBinaryFromReader);
      msg.setEnd(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.AgeRange} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.AgeRange.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getStart();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.org.phenopackets.schema.v2.core.Age.serializeBinaryToWriter
    );
  }
  f = message.getEnd();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.org.phenopackets.schema.v2.core.Age.serializeBinaryToWriter
    );
  }
};


/**
 * optional Age start = 1;
 * @return {?proto.org.phenopackets.schema.v2.core.Age}
 */
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.getStart = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.Age} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Age, 1));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.Age|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.AgeRange} returns this
*/
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.setStart = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.AgeRange} returns this
 */
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.clearStart = function() {
  return this.setStart(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.hasStart = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional Age end = 2;
 * @return {?proto.org.phenopackets.schema.v2.core.Age}
 */
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.getEnd = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.Age} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Age, 2));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.Age|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.AgeRange} returns this
*/
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.setEnd = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.AgeRange} returns this
 */
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.clearEnd = function() {
  return this.setEnd(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.AgeRange.prototype.hasEnd = function() {
  return jspb.Message.getField(this, 2) != 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.org.phenopackets.schema.v2.core.TimeInterval.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.TimeInterval.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.org.phenopackets.schema.v2.core.TimeInterval} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.toObject = function(includeInstance, msg) {
  var f, obj = {
start: (f = msg.getStart()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
end: (f = msg.getEnd()) && google_protobuf_timestamp_pb.Timestamp.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.org.phenopackets.schema.v2.core.TimeInterval}
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.TimeInterval;
  return proto.org.phenopackets.schema.v2.core.TimeInterval.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.TimeInterval} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeInterval}
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setStart(value);
      break;
    case 2:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setEnd(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.TimeInterval} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getStart();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getEnd();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
};


/**
 * optional google.protobuf.Timestamp start = 1;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.getStart = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.setStart = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeInterval} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.clearStart = function() {
  return this.setStart(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.hasStart = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional google.protobuf.Timestamp end = 2;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.getEnd = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.setEnd = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeInterval} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.clearEnd = function() {
  return this.setEnd(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeInterval.prototype.hasEnd = function() {
  return jspb.Message.getField(this, 2) != 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.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_ = [[6,1,2,3,4,5]];

/**
 * @enum {number}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.ElementCase = {
  ELEMENT_NOT_SET: 0,
  GESTATIONAL_AGE: 6,
  AGE: 1,
  AGE_RANGE: 2,
  ONTOLOGY_CLASS: 3,
  TIMESTAMP: 4,
  INTERVAL: 5
};

/**
 * @return {proto.org.phenopackets.schema.v2.core.TimeElement.ElementCase}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.getElementCase = function() {
  return /** @type {proto.org.phenopackets.schema.v2.core.TimeElement.ElementCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v2.core.TimeElement.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.org.phenopackets.schema.v2.core.TimeElement.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.TimeElement.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.org.phenopackets.schema.v2.core.TimeElement} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.TimeElement.toObject = function(includeInstance, msg) {
  var f, obj = {
gestationalAge: (f = msg.getGestationalAge()) && proto.org.phenopackets.schema.v2.core.GestationalAge.toObject(includeInstance, f),
age: (f = msg.getAge()) && proto.org.phenopackets.schema.v2.core.Age.toObject(includeInstance, f),
ageRange: (f = msg.getAgeRange()) && proto.org.phenopackets.schema.v2.core.AgeRange.toObject(includeInstance, f),
ontologyClass: (f = msg.getOntologyClass()) && proto.org.phenopackets.schema.v2.core.OntologyClass.toObject(includeInstance, f),
timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
interval: (f = msg.getInterval()) && proto.org.phenopackets.schema.v2.core.TimeInterval.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.org.phenopackets.schema.v2.core.TimeElement}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.TimeElement;
  return proto.org.phenopackets.schema.v2.core.TimeElement.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.TimeElement} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 6:
      var value = new proto.org.phenopackets.schema.v2.core.GestationalAge;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.GestationalAge.deserializeBinaryFromReader);
      msg.setGestationalAge(value);
      break;
    case 1:
      var value = new proto.org.phenopackets.schema.v2.core.Age;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Age.deserializeBinaryFromReader);
      msg.setAge(value);
      break;
    case 2:
      var value = new proto.org.phenopackets.schema.v2.core.AgeRange;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.AgeRange.deserializeBinaryFromReader);
      msg.setAgeRange(value);
      break;
    case 3:
      var value = new proto.org.phenopackets.schema.v2.core.OntologyClass;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.OntologyClass.deserializeBinaryFromReader);
      msg.setOntologyClass(value);
      break;
    case 4:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTimestamp(value);
      break;
    case 5:
      var value = new proto.org.phenopackets.schema.v2.core.TimeInterval;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.TimeInterval.deserializeBinaryFromReader);
      msg.setInterval(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.TimeElement} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.TimeElement.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getGestationalAge();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      proto.org.phenopackets.schema.v2.core.GestationalAge.serializeBinaryToWriter
    );
  }
  f = message.getAge();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.org.phenopackets.schema.v2.core.Age.serializeBinaryToWriter
    );
  }
  f = message.getAgeRange();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.org.phenopackets.schema.v2.core.AgeRange.serializeBinaryToWriter
    );
  }
  f = message.getOntologyClass();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.org.phenopackets.schema.v2.core.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getTimestamp();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getInterval();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      proto.org.phenopackets.schema.v2.core.TimeInterval.serializeBinaryToWriter
    );
  }
};


/**
 * optional GestationalAge gestational_age = 6;
 * @return {?proto.org.phenopackets.schema.v2.core.GestationalAge}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.getGestationalAge = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.GestationalAge} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.GestationalAge, 6));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.GestationalAge|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.setGestationalAge = function(value) {
  return jspb.Message.setOneofWrapperField(this, 6, proto.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.clearGestationalAge = function() {
  return this.setGestationalAge(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.hasGestationalAge = function() {
  return jspb.Message.getField(this, 6) != null;
};


/**
 * optional Age age = 1;
 * @return {?proto.org.phenopackets.schema.v2.core.Age}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.getAge = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.Age} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Age, 1));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.Age|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.setAge = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.clearAge = function() {
  return this.setAge(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.hasAge = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional AgeRange age_range = 2;
 * @return {?proto.org.phenopackets.schema.v2.core.AgeRange}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.getAgeRange = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.AgeRange} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.AgeRange, 2));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.AgeRange|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.setAgeRange = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.clearAgeRange = function() {
  return this.setAgeRange(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.hasAgeRange = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional OntologyClass ontology_class = 3;
 * @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.getOntologyClass = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.OntologyClass, 3));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.setOntologyClass = function(value) {
  return jspb.Message.setOneofWrapperField(this, 3, proto.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.clearOntologyClass = function() {
  return this.setOntologyClass(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.hasOntologyClass = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * optional google.protobuf.Timestamp timestamp = 4;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.getTimestamp = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.setTimestamp = function(value) {
  return jspb.Message.setOneofWrapperField(this, 4, proto.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.clearTimestamp = function() {
  return this.setTimestamp(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.hasTimestamp = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional TimeInterval interval = 5;
 * @return {?proto.org.phenopackets.schema.v2.core.TimeInterval}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.getInterval = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.TimeInterval} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.TimeInterval, 5));
};


/**
 * @param {?proto.org.phenopackets.schema.v2.core.TimeInterval|undefined} value
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
*/
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.setInterval = function(value) {
  return jspb.Message.setOneofWrapperField(this, 5, proto.org.phenopackets.schema.v2.core.TimeElement.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.org.phenopackets.schema.v2.core.TimeElement} returns this
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.clearInterval = function() {
  return this.setInterval(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TimeElement.prototype.hasInterval = function() {
  return jspb.Message.getField(this, 5) != 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.org.phenopackets.schema.v2.core.File.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.File.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.org.phenopackets.schema.v2.core.File} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.File.toObject = function(includeInstance, msg) {
  var f, obj = {
uri: jspb.Message.getFieldWithDefault(msg, 1, ""),
individualToFileIdentifiersMap: (f = msg.getIndividualToFileIdentifiersMap()) ? f.toObject(includeInstance, undefined) : [],
fileAttributesMap: (f = msg.getFileAttributesMap()) ? f.toObject(includeInstance, undefined) : []
  };

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


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


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.org.phenopackets.schema.v2.core.File} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.File}
 */
proto.org.phenopackets.schema.v2.core.File.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.setUri(value);
      break;
    case 2:
      var value = msg.getIndividualToFileIdentifiersMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    case 3:
      var value = msg.getFileAttributesMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
         });
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


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


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.org.phenopackets.schema.v2.core.File} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.File.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getUri();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getIndividualToFileIdentifiersMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
  f = message.getFileAttributesMap(true);
  if (f && f.getLength() > 0) {
    f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
  }
};


/**
 * optional string uri = 1;
 * @return {string}
 */
proto.org.phenopackets.schema.v2.core.File.prototype.getUri = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.org.phenopackets.schema.v2.core.File} returns this
 */
proto.org.phenopackets.schema.v2.core.File.prototype.setUri = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * map<string, string> individual_to_file_identifiers = 2;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.org.phenopackets.schema.v2.core.File.prototype.getIndividualToFileIdentifiersMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 2, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.org.phenopackets.schema.v2.core.File} returns this
 */
proto.org.phenopackets.schema.v2.core.File.prototype.clearIndividualToFileIdentifiersMap = function() {
  this.getIndividualToFileIdentifiersMap().clear();
  return this;
};


/**
 * map<string, string> file_attributes = 3;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.org.phenopackets.schema.v2.core.File.prototype.getFileAttributesMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 3, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.org.phenopackets.schema.v2.core.File} returns this
 */
proto.org.phenopackets.schema.v2.core.File.prototype.clearFileAttributesMap = function() {
  this.getFileAttributesMap().clear();
  return this;
};


goog.object.extend(exports, proto.org.phenopackets.schema.v2.core);