// source: phenopackets/schema/v1/base.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Age', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.AgeRange', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Biosample', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Biosample.IndividualAgeAtCollectionCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Disease', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Disease.OnsetCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Evidence', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.ExternalReference', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Gene', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.HgvsAllele', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.HtsFile', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.HtsFile.HtsFormat', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Individual', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Individual.AgeCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.IscnAllele', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.KaryotypicSex', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.MetaData', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.OntologyClass', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Pedigree', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Pedigree.Person', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Pedigree.Person.AffectedStatus', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.PhenotypicFeature', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.PhenotypicFeature.OnsetCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Procedure', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Resource', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Sex', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.SpdiAllele', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Update', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Variant', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.Variant.AlleleCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v1.core.VcfAllele', 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.core.MetaData = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.core.MetaData.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.MetaData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.MetaData.displayName = 'proto.org.phenopackets.schema.v1.core.MetaData';
}
/**
* 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.core.Update = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Update, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Update.displayName = 'proto.org.phenopackets.schema.v1.core.Update';
}
/**
* 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.core.Resource = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Resource, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Resource.displayName = 'proto.org.phenopackets.schema.v1.core.Resource';
}
/**
* 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.core.OntologyClass = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.OntologyClass, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.displayName = 'proto.org.phenopackets.schema.v1.core.OntologyClass';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.core.PhenotypicFeature.repeatedFields_, proto.org.phenopackets.schema.v1.core.PhenotypicFeature.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.PhenotypicFeature, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.displayName = 'proto.org.phenopackets.schema.v1.core.PhenotypicFeature';
}
/**
* 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.core.Evidence = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Evidence, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Evidence.displayName = 'proto.org.phenopackets.schema.v1.core.Evidence';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.org.phenopackets.schema.v1.core.ExternalReference = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.ExternalReference, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.displayName = 'proto.org.phenopackets.schema.v1.core.ExternalReference';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.org.phenopackets.schema.v1.core.Individual = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.core.Individual.repeatedFields_, proto.org.phenopackets.schema.v1.core.Individual.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Individual, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Individual.displayName = 'proto.org.phenopackets.schema.v1.core.Individual';
}
/**
* 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.core.Biosample = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.core.Biosample.repeatedFields_, proto.org.phenopackets.schema.v1.core.Biosample.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Biosample, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Biosample.displayName = 'proto.org.phenopackets.schema.v1.core.Biosample';
}
/**
* 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.core.Procedure = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Procedure, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Procedure.displayName = 'proto.org.phenopackets.schema.v1.core.Procedure';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.org.phenopackets.schema.v1.core.Age = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Age, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Age.displayName = 'proto.org.phenopackets.schema.v1.core.Age';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.org.phenopackets.schema.v1.core.AgeRange = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.AgeRange, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.AgeRange.displayName = 'proto.org.phenopackets.schema.v1.core.AgeRange';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.org.phenopackets.schema.v1.core.Disease = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.core.Disease.repeatedFields_, proto.org.phenopackets.schema.v1.core.Disease.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Disease, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Disease.displayName = 'proto.org.phenopackets.schema.v1.core.Disease';
}
/**
* 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.core.Pedigree = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.core.Pedigree.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Pedigree, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Pedigree.displayName = 'proto.org.phenopackets.schema.v1.core.Pedigree';
}
/**
* 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.core.Pedigree.Person = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Pedigree.Person, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.displayName = 'proto.org.phenopackets.schema.v1.core.Pedigree.Person';
}
/**
* 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.core.HtsFile = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.HtsFile, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.HtsFile.displayName = 'proto.org.phenopackets.schema.v1.core.HtsFile';
}
/**
* 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.core.Gene = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v1.core.Gene.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Gene, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Gene.displayName = 'proto.org.phenopackets.schema.v1.core.Gene';
}
/**
* 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.core.Variant = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.phenopackets.schema.v1.core.Variant.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.Variant, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.Variant.displayName = 'proto.org.phenopackets.schema.v1.core.Variant';
}
/**
* 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.core.HgvsAllele = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.HgvsAllele, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.displayName = 'proto.org.phenopackets.schema.v1.core.HgvsAllele';
}
/**
* 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.core.VcfAllele = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.VcfAllele, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.displayName = 'proto.org.phenopackets.schema.v1.core.VcfAllele';
}
/**
* 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.core.SpdiAllele = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.SpdiAllele, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.displayName = 'proto.org.phenopackets.schema.v1.core.SpdiAllele';
}
/**
* 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.core.IscnAllele = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v1.core.IscnAllele, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.displayName = 'proto.org.phenopackets.schema.v1.core.IscnAllele';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.core.MetaData.repeatedFields_ = [4,5,7];
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.core.MetaData.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.MetaData.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.core.MetaData} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.MetaData.toObject = function(includeInstance, msg) {
var f, obj = {
created: (f = msg.getCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
createdBy: jspb.Message.getFieldWithDefault(msg, 2, ""),
submittedBy: jspb.Message.getFieldWithDefault(msg, 3, ""),
resourcesList: jspb.Message.toObjectList(msg.getResourcesList(),
proto.org.phenopackets.schema.v1.core.Resource.toObject, includeInstance),
updatesList: jspb.Message.toObjectList(msg.getUpdatesList(),
proto.org.phenopackets.schema.v1.core.Update.toObject, includeInstance),
phenopacketSchemaVersion: jspb.Message.getFieldWithDefault(msg, 6, ""),
externalReferencesList: jspb.Message.toObjectList(msg.getExternalReferencesList(),
proto.org.phenopackets.schema.v1.core.ExternalReference.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.core.MetaData}
*/
proto.org.phenopackets.schema.v1.core.MetaData.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.MetaData;
return proto.org.phenopackets.schema.v1.core.MetaData.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.core.MetaData} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.MetaData}
*/
proto.org.phenopackets.schema.v1.core.MetaData.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setCreated(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setCreatedBy(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSubmittedBy(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v1.core.Resource;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Resource.deserializeBinaryFromReader);
msg.addResources(value);
break;
case 5:
var value = new proto.org.phenopackets.schema.v1.core.Update;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Update.deserializeBinaryFromReader);
msg.addUpdates(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setPhenopacketSchemaVersion(value);
break;
case 7:
var value = new proto.org.phenopackets.schema.v1.core.ExternalReference;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.ExternalReference.deserializeBinaryFromReader);
msg.addExternalReferences(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.core.MetaData.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.MetaData.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.core.MetaData} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.MetaData.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCreated();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getCreatedBy();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSubmittedBy();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getResourcesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
4,
f,
proto.org.phenopackets.schema.v1.core.Resource.serializeBinaryToWriter
);
}
f = message.getUpdatesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.org.phenopackets.schema.v1.core.Update.serializeBinaryToWriter
);
}
f = message.getPhenopacketSchemaVersion();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getExternalReferencesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
7,
f,
proto.org.phenopackets.schema.v1.core.ExternalReference.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.Timestamp created = 1;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.getCreated = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.setCreated = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.clearCreated = function() {
return this.setCreated(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.hasCreated = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string created_by = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.getCreatedBy = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.setCreatedBy = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string submitted_by = 3;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.getSubmittedBy = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.setSubmittedBy = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* repeated Resource resources = 4;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.Resource>}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.getResourcesList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.Resource>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.Resource, 4));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.Resource>} value
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.setResourcesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 4, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Resource=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.Resource}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.addResources = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.org.phenopackets.schema.v1.core.Resource, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.clearResourcesList = function() {
return this.setResourcesList([]);
};
/**
* repeated Update updates = 5;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.Update>}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.getUpdatesList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.Update>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.Update, 5));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.Update>} value
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.setUpdatesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Update=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.Update}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.addUpdates = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.phenopackets.schema.v1.core.Update, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.clearUpdatesList = function() {
return this.setUpdatesList([]);
};
/**
* optional string phenopacket_schema_version = 6;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.getPhenopacketSchemaVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.setPhenopacketSchemaVersion = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* repeated ExternalReference external_references = 7;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.ExternalReference>}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.getExternalReferencesList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.ExternalReference>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.ExternalReference, 7));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.ExternalReference>} value
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.setExternalReferencesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 7, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.ExternalReference=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.ExternalReference}
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.addExternalReferences = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.org.phenopackets.schema.v1.core.ExternalReference, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.MetaData} returns this
*/
proto.org.phenopackets.schema.v1.core.MetaData.prototype.clearExternalReferencesList = function() {
return this.setExternalReferencesList([]);
};
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.core.Update.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Update.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.core.Update} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Update.toObject = function(includeInstance, msg) {
var f, obj = {
timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
updatedBy: jspb.Message.getFieldWithDefault(msg, 2, ""),
comment: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.Update}
*/
proto.org.phenopackets.schema.v1.core.Update.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Update;
return proto.org.phenopackets.schema.v1.core.Update.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.core.Update} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Update}
*/
proto.org.phenopackets.schema.v1.core.Update.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setTimestamp(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setUpdatedBy(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setComment(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.core.Update.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Update.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.core.Update} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Update.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTimestamp();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getUpdatedBy();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getComment();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional google.protobuf.Timestamp timestamp = 1;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.getTimestamp = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Update} returns this
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.setTimestamp = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Update} returns this
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.clearTimestamp = function() {
return this.setTimestamp(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.hasTimestamp = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string updated_by = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.getUpdatedBy = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Update} returns this
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.setUpdatedBy = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string comment = 3;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.getComment = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Update} returns this
*/
proto.org.phenopackets.schema.v1.core.Update.prototype.setComment = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Resource.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.core.Resource} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Resource.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
url: jspb.Message.getFieldWithDefault(msg, 3, ""),
version: jspb.Message.getFieldWithDefault(msg, 4, ""),
namespacePrefix: jspb.Message.getFieldWithDefault(msg, 5, ""),
iriPrefix: jspb.Message.getFieldWithDefault(msg, 6, "")
};
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.core.Resource}
*/
proto.org.phenopackets.schema.v1.core.Resource.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Resource;
return proto.org.phenopackets.schema.v1.core.Resource.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.core.Resource} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Resource}
*/
proto.org.phenopackets.schema.v1.core.Resource.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setUrl(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setNamespacePrefix(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setIriPrefix(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.core.Resource.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Resource.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.core.Resource} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Resource.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getUrl();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getVersion();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getNamespacePrefix();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getIriPrefix();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Resource} returns this
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string name = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Resource} returns this
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.setName = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string url = 3;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.getUrl = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Resource} returns this
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.setUrl = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string version = 4;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Resource} returns this
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.setVersion = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string namespace_prefix = 5;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.getNamespacePrefix = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Resource} returns this
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.setNamespacePrefix = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string iri_prefix = 6;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.getIriPrefix = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Resource} returns this
*/
proto.org.phenopackets.schema.v1.core.Resource.prototype.setIriPrefix = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.org.phenopackets.schema.v1.core.OntologyClass} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
label: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.OntologyClass;
return proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.phenopackets.schema.v1.core.OntologyClass} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setLabel(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.org.phenopackets.schema.v1.core.OntologyClass} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getLabel();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass} returns this
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string label = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.prototype.getLabel = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass} returns this
*/
proto.org.phenopackets.schema.v1.core.OntologyClass.prototype.setLabel = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.repeatedFields_ = [5,10];
/**
* 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.core.PhenotypicFeature.oneofGroups_ = [[6,7,9]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.OnsetCase = {
ONSET_NOT_SET: 0,
AGE_OF_ONSET: 6,
AGE_RANGE_OF_ONSET: 7,
CLASS_OF_ONSET: 9
};
/**
* @return {proto.org.phenopackets.schema.v1.core.PhenotypicFeature.OnsetCase}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getOnsetCase = function() {
return /** @type {proto.org.phenopackets.schema.v1.core.PhenotypicFeature.OnsetCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v1.core.PhenotypicFeature.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.core.PhenotypicFeature.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.PhenotypicFeature.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.core.PhenotypicFeature} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.toObject = function(includeInstance, msg) {
var f, obj = {
description: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: (f = msg.getType()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
negated: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
severity: (f = msg.getSeverity()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
modifiersList: jspb.Message.toObjectList(msg.getModifiersList(),
proto.org.phenopackets.schema.v1.core.OntologyClass.toObject, includeInstance),
ageOfOnset: (f = msg.getAgeOfOnset()) && proto.org.phenopackets.schema.v1.core.Age.toObject(includeInstance, f),
ageRangeOfOnset: (f = msg.getAgeRangeOfOnset()) && proto.org.phenopackets.schema.v1.core.AgeRange.toObject(includeInstance, f),
classOfOnset: (f = msg.getClassOfOnset()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(),
proto.org.phenopackets.schema.v1.core.Evidence.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.core.PhenotypicFeature}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.PhenotypicFeature;
return proto.org.phenopackets.schema.v1.core.PhenotypicFeature.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.core.PhenotypicFeature} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.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 proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setType(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setNegated(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setSeverity(value);
break;
case 5:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.addModifiers(value);
break;
case 6:
var value = new proto.org.phenopackets.schema.v1.core.Age;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader);
msg.setAgeOfOnset(value);
break;
case 7:
var value = new proto.org.phenopackets.schema.v1.core.AgeRange;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.AgeRange.deserializeBinaryFromReader);
msg.setAgeRangeOfOnset(value);
break;
case 9:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setClassOfOnset(value);
break;
case 10:
var value = new proto.org.phenopackets.schema.v1.core.Evidence;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Evidence.deserializeBinaryFromReader);
msg.addEvidence(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.core.PhenotypicFeature.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.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.core.PhenotypicFeature} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getType();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getNegated();
if (f) {
writer.writeBool(
3,
f
);
}
f = message.getSeverity();
if (f != null) {
writer.writeMessage(
4,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getModifiersList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getAgeOfOnset();
if (f != null) {
writer.writeMessage(
6,
f,
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter
);
}
f = message.getAgeRangeOfOnset();
if (f != null) {
writer.writeMessage(
7,
f,
proto.org.phenopackets.schema.v1.core.AgeRange.serializeBinaryToWriter
);
}
f = message.getClassOfOnset();
if (f != null) {
writer.writeMessage(
9,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getEvidenceList();
if (f.length > 0) {
writer.writeRepeatedMessage(
10,
f,
proto.org.phenopackets.schema.v1.core.Evidence.serializeBinaryToWriter
);
}
};
/**
* optional string description = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional OntologyClass type = 2;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getType = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setType = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.clearType = function() {
return this.setType(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.hasType = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional bool negated = 3;
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getNegated = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/**
* @param {boolean} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setNegated = function(value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
/**
* optional OntologyClass severity = 4;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getSeverity = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setSeverity = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.clearSeverity = function() {
return this.setSeverity(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.hasSeverity = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* repeated OntologyClass modifiers = 5;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getModifiersList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 5));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setModifiersList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.OntologyClass=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.addModifiers = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.phenopackets.schema.v1.core.OntologyClass, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.clearModifiersList = function() {
return this.setModifiersList([]);
};
/**
* optional Age age_of_onset = 6;
* @return {?proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getAgeOfOnset = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Age} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.Age, 6));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Age|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setAgeOfOnset = function(value) {
return jspb.Message.setOneofWrapperField(this, 6, proto.org.phenopackets.schema.v1.core.PhenotypicFeature.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.clearAgeOfOnset = function() {
return this.setAgeOfOnset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.hasAgeOfOnset = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional AgeRange age_range_of_onset = 7;
* @return {?proto.org.phenopackets.schema.v1.core.AgeRange}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getAgeRangeOfOnset = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.AgeRange} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.AgeRange, 7));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.AgeRange|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setAgeRangeOfOnset = function(value) {
return jspb.Message.setOneofWrapperField(this, 7, proto.org.phenopackets.schema.v1.core.PhenotypicFeature.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.clearAgeRangeOfOnset = function() {
return this.setAgeRangeOfOnset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.hasAgeRangeOfOnset = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional OntologyClass class_of_onset = 9;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getClassOfOnset = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 9));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setClassOfOnset = function(value) {
return jspb.Message.setOneofWrapperField(this, 9, proto.org.phenopackets.schema.v1.core.PhenotypicFeature.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.clearClassOfOnset = function() {
return this.setClassOfOnset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.hasClassOfOnset = function() {
return jspb.Message.getField(this, 9) != null;
};
/**
* repeated Evidence evidence = 10;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.Evidence>}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.getEvidenceList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.Evidence>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.Evidence, 10));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.Evidence>} value
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.setEvidenceList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 10, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Evidence=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.Evidence}
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.addEvidence = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.org.phenopackets.schema.v1.core.Evidence, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.prototype.clearEvidenceList = function() {
return this.setEvidenceList([]);
};
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.core.Evidence.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Evidence.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.org.phenopackets.schema.v1.core.Evidence} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Evidence.toObject = function(includeInstance, msg) {
var f, obj = {
evidenceCode: (f = msg.getEvidenceCode()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
reference: (f = msg.getReference()) && proto.org.phenopackets.schema.v1.core.ExternalReference.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.Evidence}
*/
proto.org.phenopackets.schema.v1.core.Evidence.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Evidence;
return proto.org.phenopackets.schema.v1.core.Evidence.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.phenopackets.schema.v1.core.Evidence} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Evidence}
*/
proto.org.phenopackets.schema.v1.core.Evidence.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setEvidenceCode(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v1.core.ExternalReference;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.ExternalReference.deserializeBinaryFromReader);
msg.setReference(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Evidence.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.org.phenopackets.schema.v1.core.Evidence} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Evidence.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getEvidenceCode();
if (f != null) {
writer.writeMessage(
1,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getReference();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v1.core.ExternalReference.serializeBinaryToWriter
);
}
};
/**
* optional OntologyClass evidence_code = 1;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.getEvidenceCode = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Evidence} returns this
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.setEvidenceCode = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Evidence} returns this
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.clearEvidenceCode = function() {
return this.setEvidenceCode(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.hasEvidenceCode = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional ExternalReference reference = 2;
* @return {?proto.org.phenopackets.schema.v1.core.ExternalReference}
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.getReference = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.ExternalReference} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.ExternalReference, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.ExternalReference|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Evidence} returns this
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.setReference = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Evidence} returns this
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.clearReference = function() {
return this.setReference(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Evidence.prototype.hasReference = function() {
return jspb.Message.getField(this, 2) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.ExternalReference.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.org.phenopackets.schema.v1.core.ExternalReference} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.ExternalReference}
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.ExternalReference;
return proto.org.phenopackets.schema.v1.core.ExternalReference.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.phenopackets.schema.v1.core.ExternalReference} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.ExternalReference}
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.ExternalReference.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.org.phenopackets.schema.v1.core.ExternalReference} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.ExternalReference} returns this
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.ExternalReference} returns this
*/
proto.org.phenopackets.schema.v1.core.ExternalReference.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.core.Individual.repeatedFields_ = [2];
/**
* 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.core.Individual.oneofGroups_ = [[4,5]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.Individual.AgeCase = {
AGE_NOT_SET: 0,
AGE_AT_COLLECTION: 4,
AGE_RANGE_AT_COLLECTION: 5
};
/**
* @return {proto.org.phenopackets.schema.v1.core.Individual.AgeCase}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getAgeCase = function() {
return /** @type {proto.org.phenopackets.schema.v1.core.Individual.AgeCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v1.core.Individual.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.core.Individual.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Individual.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.core.Individual} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Individual.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
alternateIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
dateOfBirth: (f = msg.getDateOfBirth()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
ageAtCollection: (f = msg.getAgeAtCollection()) && proto.org.phenopackets.schema.v1.core.Age.toObject(includeInstance, f),
ageRangeAtCollection: (f = msg.getAgeRangeAtCollection()) && proto.org.phenopackets.schema.v1.core.AgeRange.toObject(includeInstance, f),
sex: jspb.Message.getFieldWithDefault(msg, 6, 0),
karyotypicSex: jspb.Message.getFieldWithDefault(msg, 7, 0),
taxonomy: (f = msg.getTaxonomy()) && proto.org.phenopackets.schema.v1.core.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.v1.core.Individual}
*/
proto.org.phenopackets.schema.v1.core.Individual.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Individual;
return proto.org.phenopackets.schema.v1.core.Individual.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.core.Individual} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Individual}
*/
proto.org.phenopackets.schema.v1.core.Individual.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addAlternateIds(value);
break;
case 3:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setDateOfBirth(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v1.core.Age;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader);
msg.setAgeAtCollection(value);
break;
case 5:
var value = new proto.org.phenopackets.schema.v1.core.AgeRange;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.AgeRange.deserializeBinaryFromReader);
msg.setAgeRangeAtCollection(value);
break;
case 6:
var value = /** @type {!proto.org.phenopackets.schema.v1.core.Sex} */ (reader.readEnum());
msg.setSex(value);
break;
case 7:
var value = /** @type {!proto.org.phenopackets.schema.v1.core.KaryotypicSex} */ (reader.readEnum());
msg.setKaryotypicSex(value);
break;
case 8:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setTaxonomy(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.core.Individual.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Individual.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.core.Individual} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Individual.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAlternateIdsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = message.getDateOfBirth();
if (f != null) {
writer.writeMessage(
3,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getAgeAtCollection();
if (f != null) {
writer.writeMessage(
4,
f,
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter
);
}
f = message.getAgeRangeAtCollection();
if (f != null) {
writer.writeMessage(
5,
f,
proto.org.phenopackets.schema.v1.core.AgeRange.serializeBinaryToWriter
);
}
f = message.getSex();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
f = message.getKaryotypicSex();
if (f !== 0.0) {
writer.writeEnum(
7,
f
);
}
f = message.getTaxonomy();
if (f != null) {
writer.writeMessage(
8,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated string alternate_ids = 2;
* @return {!Array<string>}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getAlternateIdsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/**
* @param {!Array<string>} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setAlternateIdsList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.addAlternateIds = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.clearAlternateIdsList = function() {
return this.setAlternateIdsList([]);
};
/**
* optional google.protobuf.Timestamp date_of_birth = 3;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getDateOfBirth = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setDateOfBirth = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.clearDateOfBirth = function() {
return this.setDateOfBirth(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.hasDateOfBirth = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional Age age_at_collection = 4;
* @return {?proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getAgeAtCollection = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Age} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.Age, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Age|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setAgeAtCollection = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.org.phenopackets.schema.v1.core.Individual.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.clearAgeAtCollection = function() {
return this.setAgeAtCollection(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.hasAgeAtCollection = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional AgeRange age_range_at_collection = 5;
* @return {?proto.org.phenopackets.schema.v1.core.AgeRange}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getAgeRangeAtCollection = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.AgeRange} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.AgeRange, 5));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.AgeRange|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setAgeRangeAtCollection = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.org.phenopackets.schema.v1.core.Individual.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.clearAgeRangeAtCollection = function() {
return this.setAgeRangeAtCollection(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.hasAgeRangeAtCollection = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional Sex sex = 6;
* @return {!proto.org.phenopackets.schema.v1.core.Sex}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getSex = function() {
return /** @type {!proto.org.phenopackets.schema.v1.core.Sex} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Sex} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setSex = function(value) {
return jspb.Message.setProto3EnumField(this, 6, value);
};
/**
* optional KaryotypicSex karyotypic_sex = 7;
* @return {!proto.org.phenopackets.schema.v1.core.KaryotypicSex}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getKaryotypicSex = function() {
return /** @type {!proto.org.phenopackets.schema.v1.core.KaryotypicSex} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.KaryotypicSex} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setKaryotypicSex = function(value) {
return jspb.Message.setProto3EnumField(this, 7, value);
};
/**
* optional OntologyClass taxonomy = 8;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.getTaxonomy = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 8));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.setTaxonomy = function(value) {
return jspb.Message.setWrapperField(this, 8, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Individual} returns this
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.clearTaxonomy = function() {
return this.setTaxonomy(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Individual.prototype.hasTaxonomy = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.core.Biosample.repeatedFields_ = [5,12,14,15];
/**
* 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.core.Biosample.oneofGroups_ = [[7,8]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.Biosample.IndividualAgeAtCollectionCase = {
INDIVIDUAL_AGE_AT_COLLECTION_NOT_SET: 0,
AGE_OF_INDIVIDUAL_AT_COLLECTION: 7,
AGE_RANGE_OF_INDIVIDUAL_AT_COLLECTION: 8
};
/**
* @return {proto.org.phenopackets.schema.v1.core.Biosample.IndividualAgeAtCollectionCase}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getIndividualAgeAtCollectionCase = function() {
return /** @type {proto.org.phenopackets.schema.v1.core.Biosample.IndividualAgeAtCollectionCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v1.core.Biosample.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.core.Biosample.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Biosample.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.core.Biosample} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Biosample.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
individualId: jspb.Message.getFieldWithDefault(msg, 2, ""),
description: jspb.Message.getFieldWithDefault(msg, 3, ""),
sampledTissue: (f = msg.getSampledTissue()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
phenotypicFeaturesList: jspb.Message.toObjectList(msg.getPhenotypicFeaturesList(),
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.toObject, includeInstance),
taxonomy: (f = msg.getTaxonomy()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
ageOfIndividualAtCollection: (f = msg.getAgeOfIndividualAtCollection()) && proto.org.phenopackets.schema.v1.core.Age.toObject(includeInstance, f),
ageRangeOfIndividualAtCollection: (f = msg.getAgeRangeOfIndividualAtCollection()) && proto.org.phenopackets.schema.v1.core.AgeRange.toObject(includeInstance, f),
histologicalDiagnosis: (f = msg.getHistologicalDiagnosis()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
tumorProgression: (f = msg.getTumorProgression()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
tumorGrade: (f = msg.getTumorGrade()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
diagnosticMarkersList: jspb.Message.toObjectList(msg.getDiagnosticMarkersList(),
proto.org.phenopackets.schema.v1.core.OntologyClass.toObject, includeInstance),
procedure: (f = msg.getProcedure()) && proto.org.phenopackets.schema.v1.core.Procedure.toObject(includeInstance, f),
htsFilesList: jspb.Message.toObjectList(msg.getHtsFilesList(),
proto.org.phenopackets.schema.v1.core.HtsFile.toObject, includeInstance),
variantsList: jspb.Message.toObjectList(msg.getVariantsList(),
proto.org.phenopackets.schema.v1.core.Variant.toObject, includeInstance),
isControlSample: jspb.Message.getBooleanFieldWithDefault(msg, 16, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample}
*/
proto.org.phenopackets.schema.v1.core.Biosample.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Biosample;
return proto.org.phenopackets.schema.v1.core.Biosample.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.core.Biosample} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample}
*/
proto.org.phenopackets.schema.v1.core.Biosample.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setIndividualId(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setSampledTissue(value);
break;
case 5:
var value = new proto.org.phenopackets.schema.v1.core.PhenotypicFeature;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.PhenotypicFeature.deserializeBinaryFromReader);
msg.addPhenotypicFeatures(value);
break;
case 6:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setTaxonomy(value);
break;
case 7:
var value = new proto.org.phenopackets.schema.v1.core.Age;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader);
msg.setAgeOfIndividualAtCollection(value);
break;
case 8:
var value = new proto.org.phenopackets.schema.v1.core.AgeRange;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.AgeRange.deserializeBinaryFromReader);
msg.setAgeRangeOfIndividualAtCollection(value);
break;
case 9:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setHistologicalDiagnosis(value);
break;
case 10:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setTumorProgression(value);
break;
case 11:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setTumorGrade(value);
break;
case 12:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.addDiagnosticMarkers(value);
break;
case 13:
var value = new proto.org.phenopackets.schema.v1.core.Procedure;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Procedure.deserializeBinaryFromReader);
msg.setProcedure(value);
break;
case 14:
var value = new proto.org.phenopackets.schema.v1.core.HtsFile;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.HtsFile.deserializeBinaryFromReader);
msg.addHtsFiles(value);
break;
case 15:
var value = new proto.org.phenopackets.schema.v1.core.Variant;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Variant.deserializeBinaryFromReader);
msg.addVariants(value);
break;
case 16:
var value = /** @type {boolean} */ (reader.readBool());
msg.setIsControlSample(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.core.Biosample.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Biosample.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.core.Biosample} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Biosample.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getIndividualId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getSampledTissue();
if (f != null) {
writer.writeMessage(
4,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getPhenotypicFeaturesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.org.phenopackets.schema.v1.core.PhenotypicFeature.serializeBinaryToWriter
);
}
f = message.getTaxonomy();
if (f != null) {
writer.writeMessage(
6,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getAgeOfIndividualAtCollection();
if (f != null) {
writer.writeMessage(
7,
f,
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter
);
}
f = message.getAgeRangeOfIndividualAtCollection();
if (f != null) {
writer.writeMessage(
8,
f,
proto.org.phenopackets.schema.v1.core.AgeRange.serializeBinaryToWriter
);
}
f = message.getHistologicalDiagnosis();
if (f != null) {
writer.writeMessage(
9,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getTumorProgression();
if (f != null) {
writer.writeMessage(
10,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getTumorGrade();
if (f != null) {
writer.writeMessage(
11,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getDiagnosticMarkersList();
if (f.length > 0) {
writer.writeRepeatedMessage(
12,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getProcedure();
if (f != null) {
writer.writeMessage(
13,
f,
proto.org.phenopackets.schema.v1.core.Procedure.serializeBinaryToWriter
);
}
f = message.getHtsFilesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
14,
f,
proto.org.phenopackets.schema.v1.core.HtsFile.serializeBinaryToWriter
);
}
f = message.getVariantsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
15,
f,
proto.org.phenopackets.schema.v1.core.Variant.serializeBinaryToWriter
);
}
f = message.getIsControlSample();
if (f) {
writer.writeBool(
16,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string individual_id = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getIndividualId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setIndividualId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string description = 3;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional OntologyClass sampled_tissue = 4;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getSampledTissue = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setSampledTissue = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearSampledTissue = function() {
return this.setSampledTissue(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasSampledTissue = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* repeated PhenotypicFeature phenotypic_features = 5;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.PhenotypicFeature>}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getPhenotypicFeaturesList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.PhenotypicFeature>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.PhenotypicFeature, 5));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.PhenotypicFeature>} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setPhenotypicFeaturesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.PhenotypicFeature}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.addPhenotypicFeatures = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.phenopackets.schema.v1.core.PhenotypicFeature, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearPhenotypicFeaturesList = function() {
return this.setPhenotypicFeaturesList([]);
};
/**
* optional OntologyClass taxonomy = 6;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getTaxonomy = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 6));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setTaxonomy = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearTaxonomy = function() {
return this.setTaxonomy(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasTaxonomy = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional Age age_of_individual_at_collection = 7;
* @return {?proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getAgeOfIndividualAtCollection = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Age} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.Age, 7));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Age|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setAgeOfIndividualAtCollection = function(value) {
return jspb.Message.setOneofWrapperField(this, 7, proto.org.phenopackets.schema.v1.core.Biosample.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearAgeOfIndividualAtCollection = function() {
return this.setAgeOfIndividualAtCollection(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasAgeOfIndividualAtCollection = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional AgeRange age_range_of_individual_at_collection = 8;
* @return {?proto.org.phenopackets.schema.v1.core.AgeRange}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getAgeRangeOfIndividualAtCollection = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.AgeRange} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.AgeRange, 8));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.AgeRange|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setAgeRangeOfIndividualAtCollection = function(value) {
return jspb.Message.setOneofWrapperField(this, 8, proto.org.phenopackets.schema.v1.core.Biosample.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearAgeRangeOfIndividualAtCollection = function() {
return this.setAgeRangeOfIndividualAtCollection(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasAgeRangeOfIndividualAtCollection = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional OntologyClass histological_diagnosis = 9;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getHistologicalDiagnosis = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 9));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setHistologicalDiagnosis = function(value) {
return jspb.Message.setWrapperField(this, 9, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearHistologicalDiagnosis = function() {
return this.setHistologicalDiagnosis(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasHistologicalDiagnosis = function() {
return jspb.Message.getField(this, 9) != null;
};
/**
* optional OntologyClass tumor_progression = 10;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getTumorProgression = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 10));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setTumorProgression = function(value) {
return jspb.Message.setWrapperField(this, 10, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearTumorProgression = function() {
return this.setTumorProgression(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasTumorProgression = function() {
return jspb.Message.getField(this, 10) != null;
};
/**
* optional OntologyClass tumor_grade = 11;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getTumorGrade = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 11));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setTumorGrade = function(value) {
return jspb.Message.setWrapperField(this, 11, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearTumorGrade = function() {
return this.setTumorGrade(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasTumorGrade = function() {
return jspb.Message.getField(this, 11) != null;
};
/**
* repeated OntologyClass diagnostic_markers = 12;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getDiagnosticMarkersList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 12));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setDiagnosticMarkersList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 12, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.OntologyClass=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.addDiagnosticMarkers = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.org.phenopackets.schema.v1.core.OntologyClass, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearDiagnosticMarkersList = function() {
return this.setDiagnosticMarkersList([]);
};
/**
* optional Procedure procedure = 13;
* @return {?proto.org.phenopackets.schema.v1.core.Procedure}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getProcedure = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Procedure} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.Procedure, 13));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Procedure|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setProcedure = function(value) {
return jspb.Message.setWrapperField(this, 13, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearProcedure = function() {
return this.setProcedure(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.hasProcedure = function() {
return jspb.Message.getField(this, 13) != null;
};
/**
* repeated HtsFile hts_files = 14;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.HtsFile>}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getHtsFilesList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.HtsFile>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.HtsFile, 14));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.HtsFile>} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setHtsFilesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 14, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.HtsFile=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.addHtsFiles = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 14, opt_value, proto.org.phenopackets.schema.v1.core.HtsFile, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearHtsFilesList = function() {
return this.setHtsFilesList([]);
};
/**
* repeated Variant variants = 15;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.Variant>}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getVariantsList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.Variant>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.Variant, 15));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.Variant>} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setVariantsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 15, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Variant=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.Variant}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.addVariants = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.org.phenopackets.schema.v1.core.Variant, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.clearVariantsList = function() {
return this.setVariantsList([]);
};
/**
* optional bool is_control_sample = 16;
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.getIsControlSample = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 16, false));
};
/**
* @param {boolean} value
* @return {!proto.org.phenopackets.schema.v1.core.Biosample} returns this
*/
proto.org.phenopackets.schema.v1.core.Biosample.prototype.setIsControlSample = function(value) {
return jspb.Message.setProto3BooleanField(this, 16, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Procedure.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.org.phenopackets.schema.v1.core.Procedure} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Procedure.toObject = function(includeInstance, msg) {
var f, obj = {
code: (f = msg.getCode()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
bodySite: (f = msg.getBodySite()) && proto.org.phenopackets.schema.v1.core.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.v1.core.Procedure}
*/
proto.org.phenopackets.schema.v1.core.Procedure.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Procedure;
return proto.org.phenopackets.schema.v1.core.Procedure.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.phenopackets.schema.v1.core.Procedure} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Procedure}
*/
proto.org.phenopackets.schema.v1.core.Procedure.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setCode(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setBodySite(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.core.Procedure.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Procedure.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.org.phenopackets.schema.v1.core.Procedure} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Procedure.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCode();
if (f != null) {
writer.writeMessage(
1,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getBodySite();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
};
/**
* optional OntologyClass code = 1;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.getCode = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Procedure} returns this
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.setCode = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Procedure} returns this
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.clearCode = function() {
return this.setCode(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.hasCode = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional OntologyClass body_site = 2;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.getBodySite = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Procedure} returns this
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.setBodySite = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Procedure} returns this
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.clearBodySite = function() {
return this.setBodySite(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Procedure.prototype.hasBodySite = 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.v1.core.Age.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Age.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.org.phenopackets.schema.v1.core.Age} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Age.toObject = function(includeInstance, msg) {
var f, obj = {
age: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.Age.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Age;
return proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.phenopackets.schema.v1.core.Age} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setAge(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.core.Age.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.org.phenopackets.schema.v1.core.Age} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAge();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string age = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Age.prototype.getAge = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Age} returns this
*/
proto.org.phenopackets.schema.v1.core.Age.prototype.setAge = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.AgeRange.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.org.phenopackets.schema.v1.core.AgeRange} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.AgeRange.toObject = function(includeInstance, msg) {
var f, obj = {
start: (f = msg.getStart()) && proto.org.phenopackets.schema.v1.core.Age.toObject(includeInstance, f),
end: (f = msg.getEnd()) && proto.org.phenopackets.schema.v1.core.Age.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.AgeRange}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.AgeRange;
return proto.org.phenopackets.schema.v1.core.AgeRange.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.org.phenopackets.schema.v1.core.AgeRange} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.AgeRange}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.org.phenopackets.schema.v1.core.Age;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader);
msg.setStart(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v1.core.Age;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader);
msg.setEnd(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.AgeRange.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.org.phenopackets.schema.v1.core.AgeRange} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.AgeRange.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getStart();
if (f != null) {
writer.writeMessage(
1,
f,
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter
);
}
f = message.getEnd();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter
);
}
};
/**
* optional Age start = 1;
* @return {?proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.getStart = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Age} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.Age, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Age|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.AgeRange} returns this
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.setStart = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.AgeRange} returns this
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.clearStart = function() {
return this.setStart(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.hasStart = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Age end = 2;
* @return {?proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.getEnd = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Age} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.Age, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Age|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.AgeRange} returns this
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.setEnd = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.AgeRange} returns this
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.clearEnd = function() {
return this.setEnd(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.AgeRange.prototype.hasEnd = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.core.Disease.repeatedFields_ = [5,6];
/**
* 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.core.Disease.oneofGroups_ = [[2,3,4]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.Disease.OnsetCase = {
ONSET_NOT_SET: 0,
AGE_OF_ONSET: 2,
AGE_RANGE_OF_ONSET: 3,
CLASS_OF_ONSET: 4
};
/**
* @return {proto.org.phenopackets.schema.v1.core.Disease.OnsetCase}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.getOnsetCase = function() {
return /** @type {proto.org.phenopackets.schema.v1.core.Disease.OnsetCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v1.core.Disease.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.core.Disease.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Disease.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.core.Disease} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Disease.toObject = function(includeInstance, msg) {
var f, obj = {
term: (f = msg.getTerm()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
ageOfOnset: (f = msg.getAgeOfOnset()) && proto.org.phenopackets.schema.v1.core.Age.toObject(includeInstance, f),
ageRangeOfOnset: (f = msg.getAgeRangeOfOnset()) && proto.org.phenopackets.schema.v1.core.AgeRange.toObject(includeInstance, f),
classOfOnset: (f = msg.getClassOfOnset()) && proto.org.phenopackets.schema.v1.core.OntologyClass.toObject(includeInstance, f),
diseaseStageList: jspb.Message.toObjectList(msg.getDiseaseStageList(),
proto.org.phenopackets.schema.v1.core.OntologyClass.toObject, includeInstance),
tnmFindingList: jspb.Message.toObjectList(msg.getTnmFindingList(),
proto.org.phenopackets.schema.v1.core.OntologyClass.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.core.Disease}
*/
proto.org.phenopackets.schema.v1.core.Disease.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Disease;
return proto.org.phenopackets.schema.v1.core.Disease.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.core.Disease} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Disease}
*/
proto.org.phenopackets.schema.v1.core.Disease.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.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setTerm(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v1.core.Age;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Age.deserializeBinaryFromReader);
msg.setAgeOfOnset(value);
break;
case 3:
var value = new proto.org.phenopackets.schema.v1.core.AgeRange;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.AgeRange.deserializeBinaryFromReader);
msg.setAgeRangeOfOnset(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setClassOfOnset(value);
break;
case 5:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.addDiseaseStage(value);
break;
case 6:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.addTnmFinding(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.core.Disease.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Disease.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.core.Disease} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Disease.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTerm();
if (f != null) {
writer.writeMessage(
1,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getAgeOfOnset();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v1.core.Age.serializeBinaryToWriter
);
}
f = message.getAgeRangeOfOnset();
if (f != null) {
writer.writeMessage(
3,
f,
proto.org.phenopackets.schema.v1.core.AgeRange.serializeBinaryToWriter
);
}
f = message.getClassOfOnset();
if (f != null) {
writer.writeMessage(
4,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getDiseaseStageList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getTnmFindingList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
};
/**
* optional OntologyClass term = 1;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.getTerm = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.setTerm = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.clearTerm = function() {
return this.setTerm(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.hasTerm = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Age age_of_onset = 2;
* @return {?proto.org.phenopackets.schema.v1.core.Age}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.getAgeOfOnset = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.Age} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.Age, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.Age|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.setAgeOfOnset = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.org.phenopackets.schema.v1.core.Disease.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.clearAgeOfOnset = function() {
return this.setAgeOfOnset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.hasAgeOfOnset = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional AgeRange age_range_of_onset = 3;
* @return {?proto.org.phenopackets.schema.v1.core.AgeRange}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.getAgeRangeOfOnset = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.AgeRange} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.AgeRange, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.AgeRange|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.setAgeRangeOfOnset = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.org.phenopackets.schema.v1.core.Disease.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.clearAgeRangeOfOnset = function() {
return this.setAgeRangeOfOnset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.hasAgeRangeOfOnset = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional OntologyClass class_of_onset = 4;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.getClassOfOnset = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.setClassOfOnset = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.org.phenopackets.schema.v1.core.Disease.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.clearClassOfOnset = function() {
return this.setClassOfOnset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.hasClassOfOnset = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* repeated OntologyClass disease_stage = 5;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.getDiseaseStageList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 5));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} value
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.setDiseaseStageList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.OntologyClass=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.addDiseaseStage = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.phenopackets.schema.v1.core.OntologyClass, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.clearDiseaseStageList = function() {
return this.setDiseaseStageList([]);
};
/**
* repeated OntologyClass tnm_finding = 6;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.getTnmFindingList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 6));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.OntologyClass>} value
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.setTnmFindingList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 6, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.OntologyClass=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.addTnmFinding = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.org.phenopackets.schema.v1.core.OntologyClass, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Disease} returns this
*/
proto.org.phenopackets.schema.v1.core.Disease.prototype.clearTnmFindingList = function() {
return this.setTnmFindingList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.core.Pedigree.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.v1.core.Pedigree.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Pedigree.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.core.Pedigree} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Pedigree.toObject = function(includeInstance, msg) {
var f, obj = {
personsList: jspb.Message.toObjectList(msg.getPersonsList(),
proto.org.phenopackets.schema.v1.core.Pedigree.Person.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.core.Pedigree}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Pedigree;
return proto.org.phenopackets.schema.v1.core.Pedigree.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.core.Pedigree} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.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.v1.core.Pedigree.Person;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.Pedigree.Person.deserializeBinaryFromReader);
msg.addPersons(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.core.Pedigree.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Pedigree.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.core.Pedigree} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Pedigree.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPersonsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.org.phenopackets.schema.v1.core.Pedigree.Person.serializeBinaryToWriter
);
}
};
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.core.Pedigree.Person.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Pedigree.Person.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.core.Pedigree.Person} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.toObject = function(includeInstance, msg) {
var f, obj = {
familyId: jspb.Message.getFieldWithDefault(msg, 1, ""),
individualId: jspb.Message.getFieldWithDefault(msg, 2, ""),
paternalId: jspb.Message.getFieldWithDefault(msg, 3, ""),
maternalId: jspb.Message.getFieldWithDefault(msg, 4, ""),
sex: jspb.Message.getFieldWithDefault(msg, 5, 0),
affectedStatus: jspb.Message.getFieldWithDefault(msg, 6, 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.v1.core.Pedigree.Person}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Pedigree.Person;
return proto.org.phenopackets.schema.v1.core.Pedigree.Person.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.core.Pedigree.Person} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.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.setFamilyId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setIndividualId(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setPaternalId(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setMaternalId(value);
break;
case 5:
var value = /** @type {!proto.org.phenopackets.schema.v1.core.Sex} */ (reader.readEnum());
msg.setSex(value);
break;
case 6:
var value = /** @type {!proto.org.phenopackets.schema.v1.core.Pedigree.Person.AffectedStatus} */ (reader.readEnum());
msg.setAffectedStatus(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.core.Pedigree.Person.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Pedigree.Person.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.core.Pedigree.Person} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFamilyId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getIndividualId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getPaternalId();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getMaternalId();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getSex();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
f = message.getAffectedStatus();
if (f !== 0.0) {
writer.writeEnum(
6,
f
);
}
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.AffectedStatus = {
MISSING: 0,
UNAFFECTED: 1,
AFFECTED: 2
};
/**
* optional string family_id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.getFamilyId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.setFamilyId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string individual_id = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.getIndividualId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.setIndividualId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string paternal_id = 3;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.getPaternalId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.setPaternalId = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string maternal_id = 4;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.getMaternalId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.setMaternalId = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional Sex sex = 5;
* @return {!proto.org.phenopackets.schema.v1.core.Sex}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.getSex = function() {
return /** @type {!proto.org.phenopackets.schema.v1.core.Sex} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Sex} value
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.setSex = function(value) {
return jspb.Message.setProto3EnumField(this, 5, value);
};
/**
* optional AffectedStatus affected_status = 6;
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person.AffectedStatus}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.getAffectedStatus = function() {
return /** @type {!proto.org.phenopackets.schema.v1.core.Pedigree.Person.AffectedStatus} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Pedigree.Person.AffectedStatus} value
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.Person.prototype.setAffectedStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 6, value);
};
/**
* repeated Person persons = 1;
* @return {!Array<!proto.org.phenopackets.schema.v1.core.Pedigree.Person>}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.prototype.getPersonsList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v1.core.Pedigree.Person>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.Pedigree.Person, 1));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v1.core.Pedigree.Person>} value
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.prototype.setPersonsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.Pedigree.Person=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree.Person}
*/
proto.org.phenopackets.schema.v1.core.Pedigree.prototype.addPersons = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.phenopackets.schema.v1.core.Pedigree.Person, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Pedigree} returns this
*/
proto.org.phenopackets.schema.v1.core.Pedigree.prototype.clearPersonsList = function() {
return this.setPersonsList([]);
};
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.core.HtsFile.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.HtsFile.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.core.HtsFile} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.HtsFile.toObject = function(includeInstance, msg) {
var f, obj = {
uri: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
htsFormat: jspb.Message.getFieldWithDefault(msg, 3, 0),
genomeAssembly: jspb.Message.getFieldWithDefault(msg, 4, ""),
individualToSampleIdentifiersMap: (f = msg.getIndividualToSampleIdentifiersMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.HtsFile;
return proto.org.phenopackets.schema.v1.core.HtsFile.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.core.HtsFile} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setUri(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 3:
var value = /** @type {!proto.org.phenopackets.schema.v1.core.HtsFile.HtsFormat} */ (reader.readEnum());
msg.setHtsFormat(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setGenomeAssembly(value);
break;
case 5:
var value = msg.getIndividualToSampleIdentifiersMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.HtsFile.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.core.HtsFile} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.HtsFile.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUri();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getHtsFormat();
if (f !== 0.0) {
writer.writeEnum(
3,
f
);
}
f = message.getGenomeAssembly();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getIndividualToSampleIdentifiersMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.HtsFormat = {
UNKNOWN: 0,
SAM: 1,
BAM: 2,
CRAM: 3,
VCF: 4,
BCF: 5,
GVCF: 6,
FASTQ: 7
};
/**
* optional string uri = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.getUri = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile} returns this
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.setUri = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile} returns this
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional HtsFormat hts_format = 3;
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile.HtsFormat}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.getHtsFormat = function() {
return /** @type {!proto.org.phenopackets.schema.v1.core.HtsFile.HtsFormat} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v1.core.HtsFile.HtsFormat} value
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile} returns this
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.setHtsFormat = function(value) {
return jspb.Message.setProto3EnumField(this, 3, value);
};
/**
* optional string genome_assembly = 4;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.getGenomeAssembly = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile} returns this
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.setGenomeAssembly = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* map<string, string> individual_to_sample_identifiers = 5;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.getIndividualToSampleIdentifiersMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 5, opt_noLazyCreate,
null));
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.org.phenopackets.schema.v1.core.HtsFile} returns this
*/
proto.org.phenopackets.schema.v1.core.HtsFile.prototype.clearIndividualToSampleIdentifiersMap = function() {
this.getIndividualToSampleIdentifiersMap().clear();
return this;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v1.core.Gene.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.core.Gene.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Gene.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.core.Gene} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Gene.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
alternateIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
symbol: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.Gene}
*/
proto.org.phenopackets.schema.v1.core.Gene.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Gene;
return proto.org.phenopackets.schema.v1.core.Gene.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.core.Gene} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Gene}
*/
proto.org.phenopackets.schema.v1.core.Gene.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.addAlternateIds(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSymbol(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.core.Gene.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Gene.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.core.Gene} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Gene.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAlternateIdsList();
if (f.length > 0) {
writer.writeRepeatedString(
2,
f
);
}
f = message.getSymbol();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Gene} returns this
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated string alternate_ids = 2;
* @return {!Array<string>}
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.getAlternateIdsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};
/**
* @param {!Array<string>} value
* @return {!proto.org.phenopackets.schema.v1.core.Gene} returns this
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.setAlternateIdsList = function(value) {
return jspb.Message.setField(this, 2, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v1.core.Gene} returns this
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.addAlternateIds = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v1.core.Gene} returns this
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.clearAlternateIdsList = function() {
return this.setAlternateIdsList([]);
};
/**
* optional string symbol = 3;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.getSymbol = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.Gene} returns this
*/
proto.org.phenopackets.schema.v1.core.Gene.prototype.setSymbol = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* 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.core.Variant.oneofGroups_ = [[2,3,4,5]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.Variant.AlleleCase = {
ALLELE_NOT_SET: 0,
HGVS_ALLELE: 2,
VCF_ALLELE: 3,
SPDI_ALLELE: 4,
ISCN_ALLELE: 5
};
/**
* @return {proto.org.phenopackets.schema.v1.core.Variant.AlleleCase}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.getAlleleCase = function() {
return /** @type {proto.org.phenopackets.schema.v1.core.Variant.AlleleCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v1.core.Variant.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.core.Variant.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.Variant.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.core.Variant} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Variant.toObject = function(includeInstance, msg) {
var f, obj = {
hgvsAllele: (f = msg.getHgvsAllele()) && proto.org.phenopackets.schema.v1.core.HgvsAllele.toObject(includeInstance, f),
vcfAllele: (f = msg.getVcfAllele()) && proto.org.phenopackets.schema.v1.core.VcfAllele.toObject(includeInstance, f),
spdiAllele: (f = msg.getSpdiAllele()) && proto.org.phenopackets.schema.v1.core.SpdiAllele.toObject(includeInstance, f),
iscnAllele: (f = msg.getIscnAllele()) && proto.org.phenopackets.schema.v1.core.IscnAllele.toObject(includeInstance, f),
zygosity: (f = msg.getZygosity()) && proto.org.phenopackets.schema.v1.core.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.v1.core.Variant}
*/
proto.org.phenopackets.schema.v1.core.Variant.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.Variant;
return proto.org.phenopackets.schema.v1.core.Variant.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.core.Variant} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.Variant}
*/
proto.org.phenopackets.schema.v1.core.Variant.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = new proto.org.phenopackets.schema.v1.core.HgvsAllele;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.HgvsAllele.deserializeBinaryFromReader);
msg.setHgvsAllele(value);
break;
case 3:
var value = new proto.org.phenopackets.schema.v1.core.VcfAllele;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.VcfAllele.deserializeBinaryFromReader);
msg.setVcfAllele(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v1.core.SpdiAllele;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.SpdiAllele.deserializeBinaryFromReader);
msg.setSpdiAllele(value);
break;
case 5:
var value = new proto.org.phenopackets.schema.v1.core.IscnAllele;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.IscnAllele.deserializeBinaryFromReader);
msg.setIscnAllele(value);
break;
case 6:
var value = new proto.org.phenopackets.schema.v1.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v1.core.OntologyClass.deserializeBinaryFromReader);
msg.setZygosity(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.core.Variant.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.Variant.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.core.Variant} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.Variant.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getHgvsAllele();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v1.core.HgvsAllele.serializeBinaryToWriter
);
}
f = message.getVcfAllele();
if (f != null) {
writer.writeMessage(
3,
f,
proto.org.phenopackets.schema.v1.core.VcfAllele.serializeBinaryToWriter
);
}
f = message.getSpdiAllele();
if (f != null) {
writer.writeMessage(
4,
f,
proto.org.phenopackets.schema.v1.core.SpdiAllele.serializeBinaryToWriter
);
}
f = message.getIscnAllele();
if (f != null) {
writer.writeMessage(
5,
f,
proto.org.phenopackets.schema.v1.core.IscnAllele.serializeBinaryToWriter
);
}
f = message.getZygosity();
if (f != null) {
writer.writeMessage(
6,
f,
proto.org.phenopackets.schema.v1.core.OntologyClass.serializeBinaryToWriter
);
}
};
/**
* optional HgvsAllele hgvs_allele = 2;
* @return {?proto.org.phenopackets.schema.v1.core.HgvsAllele}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.getHgvsAllele = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.HgvsAllele} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.HgvsAllele, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.HgvsAllele|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.setHgvsAllele = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.org.phenopackets.schema.v1.core.Variant.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.clearHgvsAllele = function() {
return this.setHgvsAllele(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.hasHgvsAllele = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional VcfAllele vcf_allele = 3;
* @return {?proto.org.phenopackets.schema.v1.core.VcfAllele}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.getVcfAllele = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.VcfAllele} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.VcfAllele, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.VcfAllele|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.setVcfAllele = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.org.phenopackets.schema.v1.core.Variant.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.clearVcfAllele = function() {
return this.setVcfAllele(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.hasVcfAllele = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional SpdiAllele spdi_allele = 4;
* @return {?proto.org.phenopackets.schema.v1.core.SpdiAllele}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.getSpdiAllele = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.SpdiAllele} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.SpdiAllele, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.SpdiAllele|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.setSpdiAllele = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.org.phenopackets.schema.v1.core.Variant.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.clearSpdiAllele = function() {
return this.setSpdiAllele(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.hasSpdiAllele = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional IscnAllele iscn_allele = 5;
* @return {?proto.org.phenopackets.schema.v1.core.IscnAllele}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.getIscnAllele = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.IscnAllele} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.IscnAllele, 5));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.IscnAllele|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.setIscnAllele = function(value) {
return jspb.Message.setOneofWrapperField(this, 5, proto.org.phenopackets.schema.v1.core.Variant.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.clearIscnAllele = function() {
return this.setIscnAllele(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.hasIscnAllele = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional OntologyClass zygosity = 6;
* @return {?proto.org.phenopackets.schema.v1.core.OntologyClass}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.getZygosity = function() {
return /** @type{?proto.org.phenopackets.schema.v1.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 6));
};
/**
* @param {?proto.org.phenopackets.schema.v1.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.setZygosity = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v1.core.Variant} returns this
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.clearZygosity = function() {
return this.setZygosity(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v1.core.Variant.prototype.hasZygosity = function() {
return jspb.Message.getField(this, 6) != 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.v1.core.HgvsAllele.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.HgvsAllele.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.core.HgvsAllele} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
hgvs: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.HgvsAllele}
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.HgvsAllele;
return proto.org.phenopackets.schema.v1.core.HgvsAllele.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.core.HgvsAllele} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.HgvsAllele}
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setHgvs(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.core.HgvsAllele.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.HgvsAllele.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.core.HgvsAllele} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getHgvs();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.HgvsAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string hgvs = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.prototype.getHgvs = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.HgvsAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.HgvsAllele.prototype.setHgvs = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.VcfAllele.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.core.VcfAllele} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.toObject = function(includeInstance, msg) {
var f, obj = {
vcfVersion: jspb.Message.getFieldWithDefault(msg, 1, ""),
genomeAssembly: jspb.Message.getFieldWithDefault(msg, 2, ""),
id: jspb.Message.getFieldWithDefault(msg, 3, ""),
chr: jspb.Message.getFieldWithDefault(msg, 4, ""),
pos: jspb.Message.getFieldWithDefault(msg, 5, 0),
ref: jspb.Message.getFieldWithDefault(msg, 6, ""),
alt: jspb.Message.getFieldWithDefault(msg, 7, ""),
info: jspb.Message.getFieldWithDefault(msg, 8, "")
};
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.core.VcfAllele}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.VcfAllele;
return proto.org.phenopackets.schema.v1.core.VcfAllele.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.core.VcfAllele} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.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.setVcfVersion(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setGenomeAssembly(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setChr(value);
break;
case 5:
var value = /** @type {number} */ (reader.readInt32());
msg.setPos(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setRef(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setAlt(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setInfo(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.core.VcfAllele.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.VcfAllele.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.core.VcfAllele} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getVcfVersion();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getGenomeAssembly();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getId();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getChr();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getPos();
if (f !== 0) {
writer.writeInt32(
5,
f
);
}
f = message.getRef();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getAlt();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getInfo();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
};
/**
* optional string vcf_version = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getVcfVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setVcfVersion = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string genome_assembly = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getGenomeAssembly = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setGenomeAssembly = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string id = 3;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string chr = 4;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getChr = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setChr = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional int32 pos = 5;
* @return {number}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getPos = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {number} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setPos = function(value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional string ref = 6;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getRef = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setRef = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string alt = 7;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getAlt = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setAlt = function(value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string info = 8;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.getInfo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.VcfAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.VcfAllele.prototype.setInfo = function(value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.SpdiAllele.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.core.SpdiAllele} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
seqId: jspb.Message.getFieldWithDefault(msg, 2, ""),
position: jspb.Message.getFieldWithDefault(msg, 3, 0),
deletedSequence: jspb.Message.getFieldWithDefault(msg, 4, ""),
insertedSequence: jspb.Message.getFieldWithDefault(msg, 5, "")
};
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.core.SpdiAllele}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.SpdiAllele;
return proto.org.phenopackets.schema.v1.core.SpdiAllele.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.core.SpdiAllele} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.SpdiAllele}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setSeqId(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setPosition(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setDeletedSequence(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setInsertedSequence(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.core.SpdiAllele.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.SpdiAllele.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.core.SpdiAllele} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSeqId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getPosition();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
f = message.getDeletedSequence();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getInsertedSequence();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.SpdiAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string seq_id = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.getSeqId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.SpdiAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.setSeqId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional int32 position = 3;
* @return {number}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.getPosition = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.org.phenopackets.schema.v1.core.SpdiAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.setPosition = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional string deleted_sequence = 4;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.getDeletedSequence = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.SpdiAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.setDeletedSequence = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string inserted_sequence = 5;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.getInsertedSequence = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.SpdiAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.SpdiAllele.prototype.setInsertedSequence = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v1.core.IscnAllele.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.core.IscnAllele} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
iscn: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v1.core.IscnAllele}
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v1.core.IscnAllele;
return proto.org.phenopackets.schema.v1.core.IscnAllele.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.core.IscnAllele} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v1.core.IscnAllele}
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setIscn(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.core.IscnAllele.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v1.core.IscnAllele.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.core.IscnAllele} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getIscn();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.IscnAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string iscn = 2;
* @return {string}
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.prototype.getIscn = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v1.core.IscnAllele} returns this
*/
proto.org.phenopackets.schema.v1.core.IscnAllele.prototype.setIscn = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.Sex = {
UNKNOWN_SEX: 0,
FEMALE: 1,
MALE: 2,
OTHER_SEX: 3
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v1.core.KaryotypicSex = {
UNKNOWN_KARYOTYPE: 0,
XX: 1,
XY: 2,
XO: 3,
XXY: 4,
XXX: 5,
XXYY: 6,
XXXY: 7,
XXXX: 8,
XYY: 9,
OTHER_KARYOTYPE: 10
};
goog.object.extend(exports, proto.org.phenopackets.schema.v1.core);