Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
ets.phenopacket-schema.2.0.2.source-code.phenotypicfeature.js Maven / Gradle / Ivy
// 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
goog.provide('proto.org.phenopackets.schema.v1.core.PhenotypicFeature');
goog.provide('proto.org.phenopackets.schema.v1.core.PhenotypicFeature.OnsetCase');
goog.require('jspb.BinaryReader');
goog.require('jspb.BinaryWriter');
goog.require('jspb.Message');
goog.require('proto.org.phenopackets.schema.v1.core.Age');
goog.require('proto.org.phenopackets.schema.v1.core.AgeRange');
goog.require('proto.org.phenopackets.schema.v1.core.Evidence');
goog.require('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';
}
/**
* List of repeated fields within this message type.
* @private {!Array}
* @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>}
* @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_, 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.PhenotypicFeature.prototype.getModifiersList = function() {
return /** @type{!Array} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.OntologyClass, 5));
};
/**
* @param {!Array} 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.PhenotypicFeature.prototype.getEvidenceList = function() {
return /** @type{!Array} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v1.core.Evidence, 10));
};
/**
* @param {!Array} 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([]);
};