// source: phenopackets/schema/v2/core/interpretation.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);
var phenopackets_vrsatile_v1_vrsatile_pb = require('../../../../phenopackets/vrsatile/v1/vrsatile_pb.js');
goog.object.extend(proto, phenopackets_vrsatile_v1_vrsatile_pb);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.AcmgPathogenicityClassification', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Diagnosis', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.GenomicInterpretation', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.GenomicInterpretation.CallCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.GenomicInterpretation.InterpretationStatus', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Interpretation', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Interpretation.ProgressStatus', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TherapeuticActionability', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.VariantInterpretation', 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.Interpretation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Interpretation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.Interpretation.displayName = 'proto.org.phenopackets.schema.v2.core.Interpretation';
}
/**
* 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.Diagnosis = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v2.core.Diagnosis.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Diagnosis, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.displayName = 'proto.org.phenopackets.schema.v2.core.Diagnosis';
}
/**
* 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.GenomicInterpretation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.phenopackets.schema.v2.core.GenomicInterpretation.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.GenomicInterpretation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.displayName = 'proto.org.phenopackets.schema.v2.core.GenomicInterpretation';
}
/**
* 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.VariantInterpretation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.VariantInterpretation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.displayName = 'proto.org.phenopackets.schema.v2.core.VariantInterpretation';
}
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.Interpretation.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.Interpretation.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.Interpretation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.Interpretation.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
progressStatus: jspb.Message.getFieldWithDefault(msg, 2, 0),
diagnosis: (f = msg.getDiagnosis()) && proto.org.phenopackets.schema.v2.core.Diagnosis.toObject(includeInstance, f),
summary: jspb.Message.getFieldWithDefault(msg, 4, "")
};
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.Interpretation}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.Interpretation;
return proto.org.phenopackets.schema.v2.core.Interpretation.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.Interpretation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.Interpretation}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.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 {!proto.org.phenopackets.schema.v2.core.Interpretation.ProgressStatus} */ (reader.readEnum());
msg.setProgressStatus(value);
break;
case 3:
var value = new proto.org.phenopackets.schema.v2.core.Diagnosis;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Diagnosis.deserializeBinaryFromReader);
msg.setDiagnosis(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setSummary(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.Interpretation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.Interpretation.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.Interpretation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.Interpretation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getProgressStatus();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getDiagnosis();
if (f != null) {
writer.writeMessage(
3,
f,
proto.org.phenopackets.schema.v2.core.Diagnosis.serializeBinaryToWriter
);
}
f = message.getSummary();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.ProgressStatus = {
UNKNOWN_PROGRESS: 0,
IN_PROGRESS: 1,
COMPLETED: 2,
SOLVED: 3,
UNSOLVED: 4
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v2.core.Interpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional ProgressStatus progress_status = 2;
* @return {!proto.org.phenopackets.schema.v2.core.Interpretation.ProgressStatus}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.getProgressStatus = function() {
return /** @type {!proto.org.phenopackets.schema.v2.core.Interpretation.ProgressStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.Interpretation.ProgressStatus} value
* @return {!proto.org.phenopackets.schema.v2.core.Interpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.setProgressStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional Diagnosis diagnosis = 3;
* @return {?proto.org.phenopackets.schema.v2.core.Diagnosis}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.getDiagnosis = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.Diagnosis} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Diagnosis, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.Diagnosis|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.Interpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.setDiagnosis = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.Interpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.clearDiagnosis = function() {
return this.setDiagnosis(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.hasDiagnosis = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional string summary = 4;
* @return {string}
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.getSummary = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v2.core.Interpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.Interpretation.prototype.setSummary = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.repeatedFields_ = [2];
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.Diagnosis.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.Diagnosis.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.Diagnosis} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.toObject = function(includeInstance, msg) {
var f, obj = {
disease: (f = msg.getDisease()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
genomicInterpretationsList: jspb.Message.toObjectList(msg.getGenomicInterpretationsList(),
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.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.Diagnosis}
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.Diagnosis;
return proto.org.phenopackets.schema.v2.core.Diagnosis.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.Diagnosis} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.Diagnosis}
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.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.setDisease(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v2.core.GenomicInterpretation;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.GenomicInterpretation.deserializeBinaryFromReader);
msg.addGenomicInterpretations(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.Diagnosis.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.Diagnosis.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.Diagnosis} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDisease();
if (f != null) {
writer.writeMessage(
1,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getGenomicInterpretationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.serializeBinaryToWriter
);
}
};
/**
* optional OntologyClass disease = 1;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.getDisease = 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.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.setDisease = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.clearDisease = function() {
return this.setDisease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.hasDisease = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated GenomicInterpretation genomic_interpretations = 2;
* @return {!Array<!proto.org.phenopackets.schema.v2.core.GenomicInterpretation>}
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.getGenomicInterpretationsList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v2.core.GenomicInterpretation>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v2.core.GenomicInterpretation, 2));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v2.core.GenomicInterpretation>} value
* @return {!proto.org.phenopackets.schema.v2.core.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.setGenomicInterpretationsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation}
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.addGenomicInterpretations = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.phenopackets.schema.v2.core.GenomicInterpretation, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v2.core.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v2.core.Diagnosis.prototype.clearGenomicInterpretationsList = function() {
return this.setGenomicInterpretationsList([]);
};
/**
* 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.GenomicInterpretation.oneofGroups_ = [[3,4]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.CallCase = {
CALL_NOT_SET: 0,
GENE: 3,
VARIANT_INTERPRETATION: 4
};
/**
* @return {proto.org.phenopackets.schema.v2.core.GenomicInterpretation.CallCase}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.getCallCase = function() {
return /** @type {proto.org.phenopackets.schema.v2.core.GenomicInterpretation.CallCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v2.core.GenomicInterpretation.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.GenomicInterpretation.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.GenomicInterpretation.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.GenomicInterpretation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.toObject = function(includeInstance, msg) {
var f, obj = {
subjectOrBiosampleId: jspb.Message.getFieldWithDefault(msg, 1, ""),
interpretationStatus: jspb.Message.getFieldWithDefault(msg, 2, 0),
gene: (f = msg.getGene()) && phenopackets_vrsatile_v1_vrsatile_pb.GeneDescriptor.toObject(includeInstance, f),
variantInterpretation: (f = msg.getVariantInterpretation()) && proto.org.phenopackets.schema.v2.core.VariantInterpretation.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.GenomicInterpretation}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.GenomicInterpretation;
return proto.org.phenopackets.schema.v2.core.GenomicInterpretation.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.GenomicInterpretation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.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.setSubjectOrBiosampleId(value);
break;
case 2:
var value = /** @type {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation.InterpretationStatus} */ (reader.readEnum());
msg.setInterpretationStatus(value);
break;
case 3:
var value = new phenopackets_vrsatile_v1_vrsatile_pb.GeneDescriptor;
reader.readMessage(value,phenopackets_vrsatile_v1_vrsatile_pb.GeneDescriptor.deserializeBinaryFromReader);
msg.setGene(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v2.core.VariantInterpretation;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.VariantInterpretation.deserializeBinaryFromReader);
msg.setVariantInterpretation(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.GenomicInterpretation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.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.GenomicInterpretation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSubjectOrBiosampleId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getInterpretationStatus();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getGene();
if (f != null) {
writer.writeMessage(
3,
f,
phenopackets_vrsatile_v1_vrsatile_pb.GeneDescriptor.serializeBinaryToWriter
);
}
f = message.getVariantInterpretation();
if (f != null) {
writer.writeMessage(
4,
f,
proto.org.phenopackets.schema.v2.core.VariantInterpretation.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.InterpretationStatus = {
UNKNOWN_STATUS: 0,
REJECTED: 1,
CANDIDATE: 2,
CONTRIBUTORY: 3,
CAUSATIVE: 4
};
/**
* optional string subject_or_biosample_id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.getSubjectOrBiosampleId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.setSubjectOrBiosampleId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional InterpretationStatus interpretation_status = 2;
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation.InterpretationStatus}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.getInterpretationStatus = function() {
return /** @type {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation.InterpretationStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation.InterpretationStatus} value
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.setInterpretationStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional org.ga4gh.vrsatile.v1.GeneDescriptor gene = 3;
* @return {?proto.org.ga4gh.vrsatile.v1.GeneDescriptor}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.getGene = function() {
return /** @type{?proto.org.ga4gh.vrsatile.v1.GeneDescriptor} */ (
jspb.Message.getWrapperField(this, phenopackets_vrsatile_v1_vrsatile_pb.GeneDescriptor, 3));
};
/**
* @param {?proto.org.ga4gh.vrsatile.v1.GeneDescriptor|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.setGene = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.org.phenopackets.schema.v2.core.GenomicInterpretation.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.clearGene = function() {
return this.setGene(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.hasGene = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional VariantInterpretation variant_interpretation = 4;
* @return {?proto.org.phenopackets.schema.v2.core.VariantInterpretation}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.getVariantInterpretation = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.VariantInterpretation} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.VariantInterpretation, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.VariantInterpretation|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.setVariantInterpretation = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.org.phenopackets.schema.v2.core.GenomicInterpretation.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.clearVariantInterpretation = function() {
return this.setVariantInterpretation(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.GenomicInterpretation.prototype.hasVariantInterpretation = function() {
return jspb.Message.getField(this, 4) != 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.VariantInterpretation.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.VariantInterpretation.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.VariantInterpretation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.toObject = function(includeInstance, msg) {
var f, obj = {
acmgPathogenicityClassification: jspb.Message.getFieldWithDefault(msg, 1, 0),
therapeuticActionability: jspb.Message.getFieldWithDefault(msg, 2, 0),
variationDescriptor: (f = msg.getVariationDescriptor()) && phenopackets_vrsatile_v1_vrsatile_pb.VariationDescriptor.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.VariantInterpretation}
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.VariantInterpretation;
return proto.org.phenopackets.schema.v2.core.VariantInterpretation.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.VariantInterpretation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.VariantInterpretation}
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.org.phenopackets.schema.v2.core.AcmgPathogenicityClassification} */ (reader.readEnum());
msg.setAcmgPathogenicityClassification(value);
break;
case 2:
var value = /** @type {!proto.org.phenopackets.schema.v2.core.TherapeuticActionability} */ (reader.readEnum());
msg.setTherapeuticActionability(value);
break;
case 3:
var value = new phenopackets_vrsatile_v1_vrsatile_pb.VariationDescriptor;
reader.readMessage(value,phenopackets_vrsatile_v1_vrsatile_pb.VariationDescriptor.deserializeBinaryFromReader);
msg.setVariationDescriptor(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.VariantInterpretation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.VariantInterpretation.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.VariantInterpretation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAcmgPathogenicityClassification();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getTherapeuticActionability();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getVariationDescriptor();
if (f != null) {
writer.writeMessage(
3,
f,
phenopackets_vrsatile_v1_vrsatile_pb.VariationDescriptor.serializeBinaryToWriter
);
}
};
/**
* optional AcmgPathogenicityClassification acmg_pathogenicity_classification = 1;
* @return {!proto.org.phenopackets.schema.v2.core.AcmgPathogenicityClassification}
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.getAcmgPathogenicityClassification = function() {
return /** @type {!proto.org.phenopackets.schema.v2.core.AcmgPathogenicityClassification} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.AcmgPathogenicityClassification} value
* @return {!proto.org.phenopackets.schema.v2.core.VariantInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.setAcmgPathogenicityClassification = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional TherapeuticActionability therapeutic_actionability = 2;
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticActionability}
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.getTherapeuticActionability = function() {
return /** @type {!proto.org.phenopackets.schema.v2.core.TherapeuticActionability} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.TherapeuticActionability} value
* @return {!proto.org.phenopackets.schema.v2.core.VariantInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.setTherapeuticActionability = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional org.ga4gh.vrsatile.v1.VariationDescriptor variation_descriptor = 3;
* @return {?proto.org.ga4gh.vrsatile.v1.VariationDescriptor}
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.getVariationDescriptor = function() {
return /** @type{?proto.org.ga4gh.vrsatile.v1.VariationDescriptor} */ (
jspb.Message.getWrapperField(this, phenopackets_vrsatile_v1_vrsatile_pb.VariationDescriptor, 3));
};
/**
* @param {?proto.org.ga4gh.vrsatile.v1.VariationDescriptor|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.VariantInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.setVariationDescriptor = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.VariantInterpretation} returns this
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.clearVariationDescriptor = function() {
return this.setVariationDescriptor(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.VariantInterpretation.prototype.hasVariationDescriptor = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.AcmgPathogenicityClassification = {
NOT_PROVIDED: 0,
BENIGN: 1,
LIKELY_BENIGN: 2,
UNCERTAIN_SIGNIFICANCE: 3,
LIKELY_PATHOGENIC: 4,
PATHOGENIC: 5
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticActionability = {
UNKNOWN_ACTIONABILITY: 0,
NOT_ACTIONABLE: 1,
ACTIONABLE: 2
};
goog.object.extend(exports, proto.org.phenopackets.schema.v2.core);