UNPKG

skyapm-nodejs-cass

Version:

The Node server instrument SDK for Apache SkyWalking

431 lines (367 loc) 11.9 kB
/** * @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')(); goog.exportSymbol('proto.RefType', null, global); goog.exportSymbol('proto.SpanLayer', null, global); goog.exportSymbol('proto.SpanType', null, global); goog.exportSymbol('proto.UniqueId', null, global); goog.exportSymbol('proto.UpstreamSegment', 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.UpstreamSegment = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.UpstreamSegment.repeatedFields_, null); }; goog.inherits(proto.UpstreamSegment, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.UpstreamSegment.displayName = 'proto.UpstreamSegment'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.UpstreamSegment.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.UpstreamSegment.prototype.toObject = function(opt_includeInstance) { return proto.UpstreamSegment.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.UpstreamSegment} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UpstreamSegment.toObject = function(includeInstance, msg) { var f, obj = { globaltraceidsList: jspb.Message.toObjectList(msg.getGlobaltraceidsList(), proto.UniqueId.toObject, includeInstance), segment: msg.getSegment_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.UpstreamSegment} */ proto.UpstreamSegment.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.UpstreamSegment; return proto.UpstreamSegment.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.UpstreamSegment} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.UpstreamSegment} */ proto.UpstreamSegment.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.UniqueId; reader.readMessage(value,proto.UniqueId.deserializeBinaryFromReader); msg.addGlobaltraceids(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setSegment(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.UpstreamSegment.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.UpstreamSegment.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.UpstreamSegment} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UpstreamSegment.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGlobaltraceidsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.UniqueId.serializeBinaryToWriter ); } f = message.getSegment_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * repeated UniqueId globalTraceIds = 1; * @return {!Array<!proto.UniqueId>} */ proto.UpstreamSegment.prototype.getGlobaltraceidsList = function() { return /** @type{!Array<!proto.UniqueId>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.UniqueId, 1)); }; /** @param {!Array<!proto.UniqueId>} value */ proto.UpstreamSegment.prototype.setGlobaltraceidsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.UniqueId=} opt_value * @param {number=} opt_index * @return {!proto.UniqueId} */ proto.UpstreamSegment.prototype.addGlobaltraceids = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.UniqueId, opt_index); }; proto.UpstreamSegment.prototype.clearGlobaltraceidsList = function() { this.setGlobaltraceidsList([]); }; /** * optional bytes segment = 2; * @return {!(string|Uint8Array)} */ proto.UpstreamSegment.prototype.getSegment = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes segment = 2; * This is a type-conversion wrapper around `getSegment()` * @return {string} */ proto.UpstreamSegment.prototype.getSegment_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSegment())); }; /** * optional bytes segment = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getSegment()` * @return {!Uint8Array} */ proto.UpstreamSegment.prototype.getSegment_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSegment())); }; /** @param {!(string|Uint8Array)} value */ proto.UpstreamSegment.prototype.setSegment = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * 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.UniqueId = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.UniqueId.repeatedFields_, null); }; goog.inherits(proto.UniqueId, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.UniqueId.displayName = 'proto.UniqueId'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.UniqueId.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.UniqueId.prototype.toObject = function(opt_includeInstance) { return proto.UniqueId.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.UniqueId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UniqueId.toObject = function(includeInstance, msg) { var f, obj = { idpartsList: jspb.Message.getRepeatedField(msg, 1) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.UniqueId} */ proto.UniqueId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.UniqueId; return proto.UniqueId.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.UniqueId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.UniqueId} */ proto.UniqueId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Array<number>} */ (reader.readPackedInt64()); msg.setIdpartsList(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.UniqueId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.UniqueId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.UniqueId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.UniqueId.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdpartsList(); if (f.length > 0) { writer.writePackedInt64( 1, f ); } }; /** * repeated int64 idParts = 1; * @return {!Array<number>} */ proto.UniqueId.prototype.getIdpartsList = function() { return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 1)); }; /** @param {!Array<number>} value */ proto.UniqueId.prototype.setIdpartsList = function(value) { jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index */ proto.UniqueId.prototype.addIdparts = function(value, opt_index) { jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; proto.UniqueId.prototype.clearIdpartsList = function() { this.setIdpartsList([]); }; /** * @enum {number} */ proto.SpanType = { ENTRY: 0, EXIT: 1, LOCAL: 2 }; /** * @enum {number} */ proto.RefType = { CROSSPROCESS: 0, CROSSTHREAD: 1 }; /** * @enum {number} */ proto.SpanLayer = { UNKNOWN: 0, DATABASE: 1, RPCFRAMEWORK: 2, HTTP: 3, MQ: 4, CACHE: 5 }; goog.object.extend(exports, proto);