UNPKG

xray-grpc

Version:
1,594 lines (1,380 loc) 49.6 kB
// source: stats.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 = (function() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); goog.exportSymbol('proto.xray.app.stats.command.Config', null, global); goog.exportSymbol('proto.xray.app.stats.command.GetStatsRequest', null, global); goog.exportSymbol('proto.xray.app.stats.command.GetStatsResponse', null, global); goog.exportSymbol('proto.xray.app.stats.command.QueryStatsRequest', null, global); goog.exportSymbol('proto.xray.app.stats.command.QueryStatsResponse', null, global); goog.exportSymbol('proto.xray.app.stats.command.Stat', null, global); goog.exportSymbol('proto.xray.app.stats.command.SysStatsRequest', null, global); goog.exportSymbol('proto.xray.app.stats.command.SysStatsResponse', 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.xray.app.stats.command.GetStatsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.stats.command.GetStatsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.GetStatsRequest.displayName = 'proto.xray.app.stats.command.GetStatsRequest'; } /** * 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.xray.app.stats.command.Stat = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.stats.command.Stat, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.Stat.displayName = 'proto.xray.app.stats.command.Stat'; } /** * 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.xray.app.stats.command.GetStatsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.stats.command.GetStatsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.GetStatsResponse.displayName = 'proto.xray.app.stats.command.GetStatsResponse'; } /** * 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.xray.app.stats.command.QueryStatsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.stats.command.QueryStatsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.QueryStatsRequest.displayName = 'proto.xray.app.stats.command.QueryStatsRequest'; } /** * 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.xray.app.stats.command.QueryStatsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.xray.app.stats.command.QueryStatsResponse.repeatedFields_, null); }; goog.inherits(proto.xray.app.stats.command.QueryStatsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.QueryStatsResponse.displayName = 'proto.xray.app.stats.command.QueryStatsResponse'; } /** * 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.xray.app.stats.command.SysStatsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.stats.command.SysStatsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.SysStatsRequest.displayName = 'proto.xray.app.stats.command.SysStatsRequest'; } /** * 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.xray.app.stats.command.SysStatsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.stats.command.SysStatsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.SysStatsResponse.displayName = 'proto.xray.app.stats.command.SysStatsResponse'; } /** * 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.xray.app.stats.command.Config = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.stats.command.Config, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.stats.command.Config.displayName = 'proto.xray.app.stats.command.Config'; } 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.xray.app.stats.command.GetStatsRequest.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.GetStatsRequest.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.xray.app.stats.command.GetStatsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.GetStatsRequest.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), reset: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.xray.app.stats.command.GetStatsRequest} */ proto.xray.app.stats.command.GetStatsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.GetStatsRequest; return proto.xray.app.stats.command.GetStatsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.GetStatsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.GetStatsRequest} */ proto.xray.app.stats.command.GetStatsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setReset(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.GetStatsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.GetStatsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.GetStatsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.GetStatsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getReset(); if (f) { writer.writeBool( 2, f ); } }; /** * optional string name = 1; * @return {string} */ proto.xray.app.stats.command.GetStatsRequest.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.xray.app.stats.command.GetStatsRequest} returns this */ proto.xray.app.stats.command.GetStatsRequest.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bool reset = 2; * @return {boolean} */ proto.xray.app.stats.command.GetStatsRequest.prototype.getReset = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value * @return {!proto.xray.app.stats.command.GetStatsRequest} returns this */ proto.xray.app.stats.command.GetStatsRequest.prototype.setReset = function(value) { return jspb.Message.setProto3BooleanField(this, 2, 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.xray.app.stats.command.Stat.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.Stat.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.xray.app.stats.command.Stat} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.Stat.toObject = function(includeInstance, msg) { var f, obj = { name: jspb.Message.getFieldWithDefault(msg, 1, ""), value: jspb.Message.getFieldWithDefault(msg, 2, 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.xray.app.stats.command.Stat} */ proto.xray.app.stats.command.Stat.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.Stat; return proto.xray.app.stats.command.Stat.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.Stat} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.Stat} */ proto.xray.app.stats.command.Stat.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.Stat.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.Stat.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.Stat} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.Stat.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getValue(); if (f !== 0) { writer.writeInt64( 2, f ); } }; /** * optional string name = 1; * @return {string} */ proto.xray.app.stats.command.Stat.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.xray.app.stats.command.Stat} returns this */ proto.xray.app.stats.command.Stat.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int64 value = 2; * @return {number} */ proto.xray.app.stats.command.Stat.prototype.getValue = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.Stat} returns this */ proto.xray.app.stats.command.Stat.prototype.setValue = function(value) { return jspb.Message.setProto3IntField(this, 2, 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.xray.app.stats.command.GetStatsResponse.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.GetStatsResponse.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.xray.app.stats.command.GetStatsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.GetStatsResponse.toObject = function(includeInstance, msg) { var f, obj = { stat: (f = msg.getStat()) && proto.xray.app.stats.command.Stat.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.xray.app.stats.command.GetStatsResponse} */ proto.xray.app.stats.command.GetStatsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.GetStatsResponse; return proto.xray.app.stats.command.GetStatsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.GetStatsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.GetStatsResponse} */ proto.xray.app.stats.command.GetStatsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.xray.app.stats.command.Stat; reader.readMessage(value,proto.xray.app.stats.command.Stat.deserializeBinaryFromReader); msg.setStat(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.GetStatsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.GetStatsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.GetStatsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.GetStatsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStat(); if (f != null) { writer.writeMessage( 1, f, proto.xray.app.stats.command.Stat.serializeBinaryToWriter ); } }; /** * optional Stat stat = 1; * @return {?proto.xray.app.stats.command.Stat} */ proto.xray.app.stats.command.GetStatsResponse.prototype.getStat = function() { return /** @type{?proto.xray.app.stats.command.Stat} */ ( jspb.Message.getWrapperField(this, proto.xray.app.stats.command.Stat, 1)); }; /** * @param {?proto.xray.app.stats.command.Stat|undefined} value * @return {!proto.xray.app.stats.command.GetStatsResponse} returns this */ proto.xray.app.stats.command.GetStatsResponse.prototype.setStat = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.xray.app.stats.command.GetStatsResponse} returns this */ proto.xray.app.stats.command.GetStatsResponse.prototype.clearStat = function() { return this.setStat(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.xray.app.stats.command.GetStatsResponse.prototype.hasStat = function() { return jspb.Message.getField(this, 1) != 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.xray.app.stats.command.QueryStatsRequest.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.QueryStatsRequest.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.xray.app.stats.command.QueryStatsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.QueryStatsRequest.toObject = function(includeInstance, msg) { var f, obj = { pattern: jspb.Message.getFieldWithDefault(msg, 1, ""), reset: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.xray.app.stats.command.QueryStatsRequest} */ proto.xray.app.stats.command.QueryStatsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.QueryStatsRequest; return proto.xray.app.stats.command.QueryStatsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.QueryStatsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.QueryStatsRequest} */ proto.xray.app.stats.command.QueryStatsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setPattern(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setReset(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.QueryStatsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.QueryStatsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.QueryStatsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.QueryStatsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPattern(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getReset(); if (f) { writer.writeBool( 2, f ); } }; /** * optional string pattern = 1; * @return {string} */ proto.xray.app.stats.command.QueryStatsRequest.prototype.getPattern = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.xray.app.stats.command.QueryStatsRequest} returns this */ proto.xray.app.stats.command.QueryStatsRequest.prototype.setPattern = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bool reset = 2; * @return {boolean} */ proto.xray.app.stats.command.QueryStatsRequest.prototype.getReset = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value * @return {!proto.xray.app.stats.command.QueryStatsRequest} returns this */ proto.xray.app.stats.command.QueryStatsRequest.prototype.setReset = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.xray.app.stats.command.QueryStatsResponse.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.xray.app.stats.command.QueryStatsResponse.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.QueryStatsResponse.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.xray.app.stats.command.QueryStatsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.QueryStatsResponse.toObject = function(includeInstance, msg) { var f, obj = { statList: jspb.Message.toObjectList(msg.getStatList(), proto.xray.app.stats.command.Stat.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.xray.app.stats.command.QueryStatsResponse} */ proto.xray.app.stats.command.QueryStatsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.QueryStatsResponse; return proto.xray.app.stats.command.QueryStatsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.QueryStatsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.QueryStatsResponse} */ proto.xray.app.stats.command.QueryStatsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.xray.app.stats.command.Stat; reader.readMessage(value,proto.xray.app.stats.command.Stat.deserializeBinaryFromReader); msg.addStat(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.QueryStatsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.QueryStatsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.QueryStatsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.QueryStatsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStatList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.xray.app.stats.command.Stat.serializeBinaryToWriter ); } }; /** * repeated Stat stat = 1; * @return {!Array<!proto.xray.app.stats.command.Stat>} */ proto.xray.app.stats.command.QueryStatsResponse.prototype.getStatList = function() { return /** @type{!Array<!proto.xray.app.stats.command.Stat>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.xray.app.stats.command.Stat, 1)); }; /** * @param {!Array<!proto.xray.app.stats.command.Stat>} value * @return {!proto.xray.app.stats.command.QueryStatsResponse} returns this */ proto.xray.app.stats.command.QueryStatsResponse.prototype.setStatList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.xray.app.stats.command.Stat=} opt_value * @param {number=} opt_index * @return {!proto.xray.app.stats.command.Stat} */ proto.xray.app.stats.command.QueryStatsResponse.prototype.addStat = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.xray.app.stats.command.Stat, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.xray.app.stats.command.QueryStatsResponse} returns this */ proto.xray.app.stats.command.QueryStatsResponse.prototype.clearStatList = function() { return this.setStatList([]); }; 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.xray.app.stats.command.SysStatsRequest.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.SysStatsRequest.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.xray.app.stats.command.SysStatsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.SysStatsRequest.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.xray.app.stats.command.SysStatsRequest} */ proto.xray.app.stats.command.SysStatsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.SysStatsRequest; return proto.xray.app.stats.command.SysStatsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.SysStatsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.SysStatsRequest} */ proto.xray.app.stats.command.SysStatsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.SysStatsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.SysStatsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.SysStatsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.SysStatsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; 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.xray.app.stats.command.SysStatsResponse.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.SysStatsResponse.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.xray.app.stats.command.SysStatsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.SysStatsResponse.toObject = function(includeInstance, msg) { var f, obj = { numgoroutine: jspb.Message.getFieldWithDefault(msg, 1, 0), numgc: jspb.Message.getFieldWithDefault(msg, 2, 0), alloc: jspb.Message.getFieldWithDefault(msg, 3, 0), totalalloc: jspb.Message.getFieldWithDefault(msg, 4, 0), sys: jspb.Message.getFieldWithDefault(msg, 5, 0), mallocs: jspb.Message.getFieldWithDefault(msg, 6, 0), frees: jspb.Message.getFieldWithDefault(msg, 7, 0), liveobjects: jspb.Message.getFieldWithDefault(msg, 8, 0), pausetotalns: jspb.Message.getFieldWithDefault(msg, 9, 0), uptime: jspb.Message.getFieldWithDefault(msg, 10, 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.xray.app.stats.command.SysStatsResponse} */ proto.xray.app.stats.command.SysStatsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.SysStatsResponse; return proto.xray.app.stats.command.SysStatsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.SysStatsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.SysStatsResponse} */ proto.xray.app.stats.command.SysStatsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setNumgoroutine(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setNumgc(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setAlloc(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setTotalalloc(value); break; case 5: var value = /** @type {number} */ (reader.readUint64()); msg.setSys(value); break; case 6: var value = /** @type {number} */ (reader.readUint64()); msg.setMallocs(value); break; case 7: var value = /** @type {number} */ (reader.readUint64()); msg.setFrees(value); break; case 8: var value = /** @type {number} */ (reader.readUint64()); msg.setLiveobjects(value); break; case 9: var value = /** @type {number} */ (reader.readUint64()); msg.setPausetotalns(value); break; case 10: var value = /** @type {number} */ (reader.readUint32()); msg.setUptime(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.SysStatsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.SysStatsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.SysStatsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.SysStatsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNumgoroutine(); if (f !== 0) { writer.writeUint32( 1, f ); } f = message.getNumgc(); if (f !== 0) { writer.writeUint32( 2, f ); } f = message.getAlloc(); if (f !== 0) { writer.writeUint64( 3, f ); } f = message.getTotalalloc(); if (f !== 0) { writer.writeUint64( 4, f ); } f = message.getSys(); if (f !== 0) { writer.writeUint64( 5, f ); } f = message.getMallocs(); if (f !== 0) { writer.writeUint64( 6, f ); } f = message.getFrees(); if (f !== 0) { writer.writeUint64( 7, f ); } f = message.getLiveobjects(); if (f !== 0) { writer.writeUint64( 8, f ); } f = message.getPausetotalns(); if (f !== 0) { writer.writeUint64( 9, f ); } f = message.getUptime(); if (f !== 0) { writer.writeUint32( 10, f ); } }; /** * optional uint32 NumGoroutine = 1; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getNumgoroutine = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setNumgoroutine = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional uint32 NumGC = 2; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getNumgc = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setNumgc = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional uint64 Alloc = 3; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getAlloc = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setAlloc = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional uint64 TotalAlloc = 4; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getTotalalloc = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setTotalalloc = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional uint64 Sys = 5; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getSys = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setSys = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; /** * optional uint64 Mallocs = 6; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getMallocs = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setMallocs = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** * optional uint64 Frees = 7; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getFrees = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setFrees = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; /** * optional uint64 LiveObjects = 8; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getLiveobjects = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setLiveobjects = function(value) { return jspb.Message.setProto3IntField(this, 8, value); }; /** * optional uint64 PauseTotalNs = 9; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getPausetotalns = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setPausetotalns = function(value) { return jspb.Message.setProto3IntField(this, 9, value); }; /** * optional uint32 Uptime = 10; * @return {number} */ proto.xray.app.stats.command.SysStatsResponse.prototype.getUptime = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** * @param {number} value * @return {!proto.xray.app.stats.command.SysStatsResponse} returns this */ proto.xray.app.stats.command.SysStatsResponse.prototype.setUptime = function(value) { return jspb.Message.setProto3IntField(this, 10, 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.xray.app.stats.command.Config.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.stats.command.Config.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.xray.app.stats.command.Config} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.Config.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.xray.app.stats.command.Config} */ proto.xray.app.stats.command.Config.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.stats.command.Config; return proto.xray.app.stats.command.Config.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.stats.command.Config} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.stats.command.Config} */ proto.xray.app.stats.command.Config.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.stats.command.Config.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.stats.command.Config.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.stats.command.Config} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.stats.command.Config.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; goog.object.extend(exports, proto.xray.app.stats.command);