skyapm-nodejs-cass
Version:
The Node server instrument SDK for Apache SkyWalking
1,555 lines (1,321 loc) • 42.3 kB
JavaScript
/**
* @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);
var common_trace$common_pb = require('../common/trace-common_pb.js');
goog.object.extend(proto, common_trace$common_pb);
goog.exportSymbol('proto.Log', null, global);
goog.exportSymbol('proto.SegmentObject', null, global);
goog.exportSymbol('proto.SegmentReference', null, global);
goog.exportSymbol('proto.SpanObjectV2', 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) {
proto.SegmentObject.displayName = 'proto.SegmentObject';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.SegmentObject.repeatedFields_ = [2];
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.SegmentObject.prototype.toObject = function(opt_includeInstance) {
return proto.SegmentObject.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.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 = {
tracesegmentid: (f = msg.getTracesegmentid()) && common_trace$common_pb.UniqueId.toObject(includeInstance, f),
spansList: jspb.Message.toObjectList(msg.getSpansList(),
proto.SpanObjectV2.toObject, includeInstance),
serviceid: jspb.Message.getFieldWithDefault(msg, 3, 0),
serviceinstanceid: jspb.Message.getFieldWithDefault(msg, 4, 0),
issizelimited: jspb.Message.getFieldWithDefault(msg, 5, 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 = new common_trace$common_pb.UniqueId;
reader.readMessage(value,common_trace$common_pb.UniqueId.deserializeBinaryFromReader);
msg.setTracesegmentid(value);
break;
case 2:
var value = new proto.SpanObjectV2;
reader.readMessage(value,proto.SpanObjectV2.deserializeBinaryFromReader);
msg.addSpans(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setServiceid(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setServiceinstanceid(value);
break;
case 5:
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.getTracesegmentid();
if (f != null) {
writer.writeMessage(
1,
f,
common_trace$common_pb.UniqueId.serializeBinaryToWriter
);
}
f = message.getSpansList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
proto.SpanObjectV2.serializeBinaryToWriter
);
}
f = message.getServiceid();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
f = message.getServiceinstanceid();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
f = message.getIssizelimited();
if (f) {
writer.writeBool(
5,
f
);
}
};
/**
* optional UniqueId traceSegmentId = 1;
* @return {?proto.UniqueId}
*/
proto.SegmentObject.prototype.getTracesegmentid = function() {
return /** @type{?proto.UniqueId} */ (
jspb.Message.getWrapperField(this, common_trace$common_pb.UniqueId, 1));
};
/** @param {?proto.UniqueId|undefined} value */
proto.SegmentObject.prototype.setTracesegmentid = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};
proto.SegmentObject.prototype.clearTracesegmentid = function() {
this.setTracesegmentid(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.SegmentObject.prototype.hasTracesegmentid = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated SpanObjectV2 spans = 2;
* @return {!Array<!proto.SpanObjectV2>}
*/
proto.SegmentObject.prototype.getSpansList = function() {
return /** @type{!Array<!proto.SpanObjectV2>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.SpanObjectV2, 2));
};
/** @param {!Array<!proto.SpanObjectV2>} value */
proto.SegmentObject.prototype.setSpansList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.SpanObjectV2=} opt_value
* @param {number=} opt_index
* @return {!proto.SpanObjectV2}
*/
proto.SegmentObject.prototype.addSpans = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.SpanObjectV2, opt_index);
};
proto.SegmentObject.prototype.clearSpansList = function() {
this.setSpansList([]);
};
/**
* optional int32 serviceId = 3;
* @return {number}
*/
proto.SegmentObject.prototype.getServiceid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.SegmentObject.prototype.setServiceid = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int32 serviceInstanceId = 4;
* @return {number}
*/
proto.SegmentObject.prototype.getServiceinstanceid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.SegmentObject.prototype.setServiceinstanceid = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional bool isSizeLimited = 5;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.SegmentObject.prototype.getIssizelimited = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
};
/** @param {boolean} value */
proto.SegmentObject.prototype.setIssizelimited = function(value) {
jspb.Message.setProto3BooleanField(this, 5, 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.SegmentReference = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.SegmentReference, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.SegmentReference.displayName = 'proto.SegmentReference';
}
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.SegmentReference.prototype.toObject = function(opt_includeInstance) {
return proto.SegmentReference.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.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),
parenttracesegmentid: (f = msg.getParenttracesegmentid()) && common_trace$common_pb.UniqueId.toObject(includeInstance, f),
parentspanid: jspb.Message.getFieldWithDefault(msg, 3, 0),
parentserviceinstanceid: jspb.Message.getFieldWithDefault(msg, 4, 0),
networkaddress: jspb.Message.getFieldWithDefault(msg, 5, ""),
networkaddressid: jspb.Message.getFieldWithDefault(msg, 6, 0),
entryserviceinstanceid: jspb.Message.getFieldWithDefault(msg, 7, 0),
entryendpoint: jspb.Message.getFieldWithDefault(msg, 8, ""),
entryendpointid: jspb.Message.getFieldWithDefault(msg, 9, 0),
parentendpoint: jspb.Message.getFieldWithDefault(msg, 10, ""),
parentendpointid: jspb.Message.getFieldWithDefault(msg, 11, 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.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 = new common_trace$common_pb.UniqueId;
reader.readMessage(value,common_trace$common_pb.UniqueId.deserializeBinaryFromReader);
msg.setParenttracesegmentid(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt32());
msg.setParentspanid(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setParentserviceinstanceid(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setNetworkaddress(value);
break;
case 6:
var value = /** @type {number} */ (reader.readInt32());
msg.setNetworkaddressid(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt32());
msg.setEntryserviceinstanceid(value);
break;
case 8:
var value = /** @type {string} */ (reader.readString());
msg.setEntryendpoint(value);
break;
case 9:
var value = /** @type {number} */ (reader.readInt32());
msg.setEntryendpointid(value);
break;
case 10:
var value = /** @type {string} */ (reader.readString());
msg.setParentendpoint(value);
break;
case 11:
var value = /** @type {number} */ (reader.readInt32());
msg.setParentendpointid(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.getParenttracesegmentid();
if (f != null) {
writer.writeMessage(
2,
f,
common_trace$common_pb.UniqueId.serializeBinaryToWriter
);
}
f = message.getParentspanid();
if (f !== 0) {
writer.writeInt32(
3,
f
);
}
f = message.getParentserviceinstanceid();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
f = message.getNetworkaddress();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getNetworkaddressid();
if (f !== 0) {
writer.writeInt32(
6,
f
);
}
f = message.getEntryserviceinstanceid();
if (f !== 0) {
writer.writeInt32(
7,
f
);
}
f = message.getEntryendpoint();
if (f.length > 0) {
writer.writeString(
8,
f
);
}
f = message.getEntryendpointid();
if (f !== 0) {
writer.writeInt32(
9,
f
);
}
f = message.getParentendpoint();
if (f.length > 0) {
writer.writeString(
10,
f
);
}
f = message.getParentendpointid();
if (f !== 0) {
writer.writeInt32(
11,
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 */
proto.SegmentReference.prototype.setReftype = function(value) {
jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional UniqueId parentTraceSegmentId = 2;
* @return {?proto.UniqueId}
*/
proto.SegmentReference.prototype.getParenttracesegmentid = function() {
return /** @type{?proto.UniqueId} */ (
jspb.Message.getWrapperField(this, common_trace$common_pb.UniqueId, 2));
};
/** @param {?proto.UniqueId|undefined} value */
proto.SegmentReference.prototype.setParenttracesegmentid = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
proto.SegmentReference.prototype.clearParenttracesegmentid = function() {
this.setParenttracesegmentid(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.SegmentReference.prototype.hasParenttracesegmentid = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional int32 parentSpanId = 3;
* @return {number}
*/
proto.SegmentReference.prototype.getParentspanid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.SegmentReference.prototype.setParentspanid = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int32 parentServiceInstanceId = 4;
* @return {number}
*/
proto.SegmentReference.prototype.getParentserviceinstanceid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.SegmentReference.prototype.setParentserviceinstanceid = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional string networkAddress = 5;
* @return {string}
*/
proto.SegmentReference.prototype.getNetworkaddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
proto.SegmentReference.prototype.setNetworkaddress = function(value) {
jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional int32 networkAddressId = 6;
* @return {number}
*/
proto.SegmentReference.prototype.getNetworkaddressid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
proto.SegmentReference.prototype.setNetworkaddressid = function(value) {
jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional int32 entryServiceInstanceId = 7;
* @return {number}
*/
proto.SegmentReference.prototype.getEntryserviceinstanceid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {number} value */
proto.SegmentReference.prototype.setEntryserviceinstanceid = function(value) {
jspb.Message.setProto3IntField(this, 7, value);
};
/**
* optional string entryEndpoint = 8;
* @return {string}
*/
proto.SegmentReference.prototype.getEntryendpoint = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};
/** @param {string} value */
proto.SegmentReference.prototype.setEntryendpoint = function(value) {
jspb.Message.setProto3StringField(this, 8, value);
};
/**
* optional int32 entryEndpointId = 9;
* @return {number}
*/
proto.SegmentReference.prototype.getEntryendpointid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
};
/** @param {number} value */
proto.SegmentReference.prototype.setEntryendpointid = function(value) {
jspb.Message.setProto3IntField(this, 9, value);
};
/**
* optional string parentEndpoint = 10;
* @return {string}
*/
proto.SegmentReference.prototype.getParentendpoint = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};
/** @param {string} value */
proto.SegmentReference.prototype.setParentendpoint = function(value) {
jspb.Message.setProto3StringField(this, 10, value);
};
/**
* optional int32 parentEndpointId = 11;
* @return {number}
*/
proto.SegmentReference.prototype.getParentendpointid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
};
/** @param {number} value */
proto.SegmentReference.prototype.setParentendpointid = function(value) {
jspb.Message.setProto3IntField(this, 11, 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.SpanObjectV2 = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.SpanObjectV2.repeatedFields_, null);
};
goog.inherits(proto.SpanObjectV2, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.SpanObjectV2.displayName = 'proto.SpanObjectV2';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.SpanObjectV2.repeatedFields_ = [5,15,16];
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.SpanObjectV2.prototype.toObject = function(opt_includeInstance) {
return proto.SpanObjectV2.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.SpanObjectV2} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SpanObjectV2.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),
operationnameid: jspb.Message.getFieldWithDefault(msg, 6, 0),
operationname: jspb.Message.getFieldWithDefault(msg, 7, ""),
peerid: jspb.Message.getFieldWithDefault(msg, 8, 0),
peer: jspb.Message.getFieldWithDefault(msg, 9, ""),
spantype: jspb.Message.getFieldWithDefault(msg, 10, 0),
spanlayer: jspb.Message.getFieldWithDefault(msg, 11, 0),
componentid: jspb.Message.getFieldWithDefault(msg, 12, 0),
component: jspb.Message.getFieldWithDefault(msg, 13, ""),
iserror: jspb.Message.getFieldWithDefault(msg, 14, false),
tagsList: jspb.Message.toObjectList(msg.getTagsList(),
common_common_pb.KeyStringValuePair.toObject, includeInstance),
logsList: jspb.Message.toObjectList(msg.getLogsList(),
proto.Log.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.SpanObjectV2}
*/
proto.SpanObjectV2.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.SpanObjectV2;
return proto.SpanObjectV2.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.SpanObjectV2} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.SpanObjectV2}
*/
proto.SpanObjectV2.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 {number} */ (reader.readInt32());
msg.setOperationnameid(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setOperationname(value);
break;
case 8:
var value = /** @type {number} */ (reader.readInt32());
msg.setPeerid(value);
break;
case 9:
var value = /** @type {string} */ (reader.readString());
msg.setPeer(value);
break;
case 10:
var value = /** @type {!proto.SpanType} */ (reader.readEnum());
msg.setSpantype(value);
break;
case 11:
var value = /** @type {!proto.SpanLayer} */ (reader.readEnum());
msg.setSpanlayer(value);
break;
case 12:
var value = /** @type {number} */ (reader.readInt32());
msg.setComponentid(value);
break;
case 13:
var value = /** @type {string} */ (reader.readString());
msg.setComponent(value);
break;
case 14:
var value = /** @type {boolean} */ (reader.readBool());
msg.setIserror(value);
break;
case 15:
var value = new common_common_pb.KeyStringValuePair;
reader.readMessage(value,common_common_pb.KeyStringValuePair.deserializeBinaryFromReader);
msg.addTags(value);
break;
case 16:
var value = new proto.Log;
reader.readMessage(value,proto.Log.deserializeBinaryFromReader);
msg.addLogs(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.SpanObjectV2.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.SpanObjectV2.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.SpanObjectV2} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.SpanObjectV2.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.getOperationnameid();
if (f !== 0) {
writer.writeInt32(
6,
f
);
}
f = message.getOperationname();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
f = message.getPeerid();
if (f !== 0) {
writer.writeInt32(
8,
f
);
}
f = message.getPeer();
if (f.length > 0) {
writer.writeString(
9,
f
);
}
f = message.getSpantype();
if (f !== 0.0) {
writer.writeEnum(
10,
f
);
}
f = message.getSpanlayer();
if (f !== 0.0) {
writer.writeEnum(
11,
f
);
}
f = message.getComponentid();
if (f !== 0) {
writer.writeInt32(
12,
f
);
}
f = message.getComponent();
if (f.length > 0) {
writer.writeString(
13,
f
);
}
f = message.getIserror();
if (f) {
writer.writeBool(
14,
f
);
}
f = message.getTagsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
15,
f,
common_common_pb.KeyStringValuePair.serializeBinaryToWriter
);
}
f = message.getLogsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
16,
f,
proto.Log.serializeBinaryToWriter
);
}
};
/**
* optional int32 spanId = 1;
* @return {number}
*/
proto.SpanObjectV2.prototype.getSpanid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.SpanObjectV2.prototype.setSpanid = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional int32 parentSpanId = 2;
* @return {number}
*/
proto.SpanObjectV2.prototype.getParentspanid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/** @param {number} value */
proto.SpanObjectV2.prototype.setParentspanid = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional int64 startTime = 3;
* @return {number}
*/
proto.SpanObjectV2.prototype.getStarttime = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.SpanObjectV2.prototype.setStarttime = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int64 endTime = 4;
* @return {number}
*/
proto.SpanObjectV2.prototype.getEndtime = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.SpanObjectV2.prototype.setEndtime = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* repeated SegmentReference refs = 5;
* @return {!Array<!proto.SegmentReference>}
*/
proto.SpanObjectV2.prototype.getRefsList = function() {
return /** @type{!Array<!proto.SegmentReference>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.SegmentReference, 5));
};
/** @param {!Array<!proto.SegmentReference>} value */
proto.SpanObjectV2.prototype.setRefsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.SegmentReference=} opt_value
* @param {number=} opt_index
* @return {!proto.SegmentReference}
*/
proto.SpanObjectV2.prototype.addRefs = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.SegmentReference, opt_index);
};
proto.SpanObjectV2.prototype.clearRefsList = function() {
this.setRefsList([]);
};
/**
* optional int32 operationNameId = 6;
* @return {number}
*/
proto.SpanObjectV2.prototype.getOperationnameid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
proto.SpanObjectV2.prototype.setOperationnameid = function(value) {
jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional string operationName = 7;
* @return {string}
*/
proto.SpanObjectV2.prototype.getOperationname = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/** @param {string} value */
proto.SpanObjectV2.prototype.setOperationname = function(value) {
jspb.Message.setProto3StringField(this, 7, value);
};
/**
* optional int32 peerId = 8;
* @return {number}
*/
proto.SpanObjectV2.prototype.getPeerid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/** @param {number} value */
proto.SpanObjectV2.prototype.setPeerid = function(value) {
jspb.Message.setProto3IntField(this, 8, value);
};
/**
* optional string peer = 9;
* @return {string}
*/
proto.SpanObjectV2.prototype.getPeer = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};
/** @param {string} value */
proto.SpanObjectV2.prototype.setPeer = function(value) {
jspb.Message.setProto3StringField(this, 9, value);
};
/**
* optional SpanType spanType = 10;
* @return {!proto.SpanType}
*/
proto.SpanObjectV2.prototype.getSpantype = function() {
return /** @type {!proto.SpanType} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
};
/** @param {!proto.SpanType} value */
proto.SpanObjectV2.prototype.setSpantype = function(value) {
jspb.Message.setProto3EnumField(this, 10, value);
};
/**
* optional SpanLayer spanLayer = 11;
* @return {!proto.SpanLayer}
*/
proto.SpanObjectV2.prototype.getSpanlayer = function() {
return /** @type {!proto.SpanLayer} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
};
/** @param {!proto.SpanLayer} value */
proto.SpanObjectV2.prototype.setSpanlayer = function(value) {
jspb.Message.setProto3EnumField(this, 11, value);
};
/**
* optional int32 componentId = 12;
* @return {number}
*/
proto.SpanObjectV2.prototype.getComponentid = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
};
/** @param {number} value */
proto.SpanObjectV2.prototype.setComponentid = function(value) {
jspb.Message.setProto3IntField(this, 12, value);
};
/**
* optional string component = 13;
* @return {string}
*/
proto.SpanObjectV2.prototype.getComponent = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, ""));
};
/** @param {string} value */
proto.SpanObjectV2.prototype.setComponent = function(value) {
jspb.Message.setProto3StringField(this, 13, value);
};
/**
* optional bool isError = 14;
* Note that Boolean fields may be set to 0/1 when serialized from a Java server.
* You should avoid comparisons like {@code val === true/false} in those cases.
* @return {boolean}
*/
proto.SpanObjectV2.prototype.getIserror = function() {
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 14, false));
};
/** @param {boolean} value */
proto.SpanObjectV2.prototype.setIserror = function(value) {
jspb.Message.setProto3BooleanField(this, 14, value);
};
/**
* repeated KeyStringValuePair tags = 15;
* @return {!Array<!proto.KeyStringValuePair>}
*/
proto.SpanObjectV2.prototype.getTagsList = function() {
return /** @type{!Array<!proto.KeyStringValuePair>} */ (
jspb.Message.getRepeatedWrapperField(this, common_common_pb.KeyStringValuePair, 15));
};
/** @param {!Array<!proto.KeyStringValuePair>} value */
proto.SpanObjectV2.prototype.setTagsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 15, value);
};
/**
* @param {!proto.KeyStringValuePair=} opt_value
* @param {number=} opt_index
* @return {!proto.KeyStringValuePair}
*/
proto.SpanObjectV2.prototype.addTags = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 15, opt_value, proto.KeyStringValuePair, opt_index);
};
proto.SpanObjectV2.prototype.clearTagsList = function() {
this.setTagsList([]);
};
/**
* repeated Log logs = 16;
* @return {!Array<!proto.Log>}
*/
proto.SpanObjectV2.prototype.getLogsList = function() {
return /** @type{!Array<!proto.Log>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.Log, 16));
};
/** @param {!Array<!proto.Log>} value */
proto.SpanObjectV2.prototype.setLogsList = function(value) {
jspb.Message.setRepeatedWrapperField(this, 16, value);
};
/**
* @param {!proto.Log=} opt_value
* @param {number=} opt_index
* @return {!proto.Log}
*/
proto.SpanObjectV2.prototype.addLogs = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 16, opt_value, proto.Log, opt_index);
};
proto.SpanObjectV2.prototype.clearLogsList = function() {
this.setLogsList([]);
};
/**
* 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) {
proto.Log.displayName = 'proto.Log';
}
/**
* 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 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.Log.prototype.toObject = function(opt_includeInstance) {
return proto.Log.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.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 */
proto.Log.prototype.setTime = function(value) {
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 */
proto.Log.prototype.setDataList = function(value) {
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);
};
proto.Log.prototype.clearDataList = function() {
this.setDataList([]);
};
goog.object.extend(exports, proto);