phenopackets/schema/v2/core/measurement_pb.js

// source: phenopackets/schema/v2/core/measurement.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 phenopackets_schema_v2_core_base_pb = require('../../../../phenopackets/schema/v2/core/base_pb.js');
goog.object.extend(proto, phenopackets_schema_v2_core_base_pb);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.ComplexValue', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Measurement', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Measurement.MeasurementValueCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Quantity', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.ReferenceRange', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TypedQuantity', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Value', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Value.ValueCase', 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.Measurement = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.phenopackets.schema.v2.core.Measurement.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Measurement, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.Measurement.displayName = 'proto.org.phenopackets.schema.v2.core.Measurement';
}
/**
 * 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.Value = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.phenopackets.schema.v2.core.Value.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Value, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.Value.displayName = 'proto.org.phenopackets.schema.v2.core.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.org.phenopackets.schema.v2.core.ComplexValue = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v2.core.ComplexValue.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.ComplexValue, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.ComplexValue.displayName = 'proto.org.phenopackets.schema.v2.core.ComplexValue';
}
/**
 * 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.Quantity = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Quantity, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.Quantity.displayName = 'proto.org.phenopackets.schema.v2.core.Quantity';
}
/**
 * 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.TypedQuantity = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.TypedQuantity, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.TypedQuantity.displayName = 'proto.org.phenopackets.schema.v2.core.TypedQuantity';
}
/**
 * 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.ReferenceRange = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.ReferenceRange, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.org.phenopackets.schema.v2.core.ReferenceRange.displayName = 'proto.org.phenopackets.schema.v2.core.ReferenceRange';
}

/**
 * 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.Measurement.oneofGroups_ = [[3,4]];

/**
 * @enum {number}
 */
proto.org.phenopackets.schema.v2.core.Measurement.MeasurementValueCase = {
  MEASUREMENT_VALUE_NOT_SET: 0,
  VALUE: 3,
  COMPLEX_VALUE: 4
};

/**
 * @return {proto.org.phenopackets.schema.v2.core.Measurement.MeasurementValueCase}
 */
proto.org.phenopackets.schema.v2.core.Measurement.prototype.getMeasurementValueCase = function() {
  return /** @type {proto.org.phenopackets.schema.v2.core.Measurement.MeasurementValueCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v2.core.Measurement.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.Measurement.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.Measurement.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.Measurement} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Measurement.toObject = function(includeInstance, msg) {
  var f, obj = {
description: jspb.Message.getFieldWithDefault(msg, 1, ""),
assay: (f = msg.getAssay()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
value: (f = msg.getValue()) && proto.org.phenopackets.schema.v2.core.Value.toObject(includeInstance, f),
complexValue: (f = msg.getComplexValue()) && proto.org.phenopackets.schema.v2.core.ComplexValue.toObject(includeInstance, f),
timeObserved: (f = msg.getTimeObserved()) && phenopackets_schema_v2_core_base_pb.TimeElement.toObject(includeInstance, f),
procedure: (f = msg.getProcedure()) && phenopackets_schema_v2_core_base_pb.Procedure.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.Measurement}
 */
proto.org.phenopackets.schema.v2.core.Measurement.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.Measurement;
  return proto.org.phenopackets.schema.v2.core.Measurement.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.Measurement} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.Measurement}
 */
proto.org.phenopackets.schema.v2.core.Measurement.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.setDescription(value);
      break;
    case 2:
      var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
      reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
      msg.setAssay(value);
      break;
    case 3:
      var value = new proto.org.phenopackets.schema.v2.core.Value;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Value.deserializeBinaryFromReader);
      msg.setValue(value);
      break;
    case 4:
      var value = new proto.org.phenopackets.schema.v2.core.ComplexValue;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.ComplexValue.deserializeBinaryFromReader);
      msg.setComplexValue(value);
      break;
    case 5:
      var value = new phenopackets_schema_v2_core_base_pb.TimeElement;
      reader.readMessage(value,phenopackets_schema_v2_core_base_pb.TimeElement.deserializeBinaryFromReader);
      msg.setTimeObserved(value);
      break;
    case 6:
      var value = new phenopackets_schema_v2_core_base_pb.Procedure;
      reader.readMessage(value,phenopackets_schema_v2_core_base_pb.Procedure.deserializeBinaryFromReader);
      msg.setProcedure(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.Measurement.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.phenopackets.schema.v2.core.Measurement.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.Measurement} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Measurement.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getDescription();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getAssay();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getValue();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.org.phenopackets.schema.v2.core.Value.serializeBinaryToWriter
    );
  }
  f = message.getComplexValue();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.org.phenopackets.schema.v2.core.ComplexValue.serializeBinaryToWriter
    );
  }
  f = message.getTimeObserved();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      phenopackets_schema_v2_core_base_pb.TimeElement.serializeBinaryToWriter
    );
  }
  f = message.getProcedure();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      phenopackets_schema_v2_core_base_pb.Procedure.serializeBinaryToWriter
    );
  }
};


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


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


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


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


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


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


/**
 * optional Value value = 3;
 * @return {?proto.org.phenopackets.schema.v2.core.Value}
 */
proto.org.phenopackets.schema.v2.core.Measurement.prototype.getValue = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.Value} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Value, 3));
};


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


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


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


/**
 * optional ComplexValue complex_value = 4;
 * @return {?proto.org.phenopackets.schema.v2.core.ComplexValue}
 */
proto.org.phenopackets.schema.v2.core.Measurement.prototype.getComplexValue = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.ComplexValue} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.ComplexValue, 4));
};


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


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


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


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


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


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


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


/**
 * optional Procedure procedure = 6;
 * @return {?proto.org.phenopackets.schema.v2.core.Procedure}
 */
proto.org.phenopackets.schema.v2.core.Measurement.prototype.getProcedure = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.Procedure} */ (
    jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.Procedure, 6));
};


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


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


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

/**
 * @enum {number}
 */
proto.org.phenopackets.schema.v2.core.Value.ValueCase = {
  VALUE_NOT_SET: 0,
  QUANTITY: 1,
  ONTOLOGY_CLASS: 2
};

/**
 * @return {proto.org.phenopackets.schema.v2.core.Value.ValueCase}
 */
proto.org.phenopackets.schema.v2.core.Value.prototype.getValueCase = function() {
  return /** @type {proto.org.phenopackets.schema.v2.core.Value.ValueCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v2.core.Value.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.Value.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.Value.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.Value} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Value.toObject = function(includeInstance, msg) {
  var f, obj = {
quantity: (f = msg.getQuantity()) && proto.org.phenopackets.schema.v2.core.Quantity.toObject(includeInstance, f),
ontologyClass: (f = msg.getOntologyClass()) && phenopackets_schema_v2_core_base_pb.OntologyClass.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.Value}
 */
proto.org.phenopackets.schema.v2.core.Value.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.Value;
  return proto.org.phenopackets.schema.v2.core.Value.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.Value} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.Value}
 */
proto.org.phenopackets.schema.v2.core.Value.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.Quantity;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Quantity.deserializeBinaryFromReader);
      msg.setQuantity(value);
      break;
    case 2:
      var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
      reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
      msg.setOntologyClass(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.Value.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.phenopackets.schema.v2.core.Value.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.Value} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Value.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getQuantity();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.org.phenopackets.schema.v2.core.Quantity.serializeBinaryToWriter
    );
  }
  f = message.getOntologyClass();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
    );
  }
};


/**
 * optional Quantity quantity = 1;
 * @return {?proto.org.phenopackets.schema.v2.core.Quantity}
 */
proto.org.phenopackets.schema.v2.core.Value.prototype.getQuantity = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.Quantity} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Quantity, 1));
};


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


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


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


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


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


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


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



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.org.phenopackets.schema.v2.core.ComplexValue.repeatedFields_ = [1];



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


/**
 * repeated TypedQuantity typed_quantities = 1;
 * @return {!Array<!proto.org.phenopackets.schema.v2.core.TypedQuantity>}
 */
proto.org.phenopackets.schema.v2.core.ComplexValue.prototype.getTypedQuantitiesList = function() {
  return /** @type{!Array<!proto.org.phenopackets.schema.v2.core.TypedQuantity>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v2.core.TypedQuantity, 1));
};


/**
 * @param {!Array<!proto.org.phenopackets.schema.v2.core.TypedQuantity>} value
 * @return {!proto.org.phenopackets.schema.v2.core.ComplexValue} returns this
*/
proto.org.phenopackets.schema.v2.core.ComplexValue.prototype.setTypedQuantitiesList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.org.phenopackets.schema.v2.core.TypedQuantity=} opt_value
 * @param {number=} opt_index
 * @return {!proto.org.phenopackets.schema.v2.core.TypedQuantity}
 */
proto.org.phenopackets.schema.v2.core.ComplexValue.prototype.addTypedQuantities = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.phenopackets.schema.v2.core.TypedQuantity, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.org.phenopackets.schema.v2.core.ComplexValue} returns this
 */
proto.org.phenopackets.schema.v2.core.ComplexValue.prototype.clearTypedQuantitiesList = function() {
  return this.setTypedQuantitiesList([]);
};





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.Quantity.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.Quantity.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.Quantity} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Quantity.toObject = function(includeInstance, msg) {
  var f, obj = {
unit: (f = msg.getUnit()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
value: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
referenceRange: (f = msg.getReferenceRange()) && proto.org.phenopackets.schema.v2.core.ReferenceRange.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.Quantity}
 */
proto.org.phenopackets.schema.v2.core.Quantity.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.Quantity;
  return proto.org.phenopackets.schema.v2.core.Quantity.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.Quantity} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.Quantity}
 */
proto.org.phenopackets.schema.v2.core.Quantity.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
      reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
      msg.setUnit(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readDouble());
      msg.setValue(value);
      break;
    case 3:
      var value = new proto.org.phenopackets.schema.v2.core.ReferenceRange;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.ReferenceRange.deserializeBinaryFromReader);
      msg.setReferenceRange(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.Quantity.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.phenopackets.schema.v2.core.Quantity.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.Quantity} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.Quantity.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getUnit();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getValue();
  if (f !== 0.0) {
    writer.writeDouble(
      2,
      f
    );
  }
  f = message.getReferenceRange();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.org.phenopackets.schema.v2.core.ReferenceRange.serializeBinaryToWriter
    );
  }
};


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


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


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


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


/**
 * optional double value = 2;
 * @return {number}
 */
proto.org.phenopackets.schema.v2.core.Quantity.prototype.getValue = function() {
  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};


/**
 * @param {number} value
 * @return {!proto.org.phenopackets.schema.v2.core.Quantity} returns this
 */
proto.org.phenopackets.schema.v2.core.Quantity.prototype.setValue = function(value) {
  return jspb.Message.setProto3FloatField(this, 2, value);
};


/**
 * optional ReferenceRange reference_range = 3;
 * @return {?proto.org.phenopackets.schema.v2.core.ReferenceRange}
 */
proto.org.phenopackets.schema.v2.core.Quantity.prototype.getReferenceRange = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.ReferenceRange} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.ReferenceRange, 3));
};


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


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


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.Quantity.prototype.hasReferenceRange = 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.TypedQuantity.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.TypedQuantity.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.TypedQuantity} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.TypedQuantity.toObject = function(includeInstance, msg) {
  var f, obj = {
type: (f = msg.getType()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
quantity: (f = msg.getQuantity()) && proto.org.phenopackets.schema.v2.core.Quantity.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.TypedQuantity}
 */
proto.org.phenopackets.schema.v2.core.TypedQuantity.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.TypedQuantity;
  return proto.org.phenopackets.schema.v2.core.TypedQuantity.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.TypedQuantity} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.TypedQuantity}
 */
proto.org.phenopackets.schema.v2.core.TypedQuantity.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
      reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
      msg.setType(value);
      break;
    case 2:
      var value = new proto.org.phenopackets.schema.v2.core.Quantity;
      reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Quantity.deserializeBinaryFromReader);
      msg.setQuantity(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.TypedQuantity.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.phenopackets.schema.v2.core.TypedQuantity.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.TypedQuantity} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.TypedQuantity.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getType();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getQuantity();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.org.phenopackets.schema.v2.core.Quantity.serializeBinaryToWriter
    );
  }
};


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


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


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


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


/**
 * optional Quantity quantity = 2;
 * @return {?proto.org.phenopackets.schema.v2.core.Quantity}
 */
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.getQuantity = function() {
  return /** @type{?proto.org.phenopackets.schema.v2.core.Quantity} */ (
    jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Quantity, 2));
};


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


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


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.hasQuantity = 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.ReferenceRange.prototype.toObject = function(opt_includeInstance) {
  return proto.org.phenopackets.schema.v2.core.ReferenceRange.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.ReferenceRange} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.toObject = function(includeInstance, msg) {
  var f, obj = {
unit: (f = msg.getUnit()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
low: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
high: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.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.ReferenceRange}
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.org.phenopackets.schema.v2.core.ReferenceRange;
  return proto.org.phenopackets.schema.v2.core.ReferenceRange.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.ReferenceRange} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.org.phenopackets.schema.v2.core.ReferenceRange}
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
      reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
      msg.setUnit(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readDouble());
      msg.setLow(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readDouble());
      msg.setHigh(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.ReferenceRange.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.org.phenopackets.schema.v2.core.ReferenceRange.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.ReferenceRange} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getUnit();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
    );
  }
  f = message.getLow();
  if (f !== 0.0) {
    writer.writeDouble(
      2,
      f
    );
  }
  f = message.getHigh();
  if (f !== 0.0) {
    writer.writeDouble(
      3,
      f
    );
  }
};


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


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


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


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


/**
 * optional double low = 2;
 * @return {number}
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.prototype.getLow = function() {
  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};


/**
 * @param {number} value
 * @return {!proto.org.phenopackets.schema.v2.core.ReferenceRange} returns this
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.prototype.setLow = function(value) {
  return jspb.Message.setProto3FloatField(this, 2, value);
};


/**
 * optional double high = 3;
 * @return {number}
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.prototype.getHigh = function() {
  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};


/**
 * @param {number} value
 * @return {!proto.org.phenopackets.schema.v2.core.ReferenceRange} returns this
 */
proto.org.phenopackets.schema.v2.core.ReferenceRange.prototype.setHigh = function(value) {
  return jspb.Message.setProto3FloatField(this, 3, value);
};


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