UNPKG

skywalking-apache

Version:

The NodeJS agent for Apache SkyWalking

1,141 lines 38.6 kB
"use strict"; // source: language-agent/JVMMetric.proto /** * @fileoverview * @enhanceable * @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! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var common_Common_pb = require('../common/Common_pb.js'); goog.object.extend(proto, common_Common_pb); goog.exportSymbol('proto.GC', null, global); goog.exportSymbol('proto.GCPhrase', null, global); goog.exportSymbol('proto.JVMMetric', null, global); goog.exportSymbol('proto.JVMMetricCollection', null, global); goog.exportSymbol('proto.Memory', null, global); goog.exportSymbol('proto.MemoryPool', null, global); goog.exportSymbol('proto.PoolType', 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.JVMMetricCollection = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.JVMMetricCollection.repeatedFields_, null); }; goog.inherits(proto.JVMMetricCollection, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.JVMMetricCollection.displayName = 'proto.JVMMetricCollection'; } /** * 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.JVMMetric = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.JVMMetric.repeatedFields_, null); }; goog.inherits(proto.JVMMetric, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.JVMMetric.displayName = 'proto.JVMMetric'; } /** * 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.Memory = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.Memory, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.Memory.displayName = 'proto.Memory'; } /** * 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.MemoryPool = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.MemoryPool, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.MemoryPool.displayName = 'proto.MemoryPool'; } /** * 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.GC = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.GC, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.GC.displayName = 'proto.GC'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.JVMMetricCollection.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.JVMMetricCollection.prototype.toObject = function (opt_includeInstance) { return proto.JVMMetricCollection.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.JVMMetricCollection} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.JVMMetricCollection.toObject = function (includeInstance, msg) { var f, obj = { metricsList: jspb.Message.toObjectList(msg.getMetricsList(), proto.JVMMetric.toObject, includeInstance), service: jspb.Message.getFieldWithDefault(msg, 2, ""), serviceinstance: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.JVMMetricCollection} */ proto.JVMMetricCollection.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.JVMMetricCollection; return proto.JVMMetricCollection.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.JVMMetricCollection} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.JVMMetricCollection} */ proto.JVMMetricCollection.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.JVMMetric; reader.readMessage(value, proto.JVMMetric.deserializeBinaryFromReader); msg.addMetrics(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setService(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setServiceinstance(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.JVMMetricCollection.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.JVMMetricCollection.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.JVMMetricCollection} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.JVMMetricCollection.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getMetricsList(); if (f.length > 0) { writer.writeRepeatedMessage(1, f, proto.JVMMetric.serializeBinaryToWriter); } f = message.getService(); if (f.length > 0) { writer.writeString(2, f); } f = message.getServiceinstance(); if (f.length > 0) { writer.writeString(3, f); } }; /** * repeated JVMMetric metrics = 1; * @return {!Array<!proto.JVMMetric>} */ proto.JVMMetricCollection.prototype.getMetricsList = function () { return /** @type{!Array<!proto.JVMMetric>} */ (jspb.Message.getRepeatedWrapperField(this, proto.JVMMetric, 1)); }; /** * @param {!Array<!proto.JVMMetric>} value * @return {!proto.JVMMetricCollection} returns this */ proto.JVMMetricCollection.prototype.setMetricsList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.JVMMetric=} opt_value * @param {number=} opt_index * @return {!proto.JVMMetric} */ proto.JVMMetricCollection.prototype.addMetrics = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.JVMMetric, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.JVMMetricCollection} returns this */ proto.JVMMetricCollection.prototype.clearMetricsList = function () { return this.setMetricsList([]); }; /** * optional string service = 2; * @return {string} */ proto.JVMMetricCollection.prototype.getService = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.JVMMetricCollection} returns this */ proto.JVMMetricCollection.prototype.setService = function (value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string serviceInstance = 3; * @return {string} */ proto.JVMMetricCollection.prototype.getServiceinstance = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.JVMMetricCollection} returns this */ proto.JVMMetricCollection.prototype.setServiceinstance = function (value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.JVMMetric.repeatedFields_ = [3, 4, 5]; 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.JVMMetric.prototype.toObject = function (opt_includeInstance) { return proto.JVMMetric.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.JVMMetric} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.JVMMetric.toObject = function (includeInstance, msg) { var f, obj = { time: jspb.Message.getFieldWithDefault(msg, 1, 0), cpu: (f = msg.getCpu()) && common_Common_pb.CPU.toObject(includeInstance, f), memoryList: jspb.Message.toObjectList(msg.getMemoryList(), proto.Memory.toObject, includeInstance), memorypoolList: jspb.Message.toObjectList(msg.getMemorypoolList(), proto.MemoryPool.toObject, includeInstance), gcList: jspb.Message.toObjectList(msg.getGcList(), proto.GC.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.JVMMetric} */ proto.JVMMetric.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.JVMMetric; return proto.JVMMetric.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.JVMMetric} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.JVMMetric} */ proto.JVMMetric.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setTime(value); break; case 2: var value = new common_Common_pb.CPU; reader.readMessage(value, common_Common_pb.CPU.deserializeBinaryFromReader); msg.setCpu(value); break; case 3: var value = new proto.Memory; reader.readMessage(value, proto.Memory.deserializeBinaryFromReader); msg.addMemory(value); break; case 4: var value = new proto.MemoryPool; reader.readMessage(value, proto.MemoryPool.deserializeBinaryFromReader); msg.addMemorypool(value); break; case 5: var value = new proto.GC; reader.readMessage(value, proto.GC.deserializeBinaryFromReader); msg.addGc(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.JVMMetric.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.JVMMetric.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.JVMMetric} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.JVMMetric.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getTime(); if (f !== 0) { writer.writeInt64(1, f); } f = message.getCpu(); if (f != null) { writer.writeMessage(2, f, common_Common_pb.CPU.serializeBinaryToWriter); } f = message.getMemoryList(); if (f.length > 0) { writer.writeRepeatedMessage(3, f, proto.Memory.serializeBinaryToWriter); } f = message.getMemorypoolList(); if (f.length > 0) { writer.writeRepeatedMessage(4, f, proto.MemoryPool.serializeBinaryToWriter); } f = message.getGcList(); if (f.length > 0) { writer.writeRepeatedMessage(5, f, proto.GC.serializeBinaryToWriter); } }; /** * optional int64 time = 1; * @return {number} */ proto.JVMMetric.prototype.getTime = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.setTime = function (value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional CPU cpu = 2; * @return {?proto.CPU} */ proto.JVMMetric.prototype.getCpu = function () { return /** @type{?proto.CPU} */ (jspb.Message.getWrapperField(this, common_Common_pb.CPU, 2)); }; /** * @param {?proto.CPU|undefined} value * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.setCpu = function (value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.clearCpu = function () { return this.setCpu(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.JVMMetric.prototype.hasCpu = function () { return jspb.Message.getField(this, 2) != null; }; /** * repeated Memory memory = 3; * @return {!Array<!proto.Memory>} */ proto.JVMMetric.prototype.getMemoryList = function () { return /** @type{!Array<!proto.Memory>} */ (jspb.Message.getRepeatedWrapperField(this, proto.Memory, 3)); }; /** * @param {!Array<!proto.Memory>} value * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.setMemoryList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.Memory=} opt_value * @param {number=} opt_index * @return {!proto.Memory} */ proto.JVMMetric.prototype.addMemory = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.Memory, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.clearMemoryList = function () { return this.setMemoryList([]); }; /** * repeated MemoryPool memoryPool = 4; * @return {!Array<!proto.MemoryPool>} */ proto.JVMMetric.prototype.getMemorypoolList = function () { return /** @type{!Array<!proto.MemoryPool>} */ (jspb.Message.getRepeatedWrapperField(this, proto.MemoryPool, 4)); }; /** * @param {!Array<!proto.MemoryPool>} value * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.setMemorypoolList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** * @param {!proto.MemoryPool=} opt_value * @param {number=} opt_index * @return {!proto.MemoryPool} */ proto.JVMMetric.prototype.addMemorypool = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.MemoryPool, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.clearMemorypoolList = function () { return this.setMemorypoolList([]); }; /** * repeated GC gc = 5; * @return {!Array<!proto.GC>} */ proto.JVMMetric.prototype.getGcList = function () { return /** @type{!Array<!proto.GC>} */ (jspb.Message.getRepeatedWrapperField(this, proto.GC, 5)); }; /** * @param {!Array<!proto.GC>} value * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.setGcList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 5, value); }; /** * @param {!proto.GC=} opt_value * @param {number=} opt_index * @return {!proto.GC} */ proto.JVMMetric.prototype.addGc = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.GC, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.JVMMetric} returns this */ proto.JVMMetric.prototype.clearGcList = function () { return this.setGcList([]); }; 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.Memory.prototype.toObject = function (opt_includeInstance) { return proto.Memory.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.Memory} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Memory.toObject = function (includeInstance, msg) { var f, obj = { isheap: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), init: jspb.Message.getFieldWithDefault(msg, 2, 0), max: jspb.Message.getFieldWithDefault(msg, 3, 0), used: jspb.Message.getFieldWithDefault(msg, 4, 0), committed: 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.Memory} */ proto.Memory.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Memory; return proto.Memory.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Memory} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Memory} */ proto.Memory.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsheap(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setInit(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setMax(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setUsed(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setCommitted(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Memory.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.Memory.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Memory} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Memory.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getIsheap(); if (f) { writer.writeBool(1, f); } f = message.getInit(); if (f !== 0) { writer.writeInt64(2, f); } f = message.getMax(); if (f !== 0) { writer.writeInt64(3, f); } f = message.getUsed(); if (f !== 0) { writer.writeInt64(4, f); } f = message.getCommitted(); if (f !== 0) { writer.writeInt64(5, f); } }; /** * optional bool isHeap = 1; * @return {boolean} */ proto.Memory.prototype.getIsheap = function () { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value * @return {!proto.Memory} returns this */ proto.Memory.prototype.setIsheap = function (value) { return jspb.Message.setProto3BooleanField(this, 1, value); }; /** * optional int64 init = 2; * @return {number} */ proto.Memory.prototype.getInit = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.Memory} returns this */ proto.Memory.prototype.setInit = function (value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int64 max = 3; * @return {number} */ proto.Memory.prototype.getMax = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.Memory} returns this */ proto.Memory.prototype.setMax = function (value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int64 used = 4; * @return {number} */ proto.Memory.prototype.getUsed = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.Memory} returns this */ proto.Memory.prototype.setUsed = function (value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional int64 committed = 5; * @return {number} */ proto.Memory.prototype.getCommitted = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value * @return {!proto.Memory} returns this */ proto.Memory.prototype.setCommitted = function (value) { return jspb.Message.setProto3IntField(this, 5, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.MemoryPool.prototype.toObject = function (opt_includeInstance) { return proto.MemoryPool.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.MemoryPool} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MemoryPool.toObject = function (includeInstance, msg) { var f, obj = { type: jspb.Message.getFieldWithDefault(msg, 1, 0), init: jspb.Message.getFieldWithDefault(msg, 2, 0), max: jspb.Message.getFieldWithDefault(msg, 3, 0), used: jspb.Message.getFieldWithDefault(msg, 4, 0), committed: 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.MemoryPool} */ proto.MemoryPool.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.MemoryPool; return proto.MemoryPool.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.MemoryPool} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.MemoryPool} */ proto.MemoryPool.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.PoolType} */ (reader.readEnum()); msg.setType(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setInit(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setMax(value); break; case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setUsed(value); break; case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setCommitted(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.MemoryPool.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.MemoryPool.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.MemoryPool} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.MemoryPool.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getType(); if (f !== 0.0) { writer.writeEnum(1, f); } f = message.getInit(); if (f !== 0) { writer.writeInt64(2, f); } f = message.getMax(); if (f !== 0) { writer.writeInt64(3, f); } f = message.getUsed(); if (f !== 0) { writer.writeInt64(4, f); } f = message.getCommitted(); if (f !== 0) { writer.writeInt64(5, f); } }; /** * optional PoolType type = 1; * @return {!proto.PoolType} */ proto.MemoryPool.prototype.getType = function () { return /** @type {!proto.PoolType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.PoolType} value * @return {!proto.MemoryPool} returns this */ proto.MemoryPool.prototype.setType = function (value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional int64 init = 2; * @return {number} */ proto.MemoryPool.prototype.getInit = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.MemoryPool} returns this */ proto.MemoryPool.prototype.setInit = function (value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int64 max = 3; * @return {number} */ proto.MemoryPool.prototype.getMax = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.MemoryPool} returns this */ proto.MemoryPool.prototype.setMax = function (value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int64 used = 4; * @return {number} */ proto.MemoryPool.prototype.getUsed = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.MemoryPool} returns this */ proto.MemoryPool.prototype.setUsed = function (value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional int64 committed = 5; * @return {number} */ proto.MemoryPool.prototype.getCommitted = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value * @return {!proto.MemoryPool} returns this */ proto.MemoryPool.prototype.setCommitted = function (value) { return jspb.Message.setProto3IntField(this, 5, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.GC.prototype.toObject = function (opt_includeInstance) { return proto.GC.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.GC} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.GC.toObject = function (includeInstance, msg) { var f, obj = { phrase: jspb.Message.getFieldWithDefault(msg, 1, 0), count: jspb.Message.getFieldWithDefault(msg, 2, 0), time: jspb.Message.getFieldWithDefault(msg, 3, 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.GC} */ proto.GC.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.GC; return proto.GC.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.GC} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.GC} */ proto.GC.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.GCPhrase} */ (reader.readEnum()); msg.setPhrase(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setCount(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setTime(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.GC.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.GC.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.GC} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.GC.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getPhrase(); if (f !== 0.0) { writer.writeEnum(1, f); } f = message.getCount(); if (f !== 0) { writer.writeInt64(2, f); } f = message.getTime(); if (f !== 0) { writer.writeInt64(3, f); } }; /** * optional GCPhrase phrase = 1; * @return {!proto.GCPhrase} */ proto.GC.prototype.getPhrase = function () { return /** @type {!proto.GCPhrase} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.GCPhrase} value * @return {!proto.GC} returns this */ proto.GC.prototype.setPhrase = function (value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional int64 count = 2; * @return {number} */ proto.GC.prototype.getCount = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.GC} returns this */ proto.GC.prototype.setCount = function (value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int64 time = 3; * @return {number} */ proto.GC.prototype.getTime = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.GC} returns this */ proto.GC.prototype.setTime = function (value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * @enum {number} */ proto.PoolType = { CODE_CACHE_USAGE: 0, NEWGEN_USAGE: 1, OLDGEN_USAGE: 2, SURVIVOR_USAGE: 3, PERMGEN_USAGE: 4, METASPACE_USAGE: 5 }; /** * @enum {number} */ proto.GCPhrase = { NEW: 0, OLD: 1 }; goog.object.extend(exports, proto); //# sourceMappingURL=JVMMetric_pb.js.map