2019-01-11 19:33:44 +00:00
|
|
|
/**
|
|
|
|
* @fileoverview
|
|
|
|
* @enhanceable
|
|
|
|
* @public
|
|
|
|
*/
|
|
|
|
// GENERATED CODE -- DO NOT EDIT!
|
|
|
|
|
|
|
|
var jspb = require('google-protobuf');
|
|
|
|
var goog = jspb;
|
|
|
|
var global = Function('return this')();
|
|
|
|
|
|
|
|
var command_pb = require('./command_pb.js');
|
|
|
|
var node_pb = require('./node_pb.js');
|
|
|
|
goog.exportSymbol('proto.ClientMessage', null, global);
|
2019-01-15 18:36:09 +00:00
|
|
|
goog.exportSymbol('proto.InitMessage', null, global);
|
|
|
|
goog.exportSymbol('proto.InitMessage.OperatingSystem', null, global);
|
2019-01-11 19:33:44 +00:00
|
|
|
goog.exportSymbol('proto.ServerMessage', 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.ClientMessage = function(opt_data) {
|
|
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ClientMessage.oneofGroups_);
|
|
|
|
};
|
|
|
|
goog.inherits(proto.ClientMessage, jspb.Message);
|
|
|
|
if (goog.DEBUG && !COMPILED) {
|
|
|
|
proto.ClientMessage.displayName = 'proto.ClientMessage';
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Oneof group definitions for this message. Each group defines the field
|
|
|
|
* numbers belonging to that group. When of these fields' value is set, all
|
|
|
|
* other fields in the group are cleared. During deserialization, if multiple
|
|
|
|
* fields are encountered for a group, only the last value seen will be kept.
|
|
|
|
* @private {!Array<!Array<number>>}
|
|
|
|
* @const
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.oneofGroups_ = [[1,2,3,4,5,6]];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @enum {number}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.MsgCase = {
|
|
|
|
MSG_NOT_SET: 0,
|
|
|
|
NEW_SESSION: 1,
|
|
|
|
SHUTDOWN_SESSION: 2,
|
|
|
|
WRITE_TO_SESSION: 3,
|
|
|
|
CLOSE_SESSION_INPUT: 4,
|
|
|
|
RESIZE_SESSION_TTY: 5,
|
|
|
|
NEW_EVAL: 6
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return {proto.ClientMessage.MsgCase}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.getMsgCase = function() {
|
|
|
|
return /** @type {proto.ClientMessage.MsgCase} */(jspb.Message.computeOneofCase(this, proto.ClientMessage.oneofGroups_[0]));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.ClientMessage.prototype.toObject = function(opt_includeInstance) {
|
|
|
|
return proto.ClientMessage.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.ClientMessage} msg The msg instance to transform.
|
|
|
|
* @return {!Object}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.toObject = function(includeInstance, msg) {
|
|
|
|
var f, obj = {
|
|
|
|
newSession: (f = msg.getNewSession()) && command_pb.NewSessionMessage.toObject(includeInstance, f),
|
|
|
|
shutdownSession: (f = msg.getShutdownSession()) && command_pb.ShutdownSessionMessage.toObject(includeInstance, f),
|
|
|
|
writeToSession: (f = msg.getWriteToSession()) && command_pb.WriteToSessionMessage.toObject(includeInstance, f),
|
|
|
|
closeSessionInput: (f = msg.getCloseSessionInput()) && command_pb.CloseSessionInputMessage.toObject(includeInstance, f),
|
|
|
|
resizeSessionTty: (f = msg.getResizeSessionTty()) && command_pb.ResizeSessionTTYMessage.toObject(includeInstance, f),
|
|
|
|
newEval: (f = msg.getNewEval()) && node_pb.NewEvalMessage.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.ClientMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.deserializeBinary = function(bytes) {
|
|
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
|
|
var msg = new proto.ClientMessage;
|
|
|
|
return proto.ClientMessage.deserializeBinaryFromReader(msg, reader);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
|
|
* given reader into the given message object.
|
|
|
|
* @param {!proto.ClientMessage} msg The message object to deserialize into.
|
|
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
|
|
* @return {!proto.ClientMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
|
while (reader.nextField()) {
|
|
|
|
if (reader.isEndGroup()) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
var field = reader.getFieldNumber();
|
|
|
|
switch (field) {
|
|
|
|
case 1:
|
|
|
|
var value = new command_pb.NewSessionMessage;
|
|
|
|
reader.readMessage(value,command_pb.NewSessionMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setNewSession(value);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
var value = new command_pb.ShutdownSessionMessage;
|
|
|
|
reader.readMessage(value,command_pb.ShutdownSessionMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setShutdownSession(value);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
var value = new command_pb.WriteToSessionMessage;
|
|
|
|
reader.readMessage(value,command_pb.WriteToSessionMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setWriteToSession(value);
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
var value = new command_pb.CloseSessionInputMessage;
|
|
|
|
reader.readMessage(value,command_pb.CloseSessionInputMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setCloseSessionInput(value);
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
var value = new command_pb.ResizeSessionTTYMessage;
|
|
|
|
reader.readMessage(value,command_pb.ResizeSessionTTYMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setResizeSessionTty(value);
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
var value = new node_pb.NewEvalMessage;
|
|
|
|
reader.readMessage(value,node_pb.NewEvalMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setNewEval(value);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
reader.skipField();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return msg;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class method variant: serializes the given message to binary data
|
|
|
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
|
|
* @param {!proto.ClientMessage} message
|
|
|
|
* @param {!jspb.BinaryWriter} writer
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.serializeBinaryToWriter = function(message, writer) {
|
|
|
|
message.serializeBinaryToWriter(writer);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
|
|
* @return {!Uint8Array}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.serializeBinary = function() {
|
|
|
|
var writer = new jspb.BinaryWriter();
|
|
|
|
this.serializeBinaryToWriter(writer);
|
|
|
|
return writer.getResultBuffer();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the message to binary data (in protobuf wire format),
|
|
|
|
* writing to the given BinaryWriter.
|
|
|
|
* @param {!jspb.BinaryWriter} writer
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.serializeBinaryToWriter = function (writer) {
|
|
|
|
var f = undefined;
|
|
|
|
f = this.getNewSession();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
1,
|
|
|
|
f,
|
|
|
|
command_pb.NewSessionMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getShutdownSession();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
2,
|
|
|
|
f,
|
|
|
|
command_pb.ShutdownSessionMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getWriteToSession();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
3,
|
|
|
|
f,
|
|
|
|
command_pb.WriteToSessionMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getCloseSessionInput();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
4,
|
|
|
|
f,
|
|
|
|
command_pb.CloseSessionInputMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getResizeSessionTty();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
5,
|
|
|
|
f,
|
|
|
|
command_pb.ResizeSessionTTYMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getNewEval();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
6,
|
|
|
|
f,
|
|
|
|
node_pb.NewEvalMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a deep clone of this proto. No data is shared with the original.
|
|
|
|
* @return {!proto.ClientMessage} The clone.
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.cloneMessage = function() {
|
|
|
|
return /** @type {!proto.ClientMessage} */ (jspb.Message.cloneMessage(this));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional NewSessionMessage new_session = 1;
|
|
|
|
* @return {proto.NewSessionMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.getNewSession = function() {
|
|
|
|
return /** @type{proto.NewSessionMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.NewSessionMessage, 1));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.NewSessionMessage|undefined} value */
|
|
|
|
proto.ClientMessage.prototype.setNewSession = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 1, proto.ClientMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ClientMessage.prototype.clearNewSession = function() {
|
|
|
|
this.setNewSession(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.hasNewSession = function() {
|
|
|
|
return jspb.Message.getField(this, 1) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional ShutdownSessionMessage shutdown_session = 2;
|
|
|
|
* @return {proto.ShutdownSessionMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.getShutdownSession = function() {
|
|
|
|
return /** @type{proto.ShutdownSessionMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.ShutdownSessionMessage, 2));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.ShutdownSessionMessage|undefined} value */
|
|
|
|
proto.ClientMessage.prototype.setShutdownSession = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 2, proto.ClientMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ClientMessage.prototype.clearShutdownSession = function() {
|
|
|
|
this.setShutdownSession(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.hasShutdownSession = function() {
|
|
|
|
return jspb.Message.getField(this, 2) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional WriteToSessionMessage write_to_session = 3;
|
|
|
|
* @return {proto.WriteToSessionMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.getWriteToSession = function() {
|
|
|
|
return /** @type{proto.WriteToSessionMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.WriteToSessionMessage, 3));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.WriteToSessionMessage|undefined} value */
|
|
|
|
proto.ClientMessage.prototype.setWriteToSession = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 3, proto.ClientMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ClientMessage.prototype.clearWriteToSession = function() {
|
|
|
|
this.setWriteToSession(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.hasWriteToSession = function() {
|
|
|
|
return jspb.Message.getField(this, 3) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional CloseSessionInputMessage close_session_input = 4;
|
|
|
|
* @return {proto.CloseSessionInputMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.getCloseSessionInput = function() {
|
|
|
|
return /** @type{proto.CloseSessionInputMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.CloseSessionInputMessage, 4));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.CloseSessionInputMessage|undefined} value */
|
|
|
|
proto.ClientMessage.prototype.setCloseSessionInput = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 4, proto.ClientMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ClientMessage.prototype.clearCloseSessionInput = function() {
|
|
|
|
this.setCloseSessionInput(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.hasCloseSessionInput = function() {
|
|
|
|
return jspb.Message.getField(this, 4) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional ResizeSessionTTYMessage resize_session_tty = 5;
|
|
|
|
* @return {proto.ResizeSessionTTYMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.getResizeSessionTty = function() {
|
|
|
|
return /** @type{proto.ResizeSessionTTYMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.ResizeSessionTTYMessage, 5));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.ResizeSessionTTYMessage|undefined} value */
|
|
|
|
proto.ClientMessage.prototype.setResizeSessionTty = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 5, proto.ClientMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ClientMessage.prototype.clearResizeSessionTty = function() {
|
|
|
|
this.setResizeSessionTty(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.hasResizeSessionTty = function() {
|
|
|
|
return jspb.Message.getField(this, 5) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional NewEvalMessage new_eval = 6;
|
|
|
|
* @return {proto.NewEvalMessage}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.getNewEval = function() {
|
|
|
|
return /** @type{proto.NewEvalMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, node_pb.NewEvalMessage, 6));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.NewEvalMessage|undefined} value */
|
|
|
|
proto.ClientMessage.prototype.setNewEval = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 6, proto.ClientMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ClientMessage.prototype.clearNewEval = function() {
|
|
|
|
this.setNewEval(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ClientMessage.prototype.hasNewEval = function() {
|
|
|
|
return jspb.Message.getField(this, 6) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.ServerMessage = function(opt_data) {
|
|
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ServerMessage.oneofGroups_);
|
|
|
|
};
|
|
|
|
goog.inherits(proto.ServerMessage, jspb.Message);
|
|
|
|
if (goog.DEBUG && !COMPILED) {
|
|
|
|
proto.ServerMessage.displayName = 'proto.ServerMessage';
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Oneof group definitions for this message. Each group defines the field
|
|
|
|
* numbers belonging to that group. When of these fields' value is set, all
|
|
|
|
* other fields in the group are cleared. During deserialization, if multiple
|
|
|
|
* fields are encountered for a group, only the last value seen will be kept.
|
|
|
|
* @private {!Array<!Array<number>>}
|
|
|
|
* @const
|
|
|
|
*/
|
2019-01-15 18:36:09 +00:00
|
|
|
proto.ServerMessage.oneofGroups_ = [[1,2,3,4,5,6,7]];
|
2019-01-11 19:33:44 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @enum {number}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.MsgCase = {
|
|
|
|
MSG_NOT_SET: 0,
|
|
|
|
NEW_SESSION_FAILURE: 1,
|
|
|
|
SESSION_DONE: 2,
|
|
|
|
SESSION_OUTPUT: 3,
|
2019-01-12 19:44:29 +00:00
|
|
|
IDENTIFY_SESSION: 4,
|
|
|
|
EVAL_FAILED: 5,
|
2019-01-15 18:36:09 +00:00
|
|
|
EVAL_DONE: 6,
|
|
|
|
INIT: 7
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return {proto.ServerMessage.MsgCase}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getMsgCase = function() {
|
|
|
|
return /** @type {proto.ServerMessage.MsgCase} */(jspb.Message.computeOneofCase(this, proto.ServerMessage.oneofGroups_[0]));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.ServerMessage.prototype.toObject = function(opt_includeInstance) {
|
|
|
|
return proto.ServerMessage.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.ServerMessage} msg The msg instance to transform.
|
|
|
|
* @return {!Object}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.toObject = function(includeInstance, msg) {
|
|
|
|
var f, obj = {
|
|
|
|
newSessionFailure: (f = msg.getNewSessionFailure()) && command_pb.NewSessionFailureMessage.toObject(includeInstance, f),
|
|
|
|
sessionDone: (f = msg.getSessionDone()) && command_pb.SessionDoneMessage.toObject(includeInstance, f),
|
|
|
|
sessionOutput: (f = msg.getSessionOutput()) && command_pb.SessionOutputMessage.toObject(includeInstance, f),
|
2019-01-12 19:44:29 +00:00
|
|
|
identifySession: (f = msg.getIdentifySession()) && command_pb.IdentifySessionMessage.toObject(includeInstance, f),
|
2019-01-11 19:33:44 +00:00
|
|
|
evalFailed: (f = msg.getEvalFailed()) && node_pb.EvalFailedMessage.toObject(includeInstance, f),
|
2019-01-15 18:36:09 +00:00
|
|
|
evalDone: (f = msg.getEvalDone()) && node_pb.EvalDoneMessage.toObject(includeInstance, f),
|
|
|
|
init: (f = msg.getInit()) && proto.InitMessage.toObject(includeInstance, f)
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
if (includeInstance) {
|
|
|
|
obj.$jspbMessageInstance = msg;
|
|
|
|
}
|
|
|
|
return obj;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deserializes binary data (in protobuf wire format).
|
|
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
|
|
* @return {!proto.ServerMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.deserializeBinary = function(bytes) {
|
|
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
|
|
var msg = new proto.ServerMessage;
|
|
|
|
return proto.ServerMessage.deserializeBinaryFromReader(msg, reader);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
|
|
* given reader into the given message object.
|
|
|
|
* @param {!proto.ServerMessage} msg The message object to deserialize into.
|
|
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
|
|
* @return {!proto.ServerMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.deserializeBinaryFromReader = function(msg, reader) {
|
|
|
|
while (reader.nextField()) {
|
|
|
|
if (reader.isEndGroup()) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
var field = reader.getFieldNumber();
|
|
|
|
switch (field) {
|
|
|
|
case 1:
|
|
|
|
var value = new command_pb.NewSessionFailureMessage;
|
|
|
|
reader.readMessage(value,command_pb.NewSessionFailureMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setNewSessionFailure(value);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
var value = new command_pb.SessionDoneMessage;
|
|
|
|
reader.readMessage(value,command_pb.SessionDoneMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setSessionDone(value);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
var value = new command_pb.SessionOutputMessage;
|
|
|
|
reader.readMessage(value,command_pb.SessionOutputMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setSessionOutput(value);
|
|
|
|
break;
|
|
|
|
case 4:
|
2019-01-12 19:44:29 +00:00
|
|
|
var value = new command_pb.IdentifySessionMessage;
|
|
|
|
reader.readMessage(value,command_pb.IdentifySessionMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setIdentifySession(value);
|
|
|
|
break;
|
|
|
|
case 5:
|
2019-01-11 19:33:44 +00:00
|
|
|
var value = new node_pb.EvalFailedMessage;
|
|
|
|
reader.readMessage(value,node_pb.EvalFailedMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setEvalFailed(value);
|
|
|
|
break;
|
2019-01-12 19:44:29 +00:00
|
|
|
case 6:
|
2019-01-11 19:33:44 +00:00
|
|
|
var value = new node_pb.EvalDoneMessage;
|
|
|
|
reader.readMessage(value,node_pb.EvalDoneMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setEvalDone(value);
|
|
|
|
break;
|
2019-01-15 18:36:09 +00:00
|
|
|
case 7:
|
|
|
|
var value = new proto.InitMessage;
|
|
|
|
reader.readMessage(value,proto.InitMessage.deserializeBinaryFromReader);
|
|
|
|
msg.setInit(value);
|
|
|
|
break;
|
2019-01-11 19:33:44 +00:00
|
|
|
default:
|
|
|
|
reader.skipField();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return msg;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class method variant: serializes the given message to binary data
|
|
|
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
|
|
* @param {!proto.ServerMessage} message
|
|
|
|
* @param {!jspb.BinaryWriter} writer
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.serializeBinaryToWriter = function(message, writer) {
|
|
|
|
message.serializeBinaryToWriter(writer);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
|
|
* @return {!Uint8Array}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.serializeBinary = function() {
|
|
|
|
var writer = new jspb.BinaryWriter();
|
|
|
|
this.serializeBinaryToWriter(writer);
|
|
|
|
return writer.getResultBuffer();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the message to binary data (in protobuf wire format),
|
|
|
|
* writing to the given BinaryWriter.
|
|
|
|
* @param {!jspb.BinaryWriter} writer
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.serializeBinaryToWriter = function (writer) {
|
|
|
|
var f = undefined;
|
|
|
|
f = this.getNewSessionFailure();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
1,
|
|
|
|
f,
|
|
|
|
command_pb.NewSessionFailureMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getSessionDone();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
2,
|
|
|
|
f,
|
|
|
|
command_pb.SessionDoneMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getSessionOutput();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
3,
|
|
|
|
f,
|
|
|
|
command_pb.SessionOutputMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
2019-01-12 19:44:29 +00:00
|
|
|
f = this.getIdentifySession();
|
2019-01-11 19:33:44 +00:00
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
4,
|
|
|
|
f,
|
2019-01-12 19:44:29 +00:00
|
|
|
command_pb.IdentifySessionMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getEvalFailed();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
5,
|
|
|
|
f,
|
2019-01-11 19:33:44 +00:00
|
|
|
node_pb.EvalFailedMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getEvalDone();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
2019-01-12 19:44:29 +00:00
|
|
|
6,
|
2019-01-11 19:33:44 +00:00
|
|
|
f,
|
|
|
|
node_pb.EvalDoneMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
2019-01-15 18:36:09 +00:00
|
|
|
f = this.getInit();
|
|
|
|
if (f != null) {
|
|
|
|
writer.writeMessage(
|
|
|
|
7,
|
|
|
|
f,
|
|
|
|
proto.InitMessage.serializeBinaryToWriter
|
|
|
|
);
|
|
|
|
}
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a deep clone of this proto. No data is shared with the original.
|
|
|
|
* @return {!proto.ServerMessage} The clone.
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.cloneMessage = function() {
|
|
|
|
return /** @type {!proto.ServerMessage} */ (jspb.Message.cloneMessage(this));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional NewSessionFailureMessage new_session_failure = 1;
|
|
|
|
* @return {proto.NewSessionFailureMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getNewSessionFailure = function() {
|
|
|
|
return /** @type{proto.NewSessionFailureMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.NewSessionFailureMessage, 1));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.NewSessionFailureMessage|undefined} value */
|
|
|
|
proto.ServerMessage.prototype.setNewSessionFailure = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 1, proto.ServerMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ServerMessage.prototype.clearNewSessionFailure = function() {
|
|
|
|
this.setNewSessionFailure(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.hasNewSessionFailure = function() {
|
|
|
|
return jspb.Message.getField(this, 1) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional SessionDoneMessage session_done = 2;
|
|
|
|
* @return {proto.SessionDoneMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getSessionDone = function() {
|
|
|
|
return /** @type{proto.SessionDoneMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.SessionDoneMessage, 2));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.SessionDoneMessage|undefined} value */
|
|
|
|
proto.ServerMessage.prototype.setSessionDone = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 2, proto.ServerMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ServerMessage.prototype.clearSessionDone = function() {
|
|
|
|
this.setSessionDone(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.hasSessionDone = function() {
|
|
|
|
return jspb.Message.getField(this, 2) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional SessionOutputMessage session_output = 3;
|
|
|
|
* @return {proto.SessionOutputMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getSessionOutput = function() {
|
|
|
|
return /** @type{proto.SessionOutputMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.SessionOutputMessage, 3));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.SessionOutputMessage|undefined} value */
|
|
|
|
proto.ServerMessage.prototype.setSessionOutput = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 3, proto.ServerMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ServerMessage.prototype.clearSessionOutput = function() {
|
|
|
|
this.setSessionOutput(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.hasSessionOutput = function() {
|
|
|
|
return jspb.Message.getField(this, 3) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2019-01-12 19:44:29 +00:00
|
|
|
* optional IdentifySessionMessage identify_session = 4;
|
|
|
|
* @return {proto.IdentifySessionMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getIdentifySession = function() {
|
|
|
|
return /** @type{proto.IdentifySessionMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, command_pb.IdentifySessionMessage, 4));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.IdentifySessionMessage|undefined} value */
|
|
|
|
proto.ServerMessage.prototype.setIdentifySession = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 4, proto.ServerMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ServerMessage.prototype.clearIdentifySession = function() {
|
|
|
|
this.setIdentifySession(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.hasIdentifySession = function() {
|
|
|
|
return jspb.Message.getField(this, 4) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional EvalFailedMessage eval_failed = 5;
|
2019-01-11 19:33:44 +00:00
|
|
|
* @return {proto.EvalFailedMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getEvalFailed = function() {
|
|
|
|
return /** @type{proto.EvalFailedMessage} */ (
|
2019-01-12 19:44:29 +00:00
|
|
|
jspb.Message.getWrapperField(this, node_pb.EvalFailedMessage, 5));
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.EvalFailedMessage|undefined} value */
|
|
|
|
proto.ServerMessage.prototype.setEvalFailed = function(value) {
|
2019-01-12 19:44:29 +00:00
|
|
|
jspb.Message.setOneofWrapperField(this, 5, proto.ServerMessage.oneofGroups_[0], value);
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ServerMessage.prototype.clearEvalFailed = function() {
|
|
|
|
this.setEvalFailed(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.hasEvalFailed = function() {
|
2019-01-12 19:44:29 +00:00
|
|
|
return jspb.Message.getField(this, 5) != null;
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2019-01-12 19:44:29 +00:00
|
|
|
* optional EvalDoneMessage eval_done = 6;
|
2019-01-11 19:33:44 +00:00
|
|
|
* @return {proto.EvalDoneMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getEvalDone = function() {
|
|
|
|
return /** @type{proto.EvalDoneMessage} */ (
|
2019-01-12 19:44:29 +00:00
|
|
|
jspb.Message.getWrapperField(this, node_pb.EvalDoneMessage, 6));
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.EvalDoneMessage|undefined} value */
|
|
|
|
proto.ServerMessage.prototype.setEvalDone = function(value) {
|
2019-01-12 19:44:29 +00:00
|
|
|
jspb.Message.setOneofWrapperField(this, 6, proto.ServerMessage.oneofGroups_[0], value);
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ServerMessage.prototype.clearEvalDone = function() {
|
|
|
|
this.setEvalDone(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.hasEvalDone = function() {
|
2019-01-12 19:44:29 +00:00
|
|
|
return jspb.Message.getField(this, 6) != null;
|
2019-01-11 19:33:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-01-15 18:36:09 +00:00
|
|
|
/**
|
|
|
|
* optional InitMessage init = 7;
|
|
|
|
* @return {proto.InitMessage}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.getInit = function() {
|
|
|
|
return /** @type{proto.InitMessage} */ (
|
|
|
|
jspb.Message.getWrapperField(this, proto.InitMessage, 7));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {proto.InitMessage|undefined} value */
|
|
|
|
proto.ServerMessage.prototype.setInit = function(value) {
|
|
|
|
jspb.Message.setOneofWrapperField(this, 7, proto.ServerMessage.oneofGroups_[0], value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto.ServerMessage.prototype.clearInit = function() {
|
|
|
|
this.setInit(undefined);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns whether this field is set.
|
|
|
|
* @return{!boolean}
|
|
|
|
*/
|
|
|
|
proto.ServerMessage.prototype.hasInit = function() {
|
|
|
|
return jspb.Message.getField(this, 7) != null;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.InitMessage = function(opt_data) {
|
|
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
|
|
};
|
|
|
|
goog.inherits(proto.InitMessage, jspb.Message);
|
|
|
|
if (goog.DEBUG && !COMPILED) {
|
|
|
|
proto.InitMessage.displayName = 'proto.InitMessage';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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.InitMessage.prototype.toObject = function(opt_includeInstance) {
|
|
|
|
return proto.InitMessage.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.InitMessage} msg The msg instance to transform.
|
|
|
|
* @return {!Object}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.toObject = function(includeInstance, msg) {
|
|
|
|
var f, obj = {
|
|
|
|
homeDirectory: msg.getHomeDirectory(),
|
|
|
|
tmpDirectory: msg.getTmpDirectory(),
|
|
|
|
dataDirectory: msg.getDataDirectory(),
|
|
|
|
workingDirectory: msg.getWorkingDirectory(),
|
|
|
|
operatingSystem: msg.getOperatingSystem()
|
|
|
|
};
|
|
|
|
|
|
|
|
if (includeInstance) {
|
|
|
|
obj.$jspbMessageInstance = msg;
|
|
|
|
}
|
|
|
|
return obj;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deserializes binary data (in protobuf wire format).
|
|
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
|
|
* @return {!proto.InitMessage}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.deserializeBinary = function(bytes) {
|
|
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
|
|
var msg = new proto.InitMessage;
|
|
|
|
return proto.InitMessage.deserializeBinaryFromReader(msg, reader);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
|
|
* given reader into the given message object.
|
|
|
|
* @param {!proto.InitMessage} msg The message object to deserialize into.
|
|
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
|
|
* @return {!proto.InitMessage}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.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.setHomeDirectory(value);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
var value = /** @type {string} */ (reader.readString());
|
|
|
|
msg.setTmpDirectory(value);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
var value = /** @type {string} */ (reader.readString());
|
|
|
|
msg.setDataDirectory(value);
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
var value = /** @type {string} */ (reader.readString());
|
|
|
|
msg.setWorkingDirectory(value);
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
var value = /** @type {!proto.InitMessage.OperatingSystem} */ (reader.readEnum());
|
|
|
|
msg.setOperatingSystem(value);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
reader.skipField();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return msg;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class method variant: serializes the given message to binary data
|
|
|
|
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
|
|
* @param {!proto.InitMessage} message
|
|
|
|
* @param {!jspb.BinaryWriter} writer
|
|
|
|
*/
|
|
|
|
proto.InitMessage.serializeBinaryToWriter = function(message, writer) {
|
|
|
|
message.serializeBinaryToWriter(writer);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
|
|
* @return {!Uint8Array}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.serializeBinary = function() {
|
|
|
|
var writer = new jspb.BinaryWriter();
|
|
|
|
this.serializeBinaryToWriter(writer);
|
|
|
|
return writer.getResultBuffer();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Serializes the message to binary data (in protobuf wire format),
|
|
|
|
* writing to the given BinaryWriter.
|
|
|
|
* @param {!jspb.BinaryWriter} writer
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.serializeBinaryToWriter = function (writer) {
|
|
|
|
var f = undefined;
|
|
|
|
f = this.getHomeDirectory();
|
|
|
|
if (f.length > 0) {
|
|
|
|
writer.writeString(
|
|
|
|
1,
|
|
|
|
f
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getTmpDirectory();
|
|
|
|
if (f.length > 0) {
|
|
|
|
writer.writeString(
|
|
|
|
2,
|
|
|
|
f
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getDataDirectory();
|
|
|
|
if (f.length > 0) {
|
|
|
|
writer.writeString(
|
|
|
|
3,
|
|
|
|
f
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getWorkingDirectory();
|
|
|
|
if (f.length > 0) {
|
|
|
|
writer.writeString(
|
|
|
|
4,
|
|
|
|
f
|
|
|
|
);
|
|
|
|
}
|
|
|
|
f = this.getOperatingSystem();
|
|
|
|
if (f !== 0.0) {
|
|
|
|
writer.writeEnum(
|
|
|
|
5,
|
|
|
|
f
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a deep clone of this proto. No data is shared with the original.
|
|
|
|
* @return {!proto.InitMessage} The clone.
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.cloneMessage = function() {
|
|
|
|
return /** @type {!proto.InitMessage} */ (jspb.Message.cloneMessage(this));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional string home_directory = 1;
|
|
|
|
* @return {string}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.getHomeDirectory = function() {
|
|
|
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, ""));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {string} value */
|
|
|
|
proto.InitMessage.prototype.setHomeDirectory = function(value) {
|
|
|
|
jspb.Message.setField(this, 1, value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional string tmp_directory = 2;
|
|
|
|
* @return {string}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.getTmpDirectory = function() {
|
|
|
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {string} value */
|
|
|
|
proto.InitMessage.prototype.setTmpDirectory = function(value) {
|
|
|
|
jspb.Message.setField(this, 2, value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional string data_directory = 3;
|
|
|
|
* @return {string}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.getDataDirectory = function() {
|
|
|
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, ""));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {string} value */
|
|
|
|
proto.InitMessage.prototype.setDataDirectory = function(value) {
|
|
|
|
jspb.Message.setField(this, 3, value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional string working_directory = 4;
|
|
|
|
* @return {string}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.getWorkingDirectory = function() {
|
|
|
|
return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {string} value */
|
|
|
|
proto.InitMessage.prototype.setWorkingDirectory = function(value) {
|
|
|
|
jspb.Message.setField(this, 4, value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* optional OperatingSystem operating_system = 5;
|
|
|
|
* @return {!proto.InitMessage.OperatingSystem}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.prototype.getOperatingSystem = function() {
|
|
|
|
return /** @type {!proto.InitMessage.OperatingSystem} */ (jspb.Message.getFieldProto3(this, 5, 0));
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** @param {!proto.InitMessage.OperatingSystem} value */
|
|
|
|
proto.InitMessage.prototype.setOperatingSystem = function(value) {
|
|
|
|
jspb.Message.setField(this, 5, value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @enum {number}
|
|
|
|
*/
|
|
|
|
proto.InitMessage.OperatingSystem = {
|
|
|
|
WINDOWS: 0,
|
|
|
|
LINUX: 1,
|
|
|
|
MAC: 2
|
|
|
|
};
|
|
|
|
|
2019-01-11 19:33:44 +00:00
|
|
|
goog.object.extend(exports, proto);
|