// source: phenopackets/schema/v2/core/medical_action.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
var phenopackets_schema_v2_core_base_pb = require('../../../../phenopackets/schema/v2/core/base_pb.js');
goog.object.extend(proto, phenopackets_schema_v2_core_base_pb);
var phenopackets_schema_v2_core_measurement_pb = require('../../../../phenopackets/schema/v2/core/measurement_pb.js');
goog.object.extend(proto, phenopackets_schema_v2_core_measurement_pb);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.DoseInterval', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.DrugType', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.MedicalAction', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.MedicalAction.ActionCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.RadiationTherapy', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TherapeuticRegimen', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.IdentifierCase', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.RegimenStatus', null, global);
goog.exportSymbol('proto.org.phenopackets.schema.v2.core.Treatment', 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.MedicalAction = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v2.core.MedicalAction.repeatedFields_, proto.org.phenopackets.schema.v2.core.MedicalAction.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.MedicalAction, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.displayName = 'proto.org.phenopackets.schema.v2.core.MedicalAction';
}
/**
* 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.Treatment = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.org.phenopackets.schema.v2.core.Treatment.repeatedFields_, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.Treatment, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.Treatment.displayName = 'proto.org.phenopackets.schema.v2.core.Treatment';
}
/**
* 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.DoseInterval = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.DoseInterval, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.displayName = 'proto.org.phenopackets.schema.v2.core.DoseInterval';
}
/**
* 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.RadiationTherapy = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.RadiationTherapy, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.displayName = 'proto.org.phenopackets.schema.v2.core.RadiationTherapy';
}
/**
* 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.TherapeuticRegimen = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.oneofGroups_);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.TherapeuticRegimen, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.displayName = 'proto.org.phenopackets.schema.v2.core.TherapeuticRegimen';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.repeatedFields_ = [8];
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.oneofGroups_ = [[1,2,3,4]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.ActionCase = {
ACTION_NOT_SET: 0,
PROCEDURE: 1,
TREATMENT: 2,
RADIATION_THERAPY: 3,
THERAPEUTIC_REGIMEN: 4
};
/**
* @return {proto.org.phenopackets.schema.v2.core.MedicalAction.ActionCase}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getActionCase = function() {
return /** @type {proto.org.phenopackets.schema.v2.core.MedicalAction.ActionCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v2.core.MedicalAction.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.MedicalAction.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.MedicalAction} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.toObject = function(includeInstance, msg) {
var f, obj = {
procedure: (f = msg.getProcedure()) && phenopackets_schema_v2_core_base_pb.Procedure.toObject(includeInstance, f),
treatment: (f = msg.getTreatment()) && proto.org.phenopackets.schema.v2.core.Treatment.toObject(includeInstance, f),
radiationTherapy: (f = msg.getRadiationTherapy()) && proto.org.phenopackets.schema.v2.core.RadiationTherapy.toObject(includeInstance, f),
therapeuticRegimen: (f = msg.getTherapeuticRegimen()) && proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.toObject(includeInstance, f),
treatmentTarget: (f = msg.getTreatmentTarget()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
treatmentIntent: (f = msg.getTreatmentIntent()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
responseToTreatment: (f = msg.getResponseToTreatment()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
adverseEventsList: jspb.Message.toObjectList(msg.getAdverseEventsList(),
phenopackets_schema_v2_core_base_pb.OntologyClass.toObject, includeInstance),
treatmentTerminationReason: (f = msg.getTreatmentTerminationReason()) && phenopackets_schema_v2_core_base_pb.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.v2.core.MedicalAction}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.MedicalAction;
return proto.org.phenopackets.schema.v2.core.MedicalAction.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.MedicalAction} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new phenopackets_schema_v2_core_base_pb.Procedure;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.Procedure.deserializeBinaryFromReader);
msg.setProcedure(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v2.core.Treatment;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Treatment.deserializeBinaryFromReader);
msg.setTreatment(value);
break;
case 3:
var value = new proto.org.phenopackets.schema.v2.core.RadiationTherapy;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.RadiationTherapy.deserializeBinaryFromReader);
msg.setRadiationTherapy(value);
break;
case 4:
var value = new proto.org.phenopackets.schema.v2.core.TherapeuticRegimen;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.deserializeBinaryFromReader);
msg.setTherapeuticRegimen(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.setTreatmentTarget(value);
break;
case 6:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.setTreatmentIntent(value);
break;
case 7:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.setResponseToTreatment(value);
break;
case 8:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.addAdverseEvents(value);
break;
case 9:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.setTreatmentTerminationReason(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.MedicalAction.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.MedicalAction.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.MedicalAction} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getProcedure();
if (f != null) {
writer.writeMessage(
1,
f,
phenopackets_schema_v2_core_base_pb.Procedure.serializeBinaryToWriter
);
}
f = message.getTreatment();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v2.core.Treatment.serializeBinaryToWriter
);
}
f = message.getRadiationTherapy();
if (f != null) {
writer.writeMessage(
3,
f,
proto.org.phenopackets.schema.v2.core.RadiationTherapy.serializeBinaryToWriter
);
}
f = message.getTherapeuticRegimen();
if (f != null) {
writer.writeMessage(
4,
f,
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.serializeBinaryToWriter
);
}
f = message.getTreatmentTarget();
if (f != null) {
writer.writeMessage(
5,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getTreatmentIntent();
if (f != null) {
writer.writeMessage(
6,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getResponseToTreatment();
if (f != null) {
writer.writeMessage(
7,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getAdverseEventsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
8,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getTreatmentTerminationReason();
if (f != null) {
writer.writeMessage(
9,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
};
/**
* optional Procedure procedure = 1;
* @return {?proto.org.phenopackets.schema.v2.core.Procedure}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getProcedure = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.Procedure} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.Procedure, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.Procedure|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setProcedure = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.org.phenopackets.schema.v2.core.MedicalAction.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearProcedure = function() {
return this.setProcedure(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasProcedure = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Treatment treatment = 2;
* @return {?proto.org.phenopackets.schema.v2.core.Treatment}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getTreatment = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.Treatment} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Treatment, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.Treatment|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setTreatment = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.org.phenopackets.schema.v2.core.MedicalAction.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearTreatment = function() {
return this.setTreatment(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasTreatment = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional RadiationTherapy radiation_therapy = 3;
* @return {?proto.org.phenopackets.schema.v2.core.RadiationTherapy}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getRadiationTherapy = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.RadiationTherapy} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.RadiationTherapy, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.RadiationTherapy|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setRadiationTherapy = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.org.phenopackets.schema.v2.core.MedicalAction.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearRadiationTherapy = function() {
return this.setRadiationTherapy(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasRadiationTherapy = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional TherapeuticRegimen therapeutic_regimen = 4;
* @return {?proto.org.phenopackets.schema.v2.core.TherapeuticRegimen}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getTherapeuticRegimen = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.TherapeuticRegimen, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.TherapeuticRegimen|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setTherapeuticRegimen = function(value) {
return jspb.Message.setOneofWrapperField(this, 4, proto.org.phenopackets.schema.v2.core.MedicalAction.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearTherapeuticRegimen = function() {
return this.setTherapeuticRegimen(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasTherapeuticRegimen = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional OntologyClass treatment_target = 5;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getTreatmentTarget = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 5));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setTreatmentTarget = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearTreatmentTarget = function() {
return this.setTreatmentTarget(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasTreatmentTarget = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional OntologyClass treatment_intent = 6;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getTreatmentIntent = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 6));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setTreatmentIntent = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearTreatmentIntent = function() {
return this.setTreatmentIntent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasTreatmentIntent = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional OntologyClass response_to_treatment = 7;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getResponseToTreatment = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 7));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setResponseToTreatment = function(value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearResponseToTreatment = function() {
return this.setResponseToTreatment(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasResponseToTreatment = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* repeated OntologyClass adverse_events = 8;
* @return {!Array<!proto.org.phenopackets.schema.v2.core.OntologyClass>}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getAdverseEventsList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v2.core.OntologyClass>} */ (
jspb.Message.getRepeatedWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 8));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v2.core.OntologyClass>} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setAdverseEventsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 8, 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.MedicalAction.prototype.addAdverseEvents = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 8, 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.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearAdverseEventsList = function() {
return this.setAdverseEventsList([]);
};
/**
* optional OntologyClass treatment_termination_reason = 9;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.getTreatmentTerminationReason = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 9));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.setTreatmentTerminationReason = function(value) {
return jspb.Message.setWrapperField(this, 9, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.MedicalAction} returns this
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.clearTreatmentTerminationReason = function() {
return this.setTreatmentTerminationReason(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.MedicalAction.prototype.hasTreatmentTerminationReason = function() {
return jspb.Message.getField(this, 9) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.org.phenopackets.schema.v2.core.Treatment.repeatedFields_ = [3];
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.Treatment.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.Treatment.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.Treatment} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.Treatment.toObject = function(includeInstance, msg) {
var f, obj = {
agent: (f = msg.getAgent()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
routeOfAdministration: (f = msg.getRouteOfAdministration()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
doseIntervalsList: jspb.Message.toObjectList(msg.getDoseIntervalsList(),
proto.org.phenopackets.schema.v2.core.DoseInterval.toObject, includeInstance),
drugType: jspb.Message.getFieldWithDefault(msg, 4, 0),
cumulativeDose: (f = msg.getCumulativeDose()) && phenopackets_schema_v2_core_measurement_pb.Quantity.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v2.core.Treatment}
*/
proto.org.phenopackets.schema.v2.core.Treatment.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.Treatment;
return proto.org.phenopackets.schema.v2.core.Treatment.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.Treatment} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.Treatment}
*/
proto.org.phenopackets.schema.v2.core.Treatment.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.setAgent(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.setRouteOfAdministration(value);
break;
case 3:
var value = new proto.org.phenopackets.schema.v2.core.DoseInterval;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.DoseInterval.deserializeBinaryFromReader);
msg.addDoseIntervals(value);
break;
case 4:
var value = /** @type {!proto.org.phenopackets.schema.v2.core.DrugType} */ (reader.readEnum());
msg.setDrugType(value);
break;
case 5:
var value = new phenopackets_schema_v2_core_measurement_pb.Quantity;
reader.readMessage(value,phenopackets_schema_v2_core_measurement_pb.Quantity.deserializeBinaryFromReader);
msg.setCumulativeDose(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.Treatment.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.Treatment.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.Treatment} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.Treatment.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAgent();
if (f != null) {
writer.writeMessage(
1,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getRouteOfAdministration();
if (f != null) {
writer.writeMessage(
2,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getDoseIntervalsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
proto.org.phenopackets.schema.v2.core.DoseInterval.serializeBinaryToWriter
);
}
f = message.getDrugType();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
f = message.getCumulativeDose();
if (f != null) {
writer.writeMessage(
5,
f,
phenopackets_schema_v2_core_measurement_pb.Quantity.serializeBinaryToWriter
);
}
};
/**
* optional OntologyClass agent = 1;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.getAgent = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.setAgent = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.clearAgent = function() {
return this.setAgent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.hasAgent = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional OntologyClass route_of_administration = 2;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.getRouteOfAdministration = 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.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.setRouteOfAdministration = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.clearRouteOfAdministration = function() {
return this.setRouteOfAdministration(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.hasRouteOfAdministration = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* repeated DoseInterval dose_intervals = 3;
* @return {!Array<!proto.org.phenopackets.schema.v2.core.DoseInterval>}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.getDoseIntervalsList = function() {
return /** @type{!Array<!proto.org.phenopackets.schema.v2.core.DoseInterval>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.org.phenopackets.schema.v2.core.DoseInterval, 3));
};
/**
* @param {!Array<!proto.org.phenopackets.schema.v2.core.DoseInterval>} value
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.setDoseIntervalsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.DoseInterval=} opt_value
* @param {number=} opt_index
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.addDoseIntervals = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.phenopackets.schema.v2.core.DoseInterval, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.clearDoseIntervalsList = function() {
return this.setDoseIntervalsList([]);
};
/**
* optional DrugType drug_type = 4;
* @return {!proto.org.phenopackets.schema.v2.core.DrugType}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.getDrugType = function() {
return /** @type {!proto.org.phenopackets.schema.v2.core.DrugType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.DrugType} value
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.setDrugType = function(value) {
return jspb.Message.setProto3EnumField(this, 4, value);
};
/**
* optional Quantity cumulative_dose = 5;
* @return {?proto.org.phenopackets.schema.v2.core.Quantity}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.getCumulativeDose = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.Quantity} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_measurement_pb.Quantity, 5));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.Quantity|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.setCumulativeDose = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.Treatment} returns this
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.clearCumulativeDose = function() {
return this.setCumulativeDose(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.Treatment.prototype.hasCumulativeDose = function() {
return jspb.Message.getField(this, 5) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.DoseInterval.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.DoseInterval} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.toObject = function(includeInstance, msg) {
var f, obj = {
quantity: (f = msg.getQuantity()) && phenopackets_schema_v2_core_measurement_pb.Quantity.toObject(includeInstance, f),
scheduleFrequency: (f = msg.getScheduleFrequency()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
interval: (f = msg.getInterval()) && phenopackets_schema_v2_core_base_pb.TimeInterval.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.DoseInterval;
return proto.org.phenopackets.schema.v2.core.DoseInterval.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.DoseInterval} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new phenopackets_schema_v2_core_measurement_pb.Quantity;
reader.readMessage(value,phenopackets_schema_v2_core_measurement_pb.Quantity.deserializeBinaryFromReader);
msg.setQuantity(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.setScheduleFrequency(value);
break;
case 3:
var value = new phenopackets_schema_v2_core_base_pb.TimeInterval;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.TimeInterval.deserializeBinaryFromReader);
msg.setInterval(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.DoseInterval.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.DoseInterval.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.DoseInterval} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getQuantity();
if (f != null) {
writer.writeMessage(
1,
f,
phenopackets_schema_v2_core_measurement_pb.Quantity.serializeBinaryToWriter
);
}
f = message.getScheduleFrequency();
if (f != null) {
writer.writeMessage(
2,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getInterval();
if (f != null) {
writer.writeMessage(
3,
f,
phenopackets_schema_v2_core_base_pb.TimeInterval.serializeBinaryToWriter
);
}
};
/**
* optional Quantity quantity = 1;
* @return {?proto.org.phenopackets.schema.v2.core.Quantity}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.getQuantity = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.Quantity} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_measurement_pb.Quantity, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.Quantity|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.setQuantity = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.clearQuantity = function() {
return this.setQuantity(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.hasQuantity = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional OntologyClass schedule_frequency = 2;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.getScheduleFrequency = 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.DoseInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.setScheduleFrequency = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.clearScheduleFrequency = function() {
return this.setScheduleFrequency(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.hasScheduleFrequency = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional TimeInterval interval = 3;
* @return {?proto.org.phenopackets.schema.v2.core.TimeInterval}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.getInterval = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.TimeInterval} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.TimeInterval, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.TimeInterval|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.setInterval = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.DoseInterval} returns this
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.clearInterval = function() {
return this.setInterval(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.DoseInterval.prototype.hasInterval = function() {
return jspb.Message.getField(this, 3) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.RadiationTherapy.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.RadiationTherapy} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.toObject = function(includeInstance, msg) {
var f, obj = {
modality: (f = msg.getModality()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
bodySite: (f = msg.getBodySite()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
dosage: jspb.Message.getFieldWithDefault(msg, 3, 0),
fractions: jspb.Message.getFieldWithDefault(msg, 4, 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.v2.core.RadiationTherapy}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.RadiationTherapy;
return proto.org.phenopackets.schema.v2.core.RadiationTherapy.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.RadiationTherapy} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.RadiationTherapy}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new phenopackets_schema_v2_core_base_pb.OntologyClass;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.OntologyClass.deserializeBinaryFromReader);
msg.setModality(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.setBodySite(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setDosage(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setFractions(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.RadiationTherapy.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.RadiationTherapy.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.RadiationTherapy} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getModality();
if (f != null) {
writer.writeMessage(
1,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getBodySite();
if (f != null) {
writer.writeMessage(
2,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getDosage();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
f = message.getFractions();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
};
/**
* optional OntologyClass modality = 1;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.getModality = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.OntologyClass, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.RadiationTherapy} returns this
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.setModality = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.RadiationTherapy} returns this
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.clearModality = function() {
return this.setModality(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.hasModality = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional OntologyClass body_site = 2;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.getBodySite = 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.RadiationTherapy} returns this
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.setBodySite = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.RadiationTherapy} returns this
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.clearBodySite = function() {
return this.setBodySite(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.hasBodySite = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional int32 dosage = 3;
* @return {number}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.getDosage = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.org.phenopackets.schema.v2.core.RadiationTherapy} returns this
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.setDosage = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int32 fractions = 4;
* @return {number}
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.getFractions = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.org.phenopackets.schema.v2.core.RadiationTherapy} returns this
*/
proto.org.phenopackets.schema.v2.core.RadiationTherapy.prototype.setFractions = function(value) {
return jspb.Message.setProto3IntField(this, 4, 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.v2.core.TherapeuticRegimen.oneofGroups_ = [[1,2]];
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.IdentifierCase = {
IDENTIFIER_NOT_SET: 0,
EXTERNAL_REFERENCE: 1,
ONTOLOGY_CLASS: 2
};
/**
* @return {proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.IdentifierCase}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.getIdentifierCase = function() {
return /** @type {proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.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.TherapeuticRegimen} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.toObject = function(includeInstance, msg) {
var f, obj = {
externalReference: (f = msg.getExternalReference()) && phenopackets_schema_v2_core_base_pb.ExternalReference.toObject(includeInstance, f),
ontologyClass: (f = msg.getOntologyClass()) && phenopackets_schema_v2_core_base_pb.OntologyClass.toObject(includeInstance, f),
startTime: (f = msg.getStartTime()) && phenopackets_schema_v2_core_base_pb.TimeElement.toObject(includeInstance, f),
endTime: (f = msg.getEndTime()) && phenopackets_schema_v2_core_base_pb.TimeElement.toObject(includeInstance, f),
regimenStatus: jspb.Message.getFieldWithDefault(msg, 5, 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.v2.core.TherapeuticRegimen}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.TherapeuticRegimen;
return proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.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.TherapeuticRegimen} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new phenopackets_schema_v2_core_base_pb.ExternalReference;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.ExternalReference.deserializeBinaryFromReader);
msg.setExternalReference(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.setOntologyClass(value);
break;
case 3:
var value = new phenopackets_schema_v2_core_base_pb.TimeElement;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.TimeElement.deserializeBinaryFromReader);
msg.setStartTime(value);
break;
case 4:
var value = new phenopackets_schema_v2_core_base_pb.TimeElement;
reader.readMessage(value,phenopackets_schema_v2_core_base_pb.TimeElement.deserializeBinaryFromReader);
msg.setEndTime(value);
break;
case 5:
var value = /** @type {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.RegimenStatus} */ (reader.readEnum());
msg.setRegimenStatus(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.TherapeuticRegimen.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.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.TherapeuticRegimen} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getExternalReference();
if (f != null) {
writer.writeMessage(
1,
f,
phenopackets_schema_v2_core_base_pb.ExternalReference.serializeBinaryToWriter
);
}
f = message.getOntologyClass();
if (f != null) {
writer.writeMessage(
2,
f,
phenopackets_schema_v2_core_base_pb.OntologyClass.serializeBinaryToWriter
);
}
f = message.getStartTime();
if (f != null) {
writer.writeMessage(
3,
f,
phenopackets_schema_v2_core_base_pb.TimeElement.serializeBinaryToWriter
);
}
f = message.getEndTime();
if (f != null) {
writer.writeMessage(
4,
f,
phenopackets_schema_v2_core_base_pb.TimeElement.serializeBinaryToWriter
);
}
f = message.getRegimenStatus();
if (f !== 0.0) {
writer.writeEnum(
5,
f
);
}
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.RegimenStatus = {
UNKNOWN_STATUS: 0,
STARTED: 1,
COMPLETED: 2,
DISCONTINUED: 3
};
/**
* optional ExternalReference external_reference = 1;
* @return {?proto.org.phenopackets.schema.v2.core.ExternalReference}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.getExternalReference = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.ExternalReference} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.ExternalReference, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.ExternalReference|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.setExternalReference = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.clearExternalReference = function() {
return this.setExternalReference(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.hasExternalReference = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional OntologyClass ontology_class = 2;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.getOntologyClass = 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.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.setOntologyClass = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.clearOntologyClass = function() {
return this.setOntologyClass(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.hasOntologyClass = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional TimeElement start_time = 3;
* @return {?proto.org.phenopackets.schema.v2.core.TimeElement}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.getStartTime = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.TimeElement} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.TimeElement, 3));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.TimeElement|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.setStartTime = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.clearStartTime = function() {
return this.setStartTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.hasStartTime = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional TimeElement end_time = 4;
* @return {?proto.org.phenopackets.schema.v2.core.TimeElement}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.getEndTime = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.TimeElement} */ (
jspb.Message.getWrapperField(this, phenopackets_schema_v2_core_base_pb.TimeElement, 4));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.TimeElement|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.setEndTime = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.clearEndTime = function() {
return this.setEndTime(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.hasEndTime = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional RegimenStatus regimen_status = 5;
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.RegimenStatus}
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.getRegimenStatus = function() {
return /** @type {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.RegimenStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/**
* @param {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.RegimenStatus} value
* @return {!proto.org.phenopackets.schema.v2.core.TherapeuticRegimen} returns this
*/
proto.org.phenopackets.schema.v2.core.TherapeuticRegimen.prototype.setRegimenStatus = function(value) {
return jspb.Message.setProto3EnumField(this, 5, value);
};
/**
* @enum {number}
*/
proto.org.phenopackets.schema.v2.core.DrugType = {
UNKNOWN_DRUG_TYPE: 0,
PRESCRIPTION: 1,
EHR_MEDICATION_LIST: 2,
ADMINISTRATION_RELATED_TO_PROCEDURE: 3
};
goog.object.extend(exports, proto.org.phenopackets.schema.v2.core);