skywalking-apache
Version:
The NodeJS agent for Apache SkyWalking
1,408 lines • 48.2 kB
JavaScript
"use strict";
// source: language-agent/Tracing.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.ID', null, global);
goog.exportSymbol('proto.Log', null, global);
goog.exportSymbol('proto.RefType', null, global);
goog.exportSymbol('proto.SegmentObject', null, global);
goog.exportSymbol('proto.SegmentReference', null, global);
goog.exportSymbol('proto.SpanLayer', null, global);
goog.exportSymbol('proto.SpanObject', null, global);
goog.exportSymbol('proto.SpanType', 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.SegmentObject = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.SegmentObject.repeatedFields_, null);
};
goog.inherits(proto.SegmentObject, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.SegmentObject.displayName = 'proto.SegmentObject';
}
/**
* 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.SegmentReference = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.SegmentReference, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.SegmentReference.displayName = 'proto.SegmentReference';
}
/**
* 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.SpanObject = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.SpanObject.repeatedFields_, null);
};
goog.inherits(proto.SpanObject, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.SpanObject.displayName = 'proto.SpanObject';
}
/**
* 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.Log = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.Log.repeatedFields_, null);
};
goog.inherits(proto.Log, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.Log.displayName = 'proto.Log';
}
/**
* 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.ID = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.ID.repeatedFields_, null);
};
goog.inherits(proto.ID, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ID.displayName = 'proto.ID';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.SegmentObject.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.SegmentObject.prototype.toObject = function (opt_includeInstance) {
return proto.SegmentObject.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.SegmentObject} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SegmentObject.toObject = function (includeInstance, msg) {
var f, obj = {
traceid: jspb.Message.getFieldWithDefault(msg, 1, ""),
tracesegmentid: jspb.Message.getFieldWithDefault(msg, 2, ""),
spansList: jspb.Message.toObjectList(msg.getSpansList(), proto.SpanObject.toObject, includeInstance),
service: jspb.Message.getFieldWithDefault(msg, 4, ""),
serviceinstance: jspb.Message.getFieldWithDefault(msg, 5, ""),
issizelimited: jspb.Message.getBooleanFieldWithDefault(msg, 6, 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.SegmentObject}
*/
proto.SegmentObject.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.SegmentObject;
return proto.SegmentObject.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.SegmentObject} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.SegmentObject}
*/
proto.SegmentObject.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.setTraceid(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTracesegmentid(value);
break;
case 3:
var value = new proto.SpanObject;
reader.readMessage(value, proto.SpanObject.deserializeBinaryFromReader);
msg.addSpans(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setService(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setServiceinstance(value);
break;
case 6:
var value = /** @type {boolean} */ (reader.readBool());
msg.setIssizelimited(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.SegmentObject.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.SegmentObject.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.SegmentObject} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SegmentObject.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTraceid();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getTracesegmentid();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getSpansList();
if (f.length > 0) {
writer.writeRepeatedMessage(3, f, proto.SpanObject.serializeBinaryToWriter);
}
f = message.getService();
if (f.length > 0) {
writer.writeString(4, f);
}
f = message.getServiceinstance();
if (f.length > 0) {
writer.writeString(5, f);
}
f = message.getIssizelimited();
if (f) {
writer.writeBool(6, f);
}
};
/**
* optional string traceId = 1;
* @return {string}
*/
proto.SegmentObject.prototype.getTraceid = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentObject} returns this
*/
proto.SegmentObject.prototype.setTraceid = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string traceSegmentId = 2;
* @return {string}
*/
proto.SegmentObject.prototype.getTracesegmentid = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentObject} returns this
*/
proto.SegmentObject.prototype.setTracesegmentid = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* repeated SpanObject spans = 3;
* @return {!Array<!proto.SpanObject>}
*/
proto.SegmentObject.prototype.getSpansList = function () {
return /** @type{!Array<!proto.SpanObject>} */ (jspb.Message.getRepeatedWrapperField(this, proto.SpanObject, 3));
};
/**
* @param {!Array<!proto.SpanObject>} value
* @return {!proto.SegmentObject} returns this
*/
proto.SegmentObject.prototype.setSpansList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.SpanObject=} opt_value
* @param {number=} opt_index
* @return {!proto.SpanObject}
*/
proto.SegmentObject.prototype.addSpans = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.SpanObject, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.SegmentObject} returns this
*/
proto.SegmentObject.prototype.clearSpansList = function () {
return this.setSpansList([]);
};
/**
* optional string service = 4;
* @return {string}
*/
proto.SegmentObject.prototype.getService = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentObject} returns this
*/
proto.SegmentObject.prototype.setService = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string serviceInstance = 5;
* @return {string}
*/
proto.SegmentObject.prototype.getServiceinstance = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentObject} returns this
*/
proto.SegmentObject.prototype.setServiceinstance = function (value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional bool isSizeLimited = 6;
* @return {boolean}
*/
proto.SegmentObject.prototype.getIssizelimited = function () {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
};
/**
* @param {boolean} value
* @return {!proto.SegmentObject} returns this
*/
proto.SegmentObject.prototype.setIssizelimited = function (value) {
return jspb.Message.setProto3BooleanField(this, 6, 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.SegmentReference.prototype.toObject = function (opt_includeInstance) {
return proto.SegmentReference.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.SegmentReference} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SegmentReference.toObject = function (includeInstance, msg) {
var f, obj = {
reftype: jspb.Message.getFieldWithDefault(msg, 1, 0),
traceid: jspb.Message.getFieldWithDefault(msg, 2, ""),
parenttracesegmentid: jspb.Message.getFieldWithDefault(msg, 3, ""),
parentspanid: jspb.Message.getFieldWithDefault(msg, 4, 0),
parentservice: jspb.Message.getFieldWithDefault(msg, 5, ""),
parentserviceinstance: jspb.Message.getFieldWithDefault(msg, 6, ""),
parentendpoint: jspb.Message.getFieldWithDefault(msg, 7, ""),
networkaddressusedatpeer: jspb.Message.getFieldWithDefault(msg, 8, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.SegmentReference}
*/
proto.SegmentReference.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.SegmentReference;
return proto.SegmentReference.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.SegmentReference} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.SegmentReference}
*/
proto.SegmentReference.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.RefType} */ (reader.readEnum());
msg.setReftype(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTraceid(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setParenttracesegmentid(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setParentspanid(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setParentservice(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setParentserviceinstance(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setParentendpoint(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setNetworkaddressusedatpeer(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.SegmentReference.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.SegmentReference.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.SegmentReference} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SegmentReference.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getReftype();
if (f !== 0.0) {
writer.writeEnum(1, f);
}
f = message.getTraceid();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getParenttracesegmentid();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getParentspanid();
if (f !== 0) {
writer.writeInt32(4, f);
}
f = message.getParentservice();
if (f.length > 0) {
writer.writeString(5, f);
}
f = message.getParentserviceinstance();
if (f.length > 0) {
writer.writeString(6, f);
}
f = message.getParentendpoint();
if (f.length > 0) {
writer.writeString(7, f);
}
f = message.getNetworkaddressusedatpeer();
if (f.length > 0) {
writer.writeString(8, f);
}
};
/**
* optional RefType refType = 1;
* @return {!proto.RefType}
*/
proto.SegmentReference.prototype.getReftype = function () {
return /** @type {!proto.RefType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.RefType} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setReftype = function (value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional string traceId = 2;
* @return {string}
*/
proto.SegmentReference.prototype.getTraceid = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setTraceid = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string parentTraceSegmentId = 3;
* @return {string}
*/
proto.SegmentReference.prototype.getParenttracesegmentid = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setParenttracesegmentid = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional int32 parentSpanId = 4;
* @return {number}
*/
proto.SegmentReference.prototype.getParentspanid = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setParentspanid = function (value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional string parentService = 5;
* @return {string}
*/
proto.SegmentReference.prototype.getParentservice = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setParentservice = function (value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string parentServiceInstance = 6;
* @return {string}
*/
proto.SegmentReference.prototype.getParentserviceinstance = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setParentserviceinstance = function (value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string parentEndpoint = 7;
* @return {string}
*/
proto.SegmentReference.prototype.getParentendpoint = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setParentendpoint = function (value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional string networkAddressUsedAtPeer = 8;
* @return {string}
*/
proto.SegmentReference.prototype.getNetworkaddressusedatpeer = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/**
* @param {string} value
* @return {!proto.SegmentReference} returns this
*/
proto.SegmentReference.prototype.setNetworkaddressusedatpeer = function (value) {
return jspb.Message.setProto3StringField(this, 8, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.SpanObject.repeatedFields_ = [5, 12, 13];
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.SpanObject.prototype.toObject = function (opt_includeInstance) {
return proto.SpanObject.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.SpanObject} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SpanObject.toObject = function (includeInstance, msg) {
var f, obj = {
spanid: jspb.Message.getFieldWithDefault(msg, 1, 0),
parentspanid: jspb.Message.getFieldWithDefault(msg, 2, 0),
starttime: jspb.Message.getFieldWithDefault(msg, 3, 0),
endtime: jspb.Message.getFieldWithDefault(msg, 4, 0),
refsList: jspb.Message.toObjectList(msg.getRefsList(), proto.SegmentReference.toObject, includeInstance),
operationname: jspb.Message.getFieldWithDefault(msg, 6, ""),
peer: jspb.Message.getFieldWithDefault(msg, 7, ""),
spantype: jspb.Message.getFieldWithDefault(msg, 8, 0),
spanlayer: jspb.Message.getFieldWithDefault(msg, 9, 0),
componentid: jspb.Message.getFieldWithDefault(msg, 10, 0),
iserror: jspb.Message.getBooleanFieldWithDefault(msg, 11, false),
tagsList: jspb.Message.toObjectList(msg.getTagsList(), common_Common_pb.KeyStringValuePair.toObject, includeInstance),
logsList: jspb.Message.toObjectList(msg.getLogsList(), proto.Log.toObject, includeInstance),
skipanalysis: jspb.Message.getBooleanFieldWithDefault(msg, 14, 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.SpanObject}
*/
proto.SpanObject.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.SpanObject;
return proto.SpanObject.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.SpanObject} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.SpanObject}
*/
proto.SpanObject.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setSpanid(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setParentspanid(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setStarttime(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setEndtime(value);
break;
case 5:
var value = new proto.SegmentReference;
reader.readMessage(value, proto.SegmentReference.deserializeBinaryFromReader);
msg.addRefs(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setOperationname(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setPeer(value);
break;
case 8:
var value = /** @type {!proto.SpanType} */ (reader.readEnum());
msg.setSpantype(value);
break;
case 9:
var value = /** @type {!proto.SpanLayer} */ (reader.readEnum());
msg.setSpanlayer(value);
break;
case 10:
var value = /** @type {number} */ (reader.readInt32());
msg.setComponentid(value);
break;
case 11:
var value = /** @type {boolean} */ (reader.readBool());
msg.setIserror(value);
break;
case 12:
var value = new common_Common_pb.KeyStringValuePair;
reader.readMessage(value, common_Common_pb.KeyStringValuePair.deserializeBinaryFromReader);
msg.addTags(value);
break;
case 13:
var value = new proto.Log;
reader.readMessage(value, proto.Log.deserializeBinaryFromReader);
msg.addLogs(value);
break;
case 14:
var value = /** @type {boolean} */ (reader.readBool());
msg.setSkipanalysis(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.SpanObject.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.SpanObject.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.SpanObject} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SpanObject.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getSpanid();
if (f !== 0) {
writer.writeInt32(1, f);
}
f = message.getParentspanid();
if (f !== 0) {
writer.writeInt32(2, f);
}
f = message.getStarttime();
if (f !== 0) {
writer.writeInt64(3, f);
}
f = message.getEndtime();
if (f !== 0) {
writer.writeInt64(4, f);
}
f = message.getRefsList();
if (f.length > 0) {
writer.writeRepeatedMessage(5, f, proto.SegmentReference.serializeBinaryToWriter);
}
f = message.getOperationname();
if (f.length > 0) {
writer.writeString(6, f);
}
f = message.getPeer();
if (f.length > 0) {
writer.writeString(7, f);
}
f = message.getSpantype();
if (f !== 0.0) {
writer.writeEnum(8, f);
}
f = message.getSpanlayer();
if (f !== 0.0) {
writer.writeEnum(9, f);
}
f = message.getComponentid();
if (f !== 0) {
writer.writeInt32(10, f);
}
f = message.getIserror();
if (f) {
writer.writeBool(11, f);
}
f = message.getTagsList();
if (f.length > 0) {
writer.writeRepeatedMessage(12, f, common_Common_pb.KeyStringValuePair.serializeBinaryToWriter);
}
f = message.getLogsList();
if (f.length > 0) {
writer.writeRepeatedMessage(13, f, proto.Log.serializeBinaryToWriter);
}
f = message.getSkipanalysis();
if (f) {
writer.writeBool(14, f);
}
};
/**
* optional int32 spanId = 1;
* @return {number}
*/
proto.SpanObject.prototype.getSpanid = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setSpanid = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int32 parentSpanId = 2;
* @return {number}
*/
proto.SpanObject.prototype.getParentspanid = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setParentspanid = function (value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional int64 startTime = 3;
* @return {number}
*/
proto.SpanObject.prototype.getStarttime = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setStarttime = function (value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int64 endTime = 4;
* @return {number}
*/
proto.SpanObject.prototype.getEndtime = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setEndtime = function (value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* repeated SegmentReference refs = 5;
* @return {!Array<!proto.SegmentReference>}
*/
proto.SpanObject.prototype.getRefsList = function () {
return /** @type{!Array<!proto.SegmentReference>} */ (jspb.Message.getRepeatedWrapperField(this, proto.SegmentReference, 5));
};
/**
* @param {!Array<!proto.SegmentReference>} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setRefsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.SegmentReference=} opt_value
* @param {number=} opt_index
* @return {!proto.SegmentReference}
*/
proto.SpanObject.prototype.addRefs = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.SegmentReference, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.clearRefsList = function () {
return this.setRefsList([]);
};
/**
* optional string operationName = 6;
* @return {string}
*/
proto.SpanObject.prototype.getOperationname = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setOperationname = function (value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string peer = 7;
* @return {string}
*/
proto.SpanObject.prototype.getPeer = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setPeer = function (value) {
return jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional SpanType spanType = 8;
* @return {!proto.SpanType}
*/
proto.SpanObject.prototype.getSpantype = function () {
return /** @type {!proto.SpanType} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/**
* @param {!proto.SpanType} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setSpantype = function (value) {
return jspb.Message.setProto3EnumField(this, 8, value);
};
/**
* optional SpanLayer spanLayer = 9;
* @return {!proto.SpanLayer}
*/
proto.SpanObject.prototype.getSpanlayer = function () {
return /** @type {!proto.SpanLayer} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
};
/**
* @param {!proto.SpanLayer} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setSpanlayer = function (value) {
return jspb.Message.setProto3EnumField(this, 9, value);
};
/**
* optional int32 componentId = 10;
* @return {number}
*/
proto.SpanObject.prototype.getComponentid = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
};
/**
* @param {number} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setComponentid = function (value) {
return jspb.Message.setProto3IntField(this, 10, value);
};
/**
* optional bool isError = 11;
* @return {boolean}
*/
proto.SpanObject.prototype.getIserror = function () {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false));
};
/**
* @param {boolean} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setIserror = function (value) {
return jspb.Message.setProto3BooleanField(this, 11, value);
};
/**
* repeated KeyStringValuePair tags = 12;
* @return {!Array<!proto.KeyStringValuePair>}
*/
proto.SpanObject.prototype.getTagsList = function () {
return /** @type{!Array<!proto.KeyStringValuePair>} */ (jspb.Message.getRepeatedWrapperField(this, common_Common_pb.KeyStringValuePair, 12));
};
/**
* @param {!Array<!proto.KeyStringValuePair>} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setTagsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 12, value);
};
/**
* @param {!proto.KeyStringValuePair=} opt_value
* @param {number=} opt_index
* @return {!proto.KeyStringValuePair}
*/
proto.SpanObject.prototype.addTags = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.KeyStringValuePair, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.clearTagsList = function () {
return this.setTagsList([]);
};
/**
* repeated Log logs = 13;
* @return {!Array<!proto.Log>}
*/
proto.SpanObject.prototype.getLogsList = function () {
return /** @type{!Array<!proto.Log>} */ (jspb.Message.getRepeatedWrapperField(this, proto.Log, 13));
};
/**
* @param {!Array<!proto.Log>} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setLogsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 13, value);
};
/**
* @param {!proto.Log=} opt_value
* @param {number=} opt_index
* @return {!proto.Log}
*/
proto.SpanObject.prototype.addLogs = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.Log, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.clearLogsList = function () {
return this.setLogsList([]);
};
/**
* optional bool skipAnalysis = 14;
* @return {boolean}
*/
proto.SpanObject.prototype.getSkipanalysis = function () {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 14, false));
};
/**
* @param {boolean} value
* @return {!proto.SpanObject} returns this
*/
proto.SpanObject.prototype.setSkipanalysis = function (value) {
return jspb.Message.setProto3BooleanField(this, 14, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.Log.repeatedFields_ = [2];
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.Log.prototype.toObject = function (opt_includeInstance) {
return proto.Log.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.Log} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.Log.toObject = function (includeInstance, msg) {
var f, obj = {
time: jspb.Message.getFieldWithDefault(msg, 1, 0),
dataList: jspb.Message.toObjectList(msg.getDataList(), common_Common_pb.KeyStringValuePair.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.Log}
*/
proto.Log.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.Log;
return proto.Log.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.Log} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.Log}
*/
proto.Log.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.KeyStringValuePair;
reader.readMessage(value, common_Common_pb.KeyStringValuePair.deserializeBinaryFromReader);
msg.addData(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.Log.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.Log.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.Log} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.Log.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTime();
if (f !== 0) {
writer.writeInt64(1, f);
}
f = message.getDataList();
if (f.length > 0) {
writer.writeRepeatedMessage(2, f, common_Common_pb.KeyStringValuePair.serializeBinaryToWriter);
}
};
/**
* optional int64 time = 1;
* @return {number}
*/
proto.Log.prototype.getTime = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.Log} returns this
*/
proto.Log.prototype.setTime = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* repeated KeyStringValuePair data = 2;
* @return {!Array<!proto.KeyStringValuePair>}
*/
proto.Log.prototype.getDataList = function () {
return /** @type{!Array<!proto.KeyStringValuePair>} */ (jspb.Message.getRepeatedWrapperField(this, common_Common_pb.KeyStringValuePair, 2));
};
/**
* @param {!Array<!proto.KeyStringValuePair>} value
* @return {!proto.Log} returns this
*/
proto.Log.prototype.setDataList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.KeyStringValuePair=} opt_value
* @param {number=} opt_index
* @return {!proto.KeyStringValuePair}
*/
proto.Log.prototype.addData = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.KeyStringValuePair, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.Log} returns this
*/
proto.Log.prototype.clearDataList = function () {
return this.setDataList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.ID.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.ID.prototype.toObject = function (opt_includeInstance) {
return proto.ID.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.ID} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ID.toObject = function (includeInstance, msg) {
var f, obj = {
idList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.ID}
*/
proto.ID.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ID;
return proto.ID.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ID} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ID}
*/
proto.ID.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.addId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ID.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.ID.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ID} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ID.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getIdList();
if (f.length > 0) {
writer.writeRepeatedString(1, f);
}
};
/**
* repeated string id = 1;
* @return {!Array<string>}
*/
proto.ID.prototype.getIdList = function () {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* @param {!Array<string>} value
* @return {!proto.ID} returns this
*/
proto.ID.prototype.setIdList = function (value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.ID} returns this
*/
proto.ID.prototype.addId = function (value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.ID} returns this
*/
proto.ID.prototype.clearIdList = function () {
return this.setIdList([]);
};
/**
* @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);
//# sourceMappingURL=Tracing_pb.js.map