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.
// source: phenopackets/schema/v2/core/measurement.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.v2.core.TypedQuantity');
goog.require('jspb.BinaryReader');
goog.require('jspb.BinaryWriter');
goog.require('jspb.Message');
goog.require('proto.org.phenopackets.schema.v2.core.OntologyClass');
goog.require('proto.org.phenopackets.schema.v2.core.Quantity');
/**
* 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.TypedQuantity = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.org.phenopackets.schema.v2.core.TypedQuantity, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.displayName = 'proto.org.phenopackets.schema.v2.core.TypedQuantity';
}
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.v2.core.TypedQuantity.prototype.toObject = function(opt_includeInstance) {
return proto.org.phenopackets.schema.v2.core.TypedQuantity.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.TypedQuantity} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.toObject = function(includeInstance, msg) {
var f, obj = {
type: (f = msg.getType()) && proto.org.phenopackets.schema.v2.core.OntologyClass.toObject(includeInstance, f),
quantity: (f = msg.getQuantity()) && proto.org.phenopackets.schema.v2.core.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.TypedQuantity}
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.org.phenopackets.schema.v2.core.TypedQuantity;
return proto.org.phenopackets.schema.v2.core.TypedQuantity.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.TypedQuantity} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.org.phenopackets.schema.v2.core.TypedQuantity}
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.org.phenopackets.schema.v2.core.OntologyClass;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.OntologyClass.deserializeBinaryFromReader);
msg.setType(value);
break;
case 2:
var value = new proto.org.phenopackets.schema.v2.core.Quantity;
reader.readMessage(value,proto.org.phenopackets.schema.v2.core.Quantity.deserializeBinaryFromReader);
msg.setQuantity(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.TypedQuantity.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.org.phenopackets.schema.v2.core.TypedQuantity.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.TypedQuantity} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getType();
if (f != null) {
writer.writeMessage(
1,
f,
proto.org.phenopackets.schema.v2.core.OntologyClass.serializeBinaryToWriter
);
}
f = message.getQuantity();
if (f != null) {
writer.writeMessage(
2,
f,
proto.org.phenopackets.schema.v2.core.Quantity.serializeBinaryToWriter
);
}
};
/**
* optional OntologyClass type = 1;
* @return {?proto.org.phenopackets.schema.v2.core.OntologyClass}
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.getType = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.OntologyClass} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.OntologyClass, 1));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.OntologyClass|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.TypedQuantity} returns this
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.setType = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.TypedQuantity} returns this
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.clearType = function() {
return this.setType(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.hasType = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Quantity quantity = 2;
* @return {?proto.org.phenopackets.schema.v2.core.Quantity}
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.getQuantity = function() {
return /** @type{?proto.org.phenopackets.schema.v2.core.Quantity} */ (
jspb.Message.getWrapperField(this, proto.org.phenopackets.schema.v2.core.Quantity, 2));
};
/**
* @param {?proto.org.phenopackets.schema.v2.core.Quantity|undefined} value
* @return {!proto.org.phenopackets.schema.v2.core.TypedQuantity} returns this
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.setQuantity = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.org.phenopackets.schema.v2.core.TypedQuantity} returns this
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.clearQuantity = function() {
return this.setQuantity(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.org.phenopackets.schema.v2.core.TypedQuantity.prototype.hasQuantity = function() {
return jspb.Message.getField(this, 2) != null;
};