// source: phenopackets/schema/v2/core/phenotypic_feature.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
var phenopackets_schema_v2_core_base_pb = require('../../../../phenopackets/schema/v2/core/base_pb.js');
goog.object.extend(proto, phenopackets_schema_v2_core_base_pb);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.PhenotypicFeature', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v2.core.PhenotypicFeature.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.PhenotypicFeature, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.displayName = 'proto.org.phenopackets.schema.v2.core.PhenotypicFeature';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.repeatedFields_ = [5,8];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.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.v2.core.PhenotypicFeature} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.toObject = function(includeInstance, msg) {
var f, obj = {
description: jspb.Message.getFieldWithDefault(msg, 1, ""),
type: (f = msg.getType()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
excluded: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
severity: (f = msg.getSeverity()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
modifiersList: jspb.Message.toObjectList(msg.getModifiersList(),
phenopackets_schema_v2_core_base_pb.OntologyClass.toObject, includeInstance),
onset: (f = msg.getOnset()) && phenopackets_schema_v2_core_base_pb.TimeElement.toObject(includeInstance, f),
resolution: (f = msg.getResolution()) && phenopackets_schema_v2_core_base_pb.TimeElement.toObject(includeInstance, f),
evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(),
phenopackets_schema_v2_core_base_pb.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.v2.core.PhenotypicFeature}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.PhenotypicFeature;
return proto.org.phenopackets.schema.v2.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.v2.core.PhenotypicFeature} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature}
*/
proto.org.phenopackets.schema.v2.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 phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.setType(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setExcluded(value);
break;
case 4:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.setSeverity(value);
break;
case 5:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.addModifiers(value);
break;
case 6:
var value = new phenopackets_schema_v2_core_base_pb.TimeElement;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.TimeElement.deserializeBinaryFromReader);
msg.setOnset(value);
break;
case 7:
var value = new phenopackets_schema_v2_core_base_pb.TimeElement;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.TimeElement.deserializeBinaryFromReader);
msg.setResolution(value);
break;
case 8:
var value = new phenopackets_schema_v2_core_base_pb.Evidence;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.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.v2.core.PhenotypicFeature.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.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.v2.core.PhenotypicFeature} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.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,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getExcluded();
if (f) {
writer.writeBool(
3,
f
);
}
f = message.getSeverity();
if (f != null) {
writer.writeMessage(
4,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getModifiersList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getOnset();
if (f != null) {
writer.writeMessage(
6,
f,
phenopackets_schema_v2_core_base_pb.TimeElement.serializeBinaryToWriter
);
}
f = message.getResolution();
if (f != null) {
writer.writeMessage(
7,
f,
phenopackets_schema_v2_core_base_pb.TimeElement.serializeBinaryToWriter
);
}
f = message.getEvidenceList();
if (f.length > 0) {
writer.writeRepeatedMessage(
8,
f,
phenopackets_schema_v2_core_base_pb.Evidence.serializeBinaryToWriter
);
}
};
/**
* optional string description = 1;
* @return {string}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.setDescription = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional OntologyClass type = 2;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getType = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.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.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.clearType = function() {
return this.setType(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.hasType = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional bool excluded = 3;
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getExcluded = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/**
* @param {boolean} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.setExcluded = function(value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
/**
* optional OntologyClass severity = 4;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getSeverity = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.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.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.clearSeverity = function() {
return this.setSeverity(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.hasSeverity = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* repeated OntologyClass modifiers = 5;
* @return {!Array<!proto.org.phenopackets.schema.v2.core.OntologyClass>}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getModifiersList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v2.core.OntologyClass>} */ (
jspb.Message.getRepeatedWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 5));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v2.core.OntologyClass>} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.setModifiersList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.OntologyClass=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.addModifiers = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.phenopackets.schema.v2.core.OntologyClass, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.clearModifiersList = function() {
return this.setModifiersList([]);
};
/**
* optional TimeElement onset = 6;
* @return {?proto.org.phenopackets.schema.v2.core.TimeElement}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getOnset = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.TimeElement} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.TimeElement, 6));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.TimeElement|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.setOnset = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.clearOnset = function() {
return this.setOnset(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.hasOnset = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional TimeElement resolution = 7;
* @return {?proto.org.phenopackets.schema.v2.core.TimeElement}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getResolution = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.TimeElement} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.TimeElement, 7));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.TimeElement|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.setResolution = function(value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.clearResolution = function() {
return this.setResolution(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.hasResolution = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* repeated Evidence evidence = 8;
* @return {!Array<!proto.org.phenopackets.schema.v2.core.Evidence>}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.getEvidenceList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v2.core.Evidence>} */ (
jspb.Message.getRepeatedWrapperField(this, phenopackets_schema_v2_core_base_pb.Evidence, 8));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v2.core.Evidence>} value
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.setEvidenceList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 8, value);
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.Evidence=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v2.core.Evidence}
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.addEvidence = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.org.phenopackets.schema.v2.core.Evidence, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v2.core.PhenotypicFeature} returns this
*/
proto.org.phenopackets.schema.v2.core.PhenotypicFeature.prototype.clearEvidenceList = function() {
return this.setEvidenceList([]);
};
goog.object.extend(exports, proto.org.phenopackets.schema.v2.core);