802 lines
21 KiB
JavaScript
802 lines
21 KiB
JavaScript
// source: common.proto
|
|
/**
|
|
* @fileoverview
|
|
* @enhanceable
|
|
* @suppress {missingRequire} reports error on implicit type usages.
|
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
* field starts with 'MSG_' and isn't a translatable message.
|
|
* @public
|
|
*/
|
|
// GENERATED CODE -- DO NOT EDIT!
|
|
/* eslint-disable */
|
|
// @ts-nocheck
|
|
|
|
var jspb = require('google-protobuf');
|
|
var goog = jspb;
|
|
var global = Function('return this')();
|
|
|
|
goog.exportSymbol('proto.Log', null, global);
|
|
goog.exportSymbol('proto.LogLevel', null, global);
|
|
goog.exportSymbol('proto.LogSource', null, global);
|
|
goog.exportSymbol('proto.PartialRunResult', null, global);
|
|
goog.exportSymbol('proto.SerializedObject', 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.SerializedObject = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.SerializedObject, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.SerializedObject.displayName = 'proto.SerializedObject';
|
|
}
|
|
/**
|
|
* 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.PartialRunResult = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.PartialRunResult.repeatedFields_, null);
|
|
};
|
|
goog.inherits(proto.PartialRunResult, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.PartialRunResult.displayName = 'proto.PartialRunResult';
|
|
}
|
|
/**
|
|
* 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, null, null);
|
|
};
|
|
goog.inherits(proto.Log, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.Log.displayName = 'proto.Log';
|
|
}
|
|
|
|
|
|
|
|
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.SerializedObject.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.SerializedObject.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.SerializedObject} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.SerializedObject.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
method: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
definition: msg.getDefinition_asB64(),
|
|
wasItRaised: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
|
|
stringizedTraceback: jspb.Message.getFieldWithDefault(msg, 4, "")
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.SerializedObject}
|
|
*/
|
|
proto.SerializedObject.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.SerializedObject;
|
|
return proto.SerializedObject.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.SerializedObject} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.SerializedObject}
|
|
*/
|
|
proto.SerializedObject.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.setMethod(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
msg.setDefinition(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setWasItRaised(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setStringizedTraceback(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.SerializedObject.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.SerializedObject.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.SerializedObject} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.SerializedObject.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getMethod();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getDefinition_asU8();
|
|
if (f.length > 0) {
|
|
writer.writeBytes(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getWasItRaised();
|
|
if (f) {
|
|
writer.writeBool(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
|
if (f != null) {
|
|
writer.writeString(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string method = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.SerializedObject.prototype.getMethod = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.SerializedObject} returns this
|
|
*/
|
|
proto.SerializedObject.prototype.setMethod = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes definition = 2;
|
|
* @return {!(string|Uint8Array)}
|
|
*/
|
|
proto.SerializedObject.prototype.getDefinition = function() {
|
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes definition = 2;
|
|
* This is a type-conversion wrapper around `getDefinition()`
|
|
* @return {string}
|
|
*/
|
|
proto.SerializedObject.prototype.getDefinition_asB64 = function() {
|
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
|
this.getDefinition()));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes definition = 2;
|
|
* Note that Uint8Array is not supported on all browsers.
|
|
* @see http://caniuse.com/Uint8Array
|
|
* This is a type-conversion wrapper around `getDefinition()`
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.SerializedObject.prototype.getDefinition_asU8 = function() {
|
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
|
this.getDefinition()));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!(string|Uint8Array)} value
|
|
* @return {!proto.SerializedObject} returns this
|
|
*/
|
|
proto.SerializedObject.prototype.setDefinition = function(value) {
|
|
return jspb.Message.setProto3BytesField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool was_it_raised = 3;
|
|
* @return {boolean}
|
|
*/
|
|
proto.SerializedObject.prototype.getWasItRaised = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {boolean} value
|
|
* @return {!proto.SerializedObject} returns this
|
|
*/
|
|
proto.SerializedObject.prototype.setWasItRaised = function(value) {
|
|
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string stringized_traceback = 4;
|
|
* @return {string}
|
|
*/
|
|
proto.SerializedObject.prototype.getStringizedTraceback = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.SerializedObject} returns this
|
|
*/
|
|
proto.SerializedObject.prototype.setStringizedTraceback = function(value) {
|
|
return jspb.Message.setField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the field making it undefined.
|
|
* @return {!proto.SerializedObject} returns this
|
|
*/
|
|
proto.SerializedObject.prototype.clearStringizedTraceback = function() {
|
|
return jspb.Message.setField(this, 4, undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.SerializedObject.prototype.hasStringizedTraceback = function() {
|
|
return jspb.Message.getField(this, 4) != null;
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* List of repeated fields within this message type.
|
|
* @private {!Array<number>}
|
|
* @const
|
|
*/
|
|
proto.PartialRunResult.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.PartialRunResult.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.PartialRunResult.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.PartialRunResult} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.PartialRunResult.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
isComplete: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
|
|
logsList: jspb.Message.toObjectList(msg.getLogsList(),
|
|
proto.Log.toObject, includeInstance),
|
|
result: (f = msg.getResult()) && proto.SerializedObject.toObject(includeInstance, f)
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.PartialRunResult}
|
|
*/
|
|
proto.PartialRunResult.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.PartialRunResult;
|
|
return proto.PartialRunResult.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.PartialRunResult} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.PartialRunResult}
|
|
*/
|
|
proto.PartialRunResult.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setIsComplete(value);
|
|
break;
|
|
case 2:
|
|
var value = new proto.Log;
|
|
reader.readMessage(value,proto.Log.deserializeBinaryFromReader);
|
|
msg.addLogs(value);
|
|
break;
|
|
case 3:
|
|
var value = new proto.SerializedObject;
|
|
reader.readMessage(value,proto.SerializedObject.deserializeBinaryFromReader);
|
|
msg.setResult(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.PartialRunResult.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.PartialRunResult.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.PartialRunResult} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.PartialRunResult.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getIsComplete();
|
|
if (f) {
|
|
writer.writeBool(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getLogsList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedMessage(
|
|
2,
|
|
f,
|
|
proto.Log.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getResult();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
3,
|
|
f,
|
|
proto.SerializedObject.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool is_complete = 1;
|
|
* @return {boolean}
|
|
*/
|
|
proto.PartialRunResult.prototype.getIsComplete = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {boolean} value
|
|
* @return {!proto.PartialRunResult} returns this
|
|
*/
|
|
proto.PartialRunResult.prototype.setIsComplete = function(value) {
|
|
return jspb.Message.setProto3BooleanField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated Log logs = 2;
|
|
* @return {!Array<!proto.Log>}
|
|
*/
|
|
proto.PartialRunResult.prototype.getLogsList = function() {
|
|
return /** @type{!Array<!proto.Log>} */ (
|
|
jspb.Message.getRepeatedWrapperField(this, proto.Log, 2));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!Array<!proto.Log>} value
|
|
* @return {!proto.PartialRunResult} returns this
|
|
*/
|
|
proto.PartialRunResult.prototype.setLogsList = function(value) {
|
|
return jspb.Message.setRepeatedWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.Log=} opt_value
|
|
* @param {number=} opt_index
|
|
* @return {!proto.Log}
|
|
*/
|
|
proto.PartialRunResult.prototype.addLogs = function(opt_value, opt_index) {
|
|
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.Log, opt_index);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the list making it empty but non-null.
|
|
* @return {!proto.PartialRunResult} returns this
|
|
*/
|
|
proto.PartialRunResult.prototype.clearLogsList = function() {
|
|
return this.setLogsList([]);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional SerializedObject result = 3;
|
|
* @return {?proto.SerializedObject}
|
|
*/
|
|
proto.PartialRunResult.prototype.getResult = function() {
|
|
return /** @type{?proto.SerializedObject} */ (
|
|
jspb.Message.getWrapperField(this, proto.SerializedObject, 3));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.SerializedObject|undefined} value
|
|
* @return {!proto.PartialRunResult} returns this
|
|
*/
|
|
proto.PartialRunResult.prototype.setResult = function(value) {
|
|
return jspb.Message.setWrapperField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.PartialRunResult} returns this
|
|
*/
|
|
proto.PartialRunResult.prototype.clearResult = function() {
|
|
return this.setResult(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.PartialRunResult.prototype.hasResult = function() {
|
|
return jspb.Message.getField(this, 3) != null;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.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 = {
|
|
message: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
source: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
level: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.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 {string} */ (reader.readString());
|
|
msg.setMessage(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {!proto.LogSource} */ (reader.readEnum());
|
|
msg.setSource(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {!proto.LogLevel} */ (reader.readEnum());
|
|
msg.setLevel(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.getMessage();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getSource();
|
|
if (f !== 0.0) {
|
|
writer.writeEnum(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getLevel();
|
|
if (f !== 0.0) {
|
|
writer.writeEnum(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string message = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.Log.prototype.getMessage = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.Log} returns this
|
|
*/
|
|
proto.Log.prototype.setMessage = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional LogSource source = 2;
|
|
* @return {!proto.LogSource}
|
|
*/
|
|
proto.Log.prototype.getSource = function() {
|
|
return /** @type {!proto.LogSource} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.LogSource} value
|
|
* @return {!proto.Log} returns this
|
|
*/
|
|
proto.Log.prototype.setSource = function(value) {
|
|
return jspb.Message.setProto3EnumField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional LogLevel level = 3;
|
|
* @return {!proto.LogLevel}
|
|
*/
|
|
proto.Log.prototype.getLevel = function() {
|
|
return /** @type {!proto.LogLevel} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.LogLevel} value
|
|
* @return {!proto.Log} returns this
|
|
*/
|
|
proto.Log.prototype.setLevel = function(value) {
|
|
return jspb.Message.setProto3EnumField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* @enum {number}
|
|
*/
|
|
proto.LogSource = {
|
|
BUILDER: 0,
|
|
BRIDGE: 1,
|
|
USER: 2
|
|
};
|
|
|
|
/**
|
|
* @enum {number}
|
|
*/
|
|
proto.LogLevel = {
|
|
TRACE: 0,
|
|
DEBUG: 1,
|
|
INFO: 2,
|
|
WARNING: 3,
|
|
ERROR: 4,
|
|
STDOUT: 5,
|
|
STDERR: 6
|
|
};
|
|
|
|
goog.object.extend(exports, proto);
|