// source: phenopackets/schema/v1/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_v1_base_pb = require('../../../phenopackets/schema/v1/base_pb.js');
goog.object.extend(proto, phenopackets_schema_v1_base_pb);
var phenopackets_schema_v1_phenopackets_pb = require('../../../phenopackets/schema/v1/phenopackets_pb.js');
goog.object.extend(proto, phenopackets_schema_v1_phenopackets_pb);
goog.exportSymbol('proto.org.phenopackets.schema.v1.Diagnosis', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.GenomicInterpretation', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.GenomicInterpretation.CallCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.GenomicInterpretation.Status', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.Interpretation', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.Interpretation.PhenopacketOrFamilyCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.Interpretation.ResolutionStatus', 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.v1.Interpretation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.Interpretation.repeatedFields_, proto.org.phenopackets.schema.v1.Interpretation.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v1.Interpretation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.Interpretation.displayName = 'proto.org.phenopackets.schema.v1.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.v1.Diagnosis = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.Diagnosis.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.Diagnosis, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.Diagnosis.displayName = 'proto.org.phenopackets.schema.v1.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.v1.GenomicInterpretation = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.phenopackets.schema.v1.GenomicInterpretation.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v1.GenomicInterpretation, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.displayName = 'proto.org.phenopackets.schema.v1.GenomicInterpretation';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.Interpretation.repeatedFields_ = [5];
/**
* 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.v1.Interpretation.oneofGroups_ = [[3,4]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.Interpretation.PhenopacketOrFamilyCase = {
PHENOPACKET_OR_FAMILY_NOT_SET: 0,
PHENOPACKET: 3,
FAMILY: 4
};
/**
* @return {proto.org.phenopackets.schema.v1.Interpretation.PhenopacketOrFamilyCase}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.getPhenopacketOrFamilyCase = function() {
return /** @type {proto.org.phenopackets.schema.v1.Interpretation.PhenopacketOrFamilyCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v1.Interpretation.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.v1.Interpretation.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.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.v1.Interpretation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.Interpretation.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
resolutionStatus: jspb.Message.getFieldWithDefault(msg, 2, 0),
phenopacket: (f = msg.getPhenopacket()) && phenopackets_schema_v1_phenopackets_pb.Phenopacket.toObject(includeInstance, f),
family: (f = msg.getFamily()) && phenopackets_schema_v1_phenopackets_pb.Family.toObject(includeInstance, f),
diagnosisList: jspb.Message.toObjectList(msg.getDiagnosisList(),
proto.org.phenopackets.schema.v1.Diagnosis.toObject, includeInstance),
metaData: (f = msg.getMetaData()) && phenopackets_schema_v1_base_pb.MetaData.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.v1.Interpretation}
*/
proto.org.phenopackets.schema.v1.Interpretation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.Interpretation;
return proto.org.phenopackets.schema.v1.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.v1.Interpretation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.Interpretation}
*/
proto.org.phenopackets.schema.v1.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.v1.Interpretation.ResolutionStatus} */ (reader.readEnum());
msg.setResolutionStatus(value);
break;
case 3:
var value = new phenopackets_schema_v1_phenopackets_pb.Phenopacket;
reader.readMessage(value,phenopackets_schema_v1_phenopackets_pb.Phenopacket.deserializeBinaryFromReader);
msg.setPhenopacket(value);
break;
case 4:
var value = new phenopackets_schema_v1_phenopackets_pb.Family;
reader.readMessage(value,phenopackets_schema_v1_phenopackets_pb.Family.deserializeBinaryFromReader);
msg.setFamily(value);
break;
case 5:
var value = new proto.org.phenopackets.schema.v1.Diagnosis;
reader.readMessage(value,proto.org.phenopackets.schema.v1.Diagnosis.deserializeBinaryFromReader);
msg.addDiagnosis(value);
break;
case 6:
var value = new phenopackets_schema_v1_base_pb.MetaData;
reader.readMessage(value,phenopackets_schema_v1_base_pb.MetaData.deserializeBinaryFromReader);
msg.setMetaData(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.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.v1.Interpretation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.Interpretation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getResolutionStatus();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getPhenopacket();
if (f != null) {
writer.writeMessage(
3,
f,
phenopackets_schema_v1_phenopackets_pb.Phenopacket.serializeBinaryToWriter
);
}
f = message.getFamily();
if (f != null) {
writer.writeMessage(
4,
f,
phenopackets_schema_v1_phenopackets_pb.Family.serializeBinaryToWriter
);
}
f = message.getDiagnosisList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.org.phenopackets.schema.v1.Diagnosis.serializeBinaryToWriter
);
}
f = message.getMetaData();
if (f != null) {
writer.writeMessage(
6,
f,
phenopackets_schema_v1_base_pb.MetaData.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.Interpretation.ResolutionStatus = {
UNKNOWN: 0,
SOLVED: 1,
UNSOLVED: 2,
IN_PROGRESS: 3
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional ResolutionStatus resolution_status = 2;
* @return {!proto.org.phenopackets.schema.v1.Interpretation.ResolutionStatus}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.getResolutionStatus = function() {
return /** @type {!proto.org.phenopackets.schema.v1.Interpretation.ResolutionStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v1.Interpretation.ResolutionStatus} value
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.setResolutionStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional Phenopacket phenopacket = 3;
* @return {?proto.org.phenopackets.schema.v1.Phenopacket}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.getPhenopacket = function() {
return /** @type{?proto.org.phenopackets.schema.v1.Phenopacket} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v1_phenopackets_pb.Phenopacket, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v1.Phenopacket|undefined} value
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.setPhenopacket = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.org.phenopackets.schema.v1.Interpretation.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.clearPhenopacket = function() {
return this.setPhenopacket(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.hasPhenopacket = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional Family family = 4;
* @return {?proto.org.phenopackets.schema.v1.Family}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.getFamily = function() {
return /** @type{?proto.org.phenopackets.schema.v1.Family} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v1_phenopackets_pb.Family, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v1.Family|undefined} value
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.setFamily = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.org.phenopackets.schema.v1.Interpretation.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.clearFamily = function() {
return this.setFamily(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.hasFamily = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* repeated Diagnosis diagnosis = 5;
* @return {!Array<!proto.org.phenopackets.schema.v1.Diagnosis>}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.getDiagnosisList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.Diagnosis>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.Diagnosis, 5));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.Diagnosis>} value
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.setDiagnosisList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.Diagnosis=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.Diagnosis}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.addDiagnosis = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.phenopackets.schema.v1.Diagnosis, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.clearDiagnosisList = function() {
return this.setDiagnosisList([]);
};
/**
* optional core.MetaData meta_data = 6;
* @return {?proto.org.phenopackets.schema.v1.core.MetaData}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.getMetaData = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.MetaData} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v1_base_pb.MetaData, 6));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.MetaData|undefined} value
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.setMetaData = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.Interpretation} returns this
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.clearMetaData = function() {
return this.setMetaData(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.Interpretation.prototype.hasMetaData = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.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.v1.Diagnosis.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.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.v1.Diagnosis} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.Diagnosis.toObject = function(includeInstance, msg) {
var f, obj = {
disease: (f = msg.getDisease()) && phenopackets_schema_v1_base_pb.Disease.toObject(includeInstance, f),
genomicInterpretationsList: jspb.Message.toObjectList(msg.getGenomicInterpretationsList(),
proto.org.phenopackets.schema.v1.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.v1.Diagnosis}
*/
proto.org.phenopackets.schema.v1.Diagnosis.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.Diagnosis;
return proto.org.phenopackets.schema.v1.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.v1.Diagnosis} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.Diagnosis}
*/
proto.org.phenopackets.schema.v1.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_v1_base_pb.Disease;
reader.readMessage(value,phenopackets_schema_v1_base_pb.Disease.deserializeBinaryFromReader);
msg.setDisease(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v1.GenomicInterpretation;
reader.readMessage(value,proto.org.phenopackets.schema.v1.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.v1.Diagnosis.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.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.v1.Diagnosis} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.Diagnosis.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDisease();
if (f != null) {
writer.writeMessage(
1,
f,
phenopackets_schema_v1_base_pb.Disease.serializeBinaryToWriter
);
}
f = message.getGenomicInterpretationsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.org.phenopackets.schema.v1.GenomicInterpretation.serializeBinaryToWriter
);
}
};
/**
* optional core.Disease disease = 1;
* @return {?proto.org.phenopackets.schema.v1.core.Disease}
*/
proto.org.phenopackets.schema.v1.Diagnosis.prototype.getDisease = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Disease} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v1_base_pb.Disease, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Disease|undefined} value
* @return {!proto.org.phenopackets.schema.v1.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v1.Diagnosis.prototype.setDisease = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v1.Diagnosis.prototype.clearDisease = function() {
return this.setDisease(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.Diagnosis.prototype.hasDisease = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated GenomicInterpretation genomic_interpretations = 2;
* @return {!Array<!proto.org.phenopackets.schema.v1.GenomicInterpretation>}
*/
proto.org.phenopackets.schema.v1.Diagnosis.prototype.getGenomicInterpretationsList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.GenomicInterpretation>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.GenomicInterpretation, 2));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.GenomicInterpretation>} value
* @return {!proto.org.phenopackets.schema.v1.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v1.Diagnosis.prototype.setGenomicInterpretationsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.GenomicInterpretation=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation}
*/
proto.org.phenopackets.schema.v1.Diagnosis.prototype.addGenomicInterpretations = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.phenopackets.schema.v1.GenomicInterpretation, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.Diagnosis} returns this
*/
proto.org.phenopackets.schema.v1.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.v1.GenomicInterpretation.oneofGroups_ = [[2,3]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.CallCase = {
CALL_NOT_SET: 0,
GENE: 2,
VARIANT: 3
};
/**
* @return {proto.org.phenopackets.schema.v1.GenomicInterpretation.CallCase}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.getCallCase = function() {
return /** @type {proto.org.phenopackets.schema.v1.GenomicInterpretation.CallCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v1.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.v1.GenomicInterpretation.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.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.v1.GenomicInterpretation} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.toObject = function(includeInstance, msg) {
var f, obj = {
status: jspb.Message.getFieldWithDefault(msg, 1, 0),
gene: (f = msg.getGene()) && phenopackets_schema_v1_base_pb.Gene.toObject(includeInstance, f),
variant: (f = msg.getVariant()) && phenopackets_schema_v1_base_pb.Variant.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.v1.GenomicInterpretation}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.GenomicInterpretation;
return proto.org.phenopackets.schema.v1.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.v1.GenomicInterpretation} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.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.v1.GenomicInterpretation.Status} */ (reader.readEnum());
msg.setStatus(value);
break;
case 2:
var value = new phenopackets_schema_v1_base_pb.Gene;
reader.readMessage(value,phenopackets_schema_v1_base_pb.Gene.deserializeBinaryFromReader);
msg.setGene(value);
break;
case 3:
var value = new phenopackets_schema_v1_base_pb.Variant;
reader.readMessage(value,phenopackets_schema_v1_base_pb.Variant.deserializeBinaryFromReader);
msg.setVariant(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.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.v1.GenomicInterpretation} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStatus();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getGene();
if (f != null) {
writer.writeMessage(
2,
f,
phenopackets_schema_v1_base_pb.Gene.serializeBinaryToWriter
);
}
f = message.getVariant();
if (f != null) {
writer.writeMessage(
3,
f,
phenopackets_schema_v1_base_pb.Variant.serializeBinaryToWriter
);
}
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.Status = {
UNKNOWN: 0,
REJECTED: 1,
CANDIDATE: 2,
CAUSATIVE: 3
};
/**
* optional Status status = 1;
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation.Status}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.getStatus = function() {
return /** @type {!proto.org.phenopackets.schema.v1.GenomicInterpretation.Status} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v1.GenomicInterpretation.Status} value
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.setStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional core.Gene gene = 2;
* @return {?proto.org.phenopackets.schema.v1.core.Gene}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.getGene = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Gene} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v1_base_pb.Gene, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Gene|undefined} value
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.setGene = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.org.phenopackets.schema.v1.GenomicInterpretation.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.clearGene = function() {
return this.setGene(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.hasGene = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional core.Variant variant = 3;
* @return {?proto.org.phenopackets.schema.v1.core.Variant}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.getVariant = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Variant} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v1_base_pb.Variant, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Variant|undefined} value
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.setVariant = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.org.phenopackets.schema.v1.GenomicInterpretation.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.GenomicInterpretation} returns this
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.clearVariant = function() {
return this.setVariant(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.GenomicInterpretation.prototype.hasVariant = function() {
return jspb.Message.getField(this, 3) != null;
};
goog.object.extend(exports, proto.org.phenopackets.schema.v1);